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()
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
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()
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
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()