Пример #1
0
# flat
# Acquire flat image pairs for linearity and gain measurement.
# 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
Пример #2
0
# ! /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
Пример #3
0
from lsst.testbench.bench import Bench
B = Bench()
import lsst.testbench.scripts.ccd.functions

# BEFORE connecting to CCD
B.initialize_REB()
# AFTER connecting to CCD
B.powerup_CCD()
B.reb.set_testtype('TEST')
m = B.execute_reb_sequence('Acquisition', 2)
# to execute again the same sequence :
m = B.execute_reb_sequence()

# 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)
Пример #4
0
#
# LSST
#
# 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()