Example #1
0
 def test_read_cosmics(self):
     #- hardcoded cosmics version
     infile = os.getenv('DESI_ROOT') + \
         '/spectro/templates/cosmics/v0.2/cosmics-bias-r.fits'
         
     shape = (10, 11)
     c1 = io.read_cosmics(infile, expid=0, shape=shape, jitter=True)
     self.assertEqual(c1.pix.shape, shape)
     c2 = io.read_cosmics(infile, expid=0, shape=shape, jitter=False)
     self.assertEqual(c2.pix.shape, shape)
     #- A different exposure should return different cosmics
     c3 = io.read_cosmics(infile, expid=1, shape=shape, jitter=False)
     self.assertTrue(np.any(c2.pix != c3.pix))
Example #2
0
    def test_read_cosmics(self):
        #- hardcoded cosmics version
        infile = (os.environ['DESI_ROOT'] +
                  '/spectro/templates/cosmics/v0.2/cosmics-bias-r.fits')

        shape = (10, 11)
        c1 = io.read_cosmics(infile, expid=0, shape=shape, jitter=True)
        self.assertEqual(c1.pix.shape, shape)
        c2 = io.read_cosmics(infile, expid=0, shape=shape, jitter=False)
        self.assertEqual(c2.pix.shape, shape)
        #- A different exposure should return different cosmics
        c3 = io.read_cosmics(infile, expid=1, shape=shape, jitter=False)
        self.assertTrue(np.any(c2.pix != c3.pix))