; IP program to construct a magnetogram. ; The program assumes that the camera frames have ; been accumulated as shown; ; Sa (RCP) - Page 0 Sa (LCP) - Page 4 ; Sc (RCP) - Page 1 Sc (LCP) - Page 6 ; ; The mag30 observation accumulates raw camera data as ; shown above. ; ; Successive Magnetograms are saved in pages 11, 15, 17, 18 and 19. ; ; Algorithm: ; ; STEP 1: ; 7: Make LCP Velocity ; 8: Make RCP Velocity ; ; STEP 2: EXTRACT a (LCP) sub-image to provide ; integral shift w.r.t. RCP Velocity image ; ; STEP 3: ; 1: (CallBack) Align LCP-V ; Align RCP-V ; 2: (CallBack) SUM LCP-V and RCP-V ; Add result to Accumulator ; If Accumulation Completed, ; Do Setup for next MAG ; ; STEP 4: For Hi-Res apply FD Cropping ; ;----------------------------------------------------------------------- ; ; DOMAG30: ; GOTOREG R3016 CALLQUE &INITMAG SETREG R3016 &MAGVECT ; MAGVECT: BRANCHEQ R3072 0x0007 &L_VEL BRANCHEQ R3072 0x0008 &R_VEL END ; ;....................................................... ; L_VEL: _VLCTY $IPRL_MAG_LVEL END ; ;....................................................... ; R_VEL: _VLCTY $IPRL_MAG_RVEL HRDINIT $IPRL_MAG_HDR ; ;....................................................... ; Align Velocities ; ALIGN_VEL: COPYREG R96 $IPRL_MAG_VPIXALGN COPYREG R97 $IPRL_MAG_VPIXALGN+1 _EXTRACT $IPRL_MAG_VPIXALGN ; Effect integral pixel shift by ;_extracting L_Vel with offset ; COPYREG R98 $IPRL_MAG_XALGN_RV+5 COPYREG R99 $IPRL_MAG_YALGN_RV+5 REGNEG $IPRL_MAG_XALGN_RV+5 $IPRL_MAG_XALGN_RV+5 $IPRL_MAG_XALGN_LV+5 REGNEG $IPRL_MAG_YALGN_RV+5 $IPRL_MAG_XALGN_RV+5 $IPRL_MAG_YALGN_LV+5 _XALIGN $IPRL_MAG_XALGN_RV ; Fractional Pixel Alignment ; COPYRD2D $IPRL_MAG_YALGN_RV $IPRL_MAG_ALGNWRK $#IPRL_MAG_ALGNWRK YALIGN $IPRL_MAG_ALGNWRK YALIGN $IPRL_MAG_ALGNWRK YALIGN $IPRL_MAG_ALGNWRK YALIGN $IPRL_MAG_ALGNWRK ; _XALIGN $IPRL_MAG_XALGN_LV ; COPYRD2D $IPRL_MAG_YALGN_LV $IPRL_MAG_ALGNWRK $#IPRL_MAG_ALGNWRK YALIGN $IPRL_MAG_ALGNWRK YALIGN $IPRL_MAG_ALGNWRK YALIGN $IPRL_MAG_ALGNWRK YALIGN $IPRL_MAG_ALGNWRK ; ; ;....................................................... ; Accumulate Magnetogram ; PROC_MAG: _SCALESUM $IPRL_MAG_GENMAG ; newMAG = RCP_VEL - LCP_VEL ; BRANCHNE $IPRF_STR_CF 0 &MAG160KDL ; Campaign Mode BRANCHIF $IPRL_STR_VC &ACCMAG ; No 160K-> Accumulate Mag BRANCHIF $IPRL_STR_MAGHR &MAG5KDL ; 160k d/l disabled -> acc. mag ; ; High Rate Downlink MAG160KDL: SETREGS R512 6 18:0x00001 0x4000 0xe5 0 0xff28 COPYREG $IPRL_MAG_HDR+4 R516 HRDINIT R512 SETREGS $IPRL_MAG_MVDL 6 5:0x00000 8:0x00226 0x100000L MOVBLKI $IPRL_MAG_MVDL SETREGS R518 2 0x100000L START1HR 0x01 0x4000 R518 END ; ; MAG5KDL: ; ; Accumulate Magnetogram for downlink in the 5K channel. In this mode the ; magnetogram is always accumulated in page 19. The cadence must therefore ; be greater than ~20 minutes. The "Dynamics" mode should not be entered ; when less than 20 minutes of 160K channel time is remaining. ; GOTOREG $IPRP_MAG_5KEP ; CLR5KBF: FILLBLK 19:0x00000 0x120000L 0 SETREG $IPRP_MAG_5KEP &DO_M5K ; DO_M5K: SETREG $IPRL_MAG_SUMMAG+5 0x9800 SETREG $IPRL_MAG_CPYMAG+1 0x9800 _MOVBLKI $IPRL_MAG_CPYMAG _SCALESUM $IPRL_MAG_SUMMAG BRANCHGT $IPRL_STR_COUNT 1 &MAGEXIT ; SETREGS $IPRL_MAG_LRDPRM 9 0 0 0 300 19:0x00226 8192 14 5 SETREGS $IPRL_MAG_LRDPRM+9 5 4000 0xBFFF 0xFFB8 0 0x0010 SETREG $IPRP_MAG_5KEP &CLR5KBF END ; ACCMAG: ; ; Accumulate magnetograms for later downlink via the 160k channel, nominally ; in VC2 mode (Delivered to GSFC). In this mode, each accumulation is ; directed to a different page. Pages 15, 18, and 19 have been set aside for ; these magnetograms. ; COPYREG $IPRP_MAG_ACCPAG $IPRL_MAG_SUMMAG+5 COPYREG $IPRP_MAG_ACCPAG $IPRL_MAG_CPYMAG+1 ; _MOVBLKI $IPRL_MAG_CPYMAG _SCALESUM $IPRL_MAG_SUMMAG ; BRANCHGT $IPRL_STR_COUNT 1 &MAGEXIT ; ; Copy the header for the completed magnetogram to the accumulation page. ; The header is always created at 18:0x00000. BRANCHEQ $IPRP_MAG_ACCPAG 0x9000 &SKIPHCP ;If acc data in p18 skip hdr copy COPYREG $IPRP_MAG_ACCPAG $IPRL_MAG_CPYHDR+3 ;Set header copy dest. _MOVBLKI $IPRL_MAG_CPYHDR ;Copy Header to Acc Page ; SKIPHCP: GOTOREG $IPRP_MAG_NEWPAG ;Jump to next page setup ; PAGE1: COPYREG $IPRP_MAG_ACCPAG $IPRL_MAG_DONE1 SETREG $IPRP_MAG_ACCPAG 0x6800 SETREG $IPRP_MAG_NEWPAG &PAGE2 GOTO &MAGEXIT ; PAGE2: COPYREG $IPRP_MAG_ACCPAG $IPRL_MAG_DONE1+1 SETREG $IPRP_MAG_ACCPAG 0x7800 SETREG $IPRP_MAG_NEWPAG &PAGE4 ; Skip P17 for now GOTO &MAGEXIT ; PAGE3: COPYREG $IPRP_MAG_ACCPAG $IPRL_MAG_DONE1+2 SETREG $IPRP_MAG_ACCPAG 0x8800 SETREG $IPRP_MAG_NEWPAG &PAGE4 GOTO &MAGEXIT ; PAGE4: COPYREG $IPRP_MAG_ACCPAG $IPRL_MAG_DONE1+3 SETREG $IPRP_MAG_ACCPAG 0x9000 SETREG $IPRP_MAG_NEWPAG &PAGE5 GOTO &MAGEXIT ; PAGE5: COPYREG $IPRP_MAG_ACCPAG $IPRL_MAG_DONE1+4 SETREG $IPRP_MAG_ACCPAG 0x9800 SETREG $IPRP_MAG_NEWPAG &PAGE1 GOTO &MAGEXIT ; MAGEXIT: END ; ;....................................................... ; Register Lists: ; INITMAG:: ; SETREGS $IPRL_MAG_LVEL 8 4:0x00514 6:0x00514 5:0x00000 4 127 ; LCP Vel SETREGS $IPRL_MAG_RVEL 8 0:0x00514 1:0x00514 6:0x00000 4 127 ; RCP Vel ; SETREGS $IPRL_MAG_VPIXALGN 8 5:0x00000 4:0x00000 1024 1024 1024 R69 ; SETREGS $IPRL_MAG_XALGN_RV 8 6:0x00000 5:0x00000 1024 0 1024 1024 SETREGS $IPRL_MAG_YALGN_RV 8 5:0x00000 6:0x00000 1024 0 1024 255 SETREGS $IPRL_MAG_XALGN_LV 8 4:0x00000 5:0x00000 1024 0 1024 1024 SETREGS $IPRL_MAG_YALGN_LV 8 5:0x00000 4:0x00000 1024 0 1024 255 ; Magnetograms are created in Page 5. SETREGS $IPRL_MAG_GENMAG 6 6:0x00000 4:0x00000 5:0x00000 SETREGS $IPRL_MAG_GENMAG+6 5 0x100000L 1 0xFFFF 0 ; ; Magnetograms are stored at an offset of 0x00226 words; The first 0x226 ; words are reserved for header data. SETREGS $IPRL_MAG_SUMMAG 6 5:0x00000 4:0x00000 13:0x00226 SETREGS $IPRL_MAG_SUMMAG+6 5 0x100000L 1 1 0 ; SETREGS $IPRL_MAG_CPYMAG 6 13:0x00226 4:0x00000 0x100000L ; ; The Magnetogram header is saved in 18:0x00000 SETREGS $IPRL_MAG_HDR 6 6:0x00001 0x9000 0xe5 0xbfff 0xff27 SETREGS $IPRL_MAG_CPYHDR 6 18:0x0000 13:0x00000 0x00226L SETREGS $IPRL_MAG_MVDL 6 5:0x00000 8:0x00000 0x100226L ; ; Set 5K Accumulation entry point SETREG $IPRP_MAG_5KEP &CLR5KBF ; ; Set Accumulation setup address SETREGS $IPRL_MAG_DONE1 6 0 0 0 0 0 0 SETREG $IPRP_MAG_ACCPAG 0x6800 SETREG $IPRP_MAG_NEWPAG &PAGE2 SETREGS $IPRL_MAG_DL 6 0 0x6800 0 0x4000 0 0x000C ; ; Clear Accumulation pages FILLBLK 15:0x00000 0x120000L 0 FILLBLK 18:0x00000 0x120000L 0 FILLBLK 19:0x00000 0x120000L 0 ; RTNQUE ;....................................................... ;=======================================================