# File: mk_hr_mvl30_v03.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/src/mk_hr_mvl30_v03.src"
descr "Loads IP queue instructions"
#=======================================================
#
#
#; FILE:    mk_hr_mvl30.ips
#; PURPOSE: Make a high resolution magnetogram, average velocity a
#;	   line-depth from a 30 sec observation.  Save the continuum fi
#;	   too.
#; METHOD:
#;		LCP in page 0 & 3
#;		RCP in page 1 & 2
#;		FC  in page 4
#;
#;						CONT filt 1024 page 19
#;						compress into page 6
#;
#;		VEL-RCP in page 5
#;		LINE-DEP (RCP) in page 17
#;		VEL-LCP in page 2
#;		LINE-DEP (LCP) in page 15
#;						LINE-DEP (Avg) in page 18
#;						compress into page 15
#;
#;						MAG in page 17
#;						VEL-AVG in page 7
#;
#;		Available pages: 5,11,13
#;
#; HISTORY: Written 2-May-96 by M.Morrison (using prog_mvc60 as st
#;	 3-May-96 (MDM) - Moved the page usage around a bit
#;	 6-May-96 (MDM) - changed to put Line-Dep (Avg) in page 13, not
#;			  (it was clobbering the Mag and VEL-AVG)
#;			- Changed DPC for mag and vel to 4b45 and 4a45 (from
#;			  4b43 and 4a44)
#;	 9-May-96 (MDM) - Changed when things are done (on which frames
#;			  new framelist
#;			- Reversed the Mag sign and changed dpc to 4b46
#;			- Changed the K bits for vel and mag
#;			- Changed to put Line-Dep (avg) in page 15, not page 13
#;			  to leave page 13 unused for flat field backup
#;			- Corrected line depth compression to come from proper page
#;	 9-May-96 (MDM) - Modified to have linedepth use page 18,15,18 
#;			  of 15,18,15 because of LOOKUP page restriction
#;	 9-May-96 (MDM) - Swapped page 2 and 4 incoming page usage
#;	 9-May-96 (MDM) - Moved VEL-LCP to page 2 (from page 4)
#
#QSR_HR_MVL30::
#
#    BRANCHEQ R3072  5 &FRM5		;save the continuum filtergram
tcblock mbipmacl 0x1920    0x01AE 0x0C00 0x0005 0x192D 
#    BRANCHEQ R3072  8 &FRM8		;make the RCP velocity
tcblock mbipmacl 0x1924    0x01AE 0x0C00 0x0008 0x1946 
#    BRANCHEQ R3072  9 &FRM9		;make the LCP velocity
tcblock mbipmacl 0x1928    0x01AE 0x0C00 0x0009 0x1971 
#    RTNQUE
tcblock mbipmacl 0x192C    0x01FA 
#
#FRM5:
#    SETREGS  $IPRL_FLTGRAM_PARAM 4 4:0x0000 19:0x0726		;set sourc
tcblock mbipmacl 0x192D    0x01B2 0x1238 0x0004 0x0000 \
                                0x2000 0x0726 0x9800 
#    SETREGS  $IPRL_FLTGRAM_PARAM+8 3 0xe2   0x4048 0x2000       ;
tcblock mbipmacl 0x1934    0x01B2 0x1240 0x0003 0x00E2 \
                                0x4048 0x2000 
#    CALLQUE  $QSR_MK_FLTGRAM					;0.3 sec
tcblock mbipmacl 0x193A    0x01F8 0x11E3 
#
#    SETREGS  $IPRL_SQRT_PARAM    4  19:0x00726 6:0x0726
tcblock mbipmacl 0x193C    0x01B2 0x13B5 0x0004 0x0726 \
                                0x9800 0x0726 0x3000 
#    CALLQUE  $QSR_SQRT_COMP					;0.3 sec
tcblock mbipmacl 0x1943    0x01F8 0x12C2 
#
#    RTNQUE
tcblock mbipmacl 0x1945    0x01FA 
#
#FRM8:
#    ;---- Make RCP velocity
#    SETREGS $IPRL_VEL_PARAM   8  1:0x00514  2:0x00514  5:0x00726 
tcblock mbipmacl 0x1946    0x01B2 0x1389 0x0008 0x0514 \
                                0x0800 0x0514 0x1000 0x0726 \
                                0x2800 0x0003 0x007F 
#    SETREGS $IPRL_VEL_PARAM+8 6  1 0xe5  0x4a00 0x2000   1 16
tcblock mbipmacl 0x1951    0x01B2 0x1391 0x0006 0x0001 \
                                0x00E5 0x4A00 0x2000 0x0001 \
                                0x0010 
#    CALLQUE $QSR_MK_VEL						;1.7 sec
tcblock mbipmacl 0x195A    0x01F8 0x123F 
#
#    ;---- Line depth (for RCP)
#    SETREGS  $IPRL_LDEP_PARAM    9 1:0x00514  2:0x00514 17:0x0072
tcblock mbipmacl 0x195C    0x01B2 0x13CD 0x0009 0x0514 \
                                0x0800 0x0514 0x1000 0x0726 \
                                0x8800 0x0007 0x007F 0x0007 
#    SETREGS  $IPRL_LDEP_PARAM+9  3 0xe4 0x4400 0x2000
tcblock mbipmacl 0x1968    0x01B2 0x13D6 0x0003 0x00E4 \
                                0x4400 0x2000 
#    CALLQUE  $QSR_MK_LDEP					;0.6 sec
tcblock mbipmacl 0x196E    0x01F8 0x1340 
#
#    RTNQUE
tcblock mbipmacl 0x1970    0x01FA 
#
#FRM9:
#    ;---- Make LCP velocity
#    SETREGS $IPRL_VEL_PARAM   8  0:0x00514  3:0x00514  2:0x00726 
tcblock mbipmacl 0x1971    0x01B2 0x1389 0x0008 0x0514 \
                                0x0000 0x0514 0x1800 0x0726 \
                                0x1000 0x0003 0x007F 
#    SETREGS $IPRL_VEL_PARAM+8 6  1 0xe5  0x4a01 0x2000   1 16
tcblock mbipmacl 0x197C    0x01B2 0x1391 0x0006 0x0001 \
                                0x00E5 0x4A01 0x2000 0x0001 \
                                0x0010 
#    CALLQUE $QSR_MK_VEL						;1.7 sec
tcblock mbipmacl 0x1985    0x01F8 0x123F 
#
#    ;---- Line depth (for LCP)
#    SETREGS  $IPRL_LDEP_PARAM    9 0:0x00514  3:0x00514 15:0x0072
tcblock mbipmacl 0x1987    0x01B2 0x13CD 0x0009 0x0514 \
                                0x0000 0x0514 0x1800 0x0726 \
                                0x7800 0x0007 0x007F 0x0007 
#    SETREGS  $IPRL_LDEP_PARAM+9  3 0xe4 0x4401 0x2000
tcblock mbipmacl 0x1993    0x01B2 0x13D6 0x0003 0x00E4 \
                                0x4401 0x2000 
#    CALLQUE  $QSR_MK_LDEP					;0.6 sec
tcblock mbipmacl 0x1999    0x01F8 0x1340 
#
#    ;---- Make the average line depth
#    SETREGS  $IPRL_SUMDIFF_PARAM  10  17:0x00726 15:0x00726 18:0x
tcblock mbipmacl 0x199B    0x01B2 0x13A0 0x000A 0x0726 \
                                0x8800 0x0726 0x7800 0x0726 \
                                0x9000 0x0010 0x00E3 0x4445 \
                                0x2000 
#    CALLQUE  $QSR_DO_SUM					;0.3 sec
tcblock mbipmacl 0x19A8    0x01F8 0x1304 
#
#    ;---- Compress the line-depth
#    SETREGS  $IPRL_SQRT_PARAM    4  18:0x00726 15:0x0726
tcblock mbipmacl 0x19AA    0x01B2 0x13B5 0x0004 0x0726 \
                                0x9000 0x0726 0x7800 
#    CALLQUE  $QSR_SQRT_COMP					;0.3 sec
tcblock mbipmacl 0x19B1    0x01F8 0x12C2 
#
#    ;---- Subtract two velocities to make the mag
#    SETREGS $IPRL_MAG_PARAM    6  2:0x00726  5:0x00726  17:0x0072
tcblock mbipmacl 0x19B3    0x01B2 0x1278 0x0006 0x0726 \
                                0x1000 0x0726 0x2800 0x0726 \
                                0x8800 
#    SETREGS $IPRL_MAG_PARAM+6  8  0x100000L  1  0xFFFF  13       
tcblock mbipmacl 0x19BC    0x01B2 0x127E 0x0008 0x0000 \
                                0x0010 0x0001 0xFFFF 0x000D \
                                0x00E2 0x4B46 0x2000 
#    CALLQUE $QSR_MK_MAG						;0.3 sec
tcblock mbipmacl 0x19C7    0x01F8 0x1295 
#
#    ;---- Make the average dopplergram
#    SETREGS  $IPRL_SUMDIFF_PARAM  10  5:0x00726  2:0x00726  7:0x0
tcblock mbipmacl 0x19C9    0x01B2 0x13A0 0x000A 0x0726 \
                                0x2800 0x0726 0x1000 0x0726 \
                                0x3800 0x000D 0x00E5 0x4A45 \
                                0x2000 
#    CALLQUE  $QSR_DO_SUM					;0.3 sec
tcblock mbipmacl 0x19D6    0x01F8 0x1304 
#
#    RTNQUE
tcblock mbipmacl 0x19D8    0x01FA 
#=======================================================
#
return
#
#=======================================================
