Ejemplo n.º 1
0
 def makeImageStack(self,imageStackFilename='',dt=30,wvlStart=None,wvlStop=None,
                        weighted=True, fluxWeighted=False, getRawCount=False, 
                        scaleByEffInt=True, deadTime=100.e-6, filterName = None):
     '''
     This function makes an image stack using the ObsFileSeq class
     
     Inputs:
         imageStackFilename - full path of file.
                            - An empty string means use the default location using self.path and self.fileID
         dt - the maximum number of seconds for one frame 
         keywords for image
     '''
     tsl = []
     for day_i in range(len(self.params['utcDates'])):
         for tstamp in self.params['obsTimes'][day_i]:
             tsl.append(self.params['utcDates'][day_i]+'-'+tstamp)
     #tsl=tsl[:1]        
     ofs = ObsFileSeq(name=self.targetName,run=self.run,date=self.params['sunsetDates'][0],timeStamps=tsl,dt=dt)
     if imageStackFilename is None or imageStackFilename is '': imageStackFilename = self.path+os.sep+'ImageStacks'+os.sep+'ImageStack_'+self.fileID+'.h5'
     self.im_params, self.im_dict = ofs.loadImageStack(imageStackFilename, wvlStart=wvlStart,wvlStop=wvlStop,
                                                        weighted=weighted, fluxWeighted=fluxWeighted, getRawCount=getRawCount, 
                                                        scaleByEffInt=scaleByEffInt, deadTime=deadTime, filterName=filterName)
     self.imageStackFilename = imageStackFilename
Ejemplo n.º 2
0
"""
Make all the FITS files and the plot location file.
Use this to find the information needed fo ofs2.py
"""
from util.ObsFileSeq import ObsFileSeq
from util.readDict import readDict

d = readDict()
d.read_from_file("mosaic.dict")
name = 'PSN234416a'
dt = 200
ofs = ObsFileSeq(name, d['run'], d['date'], d['timeStampList'], dt)
#ofs.plotLocations(name+".png")
wvMin = 3000
wvMax = 13000
ofs.makeAllFitsFiles(wvMin, wvMax)