示例#1
0
   sci_frames = all_frames
   outroot    = '1131_Ks'
   ccdbfile   = 'ccmap_final.txt'
   skybpm     = 'bpm_from_sky.fits'

""" 
Do the nonlinearity correction and create the sky file as the first pass 
"""
if redpass=='calib_1':
   niri.calib_1(sci_frames,rawroot,outroot,bpmfile,rawdir)

""" Calibrate the science frames """
if redpass=='calib_2':
   print ""
   skyfile  = '%s_sky.fits' % outroot
   niri.reduce_sci(sci_frames,outroot,skyfile,flatfile)

""" Make the bad pixel mask from the calibrated science frames """
if redpass=='calib_3':
   if skybpm is not None:
      niri.niri_bpm_from_sky(sci_frames,skybpm,outsky='sky_from_ff.fits')
   else:
      print ""
      print "*** No bad pixel mask requested for this set of input files ***"
      print ""

""" 
Prepare the files for running SExtractor
 The input files will be called ff*fits
 The output files will be called fp*fits
"""
示例#2
0
      fullnames.append('%s_%d' % (t4obsdate,i))
else:
   for i in sci_frames:
      fullnames.append('%s_%d' % (obsdate,i))

""" 
Do the nonlinearity correction and Create the sky file as the first pass 
"""
if redpass=='make_sky':
   niri.calib_1(sci_frames,rawroot,outroot,bpmfile,rawdir,obsdate)

""" Do the final calibration and make the SExtractor catalogs """
if redpass=='final_calib':
   print ""
   skyfile  = '%s_sky.fits' % outroot
   niri.reduce_sci(fullnames,outroot,skyfile,flatfile)
   if skybpm is not None:
      niri.niri_bpm_from_sky(fullnames,skybpm)

""" Make the SExtractor catalogs """
if redpass=='make_cats':
   ff_files = []
   for i in fullnames:
      ff_files.append('ff%s.fits' % i)
   niri.niri_sextractor(ff_files,tilebpm,fixpix=True,catformat='ascii')

"""
Redo the astrometry of all the individual input files onto the full grid
now that we have created it, and then do the final coadd.
"""