; FILE: fltgram_v03.ips ; PURPOSE: To take 9-10 filtergram images over 30 seconds and to downlink them over ; 60 seconds. The formattting options are: ; 1) 4x4 rebin (to 256x256 downlinked image) ; 2) 256x256 extract ; METHOD: ; Input: ; $IPRL_10FLTGRAM_TYPE is set to 1 or 2 ; Pages: ; 0 == all CCD frames are written there ; 1 == the 1024x1024 extract and filterfram header ; 11 & 15 == the stored images (waiting for downlink) ; 18 == (OPTIONALLY) the intermediate 4x4 binning product ; HISTORY: Written 5-Sep-95 by M.Morrison ; 16-Oct-95 (MDM) - Changed callback address label ; - Corrected numerous errors (it hadn't been debugged yet) ; 16-Oct-95 (MDM) - Shifted downlink by 2 frames to avoid conflict with ; the ALT30 downlink from the previous minute ; (during transitions from ALT back to CAM) ; 19-Oct-95 (MDM) - Changed how FLTGRAM_PARAM is used ; 20-Oct-95 (MDM) - Replaced patch which was running 128x128 extract instead ; of the 256x256 ; 24-Oct-95 (MDM) - Modified to do the optional downlink BEFORE making and ; storing the data product for that frame ; 25-Oct-95 (MDM) - Corrected 24-Oct modification ; 17-Nov-95 (MDM) - Modified to use 0x0500 offsets instead of 0x0226 ; 17-Nov-95 (MDM) - Modified to use 0x0226 offsets instead of 0x0500 ; 5-Dec-95 (MDM) - Changed IPCB_10FLTGRAM to be QCB_10FLTGRAM QPROG_FLTGRAM_4X4BIN:: SETREG $IPRL_10FLTGRAM_TYPE 1 GOTO &QPROG_FLTGRAM QPROG_FLTGRAM_EXT256:: SETREG $IPRL_10FLTGRAM_TYPE 2 GOTO &QPROG_FLTGRAM QPROG_FLTGRAM: ;---------------- Optional Downlink Portion OPTIONAL_DL: BRANCHEQ R3072 4 &DL_FRM04 BRANCHEQ R3072 8 &DL_FRM08 GOTO &INCOMING_IMG DL_FRM04: SETREGS $IPRL_DL_PARAM 2 0x7800 0x7804 ;downlink the images taken at frames 1 and 2 CALLQUE $QSR_DL_2PAGE GOTO &INCOMING_IMG DL_FRM08: SETREGS $IPRL_DL_PARAM 2 0x7808 0x780C ;downlink the images taken at frames 3 and 4 CALLQUE $QSR_DL_2PAGE GOTO &INCOMING_IMG ;---------------- The work for this page INCOMING_IMG: BRANCHEQ R3072 1 &FRM01 BRANCHEQ R3072 2 &FRM02 BRANCHEQ R3072 3 &FRM03 BRANCHEQ R3072 4 &FRM04 BRANCHEQ R3072 5 &FRM05 BRANCHEQ R3072 6 &FRM06 BRANCHEQ R3072 7 &FRM07 BRANCHEQ R3072 8 &FRM08 BRANCHEQ R3072 9 &FRM09 BRANCHEQ R3072 10 &FRM10 FRM01: FRM09: COPYRD2D $IPRP_HDECODE_PAGE15 $IPRL_10FLTGRAM_ADDR 3 ;put it into PAGE15-0/FOURTH (0x7800) GOTO &DO_THE_WORK FRM02: FRM10: COPYRD2D $IPRP_HDECODE_PAGE15B $IPRL_10FLTGRAM_ADDR 3 ;put it into PAGE15-1/FOURTH (0x7804) GOTO &DO_THE_WORK FRM03: COPYRD2D $IPRP_HDECODE_PAGE15C $IPRL_10FLTGRAM_ADDR 3 ;put it into PAGE15-2/FOURTH (0x7808) GOTO &DO_THE_WORK FRM04: COPYRD2D $IPRP_HDECODE_PAGE15D $IPRL_10FLTGRAM_ADDR 3 ;put it into PAGE15-3/FOURTH (0x780C) GOTO &DO_THE_WORK FRM05: COPYRD2D $IPRP_HDECODE_PAGE11 $IPRL_10FLTGRAM_ADDR 3 ;put it into PAGE11-0/FOURTH (0x5800) GOTO &DO_THE_WORK FRM06: COPYRD2D $IPRP_HDECODE_PAGE11B $IPRL_10FLTGRAM_ADDR 3 ;put it into PAGE11-1/FOURTH (0x5804) GOTO &DO_THE_WORK FRM07: COPYRD2D $IPRP_HDECODE_PAGE11C $IPRL_10FLTGRAM_ADDR 3 ;put it into PAGE11-2/FOURTH (0x5808) GOTO &DO_THE_WORK FRM08: COPYRD2D $IPRP_HDECODE_PAGE11D $IPRL_10FLTGRAM_ADDR 3 ;put it into PAGE11-3/FOURTH (0x580C) GOTO &DO_THE_WORK DO_THE_WORK: SETREG $IPRL_CB_ADDR &QCB_10FLTGRAM ;set the callback register with the address to go to ;---- Make the filtergram (1024x1024) SETREGS $IPRL_FLTGRAM_PARAM 4 0:0x0000 1:0x0226 ;set source page and destination pages COPYRD2D $IPRL_FLTGRAM_GEN $IPRL_FLTGRAM_PARAM+8 3 ;last three words are n/k, dpc(l), dpc(h) CALLQUE $QSR_MK_FLTGRAM ;---- See what type of formatting to perform BRANCHEQ $IPRL_10FLTGRAM_TYPE 1 &DO_4X4BIN BRANCHEQ $IPRL_10FLTGRAM_TYPE 2 &DO_EXT256 END DO_4X4BIN: SETREGS $IPRL_BIN_PARAM 2 1:0x0226 ;setup source page of the bin COPYRD2D $IPRL_10FLTGRAM_ADDR $IPRL_BIN_PARAM+2 3 ;copy the destination CALLQUE $QSR_FMT_4X4BIN GOTO &DONE DO_EXT256: ;---- Do the extract and saving of the image COPYRD2D $IPRL_EXTRACT_256 $IPRL_EXTRACT_PARAM 6 ;setup the parameters to be used by the extract subroutine SETREGS $IPRL_EXTRACT_INST 2 1:0x0226 ;setup source page of the extract COPYRD2D $IPRL_10FLTGRAM_ADDR $IPRL_EXTRACT_INST+2 3 ;copy the destination CALLQUE $QSR_FMT_EXTRACT ;extract the image GOTO &DONE DONE: END ;----------------------- Start of callback code QCB_10FLTGRAM:: BRANCHEQ R3072 2 &CB_FRM02 BRANCHEQ R3072 6 &CB_FRM06 BRANCHEQ R3072 10 &CB_FRM10 GOTO &QSR_CB_DONE_ADDR CB_FRM02: SETREGS $IPRL_DL_PARAM 2 0x5800 0x5804 ;downlink the images taken at frames 5 and 6 CALLQUE $QSR_DL_2PAGE GOTO &QSR_CB_DONE_ADDR CB_FRM06: SETREGS $IPRL_DL_PARAM 2 0x5808 0x580C ;downlink the images taken at frames 7 and 8 CALLQUE $QSR_DL_2PAGE GOTO &QSR_CB_DONE_ADDR CB_FRM10: SETREGS $IPRL_DL_PARAM 2 0x7800 0x7804 ;downlink the images taken at frames 9 and 10 CALLQUE $QSR_DL_2PAGE SETREG $IPRL_CB_ADDR 0 ;clear the callback register GOTO &QSR_CB_DONE_ADDR END