# For each 'flat' command a pair of flat field images are acquired # # In the configuration file the format for a flat command is # flat signal # where signal is the desired acquired signal level in e-/pixel # # FLAT_WL is used to determine what wavelength will be used for illumination # ############################################################################### from lsst.testbench.bench import Bench import eolib B = Bench() B.register("PhD") B.register("cornerstone") B.register("QTH") B.register("lakeshore1") # this registers the REB and BSS import lsst.testbench.scripts.ccd.functions # this requires the ccd.functions import lsst.testbench.scripts.eotest.common def eoflat(self, acqcfgfile, CCDID):
# ! /usr/bin/env python # # LSST # # On-line and off-line analysis of CCD images produced on the bench. # from lsst.testbench.bench import Bench B = Bench() # singleton B.register('ds9') # USAGE #from lsst.testbench.bench import Bench #B = Bench() #import lsst.testbench.scripts.ccd.analysis # from file: #B.display_file('/Users/nayman/Documents/LSST-CCD/Setups/REB1-new/100-00_ptc_flat_00010_2_20150601155652.fits') # from HDUlist: #import astropy.io.fits as pyfits #s2 = pyfits.open('/Users/nayman/Documents/REB/REB3/LPNHEtest/20151014/0x0020151014134249.fits') #s2[0].header['width'] = 256 #s2[0].header['height'] = 1000 #s2[0].header['detsize'] = '[1:6144,1:2000]' #B.display_hdu(s2) # WRAPPERS
# to create FITS HDU object i = B.conv_to_fits() #to have only channels 4 and 5: i = B.conv_to_fits([4,5]) # to save FITS HDU with headers B.save_to_fits(i, m) # between exposures TO BE TESTED p = B.reb.start_waiting_sequence() B.reb.stop_waiting_sequence(p) # when finished B.shutdown_CCD() B.register('laser') B.laser.select(2) B.laser.setCurrent(2,45.0) B.laser.enable() B.laser.disable() B.register("PhD") B.PhD.setup_current_measurements(2e-6) B.PhD.read_measurement() B.register('lakeshore1') # to recover REB object after Python reboot without reloading the whole sequencer from lsst.testbench.bench import Bench
# # Basic functions to test the REB only. # Replicates a lot from ccd.functions to test the functions before plugging the CCD in. # Could split this into tests and REB functions, use REB functions in both ccd.functions and in linearity test. import os import time import datetime import astropy.io.fits as pyfits from lsst.testbench.bench import Bench from lsst.testbench.scripts.ccd.analysis import * B = Bench() # singleton B.register('reb') # connect to the REB B.register('attenuator') B.register('Vkeithley') B.Vkeithley.setup(1) #load_sequencer(self, filename=None): # B.reb.load_sequencer(filename) # def initialize_REB(self): #B.reb.REBpowerup() # def shutdown_REB(self): # B.reb.REBshutdown() # def powerup_CCD(self):