# File: scitbls.src
#
# Loads IP tables and lists.
#
# Created M Levay 04.09.20--includes crop,limb, and other lists
#                           and dumps for verification 
# Heritage .. Iptbload  93.12.17 M. Levay
#          .. with mods 94.09.01 R Rehse 
#          .. Added Crop List load and Dump 94.09.18 M Levay
#          .. Added Limb Figure List load and Dump 94.09.20 M Levay
#          .. Added Vector and Medium-l List load and Dump 94.09.21 M Levay
#          .. Changed Vector to a "realistic" one supplied by TDT
#             And Added Rectangular Bin Lists 94.09.22 M Levay
#	   .. Fixed a couple of minor bugd    94.09.29 M Levay
# Assumptions:
#	IP Flight Code version xx.xx or higher has been loaded
#	Memory 16 has been initialized for 2 byte edac
#	Memory 14 has been initialized for 8 byte edac
#   These assumptions are realized by executing ipstrtf
#
#   V5  2 Nov 95  DPM
#       Changed Radius parameter for CROP and LF.
#   V6  7 Nov 95  DPM
#       Corrected Max and Min radii.
#   V7 14 Nov 95 DPM
#       "Proper" DPC's for Limb Figure, Med-l, Mag-Proxy and Flux budget 
#       data products.
#   V8  1 Dec 95 DPM
#       Changes Source Addresses of Golf Proxy, Flux Budget and Limb Figure
#   V9  8 Dec 95 DPM,MDM
#	changed DPCs to be flight-like
#	Removed lrbin perf commands (put them in ldstr)
#   V10 
#   V11  5 Jan 96 DPM
#     - L-depth sqrt table length changed to 32k
#     - Changed DPC's for Mag Proxy and Flux Budget due to a change
#       parameters used to calculate the line depth.
#
#   V12 11 Jan 96 DPM
#     - Changed Shift count used by RWBIN for Flux Budget to 6 (from 10).
#     - Changed Shift count used by RWBIN for Mag  Budget to 11 (from 15).
#    
#   V13 29 Feb 96 DPM
#     - Changed Med-l vectors and location
#     - Changed Med-l List and LRDXFR parameters
#     - N = 1024 in Line-Depth Sqrt Lookup Table (instead of 1)
#     - Changes shift counts for Flux Budget and Mag Proxy data products
#       since the above changes cause the input magnitudes to increase.
#
#   V14 29 Mar 96 DPMathur
#     - Limb Fig   : Annulus 7 pixels; R(inner) = 486, R(outer) = 493
#     - Med-l      : R=445 = 89.9% R(Solar); N=14, K=6, Shift = 13
#     - Mag Proxy  : N=14, K=6
#     - Flux Budget: N=15, K=7
# 
#---------------------------------------------------------------------

program "@(#) MODULE: mkobstbl.src RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/src/scitbls_v09.src"
descr "  scitbls13 - Loads IP tables and lists"

display "Executing procedure scitbls-14"

# Initialize Table and List Pages
# tcblock mbipldin 0x116 0x8000 128
# tcblock mbipldin 0x118 0x7000 136

#  Load reciprocal table
tcblock mbiptbl 0 0x8000 0x8009 0
wait time 10 

#  Load sqr root compr table
tcblock mbiptbl 1 0x0000 0x8009 0
wait time 10 

#  Load sqr root compr table (for Line-depth)
tcblock mbiptbl 1 0x0000 0x8008 0 2048 32768
# tcblock mbiptbl 1 0x0000 0x8008 0 2 32768
wait time 10 

#  Load velocity look-up table
tcblock mbiptbl 2 0x0000 0x800B 0
wait time 12 

# Load the geometry
tcblock mbiptbl 0x10 4032 3968 4096 4096 1024
wait time 10

# Load the Full Disk Crop List
tcblock mbiptbl 3 0 0x7000 0
wait time 15

# Load the Limb Figure List
tcblock mbiptbl 4 0x1000 0x7000 0 3944 3888 \
                296 12 0x8000 0x700B 0 0 1975 0x1684 0xEF30
#
# tcblock mbiptbl 4 0x1000 0x7000 0 3968 3920 \
#                 296 12 0x8000 0x700B 0 0 1720 0x1684 0xCF50
# tcblock mbiptbl 4 0x1000 0x7000 0 3968 3920 \
#                 296 12 0x8000 0x700B 0 0 1720 0x1683 0xCF50
# tcblock mbiptbl 4 0x1000 0x7000 0 3968 3920 \
#                 296 12 0x8000 0x700B 0 0 1720 0x1181 0xCF50
# tcblock mbiptbl 4 0x1000 0x7000 0 4056 4016 \
#                 296 12 0x8000 0x700B 0 0 1490 0x1180 0xAFB0
wait time 15

#
# The X and Y vector weights are taken from "Simulation of Vector-Weighted
# Binning for the Medium-l Program" by Kosovichev, Duvall and Scherrer,
# SOI Tecnical Notes 96-130, for 'a = 4' (Gaussian half width parameter). 
# The weights have been scaled by a factor of 0.566484 to make the sum of 
# weights equal 2^17.
#
# Load X-vector for use by Medium-l
tcblock mbiptbl 0x11  0x0032 0x00a6 0x01df 0x04c7 0x0ac4 0x1569 0x2594 \
                      0x3a34 0x4f8e 0x5ff6 0x6626 0x5ff6 0x4f8e 0x3a34 \
                      0x2594 0x1569 0x0ac4 0x04c7 0x01df 0x00a6 0x0032
#
# tcblock mbiptbl 0x11 1920 3584 6016 9472 13824 18816 23936 28416 31488 \
#             32640 31488 28416 23936 18816 13824 9472 6016 3584 1920

wait time 2
# Load Y-vector for use by Medium-l
tcblock mbiptbl 0x12  0x0032 0x00a6 0x01df 0x04c7 0x0ac4 0x1569 0x2594 \
                      0x3a34 0x4f8e 0x5ff6 0x6626 0x5ff6 0x4f8e 0x3a34 \
                      0x2594 0x1569 0x0ac4 0x04c7 0x01df 0x00a6 0x0032

# tcblock mbiptbl 0x12 1920 3584 6016 9472 13824 18816 23936 28416 31488 \
#            32640 31488 28416 23936 18816 13824 9472 6016 3584 1920

wait time 5
# Load the Medium-l List
tcblock mbiptbl 6 0x0000 0x7004 0 3560 5 0x000d \
                360 8 0 0x5811 14 6 8000 0x0300 0x6004

# tcblock mbiptbl 6 0x0000 0x7004 0 3280 5 0x000d \
#                 360 8 0 0x5811 14 5 8000 0x0300 0x6003
# tcblock mbiptbl 6 0x0000 0x7004 0 3280 5 0x8000 \
#                 360 8 0 0x5811 14 5 8000 0x0300 0x6002
wait time 15

# Load a RWBin List for Magnetic Proxy
tcblock mbiptbl 7 0x1000 0x7001 0 4032 8 8 8 0x800C 1 0\
                168 12 0x0000 0x700B 14 6 1024 0x0584 0x5003

# tcblock mbiptbl 7 0x1000 0x7001 0 4032 8 8 8 0x800B 1 0\
#                 168 12 0x0000 0x700B 14 6 1024 0x0583 0x5002
# tcblock mbiptbl 7 0x1000 0x7001 0 4032 8 8 8 0x800B 1 0\
#                 168 12 0x0000 0x700B 14 5 1024 0x0583 0x5002
# tcblock mbiptbl 7 0x1000 0x7001 0 4032 8 8 8 0x800B 1 0\
#                 168 12 0x0000 0x700B 14 5 1024 0x0582 0x5002
# tcblock mbiptbl 7 0x1000 0x7001 0 4032 8 8 8 0x800B 1 0\
#               168 12 0x0000 0x700B 14 5 1024 0x0581 0x5002
# tcblock mbiptbl 7 0x1000 0x7001 0 4032 8 8 8 0x800F 1 0\
#                 168 12 0x0000 0x700B 14 5 1024 0x0581 0x5001
wait time 15

# Load a RWBin List for Flux Budget
tcblock mbiptbl 7 0x1000 0x7002 0 4032 8 8 8 0x800B 1 0\
                232 12 0x4000 0x700B 15 7 1024 0x0784 0x5002

# tcblock mbiptbl 7 0x1000 0x7002 0 4032 8 8 8 0x800B 1 0\
#                 232 12 0x4000 0x700B 15 7 1024 0x0783 0x5002
# tcblock mbiptbl 7 0x1000 0x7002 0 4032 8 8 8 0x800B 1 0\
#                 232 12 0x4000 0x700B 14 5 1024 0x0783 0x5002
# tcblock mbiptbl 7 0x1000 0x7002 0 4032 8 8 8 0x8006 1 0\
#                 232 12 0x4000 0x700B 14 5 1024 0x0782 0x5002
# tcblock mbiptbl 7 0x1000 0x7002 0 4032 8 8 8 0x8006 1 0\
#                 232 12 0x4000 0x700B 14 5 1024 0x0781 0x5002
# tcblock mbiptbl 7 0x1000 0x7002 0 4032 8 8 8 0x800A 1 0\
#                 232 12 0x4000 0x700B 14 5 1024 0x0781 0x5001
wait time 15

display "Finished procedure scitbls-14: %s" !TIME

return

