示例#1
0
 def get_flatimage(self, flat_filename):
     """
     """
     self.flatfile_fullpath = self.calib_path + '/' + flat_filename
     imgc = mf.ReadSPEFile(self.flatfile_fullpath)
     self.calib_cube = imgc.image()
     imgc.close()
示例#2
0
 def get_calibimage(self, calib_filename):
     """
     """
     spefile_fullpath = self.calib_path + '/' + calib_filename
     imgc = mf.ReadSPEFile(spefile_fullpath)
     calib_cube = imgc.image()
     cexptime = imgc.exptime()[1]
     imgc.close()
     return calib_cube, cexptime
示例#3
0
    def __init__(self, imagefile):
        imgf = mf.ReadSPEFile(imagefile)
        self.image_cube = imgf.image()
        self.date = imgf.iso8601date()
        self.lst = imgf.obslst()
        self.utc = imgf.obsutc()
        self.jd = imgf.tojd()
        self.exptime = imgf.exptime()
        self.readout = imgf.readtime()
        self.gain = imgf.gain()
        self.emgain = imgf.avalancegain()
        self.tempc = imgf.temperature()

        imgf.close()
示例#4
0
 def get_dataimage(self, spe_filename):
     """
     """
     spefile_fullpath = self.raw_path + '/' + spe_filename
     imgf = mf.ReadSPEFile(spefile_fullpath)
     data_cube = imgf.image()
     self.date = imgf.iso8601date()
     self.lst = imgf.obslst()
     self.utc = imgf.obsutc()
     self.jd = imgf.tojd()
     self.exptime = imgf.exptime()
     self.readout = imgf.readtime()
     self.gain = imgf.gain()
     self.emgain = imgf.avalancegain()
     self.temperature = imgf.temperature()
     imgf.close()
     return data_cube
示例#5
0
def preview_speimage(spe_filename):
    """Preview SPE image
    """
    temp = mf.ReadSPEFile(spe_filename)

    Exptime = temp.exptime()[1]
    EMgain = temp.avalancegain()[1]
    
    temp_im = temp.avg_red_image()
    
    plt.clf()
    fig = plt.figure(1)
    ax1 = fig.add_subplot(1,1,1)
    vmax = np.amax(temp_im)
    ax1.matshow(temp_im, vmin=0, vmax=vmax, picker=True)
    ax1.set_title('ExpTime: %6.2f, EM Gain: %6d\n' % (Exptime, EMgain))
    fig.canvas.mpl_connect('pick_event', on_press)
    plt.show()
    
    temp.close()