; NAME: mk_vel.ips ; PURPOSE: Make a velocity data product and header ; EXTRA INFO: ; The first parameter after the 3 pages is ; 2 for 4 scans (60 sec velocity) ; 3 for 2 scans (30 sec velocity) ; 4 for 1 scan (15 sec velocity/magnetogram) ; PAGES: ; Parameter defines the 2 input and one output page ; In addition, page 13 is used to temporarily make the doppergram ; (before the scaling is done into the final output page) ; HISTORY: Written 14-Aug-95 by M.Morrison ; 30-Aug-95 (MDM) - Changed the name and allowed either of the ; 15-Jan-96 (MDM) - corrected the copy/setup of HDECODE_PARAM ; (it was grabbing the low word) ; 15-Jan-96 (MDM) - Used _VLCTY instead of VLCTY ; 22-Jan-96 (MDM) - Added documentation to header ; - Changed to always create the velocity to page 13 ; and to scale it and write into the final page ; ; QSR_MK_VEL:: ;------- Copy the proper velocity table BRANCHEQ $IPRL_VEL_PARAM+8 1 &VEL_HR_TABLE COPYTAB $IPRL_TAB_VEL_FD COPYTAB $IPRL_TAB_RECIP_FD GOTO &VEL_TABLE_DONE VEL_HR_TABLE: COPYTAB $IPRL_TAB_VEL_HR COPYTAB $IPRL_TAB_RECIP_HR GOTO &VEL_TABLE_DONE VEL_TABLE_DONE: COPYREG $IPRL_VEL_PARAM+4 $IPRL_VEL_SCALE+2 ;copy final destination to the scale register list COPYREG $IPRL_VEL_PARAM+5 $IPRL_VEL_SCALE+3 SETREGS $IPRL_VEL_PARAM+4 2 13:0x0726 ;force to use page 13 as the output page ;-------- Do the velocity instruction _VLCTY $IPRL_VEL_PARAM ;make the velocity - source/destination pages already set ;instruction can work directly off the parameters list ;because there are no pieces being set elesewhere ;-------- Scale the resulting velocity COPYRD2D $IPRL_VEL_PARAM+12 $IPRL_VEL_SCALE+6 3 ;copy the scale values _SCALE $IPRL_VEL_SCALE ;-------- decode the source and destination page info COPYREG $IPRL_VEL_PARAM+1 $IPRL_HDECODE_PARAM ;copy the source page high word into a known fixed place COPYREG $IPRL_VEL_SCALE+3 $IPRL_HDECODE_PARAM+1 ;copy the dest page high word into a known fixed place CALLQUE $QSR_DO_HDECODE ;decode the value - ;-------- now copy the relevant info to the hrdinit slot and make the header COPYRI2D $IPRP_HDECODE_ADDR+1 $IPRL_HEAD_WORK 10 ;copy the register list to a fixed working area COPYREG $IPRL_VEL_SCALE+2 $IPRL_HEAD_WORK+6 ;copy the final dest(l) COPYREG $IPRL_VEL_SCALE+3 $IPRL_HEAD_WORK+7 ;copy the final dest(h) COPYRD2D $IPRL_VEL_PARAM+9 $IPRL_HEAD_WORK+3 3 ;copy n/k, dpc(l), and dpc(h) into the HRDINIT slot SETREG $IPRL_HEAD_WORK+8 0x0000 ;set the output number of pixels (l) SETREG $IPRL_HEAD_WORK+9 0x10 ;set the output number of pixels (h) COPYRD2I $IPRL_HEAD_WORK $IPRP_HDECODE_ADDR+1 10 ;copy the register list back to the slot CALLQUE $QSR_DO_HEADER RTNQUE