Exemplo n.º 1
0
fileName = '/ScienceData/PAL2014/20140923/obs_20140924-080031.h5'


#  We'll select a pixel in the middle of the target for our examples
col = 18
row = 16


#  first, load the data into an ObsFile object
obs = ObsFile(fileName)
print "Loaded obsFile", fileName


#  if we tried to simply load a filter now, it would fail as we haven't defined our spectrum's binning.
#  Uncomment the following to see the error you would get.
'''
obs.loadFilter()
'''


#  Wavelength bins can be provided during the filter loading, but the easiest way is to
#  just load the flat calibration first, as that sets everything to the binning used for
#  flat cal. This file already has all its calibrations associated
#  with it in /Scratch/calLookup/lookup.h5. If a file doesn't have it's data written into 
#  this table the following will not work and calibrations must be loaded manually.
obs.loadAllCals()
print "Finished loading calibrations"


#  Now when we load a filter it works fine. A call to loadFilter() with no arguments applies
#  a Johnson V filter by default. To see a list of available filters try calling the function