top / prev

# observing system configuration - done at startup


try:

fwheel1 = mechanism('IR:fwheel1?)

fwheel2 = mechanism(?IR:fwheel2')

?

ccd = CCD("IR-EEV42",port3)

...

except InitError:

print "Init failed: call for support"

# eg. mid-end script


# provided as part of the "observing package"

#

# multrun (exposure_time)

#

# take multiple over two set of filters

# filters are moved at beginning of readout

# for time optimization

# exception are not caught -> actionError?s will abort the script

#

def multrun (exp_time):

    for filter1 in ('K-BAND', 'J-BAND', 'CLEAR'):

        for filter2 in ('SHARTMAN-R', 'SHARTMAN-L', 'CLEAR'):

            # expose

ccd.expose(exp_time)                     print "expose CCD started: ",ccd.name,"filter1 = ",filter1,"filter2 = ",filter2

            # wait beginning of readout

ccd.wait_readout ()
print "readout started - move to next setting"
# start move wheels to next setup
fwheel1.move(filter1)fwheel2.move(filter2)
 
# wait all task completed
while fwheel1.busy() || fwheel2.busy() ||. ccd.readingout():

# infinite timeout

pythonCA.pend(0.0)
 

# eg. low-end user script (visiting astronomer)

multrun ( 1.0 )