# File: dofftst.src
#
# Executes procedures to construct and downlink flat field
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/eof/src/dofftst.src"
descr "dofftst - build and test flat field."

display "Executing procedure  doff."

# Set 1st IP vector entry to point to FLTFLD procedure
tcblock  mbipldin 0x154
tcblock  mbipcmd  0x91  0 0x100

# Load Reciprocal Table
tcblock mbiptbl 0 0 0x800a 0
wait time 10 

# Load the queue
perform mk_ff

# Initialize Page 11 as list memory
tcblock mbipldin 0x118 0x5800 144

open decom160

tcblock mbcmhdr1 0x4242 0x4242 0 1 0

display "Take a dark Frame"
tcblock mbcmtp1r 0xffff 0xff15 10000
wait time 110

# tcblock mbipldin 0x152 0x100  ## construct Flat Field data
# wait time 1

display "downlink reciprocal table"
tcblock mbipldin 0x152 0x161  
wait time 5

display "downlink CAL image"
tcblock mbipldin 0x152 0x17D  
wait time 105

display "downlink Flat Field Data"
tcblock mbipldin 0x152 0x199 
wait time 105

display "downlink Bad Pixel Data"
tcblock mbipldin 0x152 0x1BE 
wait time 105

display "downlink Scaled Data"
tcblock mbipldin 0x152 0x1E1  
wait time 105

close decom160

display "Finished procedure dofftst"
return
