EBZ/CED July 1999 FLAT FIELD BACKUPS & LOADS -------------------------- * Take an EGSE .src file and transform it to a background .bkg file using make_loads: make_loads -when='', -window='' ... The make_loads routine will repeatedly call make_load to transform all of the s you specify. (You can and should use globbing -- i.e. say make_loads -when="28-Jul-1999 12:00" -window="7 days" flat17*.src to transform all of the flat17 files to background queue files to be loaded in the week after this document was written. There are 688 commands per file and 64 files in the flat field /mdisw/cfl/flat has several versions and each file uploads about 15 rasters (horizontal line scan) - mostly dep memory loads. Each patch of flat field gets loaded to a dep memory buffer, and then transferred to the IP's page 10 via the serial line connection inside MDI. When the new flat field is completely finished loading, we check it and transfer it over to page 12. To check the progress of the flat field, run the "IP dumps" campaign that dumps down the contents of all the IP pages over a few minute interval. Don't ftp files over in NRT - coordinate with the SOC and sent them in small chunks. To ftp - use toolchest or $ta/mdi_ftp_mgr or /mdisw/egse_v5.2/tasks/mdi_ftp_mgr BACKUPS: (EBZ Dec 25 1996 from e-mail by Mons Morrison Dec 11 1996) I decided to write an IP program to make the flat field backups and to do the restoring. The design is the following 1. CAM_DO_FF_BACK: Copies from page 12 out to all of the 9 pages. The framelist is "obs_obs_detune2b" which always goes to page 0. The copying is done every frame (10 times) for one minute. It then does what CAM_DO_FF_REST1 does (restores to page 10 and dumps 4 pages over 8 minutes). 2. CAM_DO_FF_REST1: Copies from the 4 primary backup pages into page 10. It then runs the PAGE_DUMP IP program for 8 minutes so that page 10 is dumped and can be verified. 3. CAM_DO_FF_REST2: Copies from the 4 double backup pages into page 10. It also runs PAGE_DUMP. We'd need two new control files. I) COPYFF10TO12 - copies from the offset location 0x20000 in page 10 into page 12. II) COPYFF10TO10 - copies from 10 into 17 and then back into 10 with a zero offset. This allows us to use the existing LD_FF1*_V03 flat field load files to patch any problem pieces. The procedure for flat field backups would be: 0. Look at the current real-time LOI images. If they look good, then the flat field in page 12 is ok and can be written out to the backup pages. 1. During VC2, run CAM New Addr/Flag and run CAM_DO_FF_BACK. It will automatically do a restore into page 10 and dump the contents to verify the backup. Probably have the chain address set to whatever you want to continue into. The procedure for flat field recovery would be 0. Clear the campaign flag -- run dynamics. This is needed so that the flat field stored in page 10 is not clobbered. Also set the terminate campaign upon completion flag. 1. Run CAM_DO_FF_REST1 2. Look at the dump data for page 10. 3a. If all looks good, run COPYFF10TO12 (_V03?) [offset 0x20000 to 0] 3b. If all does not look good, then 4. Run CAM_DO_FF_REST2 5. Look at the dump data for page 10. 6a. If all looks good, run COPYFF10TO12 (_V03?) [offset 0x20000 to 0] 6b. If all does not look good, then 7. Run COPYFF10TO10 8. By NRT or BCK, load the required LD_FF1* files 9. Run COPYFF10TO12 (_V02) - [offset 0 to 0] We would run CAM_DO_FF_REST1 once a month to check the quality of the flat field. We may run CAM_DO_FF_BACK once a month too to re-distribute the flat field and overwrite all of the single and double bit errors. The IP queue program and register setting control files are shown below. Test verification was done by loading the full flat field on the SIM and doing the tests. Since page 18/19 were missing, 96 lines + 2 other lines were missing in the reconstruction in page 10. Structure was not writing into those pages so there should be no interference. I also checked the SCI5K data and it looked fine (as fine as I could tell with structure running with dark frames). Mons ---------------------------------------------------------------- ; ; ; IP programs to make the flat field backup and restore ; ; FF_BACK: Saves the following lines to the following pages ; ; Lines 0-95 ( 96) Page 13 13:0x100800 (#) ; Lines 96-191 ( 96) Page 15 15:0x100800 ; Lines 192-287 ( 96) Page 17 17:0x100800 ; Lines 287-383 ( 96) Page 18 18:0x100800 ; Lines 384-1023 (640) Page 10 10:0x080000 (&) ; ; Double Backup ; ; Lines 400-499 (100) Page 0 0:0x107000 (*) ; Lines 500-599 (100) Page 1 1:0x107000 ; Lines 600-699 (100) Page 2 2:0x107000 ; Lines 700-799 (100) Page 3 3:0x107000 ; ; (&) Binning page so 1024x512 which ends at 0x080000 ; (*) A 1040*1032 image + 1300 word header ends at 0x106594 ; (#) A 1024*1024 image + 1830 word header ends at 0x100726 ; ; FF_REST1: Restores to page 10 assuming 640 lines in page 10 ; are in tact. ; ; FF_REST2: Restores the double backup 640 lines from other ; pages. Restores to page 10. ; ; QPROG_FF_BACK:: _MOVBLKI $IPRL_FF_BACK_MD1 _MOVBLKI $IPRL_FF_BACK_MD2 _MOVBLKI $IPRL_FF_BACK_MD3 _MOVBLKI $IPRL_FF_BACK_MD4 _MOVBLKI $IPRL_FF_BACK_M1 _MOVBLKI $IPRL_FF_BACK_M2 _MOVBLKI $IPRL_FF_BACK_M3 _MOVBLKI $IPRL_FF_BACK_M4 _MOVBLKI $IPRL_FF_BACK_M5 END QPROG_FF_REST1:: _MOVBLKI $IPRL_FF_REST_M1 _MOVBLKI $IPRL_FF_REST_M2 _MOVBLKI $IPRL_FF_REST_M3 _MOVBLKI $IPRL_FF_REST_M4 END QPROG_FF_REST2:: _MOVBLKI $IPRL_FF_REST_MD1 _MOVBLKI $IPRL_FF_REST_MD2 _MOVBLKI $IPRL_FF_REST_MD3 _MOVBLKI $IPRL_FF_REST_MD4 END ---------------------------------------------------------------- ; FILE: cam_reg60.reg ; PURPOSE: To set the registers to be used ; HISTORY: ; Created 9-Dec-96 by M.Morrison ; 11-Dec-96 (MDM) - Corrected incorrect address ; ; Label Instr Reg Class # Values ; Area words ;-------------------- ------ ---- ---- ----- ---------------------------------------------------------------------------------- IPRL_FF_BACK_M1 -- A1 IPRL 6 12:0x00000 13:0x100800 0x18000L ;Lines 0-95 IPRL_FF_BACK_M2 -- A1 IPRL 6 12:0x18000 15:0x100800 0x18000L ;Lines 96-191 IPRL_FF_BACK_M3 -- A1 IPRL 6 12:0x30000 17:0x100800 0x18000L ;Lines 192-287 IPRL_FF_BACK_M4 -- A1 IPRL 6 12:0x48000 18:0x100800 0x18000L ;Lines 287-383 IPRL_FF_BACK_M5 -- A1 IPRL 6 12:0x60000 10:0x080000 0xa0000L ;Lines 384-1023 IPRL_FF_BACK_MD1 -- A1 IPRL 6 12:0x64000 0:0x107000 0x19000L ;Lines 400-499 IPRL_FF_BACK_MD2 -- A1 IPRL 6 12:0x7d000 1:0x107000 0x19000L ;Lines 500-599 IPRL_FF_BACK_MD3 -- A1 IPRL 6 12:0x96000 2:0x107000 0x19000L ;Lines 600-699 IPRL_FF_BACK_MD4 -- A1 IPRL 6 12:0xaf000 3:0x107000 0x19000L ;Lines 700-799 ; ; Destination offsets in page 10 are shifted forward 0x20000 so that 1024x1024 is at end of the page. ; IPRL_FF_REST_M1 -- A1 IPRL 6 13:0x100800 10:0x20000 0x18000L ;Lines 0-95 IPRL_FF_REST_M2 -- A1 IPRL 6 15:0x100800 10:0x38000 0x18000L ;Lines 96-191 IPRL_FF_REST_M3 -- A1 IPRL 6 17:0x100800 10:0x50000 0x18000L ;Lines 192-287 IPRL_FF_REST_M4 -- A1 IPRL 6 18:0x100800 10:0x68000 0x18000L ;Lines 287-383 IPRL_FF_REST_MD1 -- A1 IPRL 6 0:0x107000 10:0x84000 0x19000L ;Lines 400-499 IPRL_FF_REST_MD2 -- A1 IPRL 6 1:0x107000 10:0x9d000 0x19000L ;Lines 500-599 IPRL_FF_REST_MD3 -- A1 IPRL 6 2:0x107000 10:0xb6000 0x19000L ;Lines 600-699 IPRL_FF_REST_MD4 -- A1 IPRL 6 3:0x107000 10:0xcf000 0x19000L ;Lines 700-799 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LOADS: (EBZ 25 Dec 96 - from e-mail by Mons Morrison 14 Nov 96) The procedure for the flat field recovery is pretty well established and somewhat involved. Here are the steps and I'll issue a instances to cover all the first two steps. 1. Finish the 75 pixel patch (today it got 72 of 75 blocks done) (perf mk_ff10_patch_v02) 2. Prepare page 10 for loading 2.0. No campaigns except CAM_VC2_OBS and PAGE_DUMP should be run after the load process is started. Actually the "Terminate Campaign Upon Completion" flag should be set for the dynamics period anyway. 2.1. "perf q_cam_vc2_obs_v09" to load a new CAM_VC2_OBS campaign which does not do any binning dataproducts (removed FD_M1_V2) 2.2. "perf seq_options_v??" and set chain address to addr 408 (page dump). This protects against running a campaign which would clobber page 10. 2.3. "perf q_enable_4dumps_v01" to modify the page dump list to dump page 10. 2.4. "perf seq_options_v??" and run campaign PAGE_DUMP for 10 minutes in VC2. Let the campaign run through step 2.5 2.5. "perf q_copyff10to10_v01" to move 640 lines of FF from the end of the page to the proper location. 2.6. Let PAGE_DUMP run for 10 minutes after 2.4 2.7. Clear the cam flag (Dynamics can start) 3. The following lines need to be reloaded by background queue from the /mdisw/cfl/flat/src directory, all _v03 file versions. Lines 0-192 (12 files) Lines 832-1023 (12 files) Lines 703-717 ( 2 files) 4. We'll need to dump the pages after the dynamic period is over and probably patch some pixels (since the page is not being purged) 5. Copy the FF from page 10 to page 12 (perf copyff10to12) using COPYTAB instruction. FF is in place and structure is using it. 6. Copy the 640 backup lines from page 12 to 10 (copyff12to10)