[Previous]
[Next]
NAME:
ma_labels
PURPOSE:
Given the type of spectrum, returns the number of free parameters,
and labels for those parameters.
CALLING SEQUENCE:
ma_labels,tyspec,ma,alabels
INPUT:
tyspec=the spectral type
= 1 for single p.l.
= 2 for double p.l.
= 3 for single thermal
= 4 for p.l. + thermal
= 5 for thermal + thermal
= 6 for p.l. + p.l.
= 7 thermal below Ebr, p.l. above Ebr
= 8 Thermal + double p.l.
= 9 Triple P.L.
= 10 thermal including line emission
= 11 for p.l. + thermal, includes SXR lines
= 12 for a p.l. that flattens below a value e0
= 13 for a p.l. that cuts off exponentailly below a value e0
= 14 for thermal + thermal, including SXR lines
OUTPUT:
ma= no. of parameters fit
alabels = labels for the fit parameters
tyspec =1 a(0)=K, a(1)=gamma
=2 a(0)=K1, a(1)=gamma1, a(2)=gamma2, a(3)=ebr
=3 a(0)=em/1.0e47, a(1)=T/1.0e6
=4 a(0)=em/1.0e47, a(1)=T/1.0e6, a(2)=K, a(3)=gamma
=5 a(0)=em1/1.0e47, a(1)=T1/1.0e6, a(2)=em2/1.0e47, a(3)=T2/1.0e6
=6 a(0)=K1, a(1)=gamma1, a(2)=K2, a(3)=gamma2
=7 a(0)=K, a(1)=gamma, a(2)=T/1.0e6, a(3)=Ebr
=8 a(0)=em/1.0e47, a(1)=T/1.0e6,
a(2)=K1, a(3)=gamma1, a(4)=gamma2, a(5)=Ebr
=9 a(0)=K1, a(1)=gamma1, a(2)=gamma2,
a(3)=gamma3, a(4)=eb1 (between gamma1 & gamma2),
a(5)=eb2 (between gamma2 and gamma3)
=10 a(0)=em/1.0e47, a(1)=T/1.0e6
=11 a(0)=em/1.0e47, a(1)=T/1.0e6, a(2)=K, a(3)=gamma
=12, a(0)=K, a(1)=gamma, a(2)=e0
=13, a(0)=K, a(1)=gamma, a(2)=e0
=14, a(0)=em1/1.0e47, a(1)=T1/1.0e6, a(2)=em2/1.0e47, a(3)=T2/1.0e6
CALLED BY:
fix_pars0, fsp_11, fsp_mc, fsp_proc, hxt_anycomp, sxt_anycomp
HISTORY:
Written By JMM , 30-mar-94
[Previous]
[Next]
NAME : magtv1 (procedure)
PURPOSE :
display vector mag.field and draw intensity contour
CATEGORY :
idl/lib/flare
CALLING SEQUENCE :
magtv1,img,q,u,v,h=h,/spline,/order,save=filename,/seq, $
magnify=magnify,bin=bin,/nocont,x0=x0,y0=y0,/notitle, $
/bw,bmax=bmax
or magtv1,img,Bx,By,Bl,/cal,h=h,/spline,/order,save=filename,/seq, $
magnify=magnify,bin=bin,/nocont,x0=x0,y0=y0,/notitle, $
/bw,bmax=bmax
INPUTS :
img : image (*,*) or i,q,u,v as (*,*,4)
q,u,v : polarization degree*10000
Bx,By,Bl: trans. & long. mag fields, gauss*10
OPTIONAL INPUT PARAMETERS :
none
KEYWORD PARAMETERS :
h : header array
spline : if set, draw spline contour
order : if set, up-down direction is opposite
save=filename : save tvrd to file
/cal : for calibrated data Bl=>q, Bx=>u, By=>v
/seq : display seq.no
magnify : magnification factor
bin : binning factor
nocont : no contour of img
x0,y0 : lower-left position for drwaing
/notitle: omit title
/bw : black & white display
bmax : fix max of Bl or V
OUTPUTS :
none
CALLS: ***
COLORTBL, CONGRID [1], CONGRID [2], CONGRID [3], JST2UT, LCT_RB, LOADCT, MAGTV1, MAGTV1C
MAGTV1R, MIRROR, NKRSAVE, PIX_SIZE, STR_GPOS, TIMEINT
COMMON BLOCKS : none
SIDE EFFECTS : none
RESTRICTIONS : none
PROCEDURE :
if h(1).value eq 'Bl', it displays as calibrated data (/cal)
MODIFICATION HISTORY :
K.I. '92/02/08
K.I. '92/05/01
K.I. '92/10/20
K.I. '92/10/28 change order of Bl & bx,by
K.I. '92/11/19 change v sign
K.I. '92/11/29 h.dx --> bin
K.I. '92/12/06 x0,y0, notitle
K.I. '92/12/30 bw keyword
K.I. '93/01/06 bmax keyword
K.I. '93/03/08 nstep=max([nstep/magnify,2])
K.I. '93/12/21 rebin -> congrid
[Previous]
[Next]
NAME : magtv1m (procedure)
PURPOSE : display multi images of T1
CALLING SEQUENCE :
magtv1m,files,size=size,info=info
INPUTS :
files -- filename array
KEYWORD PARAMETERS :
size -- size factor
info -- information array
OUTPUTS :
none
CALLS: ***
F1DATA, MAGTV1, MAGTV1M, NKRGETH
SIDE EFFECTS :
display
MODIFICATION HISTORY :
K.Ichimoto, 1993/01/29
[Previous]
[Next]
NAME : magtv2 (procedure)
PURPOSE :
display vector mag.field as contour on sunspot image
CATEGORY :
idl/lib/flare
CALLING SEQUENCE :
magtv2,img,q,u,v,h=h,/spline,/order,save=filename,/seq, $
magnify=magnify,bin=bin,/nocont,x0=x0,y0=y0,/notitle
or magtv2,img,Bx,By,Bl,/cal,h=h,/spline,/order,save=filename,/seq, $
magnify=magnify,bin=bin,/nocont,x0=x0,y0=y0,/notitle
INPUTS :
img : image (*,*) or i,q,u,v as (*,*,4)
q,u,v : polarization degree*10000
Bx,By,Bl: long. & trans. mag fields, gauss*10
OPTIONAL INPUT PARAMETERS :
none
KEYWORD PARAMETERS :
h : header array
spline : if set, draw spline contour
order : if set, up-down direction is opposite
save=filename : save tvrd to file
/cal : filenamefor calibrated data Bl=>q, Bx=>u, By=>v
/seq : display seq.no
magnify : magnification factor
bin : binning factor
nocont : no contour of img
x0,y0 : lower-left position for drwaing
/notitle: omit title
OUTPUTS :
none
CALLS: ***
COLORTBL, CONGRID [1], CONGRID [2], CONGRID [3], JST2UT, LOADCT, MAGTV2, MAGTV2C
MAGTV2R, MIRROR, NKRSAVE, PIX_SIZE, STR_GPOS, TIMEINT
COMMON BLOCKS : none
SIDE EFFECTS : none
RESTRICTIONS : none
PROCEDURE :
if h(1).value eq 'Bl', it displays as calibrated data (/cal)
MODIFICATION HISTORY :
K.I. '92/02/08
K.I. '92/05/01
K.I. '92/10/20
K.I. '92/10/28 change order of Bl & bx,by
K.I. '92/11/19 change v sign
K.I. '92/11/29 h.dx --> bin
K.I. '92/12/06 x0,y0, /notitle
K.I. '93/03/08 nstep=max([nstep/magnify,2])
K.I. '93/12/21 rebin -> congrid
[Previous]
[Next]
NAME : magtv2 (procedure)
PURPOSE :
remove trend from image
CATEGORY :
idl/lib/nkr
CALLING SEQUENCE :
img = rmtrend(img)
INPUTS :
img : image (*,*) or i,q,u,v as (*,*,4)
OPTIONAL INPUT PARAMETERS :
none
KEYWORD PARAMETERS :
degree : degree of fitting polinomial, default=2
OUTPUTS :
none
CALLS: ***
RMTREND, SURFACE_FIT
COMMON BLOCKS : none
SIDE EFFECTS : none
RESTRICTIONS : none
PROCEDURE :
MODIFICATION HISTORY :
K.I. '93/11/19
[Previous]
[Next]
NAME:
make_32
PURPOSE:
Align the event times on the nearest 32 sec boundaries.
Adjust the offset times.
INPUTS:
event = The event structure from op_get_event
RETURNS:
A new event structure with modified times.
CALLS: ***
ADDTIME [1], ADDTIME [2], BSORT [1], BSORT [2], BSORT [3], BSORT [4], Ex2Int [1]
Ex2Int [2], OP_ADD_SPECIAL, contact_sum, fmt_pass, op_edit [1], op_edit [2]
op_get_event [1], op_get_event [2], op_same_time [1], op_same_time [2]
op_terminator [1], op_terminator [2], save_event [1], save_event [2], valid_pass
valid_pass2, valid_pass3, valid_pass4 [1], valid_pass4 [2]
CALLED BY:
get_dn_rate [1], get_dn_rate [2], valid_pass4 [1], valid_pass4 [2]
MODIFICATION HISTORY:
12-oct-93, JRL, Written.
21-feb-97, JRL, Changed calls to addtime to be with the /sec switch set
[Previous]
[Next]
NAME:
make_32
PURPOSE:
Align the event times on the nearest 32 sec boundaries.
Adjust the offset times.
INPUTS:
event = The event structure from op_get_event
RETURNS:
A new event structure with modified times.
CALLS: ***
ADDTIME [1], ADDTIME [2], BSORT [1], BSORT [2], BSORT [3], BSORT [4], Ex2Int [1]
Ex2Int [2], STR2ARR [1], STR2ARR [2], contact_sum, fmt_pass, fmt_tim [1]
fmt_tim [2], get_dn_rate [1], get_dn_rate [2], input [1], input [2]
op_saa_med [1], op_saa_med [2], save_event [1], save_event [2], str_replace [1]
str_replace [2], valid_pass4 [1], valid_pass4 [2]
CALLED BY:
get_dn_rate [1], get_dn_rate [2], valid_pass4 [1], valid_pass4 [2]
MODIFICATION HISTORY:
12-oct-93, JRL, Written.
[Previous]
[Next]
NAME:
MAKE_TIMSTR
PURPOSE:
To return a day/time string from a given 'time' array.
CALLING SEQUENCE:
time_str = MAKE_TIMSTR(tim, day=day, time=time, msec=msec)
INPUT:
tim - An integer array that contains time information in the
following format:
tim(0:2,*) - [YY,MM.DD]
tim(3:6,*) - [HH,MM,SS,MSEC]
CALLED BY:
GET_FRAME_TIME
OPTIONAL KEYWORD INPUT:
day - If set, then only the YY/MM/DD part is returned.
time - If set, then only the HH:MM:SS part is returned.
msec - If set, then the HH:MM:SS.MSEC part is returned.
OUTPUT:
time_str - An array of string generated from the above time
array.
SIDE EFFECTS:
none
CATEGORY:
Yohkoh HXT data analysis.
HISTORY:
version 1.0 date unknown T.Sakao written.
1.1 98.05.03 (Sun)
Modified so as to have time strings like
'03:23:05.002' instead of ' 3:23: 5. 2'. This version
is (partially) related to the HXT NMP release.
[Previous]
[Next]
NAME:
MAKE_VTRANGE
PURPOSE:
To prepare a VTRANGE (vertical-time-range) variable which is to be
used by HXT_4CHPLOT with the option VTRANGE.
CALLING SEQUENCE:
vtrange = MAKE_VTRANGE(inf_or_file)
INPUT:
inf_or_file - Either the INF structure variable (read out as
RD_HXTIMG, img, hdr, inf, filename) or the name of
the HXT image file itself.
OUTPUT:
vtrange - A sting array with the format of
STRARR([stime,etime],4ch) = STRARR(2,4).
This variable is to be used by HXT_4CHPLOT in such
a way as:
HXT_4CHPLOT, index, data, vtrange=vtrange.
SIDE_EFFECT:
none
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], FILL_TIMEZERO, RD_HXTIMG
anytim2ints [1], anytim2ints [2], gt_day [1], gt_day [2], gt_time [1], gt_time [2]
RESTRICTIONS:
(Of course) does not accept multiple array elements for the INF
structure variable.
CATEGORY:
Yohkoh HXT data analysis.
HISTORY:
version 1.0 98.05.07 (Thu) T.Sakao written.
[Previous]
[Next]
NAME:
MAKE_WIDG_EV
PURPOSE:
The event handler for YO_TAPE_WIDG
CATEGORY:
YOHKOH tape
CALLING SEQUENCE:
XMANAGER, 'YO_TAPE_WIDG', BASE, EVENT_HANDLER='MAKE_WIDG_EV'
CALLED BY:
YO_TAPE_WIDG
CALLS TO:
none
INPUTS:
none explicit, only through common and UVALUE
UVALUE=BUTT contains the widget ID for the buttons
OPTIONAL INPUTS:
none
OUTPUTS:
none explicit, only through commons
OPTIONAL OUTPUTS:
none
CALLS: ***
XMANAGER, YO_TAPE_WIDG [2], YO_TAPE_WIDG [4], yo_tape_widg [1], yo_tape_widg [3]
CALLED BY:
YO_TAPE_WIDG [2], YO_TAPE_WIDG [4], yo_tape_widg [1], yo_tape_widg [3]
COMMON BLOCKS:
COMMON EVENT, $ ; needed for the event handler
INDEX, $ ; record the status of the buttons
IST, $ ; remember the last selected button
IEN, $ ; remember the second to last
EXCLUS ; if set, simulate exclusive buttons
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
Handle the button events as they are clicked
MODIFICATION HISTORY:
OCT 93 - Elaine Einfalt (HSTX)
[Previous]
[Next]
NAME:
makestr
PURPOSE:
create a structure from a string definition
CATEGORY:
CALLING SEQUENCE:
result = makestr(structure_definition)
INPUTS:
structure_definition = string containing structure definition
CALLED BY:
BFITS, add2str [1], add2str [2], substruc
example: '{name,one:fltarr(5),two:0.0}'
OPTIONAL INPUT PARAMETERS:
OPTIOAL KEYWORD PARAMETERS:
status = returns 1 if successful, 0 if error occurred
OUTPUTS:
result = new structure
CALLS: ***
SPLITSTR, SQUEEZE
COMMON BLOCKS:
umakestrstr: unique = keeps track of number of times routine is
called for default value for insuring that the
structure name is unique. (Static Variable)
SIDE EFFECTS:
None.
RESTRICTIONS:
Lot's kludey stuff if the structure definition is too
long for the "execute" command. Untested on VMS systems ... works
for UNIX.
PROCEDURE:
Defines a new structure from a string definition. In principle this
is trivial with the execute command, but the execute command does
not allow strings over 131 characters. To get around this problem
the routine writes a procedure to create the structure and
runs it. To write the procedure uses lots of UNIX specific stuff.
MODIFICATION HISTORY:
11/91 T. Metcalf
30-Jun-93 TRM Fixed the file generation so that it is less UNIX
specific. In principle this will now work on VMS,
but it is untested.
1995-12-01 TRM IDL v. 4.0 no longer allows multiple structure tags
with the same name. Check for this and add a number
to the tag name if necessary.
[Previous]
[Next]
NAME:
makimg0
PURPOSE:
The image synthesis subroutine performs the image deconvolution
for HXT using the zeroth order regularization method.
CALLING SEQUENCE:
makimg0, ictrl, hxi_index, index1, fobs, sig, p, index_out, data_out $
[, alpha]
INPUT:
/ictrl = enables display of final image
hxi_index = a structure containing everything we need to know about
the hxt image. nimages elements.
Tags used:
hxi_index.grause(8)=Each element is either 0b or 255b,
If hxi_index.grause(j)=0b, then the Subcollimators with
spatial wave number j+1 aren't used in the calculation
index1 = index structure of the first data set in each accumulation
fobs = the observed counts in the SC's: fltarr(nSC,nimages)
sig = the uncertainty in fobs = sqrt(fobs) kind of
p = the 2-d modulation pattern, fobs(j)=total(b*p(*,*,j)),
where b is the brightness and j is the grid number
OPTIONAL INPUT:
alpha = smoothing parameter (default = 0.1). Larger smoothing gives
a flatter imagem but it can become oversmoothed.
KEYWORD PARAMETERS:
bin = binning factor (default = 2.0). Any float number GE 1.
Bigger = faster.
/quiet = Don't print any diagnostics
/verbose = print lots of diagnostics
OUTPUT:
index_out= Hxi gen htx and hxi structure. nimages elements
data_out= the brightness, a 64X64 array of counts/cm^2/pixel^2,
THE ANSWER. fltarr(64,64,nimages)
DESCRIPTION:
makimg uses the zeroth order regularization to compute the iamge
from the SC modulation patterns, p, and the counts and variances in
the 64 sub-collimators, fobs and var. Zeroth order regularization is
similar to MEM, but it avoids the iteration.
The output matches the MEM image quite well, although the MEM image
will generally be flatter.
The image is flipped N/S to match SXT.
CALLS: ***
STR_LOAD, ocontour [1], ocontour [2], ocontour [3], ocontour [4], ocontour [5]
str_merge [1], str_merge [2], unpack_grause
CALLED BY:
HXT_QLOOK, hxt_multimg
MODIFICATION HISTORY:
Translated from FORTRAN routine MAKIMG, of T. Sakao, by
J. McTiernan, July '92
24-Aug-92 (MDM) - Added hxi_index.resolution = 1.97*1000
30-Sep-92 (JM) - changed chilim form an absolute of 2.0 to
0.40*Sqrt(total(var))/64, found semi-empirically
9-Jun-93 (JM) -changed chilim back to 2.0
22-Jun-93 (TRM) - Stripped JM's makimg. Eliminated the MEM stuff
and added zeroth order regularization.
25-Jun-93 (TRM) - Added code to handle multiple images efficiently
16-Nov-95 (TRM) - Took out call to getvar
1996-11-26 (JMM) - Added call to UNPACK_GRAUSE, which allows for
individual SC's to be left out of the fit
[Previous]
[Next]
NAME:
makimg_g0
PURPOSE:
Image synthesis subroutine, forward fitting, makimg_g tries to
fit a user-defined number of gaussian sources to the HXT data.
CALLING SEQUENCE:
Makimg_g0, ictrl, hxi_index, index1, image0, fobs, sig, p, index_out, data_out, $
Chi_limit=chi_limit, n_sources=n_sources, Cyl=cyl, moff=moff, $
ftol=ftol, alpha=alpha, beta=beta, gamma=gamma, itmax=itmax, $
restart=restart, fixed_pos=fixed_pos, fixed_rad=fixed_rad, $
source_pars=source_pars
INPUT:
ictrl=1 enables us to look at intermediate data, or it
will, when implemented.
hxi_index= a structure containing everything we need to know about the hxt image
Tags used:
hxi_index.grause(8)=Each element is either 0b or 255b,
If hxi_index.grause(j)=0b, then the Subcollimators with
spatial wave number j+1 aren't used in the calculation
hxi_index.area= total area in cm^2 of scintillators
hxi_index.gamma0= initial value of iteration gain
hxi_index.laminc= initial value for lambda increment
hxi_index.chilim= minimum value of chi^2 needed
index1=index structure of the first data set in accumulation
image0= and initial image, to find the ftootpoints...
fobs= the observed counts in the SC's
sig= the uncertainty in fobs = sqrt(fobs) kind of
p= the 2-d modulation pattern, fobs(j)=total(b*p(*,*,j)),
where b is the brightness and j is the grid number
OUTPUT: (probably not used anymore)
More tags for the structure hxi_index:
hxi_index.lambda= final value of lambda, which controls the
iteration step size
hxi_index.iteration= the number of iterations, for a given value of lambda
hxi_index.delta= total((b(i)-b(i-1))^2)/Total(b(i)^2) for each iteration,
lambda is changed when delta is reduced to 0.030 or less
hxi_index.chi2= chi^2, reduced = total((fobs(b(i))-fobs)^2/var)/usenum
where usenum is the number of SC's used
hxi_index.max_bright= maximum brightness of image
hxi_index.x_max= Column of max. brightness
hxi_index.y_max= row of max. brightness
index_out= Hxi gen htx and hxi structure,...
data_out= the brightness, a n_pixXn_pix array of
counts/cm^2/pixel^2, THE ANSWER. n_pix is obtained from
the mod pattern (18-jul-94, jmm)
KEYWORDS:
n_sources= number of sources in the image, max is 3
chi_limit = limiting chi^2, the default is 2.0
source_pars= the source parameters, brightness, radius, x and y positions
amoeba_x keywords, for downhill simplex minimization
ftol = fractional tolerance that we'll iterate to, default is 1.0e-5
alpha, beta, gamma= iteration parameters, i don't know what yet
defaults are 1.0, 0.5, 2.0, respectively.
itmax= max number of iterations, default is 500
restart= max. number of times to restart the algorithm
cyl = if set, use cylindrical sources
moff = if set, use cylindrical moffat fns, f=c/(1+r^2/r0^2)^moff(0)
fixed_pos= if set, keep the position of the sources fixed at their
starting points
fixed_rad=if set, keep the radii of the sources fixed
DESCRIPTION:
Start with a gaussian, or number of gaussians near the middle of the
image, vary the strength and positions of the gaussians to minimize
chi^2. Uses the routine Amoeba_x for linear simplex minimization.
CALLED BY:
hxt_sources
MODIFICATION HISTORY:
Stripped MAKIMG, built this, jmm, 14-mar-95
Added initial image image0, 16-mar-95, jmm
1-Aug-95 (jmm) - removed call to GETVAR, since the systematic error is added
in in HXTIMG_ACCUM now
[Previous]
[Next]
NAME:
makimg_g1
PURPOSE:
Image synthesis subroutine, forward fitting, makimg_g1 tries to
fit a user-defined number of gaussian sources to the HXT data.
makimg_g1 allows for a constant non-zero background level
CALLING SEQUENCE:
Makimg_g1, ictrl, hxi_index, index1, image0, fobs, sig, p, index_out, data_out, $
Chi_limit=chi_limit, n_sources=n_sources, Cyl=cyl, moff=moff, $
ftol=ftol, alpha=alpha, beta=beta, gamma=gamma, itmax=itmax, $
restart=restart, fixed_pos=fixed_pos, fixed_rad=fixed_rad, $
source_pars=source_pars
INPUT:
ictrl=1 enables us to look at intermediate data, or it
will, when implemented.
hxi_index= a structure containing everything we need to know about the hxt image
Tags used:
hxi_index.grause(8)=Each element is either 0b or 255b,
If hxi_index.grause(j)=0b, then the Subcollimators with
spatial wave number j+1 aren't used in the calculation
hxi_index.area= total area in cm^2 of scintillators
hxi_index.gamma0= initial value of iteration gain
hxi_index.laminc= initial value for lambda increment
hxi_index.chilim= minimum value of chi^2 needed
index1=index structure of the first data set in accumulation
image0= and initial image, to find the ftootpoints...
fobs= the observed counts in the SC's
sig= the uncertainty in fobs = sqrt(fobs) kind of
p= the 2-d modulation pattern, fobs(j)=total(b*p(*,*,j)),
where b is the brightness and j is the grid number
OUTPUT: (probably not used anymore)
More tags for the structure hxi_index:
hxi_index.lambda= final value of lambda, which controls the
iteration step size
hxi_index.iteration= the number of iterations, for a given value of lambda
hxi_index.delta= total((b(i)-b(i-1))^2)/Total(b(i)^2) for each iteration,
lambda is changed when delta is reduced to 0.030 or less
hxi_index.chi2= chi^2, reduced = total((fobs(b(i))-fobs)^2/var)/usenum
where usenum is the number of SC's used
hxi_index.max_bright= maximum brightness of image
hxi_index.x_max= Column of max. brightness
hxi_index.y_max= row of max. brightness
index_out= Hxi gen htx and hxi structure,...
data_out= the brightness, a n_pixXn_pix array of
counts/cm^2/pixel^2, THE ANSWER. n_pix is obtained from
the mod pattern (18-jul-94, jmm)
KEYWORDS:
n_sources= number of sources in the image, max is 3
chi_limit = limiting chi^2, the default is 2.0
source_pars= the source parameters, brightness, radius, x and y positions
and background
amoeba_x keywords, for downhill simplex minimization
ftol = fractional tolerance that we'll iterate to, default is 1.0e-5
alpha, beta, gamma= iteration parameters, i don't know what yet
defaults are 1.0, 0.5, 2.0, respectively.
itmax= max number of iterations, default is 500
restart= max. number of times to restart the algorithm
cyl = if set, use cylindrical sources
moff = if set, use cylindrical moffat fns, f=c/(1+r^2/r0^2)^moff(0)
fixed_pos= if set, keep the position of the sources fixed at their
starting points
fixed_rad=if set, keep the radii of the sources fixed
DESCRIPTION:
Start with a gaussian, or number of gaussians near the middle of the
image, vary the strength and positions of the gaussians to minimize
chi^2. Uses the routine Amoeba_x for linear simplex minimization.
CALLED BY:
hxt_sources
MODIFICATION HISTORY:
Stripped MAKIMG, built this, jmm, 14-mar-95
Added initial image image0, 16-mar-95, jmm
1-Aug-95 (jmm) - removed call to GETVAR, since the systematic error is added
in in HXTIMG_ACCUM now
[Previous]
[Next]
NAME:
manual_toban
PURPOSE:
To give a mechanism for GO_TOBAN to be run manually.
HISTORY:
Written 9-Feb-93 by M.Morrison
10-Feb-93 (MDM) - Modified to have three options, not just the
SRSPAS option
24-May-93 (MDM) - Added SRSGET/REFORMAT stage only option by
doing a "MTOBAN_NO_STEP2=1"
Only applicable in option 2
18-Jun-93 (MDM) - Added MTOBAN_DSN option so that DSN data can
be reformatted if "MTOBAN_DSN=1"
7-Oct-93 (MDM) - Replaced /ys with $ys
12-Nov-93 (MDM) - Modified header
30-Nov-93 (MDM) - Modified to allow the job to be built and submitted
as a batch job. If MTOBAN_BATCH=1, then build
the command and sumbit it as batch. Only works for
option #1.
- Made submitting it as a batch the default for option #1
1-Dec-93 (MDM) - Added check that if MTOBAN_SRSGET2=1, then run
SRSGET2.
[Previous]
[Next]
NAME:
MANY_DAYS
PURPOSE:
Runs bcs_24hr_plot over a period of many days
CALLING SEQUENCE:
many_days,date,ndays
INPUTS:
date start date for plots
ndays number of days to be plotted
OPTIONAL INPUTS:
nbid if set, no blockid will be output (see BCS_24HR_PLOT)
OUTPUTS:
creates and prints plot file if to PS device
OPTIONAL OUTPUTS:
CALLS: ***
BCS_24HR_PLOT [1], BCS_24HR_PLOT [2], BCS_24HR_PLOT [3], Ex2Int [1], Ex2Int [2]
Int2Ex [1], Int2Ex [2], fmt_tim [1], fmt_tim [2], pprint [1], pprint [2]
timstr2ex [1], timstr2ex [2]
RESTRICTIONS:
PROCEDURE:
Calls BCS_24HR_PLOT for each day requested. NBID switch passed.
MODIFICATION HISTORY:
CDP Aug 92
RDB 27-Oct-92 Added NOBID switch
RDB 04-Oct-93 Added /BDA to call to BCS_24HR_PLOT since now
defaults to OBServing logs.
[Previous]
[Next]
NAME:
map_bsc
PURPOSE:
plot 2d maps of BSC data (time vs wavelength)
CALLING SEQUENCE:
map_bsc,bsc_index,bsc_data
INPUTS:
BSC_INDEX - BSC index structures
BSC_DATA - BSC data structure
KEYWORDS:
CHAN - channel to plot
FILE - file from which to read BSC index and data
TSTART, TEND - string start and end times (e.g. '09:00')
XSPACE,YSPACE- shift amounts in x and y directions
CALLS: ***
BSC_CHAN, BSC_CHECK [1], BSC_CHECK [2], GT_BSC_CRATE, GT_BSC_TIME, SEL_BSC, WDEF [1]
WDEF [2], msplot
PROCEDURE:
based on JTM's MPLOT
HISTORY:
Written Mar'93 by D. Zarro (ARC)
[Previous]
[Next]
NAME:
MARKS2BOX.PRO
PURPOSE:
show the locations of the LCUR_IMAGE boxes on an image
CATEGORY:
Yohkoh
CALLING SEQUENCE:
marks2box, image, marks, scale=scale
INPUTS:
an image
marks returned from lcur_image, marks=marks
OPTIONAL (KEYWORD) INPUT PARAMETERS:
scale to magnify
OUTPUTS:
presents an image on the current window at the scale chosen
CALLS: ***
CLEAR_UTPLOT [1], CLEAR_UTPLOT [2], clearplot [1], clearplot [2]
draw_boxcorn [1], draw_boxcorn [2]
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
HSH 29-Aug-94, written
JIK 5-Oct-94, fixed to outline the pixels properly
HSH 5-Jan-95, added coordinate outputs via /print
[Previous]
[Next]
Procedure to check that the fheader structure returned by test_rd
has the same time values as those contained in the dp_sync structure.
An error message is output if a problem is found.
RDB? 91
[Previous]
[Next]
Name: match_index
Purpose: return ss for 'closest' match of index1 in index2 array
(fuzzy logic since it was written during ISAS visit)
Input Parameters:
index1, index2 - index or roadmap records
Keyword Parameters:
dpe - if set, match i1:i2 dpe
res - if set, match i1:i2 resolution
expmode - if set, match i1:specified mode
point - if set, choose minimum pointing seperation (if multiple matches)
delta - (output), deltaT for matching records
pdelta - (output), delta Pointing (arcsecs), only if POINT is set
ccdtemp - if set, match CCDTEMP (+/- specified degrees)
Output:
output are indices (lonarr) relative to index2 (-1 = no match)
Calling Sequence:
ss= match_index(index1,index2 , /res, /dpe)
Match Criteria:
filterA=flterA ; always
filterB=filterB
expmodeA=expmodeB
if (dpe) then dpeB=dpe ;
if (res) then above AND resA=resB ;
if (point) then minimal seperation satisfying above
Then, choose closest time satisfying above ; before/after date?
9-Dec-1994 (SLF) - SDC matches originally , but useful elsewhere?
10-dec-1994 (SLF) - tweaked etc...
17-mar-1995 (SLF) - logic correction (courtesy kevin reardon)
16-apr-1995 (SLF) - add SEPERATION keyword (output)
10-oct-1996 (SLF) - add CCD TEMP check
23-Jan-1998 (SLF) - include Solar Radius if /point is set
4-Feb-1998 (SLF) - protect agains only one SFC per filter/era
25-apr-1999 (SLF) - add /ROLL keyword (include roll in) made noroll default
CALLS: ***
gt_pix_size, his_index, sxt_cen [1], sxt_cen [2], tim2dset [1], tim2dset [2]
CALLED BY:
mk_sfc [1], mk_sfc [2], plot_sxg, sel_leak_image [1], sel_leak_image [3]
sel_leak_image [4]
Side effects: - history record will be appended to index2 if
keyword POINT is set and no history exists already
[Previous]
[Next]
Name: match_index
Purpose: return ss for 'closest' match of index1 in index2 array
(fuzzy logic since it was written during ISAS visit)
Input Parameters:
index1, index2 - index or roadmap records
Keyword Parameters:
dpe - if set, match i1:i2 dpe
res - if set, match i1:i2 resolution
expmode - if set, match i1:specified mode
point - if set, choose minimum pointing seperation (if multiple matches)
delta - (output), deltaT for matching records
pdelta - (output), delta Pointing (arcsecs), only if POINT is set
ccdtemp - if set, match CCDTEMP (+/- specified degrees)
Output:
output are indices (lonarr) relative to index2 (-1 = no match)
Calling Sequence:
ss= match_index(index1,index2 , /res, /dpe)
Match Criteria:
filterA=flterA ; always
filterB=filterB
expmodeA=expmodeB
if (dpe) then dpeB=dpe ;
if (res) then above AND resA=resB ;
if (point) then minimal seperation satisfying above
Then, choose closest time satisfying above ; before/after date?
9-Dec-1994 (SLF) - SDC matches originally , but useful elsewhere?
10-dec-1994 (SLF) - tweaked etc...
17-mar-1995 (SLF) - logic correction (courtesy kevin reardon)
16-apr-1995 (SLF) - add SEPERATION keyword (output)
10-oct-1996 (SLF) - add CCD TEMP check
CALLS: ***
gt_pix_size, his_index, sxt_cen [1], sxt_cen [2], tim2dset [1], tim2dset [2]
CALLED BY:
mk_sfc [1], mk_sfc [2], plot_sxg, sel_leak_image [1], sel_leak_image [3]
sel_leak_image [4]
Side effects: - history record will be appended to index2 if
keyword POINT is set and no history exists already
[Previous]
[Next]
NAME: match_type
PURPOSE: to convert a variable type to match another
METHOD: use size on the target variable, then a case statement
for each type, and standard IDL conversion routines.
CALLING SEQUENCE: out=match_type(indat,tgrt)
PARAMETERS: indat data to be converted
trgt data whose type you want to match
out a variable with type matching TRGT.
CALLED BY:
rect_rot, rm_darklimb
HISTORY: Drafted by A. McAllister, March 1993.
[Previous]
[Next]
NAME:
matchem
PURPOSE:
To find the common indices between arrays aa and bb.
CALLING SEQUENCE:
iiaa = matchem(aa,bb)
PROCEDURES CALLED
delind
CALLS: ***
UNIQ [1], UNIQ [2], UNIQ [3], delind [1], delind [2]
CALLED BY:
sxt_clean [1], sxt_clean [2]
HISTORY:
Written by LWA on 3-Jan-96.
Rewritten using delind, LWA, 1/13/96.
Updated header, LWA, 1/15/96
Handled case of aa larger than bb.
Handled case of no common elements.
Case of non-unique elements, LWA, 1/27/96.
Replaced delind with kill_index, LWA, 8/02/00.
Back to use of delind.pro, now that it is fixed. LWA 10/25/05
Handle case of all common elements.
[Previous]
[Next]
NAME:
matchem
PURPOSE:
To find the common indices between arrays aa and bb.
CALLING SEQUENCE:
iiaa = matchem(aa,bb)
PROCEDURES CALLED
delind
CALLS: ***
UNIQ [1], UNIQ [2], UNIQ [3], delind [1], delind [2]
CALLED BY:
sxt_clean [1], sxt_clean [2]
HISTORY:
Written by LWA on 3-Jan-96.
Rewritten using delind, LWA, 1/13/96.
Updated header, LWA, 1/15/96
Handled case of aa larger than bb.
Handled case of no common elements.
Case of non-unique elements, LWA, 1/27/96.
[Previous]
[Next]
NAME: maxspect
Purpose: compute the maximum image size given the size of the
image and display.
Calling Sequence:
maxspect, ximg, yimg, xwin, ywin, nxsize, nysize
where,
INPUT:
ximg is the image size in x-dim.
yimg is the image size in y-dim.
xwin is the window size in x-dim.
ywin is the window size in y-dim.
OUTPUT:
nxsize is the new maximum size image with same aspect ratio
nysize is the new maximum size image with same aspect ratio
CALLED BY:
mk_movie [1], mk_movie [2], mk_ptv_movie
History:
written 30-Jun-94, gal
[Previous]
[Next]
NAME:
may_eclipse
PURPOSE:
enter Soma-san's calculations for the May 1994 eclipse of Yohkoh
CATEGORY:
Yohkoh
CALLING SEQUENCE:
may_data, data,
INPUTS:
none. Uses hard-wired data file
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
structure with many things
CALLS: ***
DAY_IN, RDFILE [1], RDFILE [2], anytim [1], anytim [2], anytim [3], anytim [4]
anytim [5], rd_fem, saa_in [1], saa_in [2]
MODIFICATION HISTORY:
HSH written 8 April 1994
HSH added d/n and saa 10 April 1994
[Previous]
[Next]
Name:
mbe2sec
Purpose:
Convert the mailbox exposure level, mbe, to time in sec.
Input:
mbExpLevel mailbox exposure level
Output:
Function returns commanded exposure time in sec.
CALLED BY:
GetStrExpLev
History:
Written 18-Sep-91: JRL
[Previous]
[Next]
NAME:
mc_unc
PURPOSE:
A brand new monte carlo test to obtain uncertainties in an SXT pixel
CALLING SEQUENCE:
Mc_unc, te, em, s_te, s_em, fb1, fb2, dt1=dt1, dt2=dt2, niter=niter, $
xxx=xxx, date=date, dnp_str=dnp_str, dnp_av=dnp_av, $
no_mc=no_mc, b1=b1, b2=b2, i_values=i_values, goods = goods
INPUT:
te= input temperature in Logs of t, note that this must be a scalar
em= input em in logs of em, note that this must be a scalar
fb1, fb2= filter numbers for the appropriate filters,
may be index structures
OUTPUT:
te= temperature in Logs of t, overwrites input te, i don't care.
em= em in logs of em, overwrites input em, i don't care.
s_te= uncertainty in te
s_em= uncertainty in em
KEYWORDS:
dt1, dt2= exposure times for the two filters in ms, as given
by gt_expdur.pro, defaults are 10ms, may be arrays.
niter= number of iterations for monte carlo calculation, default is 1000
xxx=if not set, then use sxt_flux.pro to get ccd e's and p's, if set,
uses sxt_dn_int to do calculation.
date= time in any format (including structure). Used to
determine entrance filter transmission.
this will override any date given if fb1 and fb2 are structures.
The default is as of yet unknown.
dnp_str= the distributions of dn's and photons, te's and em's,
tags are te, em, dn1, dn2, p1, p2
dnp_av= averages and dispersions in dn1, dn2, p1, p2
no_mc= if set, don't bother with the iteration
b1, b2= background DN's, defaults are b1, b2=13
i_values= the initial values of te, em, s_te, s_em, dn1, dn2, p1, p2
in a structure
goods= subscripts of the array elements that are ok
CALLS: ***
POIDEV, SXT_TEEM [1], SXT_TEEM [2], sxt_comp, sxt_decomp [1], sxt_decomp [2]
sxt_dn_int, sxt_flux [1], sxt_flux [2], sxt_flux [3]
RESTRICTIONS:
DATE or FRAC_OPEN (if specified) must be length 1. If the date is
obtained from FILTER (= SXT index), the first time in the structure
will be used to determine the entrance filter fraction.
If the dates of interest span the time of 13-nov-92 16:50 UT, then
separate calls must be made for data before and after this date.
HISTORY:
6-JUN-94 by JMM
12-jul-94, changed units from e47, t6 to em, te
12-jan-94, changed dispersion calculation to
sigma=sqrt(total((x-xbar)^2)/(n-1)), jmm
[Previous]
[Next]
NAME:
MEM_CHECKSUM
PURPOSE:
Calculates the checksum for the BCS micro memory
CATEGORY:
CALLING SEQUENCE:
checksum = mem_checksum(full_memory)
INPUTS:
full_memory Image of BCS micro memory
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
OUTPUTS:
checksum XOR checksum between 2000'x and 35ff'x
OPTIONAL OUTPUT PARAMETERS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
Image must start from at 0000'x and go at least to 035ff'x
PROCEDURE:
MODIFICATION HISTORY:
RDB 20-Jul-92
RDB 16-May-94 Split into seperate routine
[Previous]
[Next]
NAME:
MEMCHK_TIMES
PURPOSE:
Determines the times of changes in state of the MEM_CHECK flag
Short transitions due to bad frames are filtered out.
CALLING SEQUENCE:
MEMCHK_TIMES,DP_SYNC [,/print]
INPUT:
DP_SYNC structure
KEYWORD INPUT:
PRINT If set, the results are printed
OUTPUT:
produces "mem_chk.lis" on current directory
OPTIONAL OUTPUT:
HISTORY
RDB, 19-Feb-92 Written
RDB, 10-May-92 Added /PRINT option
CALLS:
CALLED BY
FIND_SEU
[Previous]
[Next]
Name: merc_lwa
Purpose: read/display genx files
CALLS: ***
DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], WDEF [1], WDEF [2], delvarx [5]
prstr [1], prstr [2], restgen [1], restgen [2], wmenu_sel [1], wmenu_sel [2]
Optional Keyword Input:
/notv, set this if you only desire to read the text output.
/no_rgb, set this if you wish to use your own color table.
History:
7-Nov-1993 (SLF) Written for mercury picture display
10-Nov-1993 (SLF) allow r,g,b parameters, auto size window if too small
10-Nov-1993 (LWA) added header info and no_rgb keyword
and changed name to merc_lwa
Side Effects:
may open a new window
[Previous]
[Next]
Name: merc_pix
Purpose: read/display genx files
History:
7-Nov-1993 (SLF) Written for mercury picture display
10-Nov-1993 (SLF) allow r,g,b parameters, auto size window if too small
11-Nov-1993 (SLF) add norgb switch, add delvarx,r,g,b
CALLS: ***
DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], WDEF [1], WDEF [2], delvarx [5]
prstr [1], prstr [2], restgen [1], restgen [2], wmenu_sel [1], wmenu_sel [2]
Side Effects:
may open a new window
[Previous]
[Next]
NAME:
mewe_solar
PURPOSE:
Create the mewe_solar.genx spectral-line data file from the
file /ys/sxt/resposne/mewe_cosmic.genx
Uses Meyer 1985 "adopted coronal" values.
MODIFICATION HISTORY:
25-feb-93, J. R. Lemen, LPARL
[Previous]
[Next]
NAME:
mewe_spec = mewe_spec_lwa
PURPOSE:
Compute a Mewe thermal spectrum (line + continuum) for EM=1.e44 cm^-3
CALLING SEQUENCE:
Flux = mewe_spec(Te6,wave) ; ph s-1
Flux = mewe_spec(Te6,wave,/photon) ; ph s-1
Flux = mewe_spec(Te6,wave,/erg) ; erg s-1
Flux = mewe_spec(Te6,wave,/cosmic) ; Cosmic abundances
INPUTS:
Te6 = Electron Temperature in MK (may be a vector)
Wave = Vector of wavelengths (Ang) (centers of the wavelength bins)
or, if keyword EDGES is set, either
a 2xN array of the 2 wavelength edges of N bins, or,
a 1-d vector of the bin edges (Ang).
Unequal wavelength bins and non-integer wavelengths
are acceptable.
OUTPUTS:
Flux = Fluxes in ph s-1 or erg s-1 (total flux with each bin)
Fluxes = fltarr(N_elements(Te6),N_elements(wave))
OPTIONAL INPUT KEYWORDS:
Photon = If set, calculation is made in ph s-1 (default)
Erg = If set, calculation is made in erg s-1
Cosmic = If set, use cosmic abundances (solar is default)
Edges = If set, interpret Wave as a 2xN set of wavelength boundaries
file_in = To specify the input file for linflx explicity.
OPTIONAL OUTPUT KEYWORDS:
Abun = Abundances used for calculation
elem = Elements corresponding to the abundances
cont_flux = Continuum flux alone (without line contribution).
dwave = Widths of wavelength bins (Ang)
wave_range = Interval over which lines are extracted (Ang)
wave4plot = Bin-center wavelengths for plotting purposes (Ang)
METHOD:
Calls linflx and conflx. Linflx reads the line data from either
$DIR_SXT_SENSITIVE/mewe_cosmic.genx or $DIR_SXT_SENSITIVE/mewe_solar.genx
The mewe_cosmic.genx file is taken from the following references:
Mewe, Gronenschild, van den Oord, 1985, (Paper V) A. & A. Suppl., 62, 197
Mewe, Lemen, and van den Oord, 1986, (Paper VI) A. & A. Suppl., 65, 511
PROGRAMS CALLED:
conflx_binner, conflx, linflx, sort, rebin, transpose, total, reform
CALLS: ***
CONFLX [1], CONFLX [2], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
MEWE_SPEC_LWA, UNIQ [1], UNIQ [2], UNIQ [3], conflx_binner, delvarx [5], linflx [1]
linflx [2]
MODIFICATION HISTORY:
29-oct-92, Written, J. R. Lemen, LPARL
25-feb-93, JRL, Added /cosmic option
7-jul-93, JRL, Added the file_in= keyword
8-jun-94, JMM, Added IF block to avoid crashing when the line
flux comes out to be zero.
13-jul-94, JRL, Added /edges a la R. A. Schwartz cira 1993
2-aug-94, JRL, Added the file_in= keyword (again!). Changed header.
21-Jun-95, JRL, linflx changed to assume EM=1.e44 cm-3
6-Jan-96, JRL, Added the Mewe et al references to the header
11-Jun-96, LWA, Improved continuum calculation for cases of unequal
wavelength bin widths or wide bins. Removed
requirement for 2xN wavelength array for /edges.
13-Jun-96, LWA, Dumb repair to handle single temperature case.
Allowed the 2xN wave for /edges for consistency.
25-Jun-96, LWA, Revised logic to split line flux between adjacent
wavelength bins when wavelength of line and bin
edge are at the same wavelength.
[Previous]
[Next]
NAME:
mewe_spec
PURPOSE:
Compute a Mewe thermal spectrum (line + continuum) for EM=1.e44 cm^-3
CALLING SEQUENCE:
Flux = mewe_spec(Te6,wave) ; ph s-1
Flux = mewe_spec(Te6,wave,/photon) ; ph s-1
Flux = mewe_spec(Te6,wave,/erg) ; erg s-1
Flux = mewe_spec(Te6,wave,/cosmic) ; Cosmic abundances
INPUTS:
Te6 = Electron Temperature in MK (may be a vector)
Wave = Vector of wavelengths (Ang) (centers of the wavelength bins)
or, if keyword EDGES is set,
a 2xN array of the 2 wavelength edges of N bins.
OUTPUTS:
Flux = Fluxes in ph s-1 or erg s-1 (total flux with each bin)
Fluxes = fltarr(N_elements(Te6),N_elements(wave))
OPTIONAL INPUT KEYWORDS:
Photon = If set, calculation is made in ph s-1 (default)
Erg = If set, calculation is made in erg s-1
Cosmic = If set, use cosmic abundances (solar is default)
Edges = If set, interpret Wave as a 2xN set of wavelength boundaries
file_in = To specify the input file for linflx explicity.
OPTIONAL OUTPUT KEYWORDS:
Abun = Abundances used for calculation
elem = Elements corresponding to the abundances
cont_flux = Continuum flux alone (without line contribution).
dwave = Widths of wavelength bins (Ang)
wave_range = Interval over which lines are extracted (Ang)
METHOD:
Calls linflx and conflx. Linflx reads the line data from either
$DIR_SXT_SENSITIVE/mewe_cosmic.genx or $DIR_SXT_SENSITIVE/mewe_solar.genx
The mewe_cosmic.genx file is taken from the following references:
Mewe, Gronenschild, van den Oord, 1985, (Paper V) A. & A. Suppl., 62, 197
Mewe, Lemen, and van den Oord, 1986, (Paper VI) A. & A. Suppl., 65, 511
The solar coronal abundances in mewe_solar.genx a adapted from:
Meyer, J.-P., 1985, ApJ Suppl., 57, 173.
CALLS: ***
CONFLX [1], CONFLX [2], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], UNIQ [1]
UNIQ [2], UNIQ [3], delvarx [5], linflx [1], linflx [2]
CALLED BY:
MAKE_GOES_RESP, ROUTINE_NAME [1], SXT_THERM, SXT_THERM_EBAR, SXT_WEIGHT
THERMAL_KEV, dfx_1th_lo, dfx_thppl_lo, fdf10_init, fx_1th_lo, get_slider, model_spec
out_spectra_4_designer, set_field, sxt_dn_int, sxt_erg_per_dn, sxt_etemp
tem_thermal_power
MODIFICATION HISTORY:
29-oct-92, Written, J. R. Lemen, LPARL
25-feb-93, JRL, Added /cosmic option
7-jul-93, JRL, Added the file_in= keyword
8-jun-94, JMM, Added IF block to avoid crashing when the line
flux comes out to be zero.
13-jul-94, JRL, Added /edges a la R. A. Schwartz cira 1993
2-aug-94, JRL, Added the file_in= keyword (again!). Changed header.
21-Jun-95, JRL, linflx changed to assume EM=1.e44 cm-3
6-Jan-96, JRL, Added the Mewe et al references to the header
16-Dec-96, LWA, Added the Meyer reference to the header.
[Previous]
[Next]
NAME:
minF_partan
PURPOSE:
Find the local minimum of a scalar function of several variables using
the Partan modification to the Conjugate Gradient method
(Fletcher-Reeves-Polak-Ribiere algorithm).
Function may be anything with computable partial derivatives.
Each call to minF_partan performs one iteration of algorithm,
and returns an N-dim point closer to the local minimum of function.
CALLING EXAMPLE:
p_min = replicate( 1, N_dim )
minF_partan, p_min, f_min, conv_factor, FUNC_NAME="name",/INITIALIZE
while (conv_factor GT 0) do begin
minF_partan, p_min, f_min, conv_factor, FUNC_NAME="name"
endwhile
INPUTS:
p_min = vector of independent variables, location of minimum point
obtained from previous call to minF_partan, (or first
guess).
KEYWORDS:
FUNC_NAME = function name (string)
Calling mechanism should be: F = func_name( px, gradient )
where:
F = scalar value of function at px.
px = vector of independent variables, input.
gradient = vector of partial derivatives of the function
with respect to independent variables, evaluated at px.
This is an optional output parameter:
gradient should not be calculated if parameter is not
supplied in call (Unless you want to waste some time).
/INIT must be specified on first call (whenever p_min is a guess),
to initialize the iteration scheme of algorithm.
/USE_DERIV causes the directional derivative of function to be used
in the 1-D minimization part of algorithm
(default is not to use directional derivative).
/CONTINUED = Use continued ParTan rather than the default iterative
ParTan.
TOLERANCE = desired accuracy of minimum location, default=sqrt(1.e-7).
OUTPUTS:
p_min = vector giving improved solution for location of minimum point.
f_min = value of function at p_min.
conv_factor = gives the current rate of convergence (change in value),
iteration should be stopped when rate gets near zero.
EXTERNAL CALLS:
pro minF_bracket, to find 3 points which bracket the minimum in 1-D.
pro minF_parabolic, to find minimum point in 1-D.
pro minF_parabol_D, to find minimum point in 1-D, using derivatives.
CALLS: ***
MINF_BRACKET, MINF_PARABOLIC, MINF_PARABOL_D [2], minF_parabol_D [1]
CALLED BY:
HXTFPB, HXTFPB_FUZZY, PSFPIXON
COMMON BLOCKS:
common minf_partan, grad_conj, grad_save, gs_norm, last_p1,last_p2
(to keep conjugate gradient, gradient and norm from previous iteration)
PROCEDURE:
Algorithm adapted from Numerical Recipes, sec.10.6 (p.305).
Conjugate gradient is computed from gradient, which then gives
the best direction (in N-dim space) in which to proceed to find
the minimum point. The function is then minimized along
this direction of conjugate gradient (a 1-D minimization).
The algorithm is repeated starting at the new point by calling again.
MODIFICATION HISTORY:
Written, Frank Varosi NASA/GSFC 1992.
T. Metcalf June 14, 1994 Modified minf_conj_grad.pro for the
partan algorithm.
[Previous]
[Next]
NAME:
mk_aoslos
PURPOSE:
Create the AOSLOS raw ascii file for use by op_first_guess and
mk_dsn_predict. This is a driver for run_dsnfil
CALLING SEQUENCE:
mk_aoslos,sttim,interval,num_interval,aoslos_file=aoslos_file,path=path
INPUTS:
sttim = Starting time in any standard format
interval = Interval in sec
num_interval= Number of intervals
OPTIONAL INPUT KEYWORDS:
path = Output path of the aoslos file.
OPTIONAL INTPUT KEYWORDS:
keep = Purge old versions, but keep this number.
If not supplied or set to 0, no action.
OPTIONAL OUTPUT KEYWORDS:
aoslos_file = Name of the output file.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], anytim2ex [1], anytim2ex [2]
concat_dir [4], run_dsnfil
CALLED BY:
mk_op_file, mk_orbit_files
MODIFICATION HISTORY:
7-sep-92, J. R. Lemen, Written
22-sep-92, JRL, Added keep keyword
1-may-93, JRL, Added ASCA keyword
13-Dec-99, JRL/SLF - remove file_purge (Y2K)
[Previous]
[Next]
NAME:
mk_att
PURPOSE:
To take the raw attitude summary file (ATR) and make the
processed pointing file (ATT)
INPUT:
week_str- The week to process (ie: "93_24")
OPTIONAL KEYWORD OUTPUT:
run_time- The number of minutes it took to run
CALLS: ***
ATT_STRUCT [1], ATT_STRUCT [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
FILE_EXIST [2], GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, HXA_PARMS [1]
HXA_PARMS [2], HXA_PARMS [3], IRUHXASCAN2SXT [1], IRUHXASCAN2SXT [2]
OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE, REF_STRUCT, Rd_NewOrb_p [1]
Rd_NewOrb_p [2], Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2]
Rd_fHeader [3], WRT1P_FH, anytim2ints [1], anytim2ints [2], concat_dir [4]
file_exist [1], file_exist [3], fmt_tim [1], fmt_tim [2], rdwrt [1], rdwrt [2]
rdwrt [3], read_genxcat, tim2orbit [1], tim2orbit [2]
HISTORY:
Written 20-Jul-93 by M.Morrison
V1.1 10-May-94 (MDM) - Modified to not crash when two ADA files have
complete overlap and there is no new data to
write out
V1.2 29-Aug-94 (MDM) - Added print statement
- Added OUTDIR and QSTOP option
V1.3 2-Sep-94 (MDM) - Save ATT file with ATT prefix not ATR inside the
file header
- Changed print statement to MK_ATT not MK_ATR finished
V1.4 24-Sep-94 (SLF) - set STATUS2 Correction Version number (currently,
only use hxa_params version number directly
V1.5 8-Dec-94 (MDM) - Updated to work when there is no data, but there
is an orbit pointer entry
- Also updated ProgVerNo which was not updated at V1.4
31-Mar-99 (GLS) - Modified to include hxa_scan data in pointing solution.
[Previous]
[Next]
NAME:
mk_att
PURPOSE:
To take the raw attitude summary file (ATR) and make the
processed pointing file (ATT)
INPUT:
week_str- The week to process (ie: "93_24")
OPTIONAL KEYWORD OUTPUT:
run_time- The number of minutes it took to run
CALLS: ***
ATT_STRUCT [1], ATT_STRUCT [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
FILE_EXIST [2], GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, HXA_PARMS [1]
HXA_PARMS [2], HXA_PARMS [3], IRUHXASCAN2SXT [1], IRUHXASCAN2SXT [2]
OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE, REF_STRUCT, Rd_NewOrb_p [1]
Rd_NewOrb_p [2], Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2]
Rd_fHeader [3], WRT1P_FH, anytim2ints [1], anytim2ints [2], concat_dir [4]
file_exist [1], file_exist [3], fmt_tim [1], fmt_tim [2], rdwrt [1], rdwrt [2]
rdwrt [3], read_genxcat, tim2orbit [1], tim2orbit [2]
HISTORY:
Written 20-Jul-93 by M.Morrison
V1.1 10-May-94 (MDM) - Modified to not crash when two ADA files have
complete overlap and there is no new data to
write out
V1.2 29-Aug-94 (MDM) - Added print statement
- Added OUTDIR and QSTOP option
V1.3 2-Sep-94 (MDM) - Save ATT file with ATT prefix not ATR inside the
file header
- Changed print statement to MK_ATT not MK_ATR finished
V1.4 24-Sep-94 (SLF) - set STATUS2 Correction Version number (currently,
only use hxa_params version number directly
V1.5 8-Dec-94 (MDM) - Updated to work when there is no data, but there
is an orbit pointer entry
- Also updated ProgVerNo which was not updated at V1.4
[Previous]
[Next]
NAME:
mk_bcs_spec
PURPOSE:
Called by bcs_spec to compute a BCS spectrum (ph cm-2 s-1 Ang-1 at 1AU)
CALLING SEQUENCE:
spectrum = mk_bcs_spec(TDOPPW,ROCKW,wave1,wave0,intensity)
spectrum = mk_bcs_spec(TDOPPW,ROCKW,wave1,wave0,intensity,vel=vel)
INPUTS:
TDOPPW = FWHM of Gaussian line broadening term (Ang)
ROCKW = FWHM of Lorentzian line broadening term (Ang)
Wave1 = A vector describing the start wavelength of a vector of bins. (Ang)
bcs_spec will return n_elements(wave)-1 bins.
Wave must be monotonically increasing or decreasing.
wave0 = Vector of wavelengths corresponding to intensity. (Ang)
intensity = Vector of line or continuum intensities (photons s-1)
If TDOPPW=ROCKW=0, then assume intensity is ph s-1 Ang-1
OPTIONAL INPUT KEYWORDS:
velocity = Line-of-sight velocity in km/s (negative is blue-shifted)
Ashift = Bulk wavelength shift
OUTPUTS:
CALLS: ***
DSPLINE, WVOIGT
CALLED BY:
bcs_spec
Note: This routine normalizes to per Ang and puts the source at 1 AU
Output spectrum is in photons/cm^2/sec/Ang at 1 AU
MODIFICATION HISTORY:
17-sep-93, J. R. Lemen (LPARL), Written
29-oct-93, JRL, Fixed a bug with the Vel= option
[Previous]
[Next]
NAME:
MK_BSA
PURPOSE:
to produce a BSA structure that contains information
to guide the production of a BSC file via MK_BSC.
CALLING SEQUENCE:
MK_BSA,BDA_INDEX,BSA_INDEX
INPUTS:
BDA_INDEX - an array of BDA index (or roadmap) structures
BSA_INDEX - an initial BSC index structures with fields
set according to user specifications described below.
The BSA_INDEX will be input to MKBSC to create a BSC
file.
KEYWORDS:
CHANS - channels to select:
e.g. CHANS=1 to select channel 1,
CHANS=[1,4] to select channels 1 and 4, etc.
Default is [2,3,4] channels.
ACCUM - seconds of integration to accumulate spectrum:
e.g. ACCUM=3 to accumulate all desired channels
with 3 second intervals; ACCUM=[3,10] to use 3 and 10
second intervals in channels selected via CHAN, etc.
Setting ACCUM=0 will deliver the highest available time
resolution. Default is 9 sec accumulation.
THRESH - threshold counts upon which to base accumulation time.
e.g. THRESH=100 to accumulate all desired channels
until 100 counts is reached; THRESH=[100,200] to
accumulate data in channels selected via CHAN
until 100 and 200 counts are reached, etc.
Default is NO threshold (THRESH=0).
DEADTIME - 0 = no deadtime correction
1 = use LIM/ACC DP_SYNC counts
2 = use SUM(LIM)/SUM(ACC) counts were SUM is taken over
channel 1 & 2, and 3 & 4.
DT_INTERP - 1 = interpolate zero deadtime factors
= do not interpolate
FLUXCAL - 1 = convert count rates to photon flux
0 = do not flux calibrate
WAVECAL - 1 = apply wavelength calibration to spectra
0 = do not wavelength calibrate
BLOCKID - Block ID to select (def=0; normal)
MODEID - Mode ID to select (def=all)
XCORR - 1 = apply crystal curvature corrections
0 = do not correct for curvature
TRANGE - [TSTART,TEND] time range to confine processing,
where TSTART.TIME=MSOD, TSTART.DAY=DS79, etc.
Default is to process all data times in BDA_INDEX.
ERR - 1 if failed else 0
CALLS: ***
MK_BSA_STC [1], MK_BSA_STC [2], mk_bsa_interv [1], mk_bsa_interv [2]
PROCEDURE:
Calls MK_BSA_STC and MK_BSA_INTERV
HISTORY:
Written Apr'93 by D. Zarro (Applied Research Corp).
[Previous]
[Next]
NAME:
mk_bsa_ans
PURPOSE:
to create a low-level BSA structure
CALLING SEQUENCE:
bsa_ans=mk_bsa_ans()
INPUTS:
none
OUTPUTS:
bsa_ans = a structure
CALLED BY:
GET_BSA_ANS [1], GET_BSA_ANS [2], WBSA [1], WBSA [2]
PROCEDURE:
Creates a very low-level BSA answer structure
that is later incorporated into the BSC_INDEX by MKBSA
HISTORY:
Written Jan'93 by DMZ (ARC)
[Previous]
[Next]
NAME:
mk_bsa_interv
PURPOSE:
define accumulation time intervals for BSC data
CALLING SEQUENCE:
mk_bsa_interv,bda_index,bsa_index,trange=trange
INPUTS:
BDA_INDEX - an array of BDA index (or roadmap) structures
BSA_INDEX - an array of initial BSC index structures with fields
set according to user specifications.
OUTPUTS:
BSA_INDEX - modified with start/stop intervals for accumulation
KEYWORDS:
ERR - 1 if BSA_INTERV failed else 0
TRANGE - [TSTART,TEND] time range to confine processing,
where TSTART.TIME=MSOD, TSTART.DAY=DS79, etc.
Default is to process all data times in BDA_INDEX.
CALLS: ***
BSC_CHECK [1], BSC_CHECK [2], COMDIM2, fmt_tim [1], fmt_tim [2], gt_day [1]
gt_day [2], gt_time [1], gt_time [2]
CALLED BY:
MK_BSA, MK_BSC [1], MK_BSC [2], WBDA [1], WBDA [2]
PROCEDURE:
Uses TOTAL_CNTS in index to determine start and end
times for integration in each channel. Counts in each
channel will be integrated until summed accumulation
time is greater than or equal to specified ACCUM.
If THRESH is set, then counts will be integrated until
summed counts are greater than or equal to specified THRESH.
If THRESH and ACCUM are both set, then accumulation is
increased until THRESH and ACCUM are reached.
(N.B. different channels can end up with different
total numbers of accumulated samples).
HISTORY:
- Written Apr'93 by D. Zarro (Applied Research Corp).
- removed concatanation to alleviate speed/memory probs.
- 12-Apr-94, Zarro, improved error checking
- 19-May-94, Zarro, added check for nonexistent channels
- 20-Jun-94, fixed potential overflow bug in total_cnts
- 26-Jan-95, added facility to flag BLOCKID change
- Apr'95 , switched off SAA/NIGHT check
- 31-Dec-2003, Zarro (L-3Com/GSFC) - made threshold/accumulation check
consistent with documentation
[Previous]
[Next]
NAME:
mk_bsa_interv
PURPOSE:
define accumulation time intervals for BSC data
CALLING SEQUENCE:
mk_bsa_interv,bda_index,bsa_index,trange=trange
INPUTS:
BDA_INDEX - an array of BDA index (or roadmap) structures
BSA_INDEX - an array of initial BSC index structures with fields
set according to user specifications.
OUTPUTS:
BSA_INDEX - modified with start/stop intervals for accumulation
KEYWORDS:
ERR - 1 if BSA_INTERV failed else 0
TRANGE - [TSTART,TEND] time range to confine processing,
where TSTART.TIME=MSOD, TSTART.DAY=DS79, etc.
Default is to process all data times in BDA_INDEX.
CALLS: ***
BSC_CHECK [1], BSC_CHECK [2], COMDIM2, fmt_tim [1], fmt_tim [2], gt_day [1]
gt_day [2], gt_time [1], gt_time [2]
CALLED BY:
MK_BSA, MK_BSC [1], MK_BSC [2], WBDA [1], WBDA [2]
PROCEDURE:
Uses TOTAL_CNTS in index to determine start and end
times for integration in each channel. Counts in each
channel will be integrated until summed accumulation
time is greater than or equal to specified ACCUM.
If THRESH is set, then counts will be integrated until
summed counts are greater than or equal to specified THRESH.
If THRESH and ACCUM are both set, then accumulation is
increased until THRESH and ACCUM are reached.
(N.B. different channels can end up with different
total numbers of accumulated samples).
HISTORY:
- Written Apr'93 by D. Zarro (Applied Research Corp).
- removed concatanation to alleviate speed/memory probs.
- 12-Apr-94, Zarro, improved error checking
- 19-May-94, Zarro, added check for nonexistent channels
- 20-Jun-94, fixed potential overflow bug in total_cnts
- 26-Jan-95, added facility to flag BLOCKID change
- Apr'95 , switched off SAA/NIGHT check
[Previous]
[Next]
NAME:
MK_BSA_STC
PURPOSE:
to produce a BSA structure that contains information
to guide production of a BSC file via MK_BSC.
CALLING SEQUENCE:
MK_BSA_STC, BSA_INDEX
OUTPUTS:
BSA_INDEX - an initial BSC index structures with fields
set according to user specifications described below.
The BSA_INDEX is used in MK_BSC to create a BSC
file.
KEYWORDS:
CHANS - channels to select:
e.g. CHANS=1 to select channel 1,
CHANS=[1,4] to select channels 1 and 4, etc.
Default is [2,3,4] channels.
ACCUM - seconds of integration to accumulate spectrum:
e.g. ACCUM=3 to accumulate all desired channels
with 3 second intervals; ACCUM=[3,10] to use 3 and 10
second intervals in channels selected via CHAN, etc.
Setting ACCUM=0 will deliver the highest available time
resolution. Default is 9 sec accumulation.
THRESH - threshold counts upon which to base accumulation time.
e.g. THRESH=100 to accumulate all desired channels
until 100 counts is reached; THRESH=[100,200] to
accumulate data in channels selected via CHAN
until 100 and 200 counts are reached, etc.
Default is NO threshold (THRESH=0).
DEADTIME - 0 = no deadtime correction
1 = use LIM/ACC DP_SYNC counts
2 = use SUM(LIM)/SUM(ACC) counts were SUM is taken over
channel 1 & 2, and 3 & 4.
DT_INTERP - 1 set zero deadtime factors to unity
- 2 keep zero deadtime factors as zero
- 3 interpolate out zero deadtime factors
FLUXCAL - 1 = convert count rates to photon flux
0 = do not flux calibrate
WAVECAL - 1 = apply wavelength calibration to spectra
0 = do not wavelength calibrate
XCORR - 1 = apply crystal curvature corrections
0 = do not correct for curvature
CALLS: ***
MK_BSC_STR [1], MK_BSC_STR [2]
CALLED BY:
MK_BSA, MK_BSC [1], MK_BSC [2], WBDA [1], WBDA [2]
HISTORY:
Written Apr'93 by D. Zarro (ARC)
Modified Feb'94 by D. Zarro (ARC) -- added st$spacecraft tag to .BSC
Modified Apr'95 by D. Zarro (ARC) -- added bad channel check
Modified Mar'97 by D. Zarro (ARC) -- made DT_INTERP=0 the default
[Previous]
[Next]
NAME:
MK_BSA_STC
PURPOSE:
to produce a BSA structure that contains information
to guide production of a BSC file via MK_BSC.
CALLING SEQUENCE:
MK_BSA_STC, BSA_INDEX
OUTPUTS:
BSA_INDEX - an initial BSC index structures with fields
set according to user specifications described below.
The BSA_INDEX is used in MK_BSC to create a BSC
file.
KEYWORDS:
CHANS - channels to select:
e.g. CHANS=1 to select channel 1,
CHANS=[1,4] to select channels 1 and 4, etc.
Default is [2,3,4] channels.
ACCUM - seconds of integration to accumulate spectrum:
e.g. ACCUM=3 to accumulate all desired channels
with 3 second intervals; ACCUM=[3,10] to use 3 and 10
second intervals in channels selected via CHAN, etc.
Setting ACCUM=0 will deliver the highest available time
resolution. Default is 9 sec accumulation.
THRESH - threshold counts upon which to base accumulation time.
e.g. THRESH=100 to accumulate all desired channels
until 100 counts is reached; THRESH=[100,200] to
accumulate data in channels selected via CHAN
until 100 and 200 counts are reached, etc.
Default is NO threshold (THRESH=0).
DEADTIME - 0 = no deadtime correction
1 = use LIM/ACC DP_SYNC counts
2 = use SUM(LIM)/SUM(ACC) counts were SUM is taken over
channel 1 & 2, and 3 & 4.
DT_INTERP - 1 = interpolate zero deadtime factors
= do not interpolate
FLUXCAL - 1 = convert count rates to photon flux
0 = do not flux calibrate
WAVECAL - 1 = apply wavelength calibration to spectra
0 = do not wavelength calibrate
XCORR - 1 = apply crystal curvature corrections
0 = do not correct for curvature
CALLS: ***
MK_BSC_STR [1], MK_BSC_STR [2]
CALLED BY:
MK_BSA, MK_BSC [1], MK_BSC [2], WBDA [1], WBDA [2]
HISTORY:
Written Apr'93 by D. Zarro (ARC)
Modified Feb'94 by D. Zarro (ARC) -- added st$spacecraft tag to .BSC
Modified Apr'95 by D. Zarro (ARC) -- added bad channel check
[Previous]
[Next]
NAME:
MK_BSC
PURPOSE:
to make BSC data
CALLING SEQUENCE:
MK_BSC, BDA_INDEX, BDA_DATA,BSC_INDEX,BSC_DATA,DP_SYNC=DP_SYNC
INPUTS:
BDA_INDEX - BDA index structures (from YODAT)
BDA_DATA - BDA data array
OUTPUTS:
BSC_INDEX - BSC index structure
BSC_DATA - BSC data structure
KEYWORDS:
DEF - if set, then use defaults
DP_SYNC - input DP_SYNC array (needed for deadtime correction)
LAST - use information already contained in latest BSC index
BSA - just compute BSC index and stop
SAVE - save BCS index and/or data in a BSC file
(if FILE is not a string, then file name is constructed
from start time and date of BSC data)
WID - use widget option
VERBOSE - verbose output
CHANS, ACCUM, THRESH - channels, accumulation times, thresholds
MODEID - modeid to select [def = all]
BLOCKID - blockid to select [def = all]
IMODEID - modeid to ignore [def = none]
IBLOCKID - blockid to ignore [def = 5]
CALLED BY:
first_bcs
PROCEDURE:
Prompts user for starting parameters for MKBSC
User can opt to write a BSA file (which contains just the BSC_INDEX)
or a BSC file (which contains the BSC INDEX and DATA structures).
Calls: ***
BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
mk_bsa_interv [2], sav_bsc
Calls: ***
BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
mk_bsa_interv [2], sav_bsc
Calls: ***
BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
mk_bsa_interv [2], sav_bsc
Calls: ***
BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
mk_bsa_interv [2], sav_bsc
Calls: ***
BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
mk_bsa_interv [2], sav_bsc
HISTORY:
Nov'92, DMZ (ARC) - written
Apr'93, DMZ, -- added COMMON for DP_SYNC
Oct'93, DMZ -- added check for valid_ans
1-Nov-93, DMZ -- added CHANS, ACCUM, and THRESH keywords
12-Apr-94, DMZ -- fixed bug introduced 1-Nov-93
18-May-94, DMZ -- added modeid keyword
16-Jun-94, DMZ -- added more error checking of inputs
27-Jan-95, DMZ -- added BLOCKID keyword
1-Apr-95, DMZ -- added filter for MODE and BLOCK IDS
29-Jun-95, DMZ -- added ignore option for MODE and BLOCK ID filter
18-Dec-95, DMZ -- added check so that BSC_VALID uses correct NBINS
when /LAST is set
17-Mar-97, DMZ -- passed VERBOSE to MK_BSC_DATA
[Previous]
[Next]
NAME:
MK_BSC
PURPOSE:
to make BSC data
CALLING SEQUENCE:
MK_BSC, BDA_INDEX, BDA_DATA,BSC_INDEX,BSC_DATA,DP_SYNC=DP_SYNC
INPUTS:
BDA_INDEX - BDA index structures (from YODAT)
BDA_DATA - BDA data array
OUTPUTS:
BSC_INDEX - BSC index structure
BSC_DATA - BSC data structure
KEYWORDS:
DEF - if set, then use defaults
DP_SYNC - input DP_SYNC array (needed for deadtime correction)
LAST - use information already contained in latest BSC index
BSA - just compute BSC index and stop
SAVE - save BCS index and/or data in a BSC file
(if FILE is not a string, then file name is constructed
from start time and date of BSC data)
WID - use widget option
VERBOSE - verbose output
CHANS, ACCUM, THRESH - channels, accumulation times, thresholds
MODEID - modeid to select [def = all]
BLOCKID - blockid to select [def = all]
IMODEID - modeid to ignore [def = none]
IBLOCKID - blockid to ignore [def = 5]
CALLED BY:
first_bcs
PROCEDURE:
Prompts user for starting parameters for MKBSC
User can opt to write a BSA file (which contains just the BSC_INDEX)
or a BSC file (which contains the BSC INDEX and DATA structures).
Calls: ***
BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
mk_bsa_interv [2], sav_bsc
Calls: ***
BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
mk_bsa_interv [2], sav_bsc
Calls: ***
BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
mk_bsa_interv [2], sav_bsc
Calls: ***
BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
mk_bsa_interv [2], sav_bsc
Calls: ***
BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
mk_bsa_interv [2], sav_bsc
HISTORY:
Nov'92, DMZ (ARC) - written
Apr'93, DMZ, -- added COMMON for DP_SYNC
Oct'93, DMZ -- added check for valid_ans
1-Nov-93, DMZ -- added CHANS, ACCUM, and THRESH keywords
12-Apr-94, DMZ -- fixed bug introduced 1-Nov-93
18-May-94, DMZ -- added modeid keyword
16-Jun-94, DMZ -- added more error checking of inputs
27-Jan-95, DMZ -- added BLOCKID keyword
1-Apr-95, DMZ -- added filter for MODE and BLOCK IDS
29-Jun-95, DMZ -- added ignore option for MODE and BLOCK ID filter
18-Dec-95, DMZ -- added check so that BSC_VALID uses correct NBINS
when /LAST is set
[Previous]
[Next]
NAME:
MK_BSC_DATA
PURPOSE:
to produce a BSC data structure from BDA data given control information
in the variable BSC_INDEX
CALLING SEQUENCE:
MK_BSC_DATA,BDA_INDEX,BDA_DATA,BSC_INDEX,BSC_DATA,DP_SYNC=DP_SYNC
INPUTS:
BDA_INDEX - BDA index structure
BDA_DATA - BDA data in [4,*] array (counts)
BSC_INDEX - BSC_INDEX created by MKBSA
OUTPUTS:
BSC_DATA - BSC data structure
BSC_INDEX - updated BSC_INDEX
KEYWORDS:
DP_SYNC - input DP_SYNC array needed for dead-time correction
ERRCAL - compute data uncertainties
NOVALID - don't extract out valid bins (i.e. sin(theta) ne 0)
VERBOSE - be verbose
CALLED BY:
MK_BSC [1], MK_BSC [2], WBDA [1], WBDA [2]
PROCEDURE:
Uses information in BSC_INDEX to determine
how BDA spectral data will be processed.
CALLS: ***
BCS_ACCUM [1], BCS_ACCUM [2], BSC_CHECK [1], BSC_CHECK [2], BSC_ERRCAL [1]
BSC_ERRCAL [2], BSC_FLUXCAL, BSC_VALID, BSC_WAVECAL, BSC_XCORR, bcs_dtfac [1]
bcs_dtfac [2]
RESTRICTIONS:
It is assumed that the user has already read the
BDA data into main memory
(e.g. with YODAT)
HISTORY:
Written Sept. 1992 by D. Zarro (Applied Research Corp).
Modified Dec'92, modified for new BSC data structures
Modified Apr'93, added check that DP_SYNC and data times overlap
Modified Mar'97, added VERBOSE
[Previous]
[Next]
NAME:
MK_BSC_DATA
PURPOSE:
to produce a BSC data structure from BDA data given control information
in the variable BSC_INDEX
CALLING SEQUENCE:
MK_BSC_DATA,BDA_INDEX,BDA_DATA,BSC_INDEX,BSC_DATA,DP_SYNC=DP_SYNC
INPUTS:
BDA_INDEX - BDA index structure
BDA_DATA - BDA data in [4,*] array (counts)
BSC_INDEX - BSC_INDEX created by MKBSA
OUTPUTS:
BSC_DATA - BSC data structure
BSC_INDEX - updated BSC_INDEX
KEYWORDS:
DP_SYNC - input DP_SYNC array needed for dead-time correction
ERRCAL - compute data uncertainties
NOVALID - don't extract out valid bins (i.e. sin(theta) ne 0)
CALLED BY:
MK_BSC [1], MK_BSC [2], WBDA [1], WBDA [2]
PROCEDURE:
Uses information in BSC_INDEX to determine
how BDA spectral data will be processed.
CALLS: ***
BCS_ACCUM [1], BCS_ACCUM [2], BSC_CHECK [1], BSC_CHECK [2], BSC_ERRCAL [1]
BSC_ERRCAL [2], BSC_FLUXCAL, BSC_VALID, BSC_WAVECAL, BSC_XCORR, bcs_dtfac [1]
bcs_dtfac [2]
RESTRICTIONS:
It is assumed that the user has already read the
BDA data into main memory
(e.g. with YODAT)
HISTORY:
Written Sept. 1992 by D. Zarro (Applied Research Corp).
Modified Dec'92, modified for new BSC data structures
Modif Apr'93, added check that DP_SYNC and data times overlap
[Previous]
[Next]
NAME:
MK_BSC_STR
PURPOSE:
Build the BSC data structure definition
SAMPLE CALLING SEQUENCE:
data = mk_bsc_str(1+2+4, 768)
data = mk_bsc_str(1+2+4, 768, ncopy=205)
data = mk_bsc_str(roadmap=roadmap)
data = mk_bsc_str(index=index)
index = mk_bsc_str(/sample_index)
index = mk_bsc_str(/sample_index, /fit)
INPUT:
datarectype - The bit pattern telling which data tags are
needed.
length - The length of the data arrays within the structure
(e.g.: the length of the wavelength/bin/counts array)
All tags will have the same number of elements
CALLS: ***
BSC_STRUCT [1], BSC_STRUCT [2], GEN_STRUCT [1], GEN_STRUCT [2], MAKE_STR [1]
MAKE_STR [2], bits [1], bits [2], str_merge [1], str_merge [2]
CALLED BY:
BCS_ACCUM [1], BCS_ACCUM [2], BSC_FIELD, MK_BSA_STC [1], MK_BSA_STC [2]
RD_BSC_DATA, dat2bsc, rdbda_smm
OPTIONAL KEYWORD INPUT:
ncopy - The number of copies of the structure to make. It
simply replicates the output structure "ncopy" times
roadmap - The BSC roadmap can be passed instead of datarectype/length
index - The BSC index can be passed instead of datarectype/length
sample_index - If set, return an index structure definition with
the nested .GEN and .BSC structures.
fit - If set, then return the nested .FIT structure when using
the /SAMPLE_INDEX option in addition to .GEN and .BSC
OUTPUT:
returns a BSC structure
OPTIONAL KEYWORD OUTPUT:
str - The structure definition of the output
HISTORY:
written 16-Dec-92 by Mons Morrison
3-Feb-93 (MDM) - Added DATA.FLUX capability
31-Jul-93 (SLF) - added /down to str_merge call
16-Sep-93 (MDM) - Added .WAVEC option (bit 6)
- Added /FIT option
2-Oct-93 (MDM) - Changed .WAVEC to WAVE_FIT and
changed .FIT to .FLUX_FIT
- Changed the order that the data tags are built
8-Nov-93 (MDM) - Added .FLUX_FIT2 (bit 8)
[Previous]
[Next]
NAME:
mk_bscfit_eps
PURPOSE:
Generate a Portrait style BCS fitted spectrum.
CALLING SEQUENCE:
mk_fit_bsc_eps,filename
mk_fit_bsc_eps,filename, subscript ; Subscript of spectrum in file to read
mk_fit_bsc_eps, index, data ; index and data should be
scalar bsc structures
mk_fit_bsc_eps,filename,xoff=xoff,yoff=yoff,xsize=xsize,ysize=ysize
mk_fit_bsc_eps,filename,/eps ; EPS PostScript file
mk_fit_bsc_eps,filename,/hc ; Send to printer
mk_fit_bsc_eps,filename,/ps ; Generate a PostScript file (not printed)
INPUTS:
filename = bsc file containing a fitted spectrum.
subscript = Number of the spectrum in the file to plot (def=0)
index,data = Scalar BSC index and data structures
OPTIONAL INPUT KEYWORDS:
xoffs,yoffs = (cm) Offsets of the plot
xsize,ysize = (cm) Size of the plot page.
Defaults: xsize=2.54*6.5 cm, ysize=2.54*5.5 cm
xlen,ylen = (cm) Length of x and y axes.
Defaults: xlen =xsize-1.5*2.54, ylen=ysize-1.25*2.54
xoff_anno = Fractional X position of fitting parameter annotation
file = specify the output .ps file name (def=idl.ps)
xrange,yrange,charsize = Normal IDL plot keywords
noatomic = If set, suppress the atomic calculation information
nodate = If set (or absent), don't put the date on plot
HINTS:
1. Try starting with:
mk_fit_bsc_eps,index,data,/noatomic,/ps ; Examine with previewer
mk_fit_bsc_eps,index,data,/noatomic,xoffs=2.8,yoffs=3.0,/ps
2. The default X and Y page sizes and axis lengths are set to
fill a A4 sheet of paper.
3. Note that xlen and xpage can be adjusted separately. Study the defaults
in the code below to get an idea how to change these values.
CALLS: ***
BCS_SPEC_PLOT, BSC_CHECK [1], BSC_CHECK [2], MK_FIT_BSC_EPS, rd_bsc
MODIFICATION HISTORY:
29-dec-93, J. R. Lemen, Written
[Previous]
[Next]
NAME: mk_cd
PURPOSE: Make a CD from data found in path "dpath". Default
is for making CD's from general/personal data sets.
Use the /arcweek switch for making normal weely Yohkoh
archive discs. Use the /ydb switch to archive sfd files
and other weekly log files.
Parameters:
dpath Input data path(s) (otherwise default dir)
flist list of files to archive to CD using "/gen"
select switch to allow interactive selection of
files to premaster.
ydb to make CD archive from any of the
Yohkoh databases, e.g. sfd, sfm, ...
sfd make CD archive f. an sfd db, same as ydb option
arcweek to make a Yohkoh-Archive week CD
weekid user specified week to archive
dupweek switch to allow making duplicate copies
of premastered data.
dest destination for CD, self (default), UH,
SU, UCB, KH, UM, LPARL, NSSDC
premaster restart from premaster stage
nopremaster do not premaster or master data
nomaster do not master data
noexec do not execute script to make CD
nolog do not log CD making
cdpath list of root-level CD directories. The
"dpath" directories are appended to
these directories. The number of
elements in dpath must equal number of
elements in cdpath.
mkrootdir Use the "archdir" var to make a root level
directory on the CD
cp use a cp command instead of mv to copy
files to the /cdr_base area. This is useful
when the source is a read-only device such
a CD.
stage_disk area where input files are to be staged
defaults to /sxt8data5/stage_b1
type_comp type compression: none or 1 = Unix compress
2 = gzip
cd_yes flag to bypass 'do you want to burn CD' query.
alt_my_cd Alternate directory for writing my_cd script
CALLS: ***
STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3], file_append [1]
file_append [2], get_host [1], get_host [2], input [1], input [2], prep_dat [1]
prep_dat [2], prep_gendat, prep_week [1], prep_week [2], prt_flst [1]
prt_flst [2]
CALLED BY:
go_mk_cd
History: written, GAL, 24-May-95
28-Nov-95, GAL, modified chmod command to -R a+wX/cdr_base/*
from -R a+wxX /cdr_base/*.
18-Mar-95, GAL, modified chmod command again.
1-Apr-96, GAL, added cdpath and muilt path CD making.
2-Aug-96, GAL, yet another change to chmod now a+rwX/cdr_base
27-Sep-96, GAL, make NO root level dir. the default for
standard Yohkoh-Archive CDs. Use the /mkrootdir
switch to make a CD with files in that dir.
29-Oct-96, GAL, bug fix to 'gen' or default mode.
14-Feb-97, GAL, added a cp switch for case where the in
input device was read-only. /cp uses cp instead of mv.
12-Jan-98, PGS added stage_disk, type_comp & cd_yes keywords.
19-Jan-98 Changed cd 'size' indicator from 680 to 650 in script.
21-Jan-98, PGS if arcweek, '_c' files are copied without '_c'
extension to /cdr_base
05-Feb-98 PGS added alt_my_cd alternate directory for my_cd script
16-Feb-98 PGS inserted tap_wrt_chk to compare stage_disk tapes with XBD files
Added -V keyword to script call to makedisc. (To make long volume name)
Added alt_my_cd: alternate location to write my_cd script.
[Previous]
[Next]
NAME: mk_cd
PURPOSE: Make a CD from data found in path "dpath". Default
is for making CD's from general/personal data sets.
Use the /arcweek switch for making normal weely Yohkoh
archive discs. Use the /ydb switch to archive sfd files
and other weekly log files.
Parameters:
dpath Input data path(s) (otherwise default dir)
flist list of files to archive to CD using "/gen"
select switch to allow interactive selection of
files to premaster.
ydb to make CD archive from any of the
Yohkoh databases, e.g. sfd, sfm, ...
sfd make CD archive f. an sfd db, same as ydb option
arcweek to make a Yohkoh-Archive week CD
weekid user specified week to archive
dupweek switch to allow making duplicate copies
of premastered data.
dest destination for CD, self (default), UH,
SU, UCB, KH, UM, LPARL, NSSDC
premaster restart from premaster stage
nopremaster do not premaster or master data
nomaster do not master data
noexec do not execute script to make CD
nolog do not log CD making
cdpath list of root-level CD directories. The
"dpath" directories are appended to
these directories. The number of
elements in dpath must equal number of
elements in cdpath.
mkrootdir Use the "archdir" var to make a root level
directory on the CD
CALLS: ***
STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3], file_append [1]
file_append [2], get_host [1], get_host [2], input [1], input [2], prep_dat [1]
prep_dat [2], prep_gendat, prep_week [1], prep_week [2], prt_flst [1]
prt_flst [2]
CALLED BY:
go_mk_cd
History: written, GAL, 24-May-95
28-Nov-95, GAL, modified chmod command to -R a+wX/cdr_base/*
from -R a+wxX /cdr_base/*.
18-Mar-95, GAL, modified chmod command again.
1-Apr-96, GAL, added cdpath and muilt path CD making.
2-Aug-96, GAL, yet another change to chmod now a+rwX/cdr_base
27-Sep-96, GAL, make NO root level dir. the default for
standard Yohkoh-Archive CDs. Use the /mkrootdir
switch to make a CD with files in that dir.
29-Oct-96, GAL, bug fix to 'gen' or default mode.
[Previous]
[Next]
Name:
mk_close_vec
Purpose:
Create a vector whose n elements are the indices for the
elements of vector v1 with values closest in absolute value
to the n elements of vector v0
Calling Sequence:
index_arr = mk_close_vec(v0,v1)
CALLED BY
go_nvs4
[Previous]
[Next]
NAME:
mk_coal_movie
PURPOSE:
Create a co-aligned sxt and gbo movie
CATEGORY:
CALLING SEQUENCE:
mov = mk_coal_movie(i1,dat1,i2,dat2)
INPUTS:
i1 = time vector or index (if SXT) for 1st movie
dat1 = 1st input movie data
i2 = time vector or index (if SXT) for 2nd movie, optional
dat2 = 2nd input movie data, optional
KEYWORDS (INPUT):
pp1 = transformation for 1st movie
pp2 = transformation for 2nd movie
key1 = trans.type for 1st movie
key2 = trans.type for 2nd movie
ref1 = reference index for 1st movie (use only if dat1 is SXT data)
Causes automatic dejittering and solar rot. correction.
ref2 = reference index for 2nd movie (use only if dat2 is SXT data)
Causes automatic dejittering and solar rot. correction.
xy1 = dejitter vector for 1st movie (for non-SXT data)
xy2 = dejitter vector for 2nd movie (for non-SXT data)
z = zoom factor
s = size of output frames
o = offset of corner of reference image in output frame.
Allows a different FOV of the output frame other than the FOV
of the co-alignment reference image.
dselect = 1 or 2 (default = 1)
1 : select frames of dat2 closest to each frame of dat1
contour = fltarr. If set, overlay 2nd movie with contours at levels
indicated by the fltarr.
/contour = Select contour levels automatically.
c_color = color of contours (see oplot_b for details)
c_line = linestyle of contours (see oplot_b for details)
tcon = string vector. Time or comment strings for each frame.
Only works if the contour keyword is set.
/nointerp = use nearest neighbor method when rebinning
OUTPUTS:
mov = overlay movie
KEYWORDS (OUTPUT):
CALLS: ***
OVER_MOVIE, POLY_MOVIE, cont_movie, conv_a2p [1], conv_a2p [2], fmt_tim [1]
fmt_tim [2], gt_center, gt_corner, gt_res, mod_res, tim2dset [1], tim2dset [2]
track_h2a [1], track_h2a [2], track_h2a [3]
COMMON BLOCKS:
None.
SIDE EFFECTS:
RESTRICTIONS:
All pp vectors referring to SXT coordinates must refer to full
resolution SXT images/pixels. If necessary, use mod_res.pro
on SXT reference image before creating pp vector.
PROCEDURE:
MODIFICATION HISTORY:
JPW, 13-oct-94
JPW, 22-nov-94 added "key" keywords
JPW, 2-jun-95 added /nointerp
[Previous]
[Next]
NAME:
mk_daily_ints
PURPOSE
To create a one-per-day time structure.
CALLING SEQUENCE
tout = mk_daily_ints('15-sep-91','11-nov-95')
INPUT
sttim, entim - first and last days in any format.
OUTPUT
Yohkoh time structure for the time interval.
PROCEDURES CALLED
anytim2ex, anytim2doy, leap_yr, anytim2ints, str_concat
HISTORY
17-Jan-96, LWA, written.
CALLS:
[Previous]
[Next]
NAME:
mk_desat
PURPOSE:
Given a set of files, read the roadmaps and find where there
is a long and short exposure. Make a composite image and remove
the saturated pixels. Write images to an output file.
INPUT:
infil - an array of input file names
outdir - the output directory where the file should be written
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GetObsID, RD_XDA [1], RD_XDA [2]
Rd_Roadmap [2], concat_dir [4], fmt_tim [1], fmt_tim [2], get_dc_image [1]
get_dc_image [2], get_dc_image [3], gt_dpe, gt_expdur [1], gt_expdur [2]
gt_expmode, gt_filtb, gt_res, int2secarr [1], int2secarr [2], mk_dset_str [1]
mk_dset_str [2], rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3]
sxt_decomp [1], sxt_decomp [2]
OPTIONAL KEYWORD INPUT:
interactive- If set, display the results to the screen as the
processing occurs.
HISTORY:
draft version: 28 January 1992 (KTS)
20-Mar-92 (MDM) - Took Keith Strong's program "db_desat.pro"
and made the procedure "mk_desat"
7-Apr-92 (KTS) - Put IFLAG in to avoid error if first image
is rejected
14-Apr-92 (KTS) - 'PREFIX' parameter hardwired for 'sfd'
- Added automatic week # feature
- Better generated dark frame algorithm
- Avoid night images algorithm
Ver 2.0 16-Apr-92 (KTS) - Added dark frame library read
16-Apr-92 (MDM) - Changed file name definition to use the
"progverno" variable to determine the extension
- Put the prefix parameter back in (so it would work
with old existing programs)
20-Apr-92 (MDM) - Added RUN_TIME parameter
21-Apr-92 (KTS) - Included LWA/MDM desat technique
- Included MDM DC routine
Ver 2.1 22-Apr-92 (MDM) - Added "roadmap" to the RD_SDA calls (speeds
things up since it will not re-read the roadmap
for each call)
- Adjusted the format of the code so MDM can
read it more easily
- Fixed DC subtraction to use the whole image,
not just one pixel
- Put the call to GET_DC_IMAGE for the short
exposure images outside the loop.
- Moved the check for apropriate short exposure
to before the RD_SDA (use the roadmap info)
- Replaced RD_SDA with RD_XDA
23-Apr-92 (MDM) - Added "ist" input option to skip to image
"ist" in the loop (for recovery from bombout)
[Previous]
[Next]
NAME:
mk_desat_wl
PURPOSE:
Given a set of files, read the roadmaps and find where there
are complete narrow band images. Write the subset to a datafile.
INPUT:
infil - an array of input file names
outdir - the output directory where the file should be written
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GetObsID, RD_SDA [1], RD_SDA [2]
RD_SDA [3], Rd_Roadmap [2], concat_dir [4], fmt_tim [1], fmt_tim [2], gt_day [1]
gt_day [2], gt_expmode, gt_filta, gt_res, gt_time [1], gt_time [2], mk_dset_str [1]
mk_dset_str [2], rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3]
OPTIONAL KEYWORD INPUT:
interactive- If set, display the results to the screen as the
processing occurs.
HISTORY:
draft version: 28 January 1992 (KTS)
20-Mar-92 (MDM) - Took Keith Strong's program "db_wlext.pro"
and made the procedure "mk_desat_wl"
14-Apr-92 (KTS) - Removed prefix option and set to 'sfw'
- Changed so as to output week id (91_51a.01)
16-Apr-92 (MDM) - Changed file name definition to use the
"progverno" variable to determine the extension
20-Apr-92 (MDM) - Added RUN_TIME parameter
[Previous]
[Next]
NAME:
mk_dset_str
PURPOSE:
Create a dataset structre for input to the "RD_xxx" routines
from an "SS" array of roadmap indices
CALLING SEQUENCE:
dset_arr = mk_dset_str(infil, ss)
dset_arr = mk_dset_str(filidx, ss)
dset_arr = mk_dset_str(infil, -1) ;select all dset in file(s)
dset_arr = mk_dset_str(infil, dset_arr)
dset_arr = mk_dset_str(fnmap, sxtp=dsxtp, files=files)
INPUT:
filvar - file name variable. Can be
1. a string array of filenames. If this calling format is
used, then the range of ".dset" values is checked to make
sure that it is within range for each file and the ".ifil"
maximum is checked to be smaller than the number of file
names passed in.
2. an integer vector of filename indicies (the optional
output from rd_roadmap)
3. Filename map "FNMAP" structure from a search program. If this
is used, then the "sxtp" or "sxtf" inputs should be used
to tell which filenames to extract. The ss parameter is
not used in this case.
ss - a list of the indicies to extract
1. Most common method is that "SS" is the indicie of
the roadmap. When used with filvar=filenames, this must be
the indicie with respect to ALL datasets in ALL files
available in "filenames"
2. SS can equal -1, and then all datasets are selected
(the explicit extraction list is created). "SS" is
modified in the program an returns a "INDGEN" with
the total # of datasets selected.
3. If "SS" is a structure type, the routine assumes that
the conversion to a dataset structure has already occured
and returns the input. It is checked first to make sure
that there ".dset" does not equal -1 anywhere and expands
it if it does.
CALLS: ***
Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], get_fninfo
CALLED BY:
RD_ADA, RD_AR, RD_BDA [1], RD_XDA [1], RD_XDA [2], XMOVIE_SFM, get_sfm, mk_desat
mk_desat_wl, mk_sdmi, mk_sdp, mk_sfd [1], mk_sfd [2], mk_sfd [3], mk_sfd [4], mk_sfs
mk_sft [1], mk_sft [2], mk_sfw, mk_sl [1], mk_sl [2], mk_sot, mk_sxc, sel_dc_image [1]
sel_dc_image [2], sel_dc_image [3], sxt_prep [1], sxt_prep [2], sxt_prep [3]
OPTIONAL KEYWORD INPUT:
sxtp - only used if "filvar" is FNMAP. It is the PFI dataset #
array (from credvec). Should not be used sxtf option.
sxtf - only used if "filvar" is FNMAP. It is the FFI dataset #
array (from credvec). Should not be used sxtp option
OPTIONAL KEYWORD OUTPUT:
files - when using the FNMAP option, the filename array to be
used with the ".ifil" field in the output is returned here.
RESTRICTION:
The "SS" input cannot mix convensions 1 and 2 (passing a vector of
roadmap indicies with a -1 in there somewhere). A -1 can be mixed
in the "SS" if it is a structure type (option 3), but if that
option is used, then filvar must the the filename list (so that the
number of datasets in the file can be known)
OUTPUT:
returns the variable that can be passed directly to "RD_xxx" routines
HISTORY:
Written 27-Feb-92 by M.Morrison
1-Mar-92 (MDM) - Added option to pass the filename map (FNMAP)
5-Mar-92 (MDM) - Adjustments to fix bug with FNMAP option
19-Mar-92 (MDM) - Removed use of MAKE_STR function use, just use a
fixed structure name
20-Apr-92 (MDM) - Fixed case where the input files passed in have
no datasets in them. Return a structure with the
"ifil" and "dset" set to -1.
21-Apr-92 (MDM) - Fixed case where one of the files listed has
no datasets in the file.
11-Jun-92 (MDM) - Fixed case where first file has zero datasets
20-Jun-94 (MDM) - Modified case where all files have zero datasets
23-Apr-99 (LWA) - Changed integer to longword throughout
18-Feb-01 (LWA) - Changed all "for" loops to longword type
and output data structure to longword type
[Previous]
[Next]
NAME:
mk_dset_str
PURPOSE:
Create a dataset structre for input to the "RD_xxx" routines
from an "SS" array of roadmap indices
CALLING SEQUENCE:
dset_arr = mk_dset_str(infil, ss)
dset_arr = mk_dset_str(filidx, ss)
dset_arr = mk_dset_str(infil, -1) ;select all dset in file(s)
dset_arr = mk_dset_str(infil, dset_arr)
dset_arr = mk_dset_str(fnmap, sxtp=dsxtp, files=files)
INPUT:
filvar - file name variable. Can be
1. a string array of filenames. If this calling format is
used, then the range of ".dset" values is checked to make
sure that it is within range for each file and the ".ifil"
maximum is checked to be smaller than the number of file
names passed in.
2. an integer vector of filename indicies (the optional
output from rd_roadmap)
3. Filename map "FNMAP" structure from a search program. If this
is used, then the "sxtp" or "sxtf" inputs should be used
to tell which filenames to extract. The ss parameter is
not used in this case.
ss - a list of the indicies to extract
1. Most common method is that "SS" is the indicie of
the roadmap. When used with filvar=filenames, this must be
the indicie with respect to ALL datasets in ALL files
available in "filenames"
2. SS can equal -1, and then all datasets are selected
(the explicit extraction list is created). "SS" is
modified in the program an returns a "INDGEN" with
the total # of datasets selected.
3. If "SS" is a structure type, the routine assumes that
the conversion to a dataset structure has already occured
and returns the input. It is checked first to make sure
that there ".dset" does not equal -1 anywhere and expands
it if it does.
CALLS: ***
Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], get_fninfo
CALLED BY:
RD_ADA, RD_AR, RD_BDA [1], RD_XDA [1], RD_XDA [2], XMOVIE_SFM, get_sfm, mk_desat
mk_desat_wl, mk_sdmi, mk_sdp, mk_sfd [1], mk_sfd [2], mk_sfd [3], mk_sfd [4], mk_sfs
mk_sft [1], mk_sft [2], mk_sfw, mk_sl [1], mk_sl [2], mk_sot, mk_sxc, sel_dc_image [1]
sel_dc_image [2], sel_dc_image [3], sxt_prep [1], sxt_prep [2], sxt_prep [3]
OPTIONAL KEYWORD INPUT:
sxtp - only used if "filvar" is FNMAP. It is the PFI dataset #
array (from credvec). Should not be used sxtf option.
sxtf - only used if "filvar" is FNMAP. It is the FFI dataset #
array (from credvec). Should not be used sxtp option
OPTIONAL KEYWORD OUTPUT:
files - when using the FNMAP option, the filename array to be
used with the ".ifil" field in the output is returned here.
RESTRICTION:
The "SS" input cannot mix convensions 1 and 2 (passing a vector of
roadmap indicies with a -1 in there somewhere). A -1 can be mixed
in the "SS" if it is a structure type (option 3), but if that
option is used, then filvar must the the filename list (so that the
number of datasets in the file can be known)
OUTPUT:
returns the variable that can be passed directly to "RD_xxx" routines
HISTORY:
Written 27-Feb-92 by M.Morrison
1-Mar-92 (MDM) - Added option to pass the filename map (FNMAP)
5-Mar-92 (MDM) - Adjustments to fix bug with FNMAP option
19-Mar-92 (MDM) - Removed use of MAKE_STR function use, just use a
fixed structure name
20-Apr-92 (MDM) - Fixed case where the input files passed in have
no datasets in them. Return a structure with the
"ifil" and "dset" set to -1.
21-Apr-92 (MDM) - Fixed case where one of the files listed has
no datasets in the file.
11-Jun-92 (MDM) - Fixed case where first file has zero datasets
20-Jun-94 (MDM) - Modified case where all files have zero datasets
[Previous]
[Next]
NAME:
mk_evn
PURPOSE:
To reduce the observing log information into a summary
of events.
KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
This is required input.
OUTPUT:
outfil - The output file name
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], EVN_STRUCT, GEN_STRUCT [1]
GEN_STRUCT [2], GET_NBYTES, OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE
REF_STRUCT, Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2]
Rd_fHeader [3], WRT1P_FH, anytim2ints [1], anytim2ints [2], concat_dir [4]
fmt_tim [1], fmt_tim [2], gt_dp_mode [1], gt_dp_mode [2], gt_total_cnts [1]
gt_total_cnts [2], int2secarr [1], int2secarr [2], rd_fem, rd_obs, rdwrt [1]
rdwrt [2], rdwrt [3], week2ex [1], week2ex [2]
CALLED BY:
yoyo_man2
OPTIONAL KEYWORD INPUT:
outdir - The output directory for the output file.
If undefined, write it to $DIR_GEN_EVN.
HISTORY:
Written 1-May-92 by M.Morrison
Ver 1.01 26-May-92 (MDM) - Changed to write a temporary file and then
move it to on-line after finished generating it
Ver 1.02 26-May-92 (MDM) - Expanded the EVN structure to have the maximum
counting rate for the different instruments and
the SXT FOV location
8-Jul-92 (MDM) - Added "outfil"
Ver 1.03 28-Aug-92 (MDM) - Made a correction caused by BCS not giving the
proper DP mode
Ver 1.04 28-Aug-92 (MDM) - Further correction for BCS DP mode
Ver 1.05 11-Sep-92 (MDM) - Corrected mistake from 1.03/1.04 modification - it
was recording the incorrect DP mode.
16-Oct-92 (MDM) - Modified to make the use of input "week" scalar
- Added runtime print statement
Ver 1.06 9-Mar-93 (MDM) - Modified to take the raw FOV_CENTER value instead
of the GT_FOV_CENTER value since it has processing
done to it
**************************************************
Ver 1.20 14-May-93 (MDM) - Modified to use the new OBS files (one per instrument)
Ver 1.21 15-Nov-93 (MDM) - Modified logic so that if one instrument is missing
it would work ok.
Ver 1.22 19-Nov-93 (MDM) - Modified to avoide SQRT(neg num). (converted to
reals because integer^2 was negative.
[Previous]
[Next]
NAME:
mk_evn
PURPOSE:
To reduce the observing log information into a summary
of events.
KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
This is required input.
OUTPUT:
outfil - The output file name
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], EVN_STRUCT, GEN_STRUCT [1]
GEN_STRUCT [2], GET_NBYTES, OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE
REF_STRUCT, Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2]
Rd_fHeader [3], WRT1P_FH, anytim2ints [1], anytim2ints [2], concat_dir [4]
fmt_tim [1], fmt_tim [2], gt_dp_mode [1], gt_dp_mode [2], gt_total_cnts [1]
gt_total_cnts [2], int2secarr [1], int2secarr [2], rd_fem, rd_obs, rdwrt [1]
rdwrt [2], rdwrt [3], week2ex [1], week2ex [2]
CALLED BY:
yoyo_man2
OPTIONAL KEYWORD INPUT:
outdir - The output directory for the output file.
If undefined, write it to $DIR_GEN_EVN.
HISTORY:
Written 1-May-92 by M.Morrison
Ver 1.01 26-May-92 (MDM) - Changed to write a temporary file and then
move it to on-line after finished generating it
Ver 1.02 26-May-92 (MDM) - Expanded the EVN structure to have the maximum
counting rate for the different instruments and
the SXT FOV location
8-Jul-92 (MDM) - Added "outfil"
Ver 1.03 28-Aug-92 (MDM) - Made a correction caused by BCS not giving the
proper DP mode
Ver 1.04 28-Aug-92 (MDM) - Further correction for BCS DP mode
Ver 1.05 11-Sep-92 (MDM) - Corrected mistake from 1.03/1.04 modification - it
was recording the incorrect DP mode.
16-Oct-92 (MDM) - Modified to make the use of input "week" scalar
- Added runtime print statement
Ver 1.06 9-Mar-93 (MDM) - Modified to take the raw FOV_CENTER value instead
of the GT_FOV_CENTER value since it has processing
done to it
**************************************************
Ver 1.20 14-May-93 (MDM) - Modified to use the new OBS files (one per instrument)
Ver 1.21 15-Nov-93 (MDM) - Modified logic so that if one instrument is missing
it would work ok.
Ver 1.22 19-Nov-93 (MDM) - Modified to avoide SQRT(neg num). (converted to
reals because integer^2 was negative.
[Previous]
[Next]
NAME:
mk_fem
PURPOSE:
Generate a FEM file
INPUT:
year - year number (eg: 92)
week - week number
CALLS: ***
CHECK_TIME, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2]
FEM_STRUCT, Int2Ex [1], Int2Ex [2], MK_FEM_WRT, anytim2ints [1], anytim2ints [2]
concat_dir [4], ex2dow [1], ex2dow [2], ex2week [1], ex2week [2], file_list [1]
file_list [2], fmt_tim [1], fmt_tim [2], get_sunset, int2secarr [1]
int2secarr [2], mk_fem_aoslos [1], mk_fem_aoslos [2], rd_fem, rd_orbit_event
CALLED BY:
mk_fem_file [1], mk_fem_file [2], mk_orbit [1], mk_orbit [2]
OPTIONAL KEYWORD INPUT:
noaoslos - if set, do not run DSNFIL (AOSLOS) program - the file already
exists. If it creates it, it will delete it automatically.
dirout - output directory for FEM file. If not defined, it goes into
$DIR_GEN_FEM. It is used for temporary regeneration of
FEM files - not disturb on-line FEM files.
asca - If set, then read the ASCA spacecraft orbital solutions and
write the reults to the DIR_ASCA_FEM directory
RESTRICTION:
CAUTION: The file IDs (FIDs) are derived from the first minute of sun
as calculated on the ground MINUS FIVE MINUTES. This is to insure
that a spacecraft day is not split between two files. As such, the
date and week # of a FID might not match that of the FEM data.
HISTORY:
Written Dec-91 by M.Morrison
28-Feb-92 (MDM) - changed from MK_FID to MK_FEM
cleaned up the code since it no longer was using
random AOSLOS files that potentially overlapped in time
17-Mar-92 (MDM) - Updated FEM structure to handle the SIRIUS path
name.
26-Apr-92 (MDM) - Regenerated all files with no time difference between
the predicted first minute of sun and the FileID.
Previous values had the FileID 5 minutes before the
the predicted first minute of sun.
26-May-92 (MDM) - Made MK_FEM_WRT always use /clobber
27-Jul-92 (MDM) - corrected bug which was eliminating station contacts
from the FEM structure when the night/day transition
occurred when an SAA or station contact was happening
7-Apr-93 (MDM) - Added /ASCA option
V3.0 21-Feb-94 (MDM) - Increased the resolution of the day/night boundary
by incorporating a call to GET_SUNSET
(increase is from 15 sec to 1 sec resolution)
16-Mar-94 (MDM) - Change to the way GET_SUNSET is called since the
new FEM file does not exist yet, and GET_SUNSET was
doing a RD_FEM within it.
V3.1 13-Apr-94 (MDM) - Corrected so that ASCA calculations do not use
GET_SUNSET
V4.0 23-Mar-95 (MDM) - Updated to handle Wallops ground station.
- Had to modify the FEM structure so a new extension
was used. Eliminated the antenna fields. Expanded
the possible number of station contacts within a
single orbit from 3 to 6
- Added /VERSION keyword
03-jan-00 - y2k fix
[Previous]
[Next]
NAME:
mk_fem
PURPOSE:
Generate a FEM file
INPUT:
year - year number (eg: 92)
week - week number
CALLS: ***
CHECK_TIME, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2]
FEM_STRUCT, Int2Ex [1], Int2Ex [2], MK_FEM_WRT, anytim2ints [1], anytim2ints [2]
concat_dir [4], ex2dow [1], ex2dow [2], ex2week [1], ex2week [2], file_list [1]
file_list [2], fmt_tim [1], fmt_tim [2], get_sunset, int2secarr [1]
int2secarr [2], mk_fem_aoslos [1], mk_fem_aoslos [2], rd_fem, rd_orbit_event
CALLED BY:
mk_fem_file [1], mk_fem_file [2], mk_orbit [1], mk_orbit [2]
OPTIONAL KEYWORD INPUT:
noaoslos - if set, do not run DSNFIL (AOSLOS) program - the file already
exists. If it creates it, it will delete it automatically.
dirout - output directory for FEM file. If not defined, it goes into
$DIR_GEN_FEM. It is used for temporary regeneration of
FEM files - not disturb on-line FEM files.
asca - If set, then read the ASCA spacecraft orbital solutions and
write the reults to the DIR_ASCA_FEM directory
RESTRICTION:
CAUTION: The file IDs (FIDs) are derived from the first minute of sun
as calculated on the ground MINUS FIVE MINUTES. This is to insure
that a spacecraft day is not split between two files. As such, the
date and week # of a FID might not match that of the FEM data.
HISTORY:
Written Dec-91 by M.Morrison
28-Feb-92 (MDM) - changed from MK_FID to MK_FEM
cleaned up the code since it no longer was using
random AOSLOS files that potentially overlapped in time
17-Mar-92 (MDM) - Updated FEM structure to handle the SIRIUS path
name.
26-Apr-92 (MDM) - Regenerated all files with no time difference between
the predicted first minute of sun and the FileID.
Previous values had the FileID 5 minutes before the
the predicted first minute of sun.
26-May-92 (MDM) - Made MK_FEM_WRT always use /clobber
27-Jul-92 (MDM) - corrected bug which was eliminating station contacts
from the FEM structure when the night/day transition
occurred when an SAA or station contact was happening
7-Apr-93 (MDM) - Added /ASCA option
V3.0 21-Feb-94 (MDM) - Increased the resolution of the day/night boundary
by incorporating a call to GET_SUNSET
(increase is from 15 sec to 1 sec resolution)
16-Mar-94 (MDM) - Change to the way GET_SUNSET is called since the
new FEM file does not exist yet, and GET_SUNSET was
doing a RD_FEM within it.
V3.1 13-Apr-94 (MDM) - Corrected so that ASCA calculations do not use
GET_SUNSET
V4.0 23-Mar-95 (MDM) - Updated to handle Wallops ground station.
- Had to modify the FEM structure so a new extension
was used. Eliminated the antenna fields. Expanded
the possible number of station contacts within a
single orbit from 3 to 6
- Added /VERSION keyword
[Previous]
[Next]
NAME:
mk_fem_aoslos
PURPOSE:
Generate a AOSLOS file to be used by MK_FEM
INPUT:
week
year
OPTIONAL INPUT:
interval - the resolution of the output file in sec. If
not passed it is 15 seconds.
OUTPUT:
aoslos_file-filename of AOSLOS output
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2], Int2Ex [1]
Int2Ex [2], concat_dir [4], run_dsnfil, week2ex [1], week2ex [2]
CALLED BY:
mk_fem [1], mk_fem [2]
HISTORY:
Written 19-Feb-92 by M.Morrison
15-Mar-93 (MDM) - Added print statement
7-Apr-93 (MDM) - Added /ASCA option
[Previous]
[Next]
NAME:
mk_fem_aoslos
PURPOSE:
Generate a AOSLOS file to be used by MK_FEM
INPUT:
week
year
OPTIONAL INPUT:
interval - the resolution of the output file in sec. If
not passed it is 15 seconds.
OUTPUT:
aoslos_file-filename of AOSLOS output
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2], Int2Ex [1]
Int2Ex [2], concat_dir [4], run_dsnfil, week2ex [1], week2ex [2]
CALLED BY:
mk_fem [1], mk_fem [2]
HISTORY:
Written 19-Feb-92 by M.Morrison
15-Mar-93 (MDM) - Added print statement
7-Apr-93 (MDM) - Added /ASCA option
[Previous]
[Next]
NAME:
mk_fem_file
PURPOSE:
To create the FEM file so that MK_FEM_WRT can write into it
INPUT:
timarr - The time of one of the s/c day's in the week
It does not have to be the first s/c day
OPTIONAL INPUT:
clobber
dirout
CALLS: ***
CHECK_TIME, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2]
FEM_STRUCT, GEN_STRUCT [1], GEN_STRUCT [2], Int2Ex [1], Int2Ex [2], OPEN_DA_FILE
WRT1P_FH, concat_dir [4], ex2dow [1], ex2dow [2], ex2week [1], ex2week [2]
fmt_tim [1], fmt_tim [2], mk_fem [1], mk_fem [2], rdwrt [1], rdwrt [2], rdwrt [3]
HISTORY:
Written Feb-92 by M.Morrison
10-Mar-92 (MDM) - Changed orbit step size to 97 min (from 95 min)
Ver 1.1 17-Mar-92 (MDM) - Write out the data structure version #
Ver 2.0 26-Mar-92 (MDM) - changed FileID to be exactly the predicted
first minute of sun
Ver 2.1 26-May-92 (MDM) - Changed MK_FEM_WRT to use orbit duration
of 97.5 instead of 98.0
Ver 2.2 17-Jun-92 (MDM) - Simple mod to change new file protection to
666 (RW for everyone)
7-Apr-93 (MDM) - Added /ASCA option
V3.0 21-Feb-94 (MDM) - Increased the resolution of the day/night boundary
by incorporating a call to GET_SUNSET
(increase is from 15 sec to 1 sec resolution)
V3.2 14-Apr-94 (MDM) - Changed period between ASCA orbits to 96 minutes
(from 97 minutes)
- Program version was being logged as 2.2
V3.21 15-Apr-94 (MDM) - Allowed 16*7 instead of 15*7 orbits in a week
for ASCA
V3.3 16-Jan-95 (MDM) - Patch for roll over to new year case
V4.0 23-Mar-95 (MDM) - Modified to add Wallops (see MK_FEM)
- Modified to get the version from MK_FEM
V5.0 7-Apr-99 (SLF) - add ORBIT_PERIOD input keyword (allow orbit degradation)
[Previous]
[Next]
NAME:
mk_fem_file
PURPOSE:
To create the FEM file so that MK_FEM_WRT can write into it
INPUT:
timarr - The time of one of the s/c day's in the week
It does not have to be the first s/c day
OPTIONAL INPUT:
clobber
dirout
CALLS: ***
CHECK_TIME, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2]
FEM_STRUCT, GEN_STRUCT [1], GEN_STRUCT [2], Int2Ex [1], Int2Ex [2], OPEN_DA_FILE
WRT1P_FH, concat_dir [4], ex2dow [1], ex2dow [2], ex2week [1], ex2week [2]
fmt_tim [1], fmt_tim [2], mk_fem [1], mk_fem [2], rdwrt [1], rdwrt [2], rdwrt [3]
HISTORY:
Written Feb-92 by M.Morrison
10-Mar-92 (MDM) - Changed orbit step size to 97 min (from 95 min)
Ver 1.1 17-Mar-92 (MDM) - Write out the data structure version #
Ver 2.0 26-Mar-92 (MDM) - changed FileID to be exactly the predicted
first minute of sun
Ver 2.1 26-May-92 (MDM) - Changed MK_FEM_WRT to use orbit duration
of 97.5 instead of 98.0
Ver 2.2 17-Jun-92 (MDM) - Simple mod to change new file protection to
666 (RW for everyone)
7-Apr-93 (MDM) - Added /ASCA option
V3.0 21-Feb-94 (MDM) - Increased the resolution of the day/night boundary
by incorporating a call to GET_SUNSET
(increase is from 15 sec to 1 sec resolution)
V3.2 14-Apr-94 (MDM) - Changed period between ASCA orbits to 96 minutes
(from 97 minutes)
- Program version was being logged as 2.2
V3.21 15-Apr-94 (MDM) - Allowed 16*7 instead of 15*7 orbits in a week
for ASCA
V3.3 16-Jan-95 (MDM) - Patch for roll over to new year case
V4.0 23-Mar-95 (MDM) - Modified to add Wallops (see MK_FEM)
- Modified to get the version from MK_FEM
[Previous]
[Next]
NAME: mk_fidlist
PURPOSE: Make a complete list of fids given a first and a last fid.
Calling Sequence:
fid_list = mk_fidlist( first_fid, last_fid) ;default dir
fid_list = mk_fidlist( first_fid, last_fid, path=path)
or fid_list = mk_fidlist( first_fid, last_fid, wid=wid)
CALLS: ***
finddir [1], finddir [2], uniq_fid [1], uniq_fid [2]
CALLED BY:
disk2_mo [1], disk2_mo [2]
History: written 5-May-93, gal.
[Previous]
[Next]
Name: mk_formt_html
Purpose: make FORM-ready html segment for times (start [and stop])
Input Paramters:
start_select - set default start time
stop_select - set default stop time
Calling Sequence:
outarray=mk_formt_html(start_select [,stop_select], t0=tim0, t1=tim1)
CALLS:
CALLED BY
html_form_addtime [1], html_form_addtime [2], html_form_addtime [3]
[Previous]
[Next]
NAME:
mk_gbe
PURPOSE:
Make the Yohkoh formated GRO/BATSE event log file (GBE)
CALLS: ***
mk_week1_file
HISTORY:
Written 13-Apr-93 by M.Morrison
18-May-93 (MDM) - Changed to use MK_WEEK1_FILE
[Previous]
[Next]
NAME:
mk_gbl
PURPOSE:
Make the Yohkoh formated GRO/BATSE light curve file (GBL)
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GBO_STRUCT [1], GBO_STRUCT [2]
GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, MIPSEB_DBLFIXUP, OBS_STRUCT [1]
OBS_STRUCT [2], OPEN_DA_FILE, WRT1P_FH, anytim2ex [1], anytim2ex [2]
anytim2ints [1], anytim2ints [2], concat_dir [4], ex2fid [1], ex2fid [2]
rdwrt [1], rdwrt [2], rdwrt [3]
HISTORY:
Written 13-Apr-93 by M.Morrison
[Previous]
[Next]
NAME:
mk_gev
PURPOSE:
Take the daily text GOES event summary file and make a
weekly binary log file
KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
This is required input.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GBO_STRUCT [1], GBO_STRUCT [2]
GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, OPEN_DA_FILE, RD_SELSIS2, WRT1P_FH
anytim2ex [1], anytim2ex [2], concat_dir [4], ex2fid [1], ex2fid [2]
file_list [1], file_list [2], gt_day [1], gt_day [2], pr_week2tim [1]
pr_week2tim [2], rd_fem, rd_selsis, rdwrt [1], rdwrt [2], rdwrt [3], str_replace [1]
str_replace [2], timegrid
OPTIONAL KEYWORD INPUT:
outdir - The output directory for the output file.
If undefined, write it to $DIR_GEN_GEV.
HISTORY:
Written 4-Jun-92 by M.Morrison
28-Aug-92 (MDM) - Modified how RD_FEM was called (call by week#)
14-May-93 (MDM) - Changed to use $ydb_raw and $ys
18-May-93 (MDM) - Minor patch in checking that there is data
2-dec-96 (SLF) - SEL format change - use rd_selsis2 for new data
13-Jan-2000 (SLF) - Y2K - apply 2-dec-96 to 2000+
[Previous]
[Next]
NAME:
mk_gev
PURPOSE:
Take the daily text GOES event summary file and make a
weekly binary log file
KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
This is required input.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GBO_STRUCT [1], GBO_STRUCT [2]
GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, OPEN_DA_FILE, RD_SELSIS2, WRT1P_FH
anytim2ex [1], anytim2ex [2], concat_dir [4], ex2fid [1], ex2fid [2]
file_list [1], file_list [2], gt_day [1], gt_day [2], pr_week2tim [1]
pr_week2tim [2], rd_fem, rd_selsis, rdwrt [1], rdwrt [2], rdwrt [3], str_replace [1]
str_replace [2], timegrid
OPTIONAL KEYWORD INPUT:
outdir - The output directory for the output file.
If undefined, write it to $DIR_GEN_GEV.
HISTORY:
Written 4-Jun-92 by M.Morrison
28-Aug-92 (MDM) - Modified how RD_FEM was called (call by week#)
14-May-93 (MDM) - Changed to use $ydb_raw and $ys
18-May-93 (MDM) - Minor patch in checking that there is data
2-dec-96 (SLF) - SEL format change - use rd_selsis2 for new data
[Previous]
[Next]
NAME:
MK_GRID_COORDS
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
INPUTS:
POSITIONAL PARAMETERS:
KEYWORDS PARAMETERS:
OUTPUTS:
POSITIONAL PARAMETERS:
KEYWORDS PARAMETERS:
CALLS: ***
REPVEC [1], REPVEC [2]
CALLED BY:
DRAW_GRID [1], DRAW_GRID [2], DRAW_GRID [3]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
EXAMPLE:
MODIFICATION HISTORY:
July, 1992. - Written by GLS, LMSC.
[Previous]
[Next]
NAME:
MK_GRID_COORDS2
CALLS:
CALLED BY
DRAW_GRID2
[Previous]
[Next]
NAME:
MK_GRSPCH
PURPOSE:
To output the grs_pc( pc13-16,pc23-26 ) data for utplot.
CALLING SEQUENCE:
grspch = mk_grspch( index,data )
grspch = mk_grspch( index,data,xtime=xtime )
( after the run of yodat and the extract of 'index' and 'data' )
INPUTS:
index - Wbs index structure from reformat data.
data - Wbs data structure from reformat data.
OPTIONAL INPUTS:
sec - If set, count rate is 1 sec.
OUTPUTS:
grspch - Float array containing of grs_pc data.
( pc13,pc14,pc15,pc16,pc23,pc24,pc25 and pc26 )
grspch = fltarr( 8,8*N ). grspch(0,*) is grs_pc13, grspch(5,*)
is grs_pc24. ( N: number of wbs data. )
-- example.--
utplot,xtime,grspch(0,*),index(0)
--> plot grs_pc11 time profile.
count rate is 0.5sec. ( high bit rate )
OPTIONAL OUTPUTS:
xtime - This option gives corresponding time for each of
grs_pc data time.
( for utplot )
CALLED BY:
PLOT_GRSPCH
PROCEDURE:
XTIME is the middle of observation time interval. the observation
time is header time minus prestored time.
Output array GRSPCH has no deadtime-corrected data.
CALLS: ***
HXT_DECOMP, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2], gt_time [1]
gt_time [2]
RESTRICTIONS:
The optional input SEC is restricted to high and medium bit rates.
HISTORY:
Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)
[Previous]
[Next]
NAME:
MK_GRSPCL
PURPOSE:
To output the grs_pc( pc11,12,21,22 ) data for utplot.
CALLING SEQUENCE:
grspcl = mk_grspcl( index,data )
grspcl = mk_grspcl( index,data,xtime=xtime )
( after the run of yodat and the extract of 'index' and 'data' )
INPUTS:
index - Wbs index structure from reformat data.
data - Wbs data structure from reformat data.
OPTIONAL INPUTS:
sec - If set, count rate is 1 sec.
OUTPUTS:
grspcl - Float array containing of grs_pc data.
( pc11, pc12, pc21 and pc22 )
grspcl = fltarr( 4,16*N ). grspcl(0,*) is grs_pc11, grspcl(3,*)
is grs_pc22. ( N: number of wbs data. )
-- example.--
utplot,xtime,grspcl(0,*),index(0)
--> plot grs_pc11 time profile.
count rate is 0.25sec. ( high bit rate )
OPTIONAL OUTPUTS:
xtime - This option gives corresponding time for each of
grs_pc data time.
( for utplot )
CALLED BY:
PLOT_GRSPCL
PROCEDURE:
XTIME is the middle of observation time interval. the observation
time is header time minus prestored time.
Output array GRSPCL has no deadtime-corrected data.
CALLS: ***
HXT_DECOMP, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2], gt_time [1]
gt_time [2]
RESTRICTIONS:
The optional input SEC is restricted to high and medium bit rates.
HISTORY:
Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)
[Previous]
[Next]
NAME:
MK_GRSPHH1
PURPOSE:
To return the grs_phh1 data for utplot.
CALLING SEQUENCE:
grsphh = mk_grsphh1( index,data )
grsphh = mk_grsphh1( index,data,xtime=xtime )
( after the run of yodat and the extract of 'index' and 'data' )
INPUTS:
index - Wbs index structure from reformat data.
data - Wbs data structure from reformat data.
OPTIONAL INPUTS:
channel - The range of channel number. ( 0 - 15 )
-- example.--
channel = 15 --> output the channel 15 of grs_phh.
channel = [ 5,10 ] --> output the total of channel 5 to 10.
OUTPUTS:
grsphh - Float array containing of grs_phh data.
grsphh = fltarr( 16,N ). grsphh(0,*) is channel 0 of grs_phh,
( N: number of wbs data. )
-- example.--
utplot,xtime,grsphh(5,*),index(0)
--> plot grs_phh channel 5 time profile.
count rate is 4 sec. ( high bit rate )
If optional input channel is present, grsphh is one-dimensional
float array. grsphh = fltarr( N ).
OPTIONAL OUTPUTS:
xtime - This option gives corresponding time for each of
grs_phh data time.
( for utplot )
CALLS: ***
HXT_DECOMP, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2], gt_time [1]
gt_time [2]
CALLED BY:
PLOT_GRSPHH
PROCEDURE:
XTIME is the middle of observation time interval. the observation
time is header time minus prestored time.
Output array GRSPHH has no deadtime-corrected data.
HISTORY:
Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)
Updated 27-dec-93 by T.Hiraoka ; added channel option.
[Previous]
[Next]
NAME:
MK_GRSPHH2
PURPOSE:
To return the grs_phh2 data for utplot.
CALLING SEQUENCE:
grsphh = mk_grsphh2( index,data )
grsphh = mk_grsphh2( index,data,xtime=xtime )
( after the run of yodat and the extract of 'index' and 'data' )
INPUTS:
index - Wbs index structure from reformat data.
data - Wbs data structure from reformat data.
OPTIONAL INPUTS:
channel - The range of channel number. ( 0 - 15 )
-- example.--
channel = 15 --> output the channel 15 of grs_phh.
channel = [ 5,10 ] --> output the total of channel 5 to 10.
OUTPUTS:
grsphh - Float array containing of grs_phh data.
grsphh = fltarr( 16,N ). grsphh(0,*) is channel 0 of grs_phh,
( N: number of wbs data. )
-- example.--
utplot,xtime,grsphh(5,*),index(0)
--> plot grs_phh channel 5 time profile.
count rate is 4 sec. ( high bit rate )
If optional input channel is present, grsphh is one-dimensional
float array. grsphh = fltarr( N ).
OPTIONAL OUTPUTS:
xtime - This option gives corresponding time for each of
grs_phh data time.
( for utplot )
CALLS: ***
HXT_DECOMP, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2], gt_time [1]
gt_time [2]
CALLED BY:
PLOT_GRSPHH
PROCEDURE:
XTIME is the middle of observation time interval. the observation
time is header time minus prestored time.
Output array GRSPHH has no deadtime-corrected data.
HISTORY:
Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)
Updated 27-dec-93 by T.Hiraoka ; added channel option.
[Previous]
[Next]
NAME:
MK_GRSPHL1
PURPOSE:
To output the grs_phl1 data for utplot.
CALLING SEQUENCE:
grsphl = mk_grsphl1( index,data )
grsphl = mk_grsphl1( index,data,xtime=xtime )
( after the run of yodat and the extract of 'index' and 'data' )
INPUTS:
index - Wbs index structure from reformat data.
data - Wbs data structure from reformat data.
OPTIONAL INPUTS:
channel - The range of channel number. ( 0 - 127 )
-- example.--
channel = 15 --> output the channel 15 of grs_phl.
channel = [ 15,20 ] --> output the total of channel 15 to 20.
OUTPUTS:
grsphl - Float array containing of grs_phl data.
grsphl = fltarr( 128,N ). grsphl(0,*) is channel 0 of grs_phl,
( N: number of wbs data. )
-- example.--
utplot,xtime,grsphl(5,*),index(0)
--> plot grs_phl channel 5 time profile.
count rate is 4 sec. ( high bit rate )
If optional input channel is present, grsphl is one-dimensional
float array. grsphl = fltarr( N ).
OPTIONAL OUTPUTS:
xtime - This option gives corresponding time for each of
grs_phl data time.
( for utplot )
CALLS: ***
HXT_DECOMP, dtcf_ph_grs1l, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2]
gt_time [1], gt_time [2]
CALLED BY:
PLOT_GRSPHL
PROCEDURE:
XTIME is the middle of observation time interval. the observation
time is header time minus prestored time.
Output array GRSPHL has deadtime-corrected data.
HISTORY:
Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)
Updated 27-dec-93 by T.Hiraoka ; added channel option.
[Previous]
[Next]
NAME:
MK_GRSPHL2
PURPOSE:
To output the grs_phl2 data for utplot.
CALLING SEQUENCE:
grsphl = mk_grsphl2( index,data )
grsphl = mk_grsphl2( index,data,xtime=xtime )
( after the run of yodat and the extract of 'index' and 'data' )
INPUTS:
index - Wbs index structure from reformat data.
data - Wbs data structure from reformat data.
OPTIONAL INPUTS:
channel - The range of channel number. ( 0 - 127 )
-- example.--
channel = 15 --> output the channel 15 of grs_phl.
channel = [ 15,20 ] --> output the total of channel 15 to 20.
OUTPUTS:
grsphl - Float array containing of grs_phl data.
grsphl = fltarr( 128,N ). grsphl(0,*) is channel 0 of grs_phl,
( N: number of wbs data. )
-- example.--
utplot,xtime,grsphl(5,*),index(0)
--> plot grs_phl channel 5 time profile.
count rate is 4 sec. ( high bit rate )
If optional input channel is present, grsphl is one-dimensional
float array. grsphl = fltarr( N ).
OPTIONAL OUTPUTS:
xtime - This option gives corresponding time for each of
grs_phl data time.
( for utplot )
CALLS: ***
DTCF_PH_GRS2L, HXT_DECOMP, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2]
gt_time [1], gt_time [2]
CALLED BY:
PLOT_GRSPHL
PROCEDURE:
XTIME is the middle of observation time interval. the observation
time is header time minus prestored time.
Output array GRSPHL has deadtime-corrected data.
HISTORY:
Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)
Updated 27-dec-93 by T.Hiraoka ; added channel option.
[Previous]
[Next]
NAME:
mk_gsn_obs
PURPOSE:
Generate the observing log file from a SOON/SPOT archive tape
SAMPLE CALLING SEQUENCE:
mk_gsn_obs
OPTIONAL INPUT:
tape_name - The name of the tape
The tape name can be derived from the tape contents,
but this is not completely accurate.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], GEN_STRUCT [1]
GEN_STRUCT [2], OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE, SOON_STRUCT
WRT1P_FH, anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2]
concat_dir [4], def_tapd [1], def_tapd [2], def_tapd [3], ex2fid [1], ex2fid [2]
file_exist [1], file_exist [3], get_logenv [1], get_logenv [2], int2secarr [1]
int2secarr [2], mk_gsn_obs_s1, mtcmd [1], mtcmd [2], rdwrt [1], rdwrt [2], rdwrt [3]
OPTIONAL KEYWORD INPUT:
dev - The device number. If not defined, it uses dev=0
outfil - The output filename to create, excluding the directory
portion. If not passed, the tape_name is used.
save_header - If set, then the FITS header for "save_header" images
for each file will be saved to an output file.
save_img - If set, then a FITS image for "save_img" images
for each file will be saved to an output file.
OPTIONAL KEYWORD INPUT:
outdir - The output directory
RESTRICTION:
HISTORY:
Written 7-Dec-93 by M.Morrison
V0.02 13-Dec-93 (MDM) - Changed the MK_GSN_OBS_S1 routine
- Added SITE and IMAGE_TYPE updating
- Corrected angular calculation for PFI location
V0.03 4-Jan-94 (MDM) - Added the list of observing sites
V0.04 26-Jul-94 (MDM) - Changed logic to write out temporary file and
to figure out the file name from the first image
on the tape.
- Replaced SPAWN with call to MTCMD
V0.05 27-Jul-94 (MDM) - Added SAVE_IMG option
V0.06 27-Jul-94 (MDM) - Revised to save "per tape file" structure at the
end of the file like a "roadmap" instead of at the
beginning so that we don't have to waste space
(we were having to allocate the maximum amount of
space to insure it would fit).
- Started saving .IMAGE_AVG
V0.10 28-Jul-94 (MDM) - Starting archiving a single full disk image per
tape file
V0.20 28-Jul-94 (MDM) - Corrected to save only full disk images
V0.30 2-Aug-94 (MDM) - Corrected location derivation. Previously it was
not correcting for the P-angle.
V0.40 3-Aug-94 (MDM) - Change "IMAGE_TYPE" to "C" for large scale h-alpha
images.
V0.50 3-Aug-94 (MDM) - Save bad headers when location and pixel size is not
good, as well as bad time/date field
- Added retry on OPEN of drive unit
V0.51 4-Aug-94 (MDM) - Changed the format of the BAD header output file
(list the bad pixel size)
V0.52 4-Aug-94 (MDM) - Fixed incorrect location printing statements
V1.00 8-Aug-94 (MDM) - Modified to save the AVERAGE center of image location
instead of the location for the last image.
- Cap the deviation from the first position at
32000
V1.01 22-Sep-94 (MDM) - Patched GSN_INFO so that it used the site info
in the tape name if it is unknown in the FITS header
V1.02 03-Nov-95 (GLS) - Replaced reference to /ydb/ref_scratch to
get_logenv('DIR_REFORMAT_SC').
[Previous]
[Next]
NAME:
mk_gsn_obs_s1
PURPOSE:
To build the SOON/SPOT observing log entries for a single tape file
and the pointer/summary structure for that file
INPUT:
lun - the logical unit of the opened tape drive
tape_name- the tape name
INPUT/OUTPUT:
eot - end of tape marker
itapefile-the file number on the tape
neof - the number of consecutive end of file marks found
OUTPUT:
obs - the observing log entry array for that one tape file
obshdr - the pointer/summary structure for that tape file
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], CONV_A2H [1], CONV_A2H [2]
CONV_H2A [1], CONV_H2A [2], CONV_H2HS [1], CONV_H2HS [2], FILE_EXIST [2]
FXPAR [1], FXPAR [2], GSN_INFO, UNIQ [1], UNIQ [2], UNIQ [3], anytim2ex [1]
anytim2ex [2], anytim2ints [1], anytim2ints [2], concat_dir [4], ex2fid [1]
ex2fid [2], fid2ex [1], fid2ex [2], file_exist [1], file_exist [3], fmt_tim [1]
fmt_tim [2], get_rb0p [1], get_rb0p [2], int2secarr [1], int2secarr [2], mail [1]
mail [2], prstr [1], prstr [2], wrt_fits [1], wrt_fits [2]
CALLED BY:
mk_gsn_obs
OPTIONAL KEYWORD INPUT:
qstop - If set, then stop within the program (for debugging)
save_head - If set, save the first "save_head" headers for each
file on the tape
save_img - If set, then save the first "save_img" images for each
file on the tape
archive_fulldisk - If set, then save the first full disk image in
each tape file to $DIR_GBO_SOON
HISTORY:
Written Dec-93 by M.Morrison
(See MK_GSN_OBS.PRO for a history)
22-Sep-94 (MDM) - Added print statement of REF_TIME
[Previous]
[Next]
NAME:
mk_gx
PURPOSE:
Generate the GXT, G6D, G7D (GOES light curve) data files
SAMPLE CALLING SEQUENCE:
mk_gx, 'gxt', infil
mk_gx, 'g6d', week=week
mk_gx, 'g7d', week=week, /append, /usefid
INPUT:
prefix - The prefix is required. It must be GXT, G6D, or G7D
OPTIONAL INPUT:
infil0 - A string array with a list of the input file names.
It should include the directory path.
The inputfiles can be derived if the "week" option is used.
outfil - The output filename to create. The output
file can be derived if the "week" option is used
CALLS: ***
ATT_STRUCT [1], ATT_STRUCT [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], GBO_STRUCT [1]
GBO_STRUCT [2], GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, MK_GOL_STR
OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE, RD_GOESTEK, REF_STRUCT
Rd_NewOrb_p [1], Rd_NewOrb_p [2], Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1]
Rd_fHeader [2], Rd_fHeader [3], SELSIS2FID, WRT1P_FH, anytim2ex [1], anytim2ex [2]
anytim2ints [1], anytim2ints [2], break_file [4], concat_dir [4], ex2fid [1]
ex2fid [2], fid2ex [1], fid2ex [2], file_exist [1], file_exist [3], file_list [1]
file_list [2], finddir [1], finddir [2], gt_day [1], gt_day [2], rd_gbl_raw [1]
rd_gbl_raw [2], rd_goes3sec [1], rd_goes3sec [2], rd_week_file [1]
rd_week_file [2], rd_week_file [3], rd_week_file [4], rdwrt [1], rdwrt [2]
rdwrt [3], str_replace [1], str_replace [2], week2ex [1], week2ex [2]
where_arr [1], where_arr [2]
OPTIONAL KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
append - If set, try to just append the files in "infil"
list which are not already in the GX file.
usefid - If set, use the FID time in the orbit pointer
(so that it can be recognized when used with
the /append switch)
indir - The input directory
outdir - The output directory
RESTRICTION:
Cannot use /USEFID or /APPEND option with 'GBL' datatype
HISTORY:
Written 13-Apr-93 by M.Morrison
14-Apr-93 (MDM) - Expanded to handle GBL
[Previous]
[Next]
NAME:
mk_gxt
PURPOSE:
write binary file containing digitized daily GOES
soft xray plots (derived from Tektronics plot files)
KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
This is required input.
CALLS: ***
mk_week_file [1], mk_week_file [2]
OPTIONAL KEYWORD INPUT:
outdir - The output directory for the output file.
If undefined, write it to $DIR_GEN_GXT.
HISTORY:
S.L.Freeland, 11-Sep-92
(Using mk_gev by M.Morrison as template)
10-Oct-1992 - changed file name generation to avoid sort
15-Apr-93 (MDM) - Replace with a call to MK_GX
29-Apr-93 (MDM) - Replaced with a call to MK_WEEK_FILE
[Previous]
[Next]
NAME:
MK_HXSPC
PURPOSE:
To output the hxs_pc data for utplot.
CALLING SEQUENCE:
hxspc = mk_hxspc( index,data )
hxspc = mk_hxspc( index,data,xtime=xtime )
( after the run of yodat and the extract of 'index' and 'data' )
INPUTS:
index - Wbs index structure from reformat data.
data - Wbs data structure from reformat data.
OPTIONAL INPUTS:
sec - If set, count rate is 1 sec.
OUTPUTS:
hxspc - Float array containing of hxs_pc data.
hxspc = fltarr( 2,32*N ). hxspc(0,*) is hxs_pc1, hxspc(1,*)
is hxs_pc2. ( N: number of wbs data. )
-- example.--
utplot,xtime,hxspc(0,*),index(0)
--> plot hxs_pc1 time profile.
count rate is 0.125sec. ( high bit rate )
OPTIONAL OUTPUTS:
xtime - This option gives corresponding time for each of
hxs_pc data time.
( for utplot )
CALLED BY:
PLOT_HXSPC
PROCEDURE:
XTIME is the middle of observation time interval. the observation
time is header time minus prestored time.
Output array HXSPC has deadtime-corrected data.
CALLS: ***
HXT_DECOMP, dtcf_pc_hxs, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2]
gt_time [1], gt_time [2]
RESTRICTIONS:
The optional input SEC is restricted to high and medium bit rates.
HISTORY:
Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)
[Previous]
[Next]
NAME:
MK_HXSPH
PURPOSE:
To output the hxs_ph data for utplot.
CALLING SEQUENCE:
hxsph = mk_hxsph( index,data )
hxsph = mk_hxsph( index,data,xtime=xtime )
( after the run of yodat and the extract of 'index' and 'data' )
INPUTS:
index - Wbs index structure from reformat data.
data - Wbs data structure from reformat data.
OPTIONAL INPUTS:
channel - The range of channel number. ( 0 - 31 )
-- example.--
channel = 15 --> output the channel 15 of hxs_ph.
channel = [ 15,20 ] --> output the total of channel 15 to 20.
OUTPUTS:
hxsph - Float array containing of hxs_ph data.
hxsph = fltarr( 32,4*N ). hxsph(0,*) is channel 0 of hxs_ph,
( N: number of wbs data. )
-- example.--
utplot,xtime,hxsph(5,*),index(0)
--> plot hxs_ph channel 5 time profile.
count rate is 1 sec. ( high bit rate )
If optional input channel is present, hxsph is one-dimensional
float array. hxsph = fltarr( 4*N ).
OPTIONAL OUTPUTS:
xtime - This option gives corresponding time for each of
hxs_ph data time.
( for utplot )
CALLS: ***
HXT_DECOMP, dtcf_ph_hxs, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2]
gt_time [1], gt_time [2]
CALLED BY:
PLOT_HXSPH
PROCEDURE:
XTIME is the middle of observation time interval. the observation
time is header time minus prestored time.
Output array HXSPH has deadtime-corrected data.
HISTORY:
Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)
Updated 27-dec-93 by T.Hiraoka ; added channel option.
[Previous]
[Next]
FUNCTION: mk_hxt_sbt_64
Make background subtracted HXT data from given structures:
hxt_flare and hxt_bgd.
usage : hxt_data = mk_hxt_sbt(hxt_flare,hxt_bgd)
hxt_flare, hxt_bgd : generated by mk_hxt_sum.pro
[Previous]
[Next]
NAME:
mk_hxt_sum_64
PURPOSE:
To make integrated cal-mode data, which is used in image synthesis
CALLING SEQUENCE:
hxt=mk_hxt_sum_64(infile,index_in,data_in,1,7)
for L band integration
INPUTS:
infile: hda file name, index_in, data_in
OPTIONAL INPUT:
noaskcmt ; for comment
CALLS: ***
SENSOR2GRID, SET_HXT_STRUCT, gt_time [1], gt_time [2]
NOTE:
Output data format is similar to hxt format used in hxtpro
Output data is integrated data from channel (ch_l) to channel (ch_h)
Output data is SAME for all elements. (elements are corresponding to each channel data
in case of non CAL-mode data)
[Previous]
[Next]
NAME:
MK_HXTDATA
PURPOSE:
Extracts HXT BGD/DATA data from a file or a reformatted data
displayed on the screen.
Retrurns a structure 'hxt' that contains HXT count data and associated
information.
CALLING SEQUENCE:
hxt = MK_HXTDATA(index, data, ssss, infil, channel=0)
INPUT:
index - HXT index.
data - HXT data.
ssss - HXT ssss.
infil - HXT infil.
CALLS: ***
MK_HXT_SUM, SELECT_HXT, wmenu_sel [1], wmenu_sel [2]
OPTIONAL KEYWORD INPUT:
channel - Specifies HXT energy channel (L:0, M1:1, M2:2, H:3) whose
time profile is displayed on the screen.
hs - If set, then the time profile is displayed with 0.5-s
resolution.
OUTPUT:
hxt - HXT data structure variable.
CATEGORY:
HXT data analysis.
HISTORY:
version 1.0 92.11.25 (Wed) T.Sakao written
version 1.1 92.11.26 (Thu)
Program was modified according to the replace of mk_hxt_sum.pro.
version 1.2 93.06.21 (Mon)
Option display was added.
version 1.3 93.06.23 (Wed)
Option channel was added.
version 1.4 97.07.05 (Sat) Added documentation.
Original in hxt_hs_data v1.3.
[Previous]
[Next]
NAME:;
PURPOSE
To display fanbeam pattern
CALLING SEQUENCE:
mk_hxtpat, hxt_x, hxt_y, p
OUTPUT
p(I,J,K) fan beam pattern
I=1,64 J=1,64, K is a number of C# ($DIR_HXT_CAL/para3.dat)
K=0,15 correspond to C#1,16
HISTORY
Written 96/05/27 by J.Sato
Comment
$DIR_HXT_CAL/para3.dat parameter is used.
formulation of beam pattern is due to inda's formulation.
Filed of view is same as default HXT image.
If you want to overlay fan_beam pattern with hard X-ray images, hxt_x and hxt_y should be same value used in HXT images.
****parameter and shape of beam is tentative.*********
CALLS:
[Previous]
[Next]
NAME:
mk_key
PURPOSE:
Use the routine WMKKEY to construct a search key
WMKKEY uses widgets
OPTIONAL INPUT:
input - The structure to be searched. For example,
roadmap, index, or observing log.
OPTIONAL OUTPUT:
ss - A vector of the dataset# where the key matches
"input". It is only returned if "input" is passed
to the routine. If the user has made many keys
while in WMKKEY, the "ss" result is only for the first
key.
OUTPUT:
Returns the string key
CALLS: ***
KeySea [1], KeySea [2], XMANAGER, wmkkey [1], wmkkey [2]
HISTORY:
Written 6-Mar-92 by M.Morrison
[Previous]
[Next]
NAME:
mk_key_stokes
PURPOSE:
Creates a "transtype" structure to be used for constrained
transformations with caltrans (TRANSTYPE keyword), and in
set_mwlt and pp_mwlt2sxt (KEY and K_IN keywords, respectively).
CATEGORY:
CALLING SEQUENCE:
key = mk_key_stokes(date)
key = mk_key_stokes(date,/lores,/xreverse)
INPUTS:
date = time of MWLT image in any Yohkoh format, e.g., '16-jan-94'.
KEYWORDS (INPUT):
/lores = if set, a low resolution stokes magnetogram with 5.6"
pixels is assumed. Default: hires (2.8" pixels)
/xreverse = if set, MWLT image is assumed to be reversed.
Default: non-reversed.
NOTE: all raw MWLT images are reversed.
JPEG compressed MWLT images are not revesed.
type = transformation type ('g', 'i', or 's'). Default: 'i'.
For details see doc_library,'caltrans'
OUTPUTS:
key = structure. Constraints for transf.
KEYWORDS (OUTPUT):
CALLS: ***
get_mwlt_roll
COMMON BLOCKS:
None.
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
JPW, 30-dec-94
[Previous]
[Next]
Make a flat field image using a set of spatially displaced
data images.
PRO mk_kuhn_flat, images, thresh, flat, offsets=offsets, niter=niter
INPUT PARMETERS:
images = cube of images. Temporal variations must be removed.
thresh = threshold for selecting valid parts of images. If
thresh > 0, valid data > thresh. If thresh < 0,
valid data < |thresh|.
INPUT KEYWORDS:
offsets = vector of approximate positional offsets of the images,
giving x,y shifts for all images. Dimensioned (2,nimages).
Offset is defined to be the location of a common place in the
images, in CCD pixels. Offsets should be given to
fractional pixels, to get shifts between images correct.
If the IDL Astronomy correlation procedures are used
to measure the shifts between images, the offsets
to this routine should be the negatives of the shifts.
OUTPUT PARAMETERS:
flat = flat field image, normalized. Zero values => no data.
OPTIONAL KEYWORDS:
niter = Number of iterations to run. Default = 10.
CALLS: ***
STDEV
PROCEDURE:
Uses the method of Kuhn, Lin, and Loranz, Pub. Astron.
Soc. Pacific, 103:1097, 1991.
HISTORY:
Written October 1993 Barry LaBonte
[Previous]
[Next]
Name: mk_mapfile
Purpose: create/update generic file which maps files into pathnames
Input Parameters:
Optional Keyword Paramters:
sw - if set, the current $ys... idl routines are mapped (default)
data - if set, the current online data is mapped
Category:
system, swmaint, unix_only
History - slf, 8-Aug-1992
slf, 19-nov-1992 ; some upgrades for data path function
slf, 7-jan-1993 ; use DIR_GEN_SETUPD (DIR_GEN_SETUP/data)
slf, 13-Jan-1993 ; use DIR_SITE_SETUPD if exists
slf, 13-may-1993 ; exclude /ys/atest_NNNNN directories
Motivation - location of reformatted data sets and software modules are
not so dynamic to justify repeated (and slow) execution of findfile.
Instead, the file-pathname relation ship can generally be mapped
once and remain valid for the session. Associated routines would
read these files on the first access into a common area. Subsequent
calls are via a table lookup for high efficiency.
Calling Sequence:
mk_mapfile [, /sw, /data]
*** this routine should be run as a cron job (via idl_batch) a
few times a day
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], DATA_PATHS, STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3]
break_file [4], concat_dir [4], file_list [1], file_list [2], savegen [1]
savegen [2]
CALLED BY:
sw2tree [1], sw2tree [2], ucon_check
Restrictions: unix only. Assumes links are used for software (/ys) and
data directories (/ydnn). Should be upgraded to allow environmentals
and VMS logicals for these
[Previous]
[Next]
An sswhere_event subroutine, to make the bit masks given the menu vectors
the unique modes, and the roadmap or index.
28-Oct-1993 (SLF) Added /original switch to gt_res call
CALLS:
[Previous]
[Next]
NAME: mk_mo
PURPOSE: Make an MO archive disk from Exabyte Archive Tape.
CALLING SEQUENCE:
mk_mo, mo, mo_node, mo_dev, mt_dev, mag_disk
CALLS: ***
mail [1], mail [2], mk_mo_disk2, mo_prep
examples:
mk_mo, '058A', 'flare4', 0 ;archive fr "on-line data"
mk_mo, '058B', 'flare4', 0 ;to MO # 0 on flare4
mk_mo, '003B', 'flare4', 0, [0,1] ;archive fr tapeS
mk_mo, '006B', 'flare4', 0, [0], '/yd13/mo_a'
INPUT:
mo MO number to make (eg. 000A, 000B, 010A)
mo_node Node name where MO device is located.
mo_dev MO device number...(eg. 0 or 1)
mag_disk Directories for staging tape data
Default are: ['/yd13/mo_a','/yd13/mo_b']
if input undefined-- assumes /yd13...
mt_dev Tape device number 0 or 1. if undefined
uses dev=0. IF dev is vector batch mode
is assumed.... no user prompts!
force batch mode with ONE tape by [0,0].
Optional Input: (NOT WORKING YET!)
start_week When more than 4 per MO side...
(eg for mo=' 007a', start_week='91_01')
interactive switch to force interactive run
LIMITS:
Only will dump a maxium of two archive weeks to MO.
When more than two tape archive weeks are contained
on an MO side must use "start_week" to dump the 3rd
and 4th weeks to MO.
HISTORY:
written by gal 9-Apr-93
mods, 6-May-93, gal
[Previous]
[Next]
NAME: mk_mo2
PURPOSE: Make an MO archive disk from online data or an
Exabyte Archive Tape.
CALLING SEQUENCE:
mk_mo2, mo, mo_node, mo_dev, mag_disk, mt_dev=[0,1]
CALLS: ***
PREFIXCK, disk2_mo [1], disk2_mo [2], finddir [1], finddir [2], list_mo_log [1]
list_mo_log [2], mail [1], mail [2], mk_mo_log, mo_check, mo_fndirck, mo_patch
mo_prep, mo_tap_dump, momount, wk_online
Examples:
from online data:
mk_mo2, '058A', 'flare4', 0 ;archive fr "on-line data"
mk_mo2, '058B', 'flare4', 1 ;to MO # 1 on flare4
from 8mm tape:
mk_mo2, '003B', 'flare4', 0, mt_dev=[0,1] ;archive f/tapeS
from staging disk:
mk_mo2, '006B', 'flare4', 0, '/yd13' ;archive f/mag_disk
INPUT:
mo MO number to make (eg. 000A, 000B, 010A)
mo_node Node name where MO device is located.
mo_dev MO device number...(eg. 0 or 1)
Optional Input:
mag_disk Directories for staging tape data to MO
Default are: ['/yd19']
if input undefined-- assumes /yd19...
Also, if define and mt_dev is undefined: data is
copied from this disk to MO.
mt_dev if set will copy data from tape.
Tape device number 0 or 1, and can be a
vector e.g. mt_dev=[0,1]
interactive Normal mode is Batch mode, but if this switch
is set it forces an interactive run.
start_week (NOT WORKING YET!) When more than 4 per
MO side... (eg for mo=' 007a', start_week='91_01')
LIMITS:
Only will dump a maxium of two archive weeks to MO.
When more than two tape archive weeks are contained
on an MO side must use "start_week" to dump the 3rd
and 4th weeks to MO.
HISTORY:
written by gal 9-Apr-93
6-May-93 (GAL) - general mods.
15-May-93 (GAL) - More mods to mk_mo2
26-May-93 (MDM) - Added WKS_STATUS keyword option
31-May-93 (MDM) - Added call to MK_MO_LOG
1-Jun-93 (MDM) - Removed the 26-May-93 modification to
be able to do parts of an MO disk.
- Added some print statements
2-Jun-93 (MDM) - Corrected typo introduced 1-Jun-93
15-Jun-93 (MDM) - Changed default staging disk from /yd13
to /yd19
8-Jul-93 (MDM) - Modified to use /DIR_DATE option to MK_MO_LOG
21-Dec-93 (MDM) - Added statements to create a text log file
of MOs that are made (call to LIST_MO_LOG)
4-Jan-94 (MDM) - Added a MOUNT/UMOUNT of the MO disk from the
local machine so that it can see the MO disk
to do the logging stage.
1-Jul094 (SLF) - replace spawn,'rm' with file_delete.pro
(avoid shell)
11-Aug-94 (GAL) - added mo_check call and trap for the
case where bad files are found on the
mo and mo_patch would have to be run.
call to mo_patch is limited to 1st disk
in the list mag_disk.
[Previous]
[Next]
NAME: mk_mo2
PURPOSE: Make an MO archive disk from online data or an
Exabyte Archive Tape.
CALLING SEQUENCE:
mk_mo2, mo, mo_node, mo_dev, mag_disk, mt_dev=[0,1]
CALLS: ***
DISK2_MO_NEW, MK_MO2_NEW, PREFIXCK, finddir [1], finddir [2], list_mo_log [1]
list_mo_log [2], mail [1], mail [2], mk_mo_log, mo_check, mo_fndirck, mo_patch
mo_prep, mo_tap_dump, momount, wk_online
Examples:
from online data:
mk_mo2, '058A', 'flare4', 0 ;archive fr "on-line data"
mk_mo2, '058B', 'flare4', 1 ;to MO # 1 on flare4
from 8mm tape:
mk_mo2, '003B', 'flare4', 0, mt_dev=[0,1] ;archive f/tapeS
from staging disk:
mk_mo2, '006B', 'flare4', 0, '/yd13' ;archive f/mag_disk
INPUT:
mo MO number to make (eg. 000A, 000B, 010A)
mo_node Node name where MO device is located.
mo_dev MO device number...(eg. 0 or 1)
Optional Input:
mag_disk Directories for staging tape data to MO
Default are: ['/yd19']
if input undefined-- assumes /yd19...
Also, if define and mt_dev is undefined: data is
copied from this disk to MO.
mt_dev if set will copy data from tape.
Tape device number 0 or 1, and can be a
vector e.g. mt_dev=[0,1]
interactive Normal mode is Batch mode, but if this switch
is set it forces an interactive run.
start_week (NOT WORKING YET!) When more than 4 per
MO side... (eg for mo=' 007a', start_week='91_01')
LIMITS:
Only will dump a maxium of two archive weeks to MO.
When more than two tape archive weeks are contained
on an MO side must use "start_week" to dump the 3rd
and 4th weeks to MO.
HISTORY:
written by gal 9-Apr-93
6-May-93 (GAL) - general mods.
15-May-93 (GAL) - More mods to mk_mo2
26-May-93 (MDM) - Added WKS_STATUS keyword option
31-May-93 (MDM) - Added call to MK_MO_LOG
1-Jun-93 (MDM) - Removed the 26-May-93 modification to
be able to do parts of an MO disk.
- Added some print statements
2-Jun-93 (MDM) - Corrected typo introduced 1-Jun-93
15-Jun-93 (MDM) - Changed default staging disk from /yd13
to /yd19
8-Jul-93 (MDM) - Modified to use /DIR_DATE option to MK_MO_LOG
21-Dec-93 (MDM) - Added statements to create a text log file
of MOs that are made (call to LIST_MO_LOG)
4-Jan-94 (MDM) - Added a MOUNT/UMOUNT of the MO disk from the
local machine so that it can see the MO disk
to do the logging stage.
1-Jul094 (SLF) - replace spawn,'rm' with file_delete.pro
(avoid shell)
11-Aug-94 (GAL) - added mo_check call and trap for the
case where bad files are found on the
mo and mo_patch would have to be run.
call to mo_patch is limited to 1st disk
in the list mag_disk.
[Previous]
[Next]
NAME:
mk_mo_disk
PURPOSE:
This is a program to copy the Yohkoh data from exabyte to
MO Disk
SAMPLE CALLING SEQUENCE:
mk_mo_disk, '/mo/flare15.0'
mk_mo_disk, '/mo/flare15.0', dev=1
mk_mo_disk, '/mo/flare15.0', dev=1, /qdebug
INPUT:
mo_disk - The MO directory name
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], RdTap [1]
RdTap [2], RdTap [3], UNIQ [1], UNIQ [2], UNIQ [3], concat_dir [4], def_tapd [1]
def_tapd [2], def_tapd [3], file_exist [1], file_exist [3], restgen [1]
restgen [2], wmenu_sel [1], wmenu_sel [2], yesnox [1], yesnox [2]
OPTIONAL KEYWORD INPUT:
dev - The device name for the exabyte. If not passed,
it uses device 0.
qdebug - If set, do not execute the spawn commands to
create the directories and do not call RDTAP
HISTORY:
Written 3-Feb-92 by M.Morrison (really 3-Feb-1993, gal)
modified, 4-Feb-93, by GAL, corrected usage of tape dev var,
and range switch on rd_tap.
modified, 5-Feb-93, correct cd command, gal.
3-Oct-95, LS, changed path to new mo_mount style /mo/flareN.X
changed default machine to flare15
have to parse mo_disk 's new style
[Previous]
[Next]
NAME:
mk_mo_disk2
PURPOSE:
This is a program to copy the Yohkoh data from exabyte to
MO Disk
SAMPLE CALLING SEQUENCE:
mk_mo_disk2, '/mo/flare15.0'
mk_mo_disk2, '/mo/flare15.0', '/yd13/mo_1', dev=1
mk_mo_disk2, '/mo/flare15.0', '/yd13/mo_1', dev=1,
mo_wk_no=mo_wk_no, /batch, /qdebug, progress=progress
INPUT:
mo_disk - The MO directory name
mag_disk- The mag disk directory name for staging to MO
CALLS: ***
Bell, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], RdTap [1]
RdTap [2], RdTap [3], UNIQ [1], UNIQ [2], UNIQ [3], concat_dir [4], def_tapd [1]
def_tapd [2], def_tapd [3], file_exist [1], file_exist [3], getwid, mail [1]
mail [2], restgen [1], restgen [2], wmenu_sel [1], wmenu_sel [2], yesnox [1]
yesnox [2]
CALLED BY:
mk_mo
OPTIONAL KEYWORD INPUT:
dev - The device name for the exabyte. If not passed,
it uses device 0.
mo_wk_no- If set, do not prompt user for MO and wk#. use value.
batch - If set, does not prompt user for tape!!! Tapes must
already be in the drives!
qdebug - If set, do not execute the spawn commands to
create the directories and do not call RDTAP
progress- Gives the current week count and total to status
the job: (e.g. [1,2] is week 1 of 2, [2,2] is
week 2 of 2 or last week on side.
HISTORY:
Written 3-Feb-92 by M.Morrison (really 3-Feb-1993, gal)
modified, 4-Feb-93, by GAL, corrected usage of tape dev var,
and range switch on rd_tap.
modified, 5-Feb-93, correct cd command, gal.
modified, 9-Apr-93, for automated use.
mods, 10-Apr-93, for batch mode
mod, 29-Apr-93, to use mocreate account on flare machines
for moving files to MO.
Also added mail and status features.
mod, 3-May-93, added feature to allow the 2nd tape dump
to proceed while the 1st move is occurring. Since,
the MO can not be removed until the last mv is complete
the last mv command is NOT executed in the background.
mod, 3-Oct-95, LS, changed path to new mo_mount style /mo/flareN.X
changed default machine to flare15
have to parse mo_disk 's new style
mod, 1-Nov-95, LS, changed message about how long the process will take.
with the larger capacity MOs, it takes more like 1.5 hrs.
[Previous]
[Next]
NAME:
mk_mo_list
PURPOSE:
This is a program to write a list of the files that go on the MO disk
archive.
SAMPLE CALLING SEQUENCE:
mk_mo_list
mk_mo_list, outfil='mk_mo_list.txt'
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4], prstr [1]
prstr [2], restgen [1], restgen [2]
CALLED BY:
list_mo_log [1], list_mo_log [2], mk_mo_log
HISTORY:
Written 20-May-93 by M.Morrison
26-May-93 (MDM) - Corrected where it printed the label in the list
when there were three weeks on a MO side
[Previous]
[Next]
NAME:
mk_mo_log
PURPOSE:
To make a log entry when an MO disk is made to log the date, person,
and reformatter version of the data on the MO disk.
SAMPLE CALLING SEQUENCE:
mk_mo_log, 'flare13', 0
mk_mo_log, 'flare4', 1, operator='linford', /dir_date, /mklog
INPUT:
mo_node - the name of the node which has the MO disk
mo_dev - the device number of the MO disk (0 or 1 normally)
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], GEN_STRUCT [1]
GEN_STRUCT [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], anytim2ints [1]
anytim2ints [2], concat_dir [4], file_exist [1], file_exist [3], file_info2 [1]
file_info2 [2], file_list [1], file_list [2], int2secarr [1], int2secarr [2]
list_mo_log [1], list_mo_log [2], mk_mo_list, prstr [1], prstr [2], restgen [1]
restgen [2], savegen [1], savegen [2], str_copy
CALLED BY:
mk_mo2 [1], mk_mo2 [2]
OPTIONAL KEYWORD INPUT:
operator - the name of the person who made the MO disk. If not
passed, it uses "getenv('USER')"
dir_date - if set, then do not use the current date as the time
that the MO disk was created, instead, use the lastest
date of the directories in /.../yohkoh
mklog - if set, forces an update of the mos_made.log file.
HISTORY:
Written 31-May-93 by M.Morrison
2-Jun-93 (MDM) - Minor modifications
10-Feb-94 (GAL) - bug fix for dir and week check
11-Feb-94 (gal) - added mklog switch to update ascii log
12-Feb-94 (gal) - apparently someone has changed break_file
which change file_info... so add checks for
using two tags of finfo.
18-Jul-94 (SLF) - get rid of rm (PLEASE USE FILE_DELETE!)
rm can hang the friggin thing
mo_dev = 0 by default
3-Oct-95 (LS) - changed path to new mo_mount style /mo/flareN.X
[Previous]
[Next]
NAME:
MK_MOSAIC
PURPOSE:
Makes a mosaic of PFI images as they would appear on the CCD. Converts
everything to full resolution.
CATEGORY:
CALLING SEQUENCE:
newdata = mk_mosaic(data,index [,offset])
INPUTS:
data = data cube to be mosaic'd
index = index structure for data
OPTIONAL INPUT PARAMETERS:
offset = integer offsets added to individual image positions in the
mosaic. Integer array (2,*).
KEYWORD PARAMETERS
colstart = starting x array index for each image
linstart = starting y array index for each image
missing = value to set the blank areas to (same type as data)
quiet = if set, work quietly
OUTPUTS:
newdata = mosaic'd data, same data type as the input data
CALLS: ***
get_pix_coor, gt_res
CALLED BY:
ALIGN_AR
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
Use get_pix_coord and index.sxt.corner_cmd to compute the position of
each image on the CCD. Make an array large enough to hold all the
images in correct positions and fill this array with the data in "data".
MODIFICATION HISTORY:
MDM,TRM May 7, 1992
[Previous]
[Next]
Name:
mk_movie
Purpose:
Write a series of images to either peritek graphics board or disk
for the nvs system at ISAS.
Calling Sequence:
mk_movie, num, index, data, $
[Comment0,comment1=Comment1, $
color_tab1=color_tab1, color_tab2=color_tab2, $
data2=data2, qdisplay=qdisplay, charsize=charsize, $
infile=infile, idxsfd=idxsfd, ff=ff, sfd=sfd, $
nvsdev=nvsdev, fileout=fileout, no_center=no_center, $
no_resize=nosize, delta_sec=delta_sec, $
q_log=q_log, tvdisplay=tvdisplay, no_record=no_record
margin_color=margin_color, totimg=totimg, file_log=file_log
fileidx=fileidx
Input Variables:
Num = A vector of label numbers (usually the index number of
the image from the original file).
data = 3-d byte array contain images.
index = SDA index structure corresponding to data
Optional Input variables:
Comment0 = Text string which is put into the text box of the display.
Optional Input Keywords:
Comment1 = Text string which is put into the text box of the display
Comment1 may be a vector of length n_elements(data(0,0,*))
color_tab1 = a three dimension array of r,g,b colors
color_tab1 = bytarr(3,256)
color_tab2 = a three dimension array of r,g,b colors for 2nd image
data2 = 3-d byte array contain images for 2nd image.
qdisplay = 0 to display one image with title box.
= 1 to display two images with title box.
= 2 to diplay one image with no title box.
charsize = charsize to output.
infile = name of input file with image data (eg. sfd94_34...)
idxsfd = roadmap index number within the input file for an image.
ff = laser disk #, side and frame number to record.
sfd = flag set to 1 for sfd file input, 0 if not.
nvsdev = flag =1 to indicate output goes thru nvs system, 0 if not.
fileout = The leading part of the output filename for nvs system.
no_center = flag =1 to not auto center a single image.
no_resize = flag =1 to not resize image to max aspect.
tvdisplay = Debug flag, If set to 1, images displayed only and on
nvs system files are written but not sent to nvs-device.
q_log = flag =1 to log image info to a file.
no_record = flag =1 to NOT record images.
margin_color color level for margin area around image. Default is 0.
particularly useful for reversed color tables.
totimg total number of images to process.
file_log file name of log file.
file_idx running filelist index
If color_tab1 is not specified, user will be prompted for selection.
CALLS: ***
COMMAND_PANA, CONGRID [1], CONGRID [2], CONGRID [3], GET_INFO2, STRETCH2, input [1]
input [2], maxspect [1], maxspect [2], mk_ptv_title, mknumat, stdct, wr_nvs
wr_peritek
Side effects:
If tvdisplay=1, then the test image will be displayed in window 0.
If tvdisplay=0, then title box is written to z-buf
NOTES:
Peritek video card has about 617 col and 485 rows.
NVS video card at ISAS has about 648 col and 486 rows.
History:
written by GAL, 11-Aug-94, from the Aug-94 ver. of mk_ptv_movie
and mk_nvs_movie... a nearly total merge.
15-Aug-94, GAL, bug modifications
7-Sep-94, GAL, Mod for Logging. Changed the calls to get_info
to specify the true index number.
4-Oct-94, GAL, Mod to work for multi-file requests
24-Oct-94, GAL, bug fix to file name logging for mult-file requests
[Previous]
[Next]
Name:
mk_movie
Purpose:
Write a series of images to either peritek graphics board or disk
for the nvs system at ISAS.
Calling Sequence:
mk_movie, num, index, data, $
[Comment0,comment1=Comment1, $
color_tab1=color_tab1, color_tab2=color_tab2, $
data2=data2, qdisplay=qdisplay, charsize=charsize, $
infile=infile, idxsfd=idxsfd, ff=ff, sfd=sfd, $
nvsdev=nvsdev, fileout=fileout, no_center=no_center, $
no_resize=nosize, delta_sec=delta_sec, $
q_log=q_log, tvdisplay=tvdisplay, no_record=no_record
margin_color=margin_color, totimg=totimg, file_log=file_log
fileidx=fileidx,device=device
Input Variables:
Num = A vector of label numbers (usually the index number of
the image from the original file).
data = 3-d byte array contain images.
index = SDA index structure corresponding to data
Optional Input variables:
Comment0 = Text string which is put into the text box of the display.
Optional Input Keywords:
Comment1 = Text string which is put into the text box of the display
Comment1 may be a vector of length n_elements(data(0,0,*))
color_tab1 = a three dimension array of r,g,b colors
color_tab1 = bytarr(3,256)
color_tab2 = a three dimension array of r,g,b colors for 2nd image
data2 = 3-d byte array contain images for 2nd image.
qdisplay = 0 to display one image with title box.
= 1 to display two images with title box.
= 2 to diplay one image with no title box.
charsize = charsize to output.
infile = name of input file with image data (eg. sfd94_34...)
idxsfd = roadmap index number within the input file for an image.
ff = laser disk #, side and frame number to record.
sfd = flag set to 1 for sfd file input, 0 if not.
nvsdev = flag =1 to indicate output goes thru nvs system, 0 if not.
fileout = filename for nvs system.
no_center = flag =1 to not auto center a single image.
no_resize = flag =1 to not resize image to max aspect.
tvdisplay = Debug flag, If set to 1, images displayed only and on
nvs system files are written but not sent to nvs-device.
q_log = flag =1 to log image info to a file.
no_record = flag =1 to NOT record images.
margin_color color level for margin area around image. Default is 0.
particularly useful for reversed color tables.
totimg total number of images to process.
file_log file name of log file.
file_idx running filelist index
device unit number of laser disc you are sending commands to
If color_tab1 is not specified, user will be prompted for selection.
CALLS: ***
CONGRID [1], CONGRID [2], CONGRID [3], GET_INFO2, MK_MOVIE2, STRETCH2, command_laser
input [1], input [2], maxspect [1], maxspect [2], mk_ptv_title, mknumat, stdct, wr_nvs
wr_peritek
Side effects:
If tvdisplay=1, then the test image will be displayed in window 0.
If tvdisplay=0, then title box is written to z-buf
NOTES:
Peritek video card has about 617 col and 485 rows.
NVS video card at ISAS has about 648 col and 486 rows.
History:
written by GAL, 11-Aug-94, from the Aug-94 ver. of mk_ptv_movie
and mk_nvs_movie... a nearly total merge.
15-Aug-94, GAL, bug modifications
7-Sep-94, GAL, Mod for Logging. Changed the calls to get_info
to specify the true index number.
4-Oct-94, GAL, Mod to work for multi-file requests
24-Oct-94, GAL, bug fix to file name logging for mult-file requests
12-Oct-95, LS , merged code some more. treat the NVS as if it were
an image card. NVS is not plugged into the SONY anymore,
so command_laser can now be used to operate the SONYs.
- Using new nvs command: nvsftp1
- commented out print statement. will print in go_lasdisk
(the print statement MAY be desireable if calling
mk_movie2 with an array of images)
currently, go_lasdisk only sends 1 image at a time.
[Previous]
[Next]
NAME: MK_MU
PURPOSE: For an input image, makes maps of mu (= cos(central angle)),
sinB, sinL (heliographic coordinates)
PRO mk_mu, image, r0, x0, y0, mu, r, $
pangle=pangle, b0=b0, sinb=sinb, sinl=sinl
INPUT PARAMETERS:
image = image to make coordinates for
r0,x0,y0 = radius, center of Sun in pixels
OUTPUT PARAMETERS:
mu = map of mu, set to -(sqrt(r^2-r0^2)/r0) off limb
r = image of radial distance from center in pixels
OPTIONAL INPUT KEYWORDS
pangle = angle between +y and solar north, measured toward
-x, radians
b0 = latitude of the disk center
OPTIONAL OUTPUT KEYWORDS:
(Must be set to nonzero to get return value)
sinb = image of sine of latitude, set to -2. off disk.
sinl = image of sine of longitude, set to -2. off disk.
HISTORY:
Written April 1993 Barry LaBonte
Make SINB,SINL keywords May 13, 1994 BJL
Fix confusion of sinl,sinb October 13, 1994 BJL
Add PANGLE, B0 keywords April 11, 1995 BJL
More efficient use of memory September 8, 1995 BJL
[Previous]
[Next]
NAME:
mk_nar
PURPOSE:
Take the daily SELSIS active region summary file and make a
weekly binary log file
KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
This is required input.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GBO_STRUCT [1], GBO_STRUCT [2]
GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, OPEN_DA_FILE, WRT1P_FH, anytim2doy [1]
anytim2doy [2], concat_dir [4], data_chk [1], data_chk [2], gt_day [1], gt_day [2]
rd_fem, rd_selsis, rdwrt [1], rdwrt [2], rdwrt [3], str_replace [1], str_replace [2]
OPTIONAL KEYWORD INPUT:
outdir - The output directory for the output file.
If undefined, write it to $DIR_GEN_NAR.
HISTORY:
Written 4-Jun-92 by M.Morrison
28-Aug-92 (MDM) - Modified how RD_FEM was called (call by week#)
14-May-93 (MDM) - Changed to use $ydb_raw and $ys
24-jan-97 (SLF) - change 'no files' message criteria (rd_selsis changed)
[Previous]
[Next]
NAME:
mk_nar
PURPOSE:
Take the daily SELSIS active region summary file and make a
weekly binary log file
KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
This is required input.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GBO_STRUCT [1], GBO_STRUCT [2]
GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, OPEN_DA_FILE, WRT1P_FH, anytim2doy [1]
anytim2doy [2], concat_dir [4], data_chk [1], data_chk [2], gt_day [1], gt_day [2]
rd_fem, rd_selsis, rdwrt [1], rdwrt [2], rdwrt [3], str_replace [1], str_replace [2]
OPTIONAL KEYWORD INPUT:
outdir - The output directory for the output file.
If undefined, write it to $DIR_GEN_NAR.
HISTORY:
Written 4-Jun-92 by M.Morrison
28-Aug-92 (MDM) - Modified how RD_FEM was called (call by week#)
14-May-93 (MDM) - Changed to use $ydb_raw and $ys
24-jan-97 (SLF) - change 'no files' message criteria (rd_selsis changed)
[Previous]
[Next]
NAME:
mk_nar
PURPOSE:
Take the daily SELSIS active region summary file and make a
weekly binary log file
KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
This is required input.
OPTIONAL KEYWORD INPUT:
outdir - The output directory for the output file.
If undefined, write it to $DIR_GEN_NAR.
HISTORY:
Written 4-Jun-92 by M.Morrison
28-Aug-92 (MDM) - Modified how RD_FEM was called (call by week#)
14-May-93 (MDM) - Changed to use $ydb_raw and $ys
[Previous]
[Next]
PROGRAM:
mk_nbnvs
PURPOSE
Make NVS file of a given image. (monochromatic only)
(The format of created file is plane-sequence RGB)
CALLING SEQUENCE
mk_nbnvs,image,fname,number
INPUT
image = 2D-array : image data
fname = string : NVS file name (header part)
number = integer : frame number
OUTPUT
number = integer : input value + 1
SIDE EFFECTS
create NVS file on a disk. The file name is
"fname.NNNN.raw", where fname is given as the 2nd
parameter and NNNN is given as the 3rd parameter
The number is incremented.
COMMEN BLOCKS
ADDITIONAL INFORMATION
Created files can be transfered to NVS2000 by nvs command.
You must set PATH to /ys/gen/soft/rel/movie to use
nvs. Please execute following command at unix prompt:
% setenv PATH /ys/gen/soft/rel/movie:$PATH
When you execute nvs, you must specify some parameters:
Pixel Data Format ----- 3:RAW
RAW MODE ----- 3
SIZE X Y -- n_elements(image(*,0)) n_elements(image(0,*))
ORIGIN, DIRECTION, SKIP BITE ---- default value is OK.
EXAMPLE
The following program create test.0000.raw, test.0001.raw,
test.0002.raw, ... etc. , each of which contains the
image of data(*,*,i) with the info_array information.
:::::::::::::::::::::::
number=0
xyouts,120,300,/dev,'SXT FFI MOVIE',charsize=4.0
data0=tvrd(0,0,512,512)
mk_nbnvs,data0,'test',number
for i=0,n_elemenes(data(0,0,*))-1 do begin
tv,data
xyouts,10,10,/dev,info_array(i)
data0=tvrd(0,0,512,512)
mk_nbnvs,data0,'test',number
endfor
:::::::::::::::::::::::
HISTORY
16-FEB-1993 Goro Kawai
[Previous]
[Next]
Name: mk_newdata
Purpose: job to create new data images for distribution (show_pix,etc)
History:
10-Jul-1994 (SLF) Written
14-Jul-1994 (SLF) Add fl_suntoday, fl_sxtobsnar, fl_goesplot
Moved distribution request into mk_pix
12-oct-1993 (SLF) call to fl_summary, distribute jobs in parallel
via go_batch / taskwait
6-Mar-1994 (SLF) remove go_batch (OSF problems)
Method - background job submitted via auto_toban
Parallel, distributed execution of subtasks.
Generate images for first_light, show_pix
[Previous]
[Next]
Name:
mk_nvs_img
Purpose:
Write a series of files which can be read by the NVS to make a movie.
Calling Sequence:
mk_nvs_img,data,index, $
[Comment0,comment1=Comment1,fileout=fileout, ... ]
Input Variables:
data = 3-d byte array contain images.
index = SDA index structure corresponding to data
Optional Input variables:
Comment0 = Text string which is put into the text box of the display.
Optional Input Keywords:
Comment1 = Text string which is put into the text box of the display
fileout = The leading part of the output filename.
color_tab1 = a three dimension array of r,g,b colors
color_tab1 = bytarr(3,256)
tvdisplay = If set to 1, display images on screen before writing file
xrdisplay = IF set to 1, display xray images on screen for selection
If Comment0, fileout, and color_tab1 are not specified,
mk_nvs_movie will prompt the user for inputs.
Side effects:
Will create a window,1 for displaying the titles. These are read back
using tvrd.
If tvdisplay=1, then the test image will be displayed in window 0.
Modification History:
Written, 18-jan-92, J.R. Lemen
[Previous]
[Next]
Name:
mk_nvs_movie
Purpose:
Write a series of files which can be read by the NVS to make a movie.
Calling Sequence:
mk_nvs_movie,num,data,index, $
[Comment0,comment1=Comment1,fileout=fileout, $
color_tab1=color_tab1,tvdisplay=tvdisplay, $
data2=data2,qdisplay=qdisplay,color_tab2=color_tab2]
Input Variables:
Num = A vector of label numbers (usually the index number of
the image from the original file).
data = 3-d byte array contain images.
index = SDA index structure corresponding to data
Optional Input variables:
Comment0 = Text string which is put into the text box of the display.
Optional Input Keywords:
Comment1 = Text string which is put into the text box of the display
Comment1 may be a vector of length n_elements(data(0,0,*))
fileout = The leading part of the output filename.
color_tab1 = a three dimension array of r,g,b colors
color_tab1 = bytarr(3,256)
tvdisplay = If set to 1, display images on screen before writing file
qdisplay = 0 to display one image with title box.
= 1 to display two images with title box.
= 2 to diplay one image with no title box.
If color_tab1 is not specified, user will be prompted for selection.
CALLS: ***
STRETCH2, input [1], input [2], mk_title [1], mk_title [2], mk_title [3], mknumat
stdct, wr_nvs
CALLED BY:
go_nvs4, go_nvs5
Side effects:
Will create a window,1 for displaying the titles. These are read back
using tvrd.
If tvdisplay=1, then the test image will be displayed in window 0.
Modification History:
Written, 18-jan-92, J.R. Lemen
Modified, 18-jun-92, J.R. Lemen -- Added call to stretch2 to adjust
color gama value.
Modified, 4-sep-92, JRL - Allow Num and Comment1 to be vectors
Modified, 21-nov-92, JRL - If displaying only one image, make the
titles come out as B/W
[Previous]
[Next]
NAME:
mk_obs
PURPOSE:
Make the observing log file
INPUT:
infil - an array of input files of a single prefix, usually
the "ada" file.
outfil - the output file name
OPTIONAL INPUT:
fullweek- if present, and specifying the week in
the string form 91_49 where 91 is the year
and 49 is the week number, it will generate
the input file array and output file
qdebu - If set, print several diagnostic messages
METHOD:
It checks each instrument to see if the file exists. (BCS, HXT, SXT, WBS)
Output: SXT - Every exposure (no more often than every major frame)
WBS,HXT * Every 2 MF (4 sec) in high rate
* Every 1 MF (8 sec) in med rate (?)
* Write out the first MF when a rate or mode
change occurs
* Write out in night? or just single entry
BCS * Combining several spectra, not to be written
out more often than every 4 sec
NOTES: Could key off WBS (since it is every 2 MF, and follows the
"same" rules as observing log), but what if it is not on
for a given orbit, and there is BCS and HXT data.
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], FILE_EXIST [2], break_file [4]
file_exist [1], file_exist [3], mk_week_file [1], mk_week_file [2]
CALLED BY:
yoyo_man2
Modification History:
Ver 0.20 31-Jan-92 (MDM) - added capability to copy the observing log file
to the $DIR_GEN_OBS directory
Ver 0.30 13-Feb-92 (MDM) - changed input to be an array of filenames
(not the name of a file holding the list of FIDs)
Removed the need for "DIR_IN" parameter
Expanded the /FULL_WEEK option accordingly
Made OBS file be written directly to $DIR_GEN_OBS, not
to the data directory
Ver 1.00 29-Feb-92 (MDM) - changed WBS and HXT insertion of information
to be SQRT of summary counts. It was overflowing
the byte value before (integer*2 value being put
into a byte)
Ver 1.01 1-Mar-92 (MDM) - Changed BCS reading from RD_BDA (it was reading
all data!!) to RD_ROADMAP and RD_BDA_DP.
Ver 1.02 3-Mar-92 (MDM) - Made ALL_CNTS and ACC_CNTS for BCS the SQRT of
the DP_SYNC record value (to fit into one byte)
Ver 1.03 18-Apr-92 (MDM) - Adjusted to use UNIQ_FID instead of getting
a list of the FileIDs from "findfile('ada*')"
Ver 1.04 26-May-92 (MDM) - Changed to write a temporary file and then
move it to on-line after finished generating it
Ver 1.05 14-Oct-92 (MDM) - Modified to allow appending to an existing
OBS file.
Ver 1.06 15-Oct-92 (MDM) - Added /QDEBUG and had print statements only
occur when QDEBUG is set
Ver 1.07 22-Oct-92 (MDM) - Added /QSTOP option
- Moved NORBIT=0 command since if an append
option was overridden (Files out of order)
then it was appending to the ORBIT_ARR
incorrectly.
- Added /USEFID switch. This will force the
ORBIT_ARRAY time/day entry to be the input
FileID. This should only be used when
generating temporary OBS logs
Ver 1.08 11-Nov-92 (MDM) - Use the LAST file in "infil" to figure
out the week number when the output file
is not specified.
-
Ver 1.09 27-Jan-93 (MDM) - Appending option not working quite right
Ver 1.10 3-May-93 (MDM) - Error in FULLWEEK option
********************************************************************
Ver 2.0 14-May-93 (MDM) - Re-written to use MK_WEEK_FILE and to have
separate OBS files per instrument
- Added INDIR option
[Previous]
[Next]
NAME:
mk_obs_str
PURPOSE:
Make the observing log structure
INPUT:
prefix - The Observing log prefix (OBD, OSF, OSP, OWH)
infil - an array of input files
last_tim - The last time in the previous input files
OUTPUT:
out - The observing log structure for the input files
serial_num - For OSP and OSF, this is the lowest image serial
number in the file.
CALLS: ***
GET_NBYTES, MK_OBS_BCS, MK_OBS_SXT, MK_OBS_W_H, RD_BDA_DP, Rd_Roadmap [2]
Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], anytim2ints [1], anytim2ints [2]
data_type [1], data_type [2], int2secarr [1], int2secarr [2], rd_roadmap [1]
str_replace [1], str_replace [2], tim2dset [1], tim2dset [2]
CALLED BY:
mk_week_file [1], mk_week_file [2]
HISTORY:
Written 21-Apr-93 by M.Morrison
V1.00 17-Jul-93 (MDM) - Assigned program version number
- Read/returned the reformatter version from the header
V1.10 17-Jan-95 (MDM) - Added "last_tim" input to remove duplicate data
V1.2 20-Jan-95 (MDM) - Corrected V1.10 patch so that it checked to see
if roadmap is a structure. There could be files
with no data in them.
V1.3 25-Jan-95 (MDM) - Define LAST_TIM at the end of the routine
- Changed how existence of LAST_TIM is checked
[Previous]
[Next]
NAME:
mk_op_file
PURPOSE:
Generate the 16s aoslos file for op_first_guess
File is written to $DIR_GEN_ORBIT_RAW
CALLING SEQUENCE:
mk_op_file,Sttim,Num_days
mk_op_file,'5-may-93',5
INPUTS:
sttim = Starting time in any format
Num_days = Integer number of days
OPTIONAL INPUT KEYWORDS:
None.
CALLS: ***
anytim2ex [1], anytim2ex [2], fmt_tim [1], fmt_tim [2], input [1], input [2]
mk_aoslos
MODIFICATION HISTORY:
4-may-93, J. R. Lemen, Written
[Previous]
[Next]
NAME:
mk_orb_file
PURPOSE:
To create the ORB file containg spacecraft position
INPUT:
year
week
OPTIONAL INPUT:
clobber
dirout
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2]
MK_ORB_WEEK, OPEN_DA_FILE, WRT1P_FH, concat_dir [4], rdwrt [1], rdwrt [2], rdwrt [3]
HISTORY:
Written Aug-96 by R.D.Bentley
[Previous]
[Next]
NAME:
MK_ORB_WEEK
PURPOSE:
Generates a weeks worth of orbital information to be stored in
the ORB file. Interval used is 300 secs.
Structure defined in orb_struct.pro
CALLING SEQUENCE:
mk_orb_week,year,week,orb_data
INPUT:
year
week
OUTPUT:
orb_data - structure containing the orbital information
CALLS: ***
ADDTIME [1], ADDTIME [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
FMT_TIMER [1], FMT_TIMER [2], ORB_STRUCT, REVERSE, anytim2ex [1], anytim2ex [2]
anytim2ints [1], anytim2ints [2], concat_dir [4], fmt_tim [1], fmt_tim [2]
pr_week2tim [1], pr_week2tim [2], rd_orbit_event, run_dsnfil, week2ex [1]
week2ex [2]
CALLED BY:
mk_orb_file
OPTIONAL KEYWORD INPUT:
asca - If set, generate data for the ASCA spacecraft
HISTORY:
Written Sep-96 by R.D.Bentley
[Previous]
[Next]
NAME:
mk_orbit
PURPOSE:
Read the orbit solution file that is copied from the FACOM
computer and make the files used by DSNFIL with one orbit
solution per file. Generate FEM files, aoslos files for op_first_guess
and the advance dsn predictions file.
OPTIONAL INPUT:
infile - The input file to use. If not specified, it uses
/ydb/orbit_sol/facom_orbit
wait - The number of hours to wait before the FEM generation
code is run (so that that code can run after midnight)
mail - String vector of recipients of unix mail containing
the dsn predictions.
force_make - Force the MK_ORBIT_FILES and MK_FEM routines to be
called, even if there are no errors.
skip_orbit - Skip the MK_ORBIT_FILE calls
OPTIONAL OUTPUT:
outdir - Output directory (used for debugging purposes). If not
specified it writes to /ydb/orbit_sol.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2]
FILE_EXIST [2], FILE_STAT [1], FILE_STAT [2], Int2Ex [1], Int2Ex [2]
anytim2ints [1], anytim2ints [2], concat_dir [4], ctraj2orbit, deriv_arr [1]
deriv_arr [2], file_exist [1], file_exist [3], file_list [1], file_list [2]
file_stat [3], fmt_tim [1], fmt_tim [2], int2secarr [1], int2secarr [2], mail [1]
mail [2], mk_fem [1], mk_fem [2], mk_orbit_files, rd_fem, str_replace [1]
str_replace [2], tim2orbit [1], tim2orbit [2], week_loop [1], week_loop [2]
week_loop [3], where_pattern [1], where_pattern [2]
HISTORY:
Written 1-Mar-92 by M.Morrison
20-May-92 (MDM) Modified to run MK_FEM when a new orbit solution is
found. It re-runs for for prior 2 weeks and runs
5 weeks ahead of the solution date
26-May-92 (MDM) changed to only do 1 week prior
8-Jun-92 (MDM) added keyword wait so that when FEM files are made,
it waits "wait" hours before running that portion
8-sep-92 (JRL) Added mail keyword. Added call to mk_orbit_files
22-sep-92 (JRL) Added auto purging of *ascii, *summ, dsn*txt files
15-Mar-93 (MDM) Added FORCE_MAKE option
7-Apr-93 (MDM) Added /ASCA option to read the ASCA spacecraft
orbit predictions
15-Apr-93 (MDM) Modified to call MK_FEM even for ASCA
4-may-93 (JRL) Implemented the DSN predictions for ASCA
19-May-93 (MDM) Fixed oversight - Added "asca=asca" switch to
MK_ORBIT_FILES call for ASCA
20-May-93 (MDM) Added /SKIP_ORBIT option
3-Aug-93 (MDM) Added TRAJ file check and mailing of the file
and renaming it
12-Aug-93 (MDM) Added "keep_ascii=4" to MK_ORBIT_FILES call for ASCA
10-May-94 (MDM) Added check for bad calculation
27-Jul-94 (MDM) Modified to check TRAJ files first, and if a TRAJ
file exists with no equivalent ORBIT file, create the
ORBIT file from the TRAJ file and kick off MK_FEM
and MK_ORBIT_FILES
File orbit_0173 was the last file created using
FACOM_ORBIT as the source.
26-oct-94 (SLF) fix file name problem
4-nov-94 (SLF) handle format change in facom_orbit file
(call where_pattern)
21-jan-98 (SLF) remove morrison from 'mail_old'
26-jul-2000 (GLS) Added ORB file generation via call to mk_orb_file
[Previous]
[Next]
NAME:
mk_orbit
PURPOSE:
Read the orbit solution file that is copied from the FACOM
computer and make the files used by DSNFIL with one orbit
solution per file. Generate FEM files, aoslos files for op_first_guess
and the advance dsn predictions file.
OPTIONAL INPUT:
infile - The input file to use. If not specified, it uses
/ydb/orbit_sol/facom_orbit
wait - The number of hours to wait before the FEM generation
code is run (so that that code can run after midnight)
mail - String vector of recipients of unix mail containing
the dsn predictions.
force_make - Force the MK_ORBIT_FILES and MK_FEM routines to be
called, even if there are no errors.
skip_orbit - Skip the MK_ORBIT_FILE calls
OPTIONAL OUTPUT:
outdir - Output directory (used for debugging purposes). If not
specified it writes to /ydb/orbit_sol.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2]
FILE_EXIST [2], FILE_STAT [1], FILE_STAT [2], Int2Ex [1], Int2Ex [2]
anytim2ints [1], anytim2ints [2], concat_dir [4], ctraj2orbit, deriv_arr [1]
deriv_arr [2], file_exist [1], file_exist [3], file_list [1], file_list [2]
file_stat [3], fmt_tim [1], fmt_tim [2], int2secarr [1], int2secarr [2], mail [1]
mail [2], mk_fem [1], mk_fem [2], mk_orbit_files, rd_fem, str_replace [1]
str_replace [2], tim2orbit [1], tim2orbit [2], week_loop [1], week_loop [2]
week_loop [3], where_pattern [1], where_pattern [2]
HISTORY:
Written 1-Mar-92 by M.Morrison
20-May-92 (MDM) Modified to run MK_FEM when a new orbit solution is
found. It re-runs for for prior 2 weeks and runs
5 weeks ahead of the solution date
26-May-92 (MDM) changed to only do 1 week prior
8-Jun-92 (MDM) added keyword wait so that when FEM files are made,
it waits "wait" hours before running that portion
8-sep-92 (JRL) Added mail keyword. Added call to mk_orbit_files
22-sep-92 (JRL) Added auto purging of *ascii, *summ, dsn*txt files
15-Mar-93 (MDM) Added FORCE_MAKE option
7-Apr-93 (MDM) Added /ASCA option to read the ASCA spacecraft
orbit predictions
15-Apr-93 (MDM) Modified to call MK_FEM even for ASCA
4-may-93 (JRL) Implemented the DSN predictions for ASCA
19-May-93 (MDM) Fixed oversight - Added "asca=asca" switch to
MK_ORBIT_FILES call for ASCA
20-May-93 (MDM) Added /SKIP_ORBIT option
3-Aug-93 (MDM) Added TRAJ file check and mailing of the file
and renaming it
12-Aug-93 (MDM) Added "keep_ascii=4" to MK_ORBIT_FILES call for ASCA
10-May-94 (MDM) Added check for bad calculation
27-Jul-94 (MDM) Modified to check TRAJ files first, and if a TRAJ
file exists with no equivalent ORBIT file, create the
ORBIT file from the TRAJ file and kick off MK_FEM
and MK_ORBIT_FILES
File orbit_0173 was the last file created using
FACOM_ORBIT as the source.
26-oct-94 (SLF) fix file name problem
4-nov-94 (SLF) handle format change in facom_orbit file
(call where_pattern)
[Previous]
[Next]
NAME:
mk_orbit_files
PURPOSE:
Generate the 16s aoslos file for op_first_guess
CALLING SEQUENCE:
mk_orbit_files,mail=mail,keep_ascii=keep_ascii [,/asca]
OPTIONAL INPUTS:
ndays = Number of days to compute (default = 11)
OPTIONAL INPUT KEYWORDS:
mail = Vector string of users to receive mail when
mk_dsn_predict has finished.
keep_ascii = Number of *.ascii files to keep on line
asca = If set, compute the asca 16s file.
OBSOLETE INPUT KEYWORDS:
dsn_path,keep_summ,keep_dsn
CALLS: ***
ADDTIME [1], ADDTIME [2], ARR2STR [1], Arr2Str [2], anytim2ex [1], anytim2ex [2]
fmt_tim [1], fmt_tim [2], gt_day [1], gt_day [2], mail [1], mail [2], mk_aoslos
CALLED BY:
mk_orbit [1], mk_orbit [2]
MODIFICATION HISTORY:
8-sep-92, J. R. Lemen, Written
22-sep-92, JRL, Added keep_* keywords for file purging
28-apr-93, JRL, Turned off .summ file generation
1-may-93, JRL, Added ASCA keyword
4-may-93, JRL, The *ascii file for op_first_guess is now 11 days
28-mar-95, JRL, Turned of the mk_dsn_predict part of the code.
Changed the mail message. Now defaults to 'lemen'
unless mail = ''
[Previous]
[Next]
NAME:
mk_orbit_sum
PURPOSE:
Generate ascii file containing summary of Yohkoh Day times (*.summ)
Optionally generate *.sum2 file for use by contacts.
CALLING SEQUENCE:
mk_orbit_sum ; Will prompt for start/stop and delete option.
mk_orbit_sum,start_time,stop_time,time_step, $
file=file,orbit_file=orbit_file [,/delete,/full,/nosaa,/contacts]
Examples:
mk_orbit_sum,/del,/contacts ; Will prompt for start/stop
mk_orbit_sum,'1-apr-92','3-apr-92',/del ; Default = 60s, no *.sum2 file
INPUTS:
start_day Start day in string (dd-mmm-yy hh:mm) format
stop_day Stop day in string (dd-mmm-yy hh:mm) format
time_step The time step in sec. If not present, default will be 60s
OPTIONAL INPUT KEYWORDS:
orbit_file = The file name containing the orbital state vector.
If not supplied, then the closest file in time will
be chosen by run_dsnfil.pro.
delete = If set to 1, will delete the *.ascii file.
OPTIONAL INPUT KEYWORDS FOR *.summ FILE CONTROL:
full = If set to 1, will cause (*.summ) summary file to be verbose.
nosaa = If set to 1, will exclude daylight times outside of saa.
Only has an effect if full is not set to 1.
OPTIONAL INPUT KEYWORDS FOR *.sum2 (Contacts) FILE CONTROL:
contacts = If set to 1, will call pr_orbit_sum2 to write *.sum2 file
for use by contacts.
OPTIONAL OUTPUT KEYWORDS:
file = The output summary file.
CALLS: ***
ADDTIME [1], ADDTIME [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
PR_ORBIT_SUM2, break_file [4], input [1], input [2], pr_orbit_sum, rd_orbit_event
run_dsnfil, timstr2ex [1], timstr2ex [2], yesnox [1], yesnox [2]
SIDE EFFECTS:
mk_orbit_sum will call run_dsnfil to create an *.ascii file containing
the raw orbital information. Next pr_orbit_sum will be called to
create the summary file.
MODIFICATION HISTORY:
9-mar-92, Written, J. R. Lemen
[Previous]
[Next]
Name: mk_pix
Purpose: make a genx file of image or current window for display by show_pix
Calling Sequence:
mk_pix [image, r, g, b, filename='filename', text=text, /replace]
Calling Examples:
mk_pix ; read image and r/g/b from current window
mk_pix, /norgb ; dont include r/g/b vectors
mk_pix,image,r,g,b,filename='name' ; user supplied image and r/g/b
mk_pix,'filename' ; pass filename (will prompt otherwise)
mk_pix,image,R,G,B, text=text ; image and colors passed
mk_pix,/notext ; dont prompt for text description
mk_pix,img,r,g,b, subdir='calibration' ; subdir = showpix subdirectory
mk_pix,'filename', /replace ; replace (overwrite) an existing file
mk_pix,'filename', opath=curdir() ; write file to current directory
mk_pix,'filename', text='filename' ; if text=file, read text from file
mk_pix,'filename', text='filename', /newcaption ; update text of existing file
mk_pix,im,r,g,b,/http ; update HTTP (mosaic) area
Keyword Parmaeters:
filename - filename to use (scaler string)
norgb - if set, dont save R/G/B vectors
notext - switch if set, dont prompt for text
moon OR eclipse - if set, use moon directory
mercury - if set, use mercury directory
misc OR other - if set, use misc(ellaneous) directory
opath - path for output (default is showpix common area)
subdir - specify subdirectory under showpix common area)
newcapt - if set, update text (only) from existing file
text - string or string array desrcribing image (prompts if not passed)
(text may be name of file which contains the desired text)
nodist - if set, do not send mail to ysserver (triggers distribution)
CALLS: ***
BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1]
CONCAT_DIR [2], CONCAT_DIR [3], CT2RGB, FILE_EXIST [2], break_file [4]
concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2], dir_list [1]
dir_list [2], file_append [1], file_append [2], file_exist [1], file_exist [3]
file_list [1], file_list [2], genx2html [1], genx2html [2], get_logenv [1]
get_logenv [2], mail [1], mail [2], rd_tfile [1], rd_tfile [2], restgen [1]
restgen [2], savegen [1], savegen [2], str_replace [1], str_replace [2], tbeep [1]
tbeep [2], tbeep [3], wc_where [1], wc_where [2], wmenu_sel [1], wmenu_sel [2]
yesnox [1], yesnox [2]
CALLED BY:
daily_forecast [2], eit_mirror, fl_goesplot [1], fl_goesplot [2]
fl_goesplot [3], fl_summary [1], fl_summary [2], fl_summary [3], fl_suntoday [1]
fl_suntoday [2], fl_suntoday [3], fl_sxtobsnar [1], fl_sxtobsnar [2]
sun_today [1], sun_today [2], sun_today [3]
History:
13-Nov-1993 (SLF)
17-Nov-1993 (SLF) - fix bug with text
7-Dec-1993 (SLF) - add replace switch
1-Mar-1994 (SLF) - add opath keyword, allow text to be file name
15-Mar-1994 (SLF) - add subdir keyword
18-Mar-1994 (SLF) - use $DIR_GEN_SHOWPIX instead of $DIR_SITE_GENPIX
26-Jun-1994 (SLF) - filename logic and document, add FILENAME keyword
14-Jul-1994 (SLF) - send mail to ysserver account (trigger distribution)
22-Jul-1994 (ETB/SLF) - add index keyword
12-oct-1994 (SLF) - fix potential scaler/array mismatch
7-Dec-1994 (SLF) - make dummy file to prevent distribution of
'replaced' files...
14-Feb-1995 (SLF) - add HTTP keyword and function
10-apr-1995 (SLF) - insure that subdir is defined
23-Feb-1998 (SLF) - permit ...fname,image,r,g,b
26-Feb-1998 (SLF) - fix problem with 23-feb update
[Previous]
[Next]
NAME:
mk_pnt
PURPOSE:
Generate the PNT data file from the ADA files
INPUT:
infil0 - A string array with a list of the ADA file
names. It should include the directory
path. The inputfiles can be derived if the
"week" option is used.
outfil - The output filename to create. The output
file can be derived if the "week" option is used
CALLS: ***
ATT_STRUCT [1], ATT_STRUCT [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], GEN_STRUCT [1]
GEN_STRUCT [2], GET_NBYTES, MASK, OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE
PNT_STRUCT, RD_ADA, REF_STRUCT, Rd_NewOrb_p [1], Rd_NewOrb_p [2], Rd_Pointer [1]
Rd_Pointer [2], Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
WRT1P_FH, anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2]
break_file [4], concat_dir [4], ex2fid [1], ex2fid [2], ex2week [1], ex2week [2]
fid2ex [1], fid2ex [2], file_exist [1], file_exist [3], finddir [1], finddir [2]
fmt_tim [1], fmt_tim [2], gt_dp_mode [1], gt_dp_mode [2], gt_dp_rate [1]
gt_dp_rate [2], int2secarr [1], int2secarr [2], rd_pnt, rd_roadmap [1], rdwrt [1]
rdwrt [2], rdwrt [3], tim2dset [1], tim2dset [2], tim2orbit [1], tim2orbit [2]
where_arr [1], where_arr [2]
CALLED BY:
yoyo_man2
OPTIONAL KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
append - If set, try to just append the files in "infil"
list which are not already in the PNT file.
usefid - If set, use the FID time in the orbit pointer
(so that it can be recognized when used with
the /append switch)
HISTORY:
Written 13-Feb-92 by M.Morrison
Ver 0.200
Ver 0.210 (MDM) - Made correction to STENTRY value in orbit pointer
section (needed to be integer*4 and was off by 1)
Ver 0.30 (MDM) - TFSS needed to have the proper bits extracted before
taking the average
Ver 1.00 13-Mar-92 (MDM) - Adjusted extraction from ADA files to
not use the same datasets twice if they overlap
in successive data files.
Ver 1.01 26-May-92 (MDM) - Changed so that if outfil is not passed
the name is built based on the first file.
Ver 1.02 31-Jul-92 (MDM) - Removed copying SC_PNTG field into PNT
structure - the ADS data is being written there and
we want to avoid confusion
Ver 1.03 15-Oct-92 (MDM) - Modified to allow appending to an existing
PNT file.
Ver 1.04 9-Nov-92 (MDM) - CHMOD +W on the output file
Ver 1.05 11-Nov-92 (MDM) - Moved NORBIT=0 command since if an append
option was overridden (Files out of order)
then it was appending to the ORBIT_ARR
incorrectly.
- Added /USEFID switch. This will force the
ORBIT_ARRAY time/day entry to be the input
FileID. This should only be used when
generating temporary OBS logs
Ver 1.06 11-Nov-92 (MDM) - Use the LAST file in "infil" to figure
out the week number when the output file
is not specified.
Ver 1.07 19-Nov-92 (MDM) - Patch to handle cases when there are no
datasets in the ADA file (most likely the
ADA file is garbage and was not finished)
10-Feb-93 (MDM) - Patched bug which was not allowing the
input parameter "outfil" to be useable
11-Feb-93 (MDM) - Similar fix to 10-Feb-93
29-Mar-93 (MDM) - Adding debugging print statements
Ver 1.08 8-Jul-93 (MDM) - Corrected the generation of the output file
name when not specified. It was sometimes
using the weekID for the NEXT week.
Ver 1.09 14-Dec-93 (MDM) - Modified to correct for the case where
An input file is totally contained in a
previous file
[Previous]
[Next]
Name:
mk_ptv_movie
Purpose:
Write a series of images to the graphics board.
Calling Sequence:
mk_ptv_movie, num, index, data, $
[Comment0,comment1=Comment1, $
color_tab1=color_tab1, color_tab2=color_tab2, $
data2=data2, qdisplay=qdisplay, charsize=charsize, $
infile=infile, idxsfd=idxsfd, ff=ff, sfd=sfd, $
nvsdev=nvsdev, fileout=fileout, no_center=no_center, $
no_resize=nosize, delta_sec=delta_sec, $
q_log=q_log, tvdisplay=tvdisplay, no_record=no_record
margin_color=margin_color, totimg=totimg, file_log=file_log
Input Variables:
Num = A vector of label numbers (usually the index number of
the image from the original file).
data = 3-d byte array contain images.
index = SDA index structure corresponding to data
Optional Input variables:
Comment0 = Text string which is put into the text box of the display.
Optional Input Keywords:
Comment1 = Text string which is put into the text box of the display
Comment1 may be a vector of length n_elements(data(0,0,*))
color_tab1 = a three dimension array of r,g,b colors
color_tab1 = bytarr(3,256)
color_tab2 = a three dimension array of r,g,b colors for 2nd image
data2 = 3-d byte array contain images for 2nd image.
qdisplay = 0 to display one image with title box.
= 1 to display two images with title box.
= 2 to diplay one image with no title box.
charsize = charsize to output.
infile = name of input file with image data (eg. sfd94_34...)
idxsfd = roadmap index number within the input file for an image.
ff = laser disk #, side and frame number to record.
sfd = flag set to 1 for sfd file input, 0 if not.
nvsdev = flag =1 to indicate output goes thru nvs system, 0 if not.
fileout = The leading part of the output filename for nvs system.
no_center = flag =1 to not auto center a single image.
no_resize = flag =1 to not resize image to max aspect.
tvdisplay = Debug flag, If set to 1, images displayed only and on
nvs system files are written but not sent to nvs-device.
q_log = flag =1 to log image info to a file.
no_record = flag =1 to NOT record images (peritek option only)
margin_color color level for margin area around image. Default is 0.
particularly useful for reversed color tables.
totimg total number of images to process.
file_log file name of log file.
If color_tab1 is not specified, user will be prompted for selection.
CALLS: ***
COMMAND_PANA, CONGRID [1], CONGRID [2], CONGRID [3], GET_INFO2, STRETCH2, input [1]
input [2], maxspect [1], maxspect [2], mk_ptv_title, mknumat, stdct, wr_nvs
wr_peritek
Side effects:
Will create a window,1 for displaying the titles. These are read back
using tvrd.
If tvdisplay=1, then the test image will be displayed in window 0.
NOTES:
Peritek video card has about 617 col and 485 rows.
History:
[Previous]
[Next]
Name:
mk_ptv_title
Purpose:
Write a title for a SXT movie sequence.
Calling sequence:
mk_title,Num,index,Comment0,Comment1
For Example,
mk_title,Num,index,'Composite','SXT Movie Ver 1.2',xoff=10
Inputs:
Num = User supplied sequence number (usually a do-loop parameter)
index = SXT index structure
Comment0 and Comment1 = Strings that are comments written to the plot.
Optional Keywords:
xoff = Starting pointing in X. Default is 10.
charsize = Character size
highres = If set, write the text to a twice bigger screen, then read
back and rebin.
xsize = X size of window 1. Default = 134
ysize = Y size of window 1. Default = 486
CALLS: ***
anytim2ex [1], anytim2ex [2], gt_day [1], gt_day [2], gt_dp_mode [1]
gt_dp_mode [2], gt_dp_rate [1], gt_dp_rate [2], gt_dpe, gt_filta, gt_filtb, gt_res
gt_time [1], gt_time [2]
CALLED BY:
mk_movie [1], mk_movie [2], mk_ptv_movie
Side Effects:
Will create a window 1 to write the titles.
If the highres keyword is set, will create a temporary window to write
the characters at double size.
Modification History:
written, 30-Jun-94, gal, from greg2, and mk_title
[Previous]
[Next]
Name: mk_pubydb
Purpose: make the ydb mapping file (used by ydb_install)
Calling Sequence:
mk_pubydb
Generally called by cron job via software account
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4], file_append [1]
file_append [2], get_logenv [1], get_logenv [2], pr_status [1], pr_status [2]
rd_tfile [1], rd_tfile [2], str_replace [1], str_replace [2], strjustify
History:
S.L.Freeland
[Previous]
[Next]
NAME:
mk_rasm_files
PURPOSE:
Reformat the rasm raw files.
CALLING SEQUENCE:
mk_rasm_files,path
INPUTS:
path = Directory to look for the rasm_diff.log file on.
OUTPUTS:
None
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], break_file [4], concat_dir [4], fmt_rasm, get_host [1]
get_host [2]
SIDE EFFECTS:
Looks for rasm_diff.log on the directory given by path. mk_rasm_files
then tries to determine if it is necessary to run fmt_rasm to create
new files.
If running from flare11, will print any files written to the
flare1 printer.
MODIFICATION HISTORY:
21-sep-92, J. R. Lemen, Written
2-jul-93, JRL, Modified to edit the ASCA files
[Previous]
[Next]
NAME:
MK_RBMPC
PURPOSE:
To output the rbm_sc_pc( pc1,2) and rbm_sd_pc data for utplot.
CALLING SEQUENCE:
rbmpc = mk_rbmpc( index,data )
rbmpc = mk_rbmpc( index,data,xtime=xtime )
( after the run of yodat and the extarct of 'index' and 'data' )
INPUTS:
index - Wbs index structure from reformat data.
data - Wbs data structure from reformat data.
OPTIONAL INPUTS:
sec - If set, count rate is 1 sec.
OUTPUTS:
rbmpc - Float array containing of rbm_pc data.
( sc_pc1, sc_pc2 and sd_pc )
rbmpc = fltarr( 3,16*N ). rbmpc(0,*) is rbm_sc_pc1, rbmpc(2,*)
is rbm_sd_pc. ( N: number of wbs data. )
-- example.--
utplot,xtime,rbmpc(0,*),index(0)
--> plot rbm_sc_pc1 time profile.
count rate is 0.25sec. ( high bit rate )
OPTIONAL OUTPUTS:
xtime - This option gives corresponding time for each of
rbm_pc data time.
( for utplot )
PROCEDURE:
XTIME is the middle of observation time interval. the observation
time is header time minus prestored time.
Output array RBMPC has no deadtime-corrected data.
CALLS: ***
UNSIGN, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2], gt_time [1]
gt_time [2]
RESTRICTIONS:
The optional input SEC is restricted to high and medium bit rates.
HISTORY:
Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)
[Previous]
[Next]
NAME: MK_ROOT_BITMAP
PURPOSE: IDL routine program to process a byte image to a bitmap, save,
and load onto root window.
PRO mk_root_bitmap, inimage, floyd=floyd
INPUT PARAMETERS:
inimage = byte array image to process
OPTIONAL INPUT KEYWORDS:
floyd - if set, use pretty but slow Floyd-Steinberg halftoning.
Default uses faster, noisier DOT_PLOTTER halftoning.
METHOD: Routine converts image from 8-bit to 1-bit, saves and
displays on root window. Works on any Unix platform running X11.
IDL PROCEDURES USED:
dot_plotter, wrt_x11_bitmap
X11 PROCEDURES USED:
xwininfo, xsetroot
CALLS: ***
FLOYD_STEINBERG, dot_plotter, wrt_x11_bitmap
CALLED BY:
background_new
HISTORY:
Written April 29, 1993 Barry LaBonte
Eliminate temp file January 3, 1995 BJL
[Previous]
[Next]
Name: mk_script
Purpose: make a script file from str_data and optionally spawn it
Input Parameters:
str_data - string array of commands
Optional Keyword Parameters
name - file name for script file (default='mk_script.src')
submit - switch; if set, the file is sourced (executed)
Output - function return value is script file name
History - slf, 15-nov-92
slf, 6-mar-92 - allow 'appending' to new file
CALLED BY
arctap2tap, mktap_prep
[Previous]
[Next]
NAME:
mk_sd2
PURPOSE:
Generate the SXT Dark Current SDA Warm image (SDW) file from the
SFR files of all 100% data images that are take with the CCD
warm.
OPTONAL INPUT:
infil - A list of the SFR file names that were used to make
the SDL file. If this parameter is not passed, the
program will use FINDDIR to get the directory for that
week of data and then use FINDFILE.
KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2]
GET_NBYTES, GET_SDL_INFO, MK_SDW, OPEN_DA_FILE, RD_XDA [1], RD_XDA [2], REF_STRUCT
Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SXT_STRUCT
UNIQ [1], UNIQ [2], UNIQ [3], WRT1P_FH, anytim2ex [1], anytim2ex [2], concat_dir [4]
ex2week [1], ex2week [2], file_list [1], file_list [2], finddir [1], finddir [2]
gt_dpe, gt_expdur [1], gt_expdur [2], gt_res, gt_temp_ccd, rd_roadmap [1], rd_sdl
rdwrt [1], rdwrt [2], rdwrt [3], tim2dset [1], tim2dset [2], wrtsxtmap
HISTORY:
Written 26-Apr-92 by M.Morrison
Ver 1.11 26-May-92 (MDM) - Changed to write a temporary file and then
move it to on-line after finished generating it
8-Jul-92 (MDM) - Added "outfil"
18-Aug-93 (MDM) - Removed reference to DIR_SXT_DC
Ver 1.20 4-Aug-94 (MDM) - Modified to exclude dark images which have staturated
pixels
[Previous]
[Next]
NAME:
mk_sdc
PURPOSE:
Generate the SXT Dark Current SDA image (SDC) file from the
SFR files of all unique (exposure and resolution) dark current
images excluding SAA and non-100% images
OPTONAL INPUT:
infil - A list of the SFR file names that were used to make
the SDL file. If this parameter is not passed, the
program will use FINDDIR to get the directory for that
week of data and then use FINDFILE.
KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
/correct_col_blem = call sdc_verify a second time to correct
column blemishes, when necessary.
CALLED BY:
mk_sdcs
HISTORY:
Written 20-Apr-92 by M.Morrison
Ver 1.11 26-May-92 (MDM) - Changed to write a temporary file and then
move it to on-line after finished generating it
8-Jul-92 (MDM) - added "outfil"
13-May-93 (MDM) - Changed GT_EXPDUR call to have /NOCORR to not
correct for the shutter error
- Added check for upper/lower half image (for FR)
Ver 1.12 16-May-93 (MDM) - Patch to exclude BLS dark images taken "11-APR-93"
which were "Qrtr Dark DPE=11 (38.0 )"
18-Aug-93 (MDM) - Changed to use DIR_SXT_SDC and DIR_SXT_SDL
Ver 1.13 19-Aug-93 (MDM) - Added check to avoid the SLS images which are
QR, DPE=2, NaBan images which have scatter light
in them.
Ver 1.20 4-Aug-94 (MDM) - Modified to exclude dark images which have staturated
pixels
Ver 1.21 7-apr-95 (SLF) - avoid frames with fill data (show 100% "good")
Ver 1.22 6-Jul-95 (MDM) - Added check that the image is not a patrol image
- Updated ProgVerNo (it was not for Ver 1.21)
Ver 1.23 23-Mar-99 (TRM) - added call to sdc_verify to select the best dark
frame when multiple frames are available.
- Added check of filters. Before the Oct 1992
entrance filter failure any filter combination
is allowed. Between the Oct 92 and Nov 92
failures, only darks with a metal filter are
allowed. After the Nov 92 failure only darks
with AlMg filter are allowed.
Ver 1.24 11-May-99 (SLF) - add /CLEAR_COMPRESS in rd_xda call
Ver 1.30 12-May-99 (SLF) - !!SIMPLIFY!! use sav_sda instead of lower level...
use file_delete, /noshell etc.
Ver 1.31 15-May-99 (TRM) - Simplified the call to sdc_verify so that it is
only called when necessary. Added a second call
to sdc_verify to correct for column blemishes,
when necessary.
Ver 1.32 15-Jul-99 (TRM) - Make the default NOT to do the column blemish
correction.
Ver 1.33 28-jan-00 (PGS) - y2k fix: replaced sel_timrange with
ssw_time_compare
Ver 1.34 22-Nov-02 (TRM) - Added nbest keyword. Changed SAA flag to
use saa_in.pro rather than just
the RBM flag. Removed call to
get_sdl_info and changed code to reject
all darks from SAA times. Changed the
test around Nov 92 to allow gt_filtb GE 3
so that the thicker filters are not
rejected at that time. I also noticed that when
Phil did the y2k fix he did not update the
version number so there probably is no
1.33
Ver 1.35 02-Dec-02 (TRM) - Despike the short exposure darks.
- Added call to sxt_mksdc_history
- Added call to sxt_bakeout_in with a
cooling time of 12 hours to better
eliminate bakeouts.
11-Mar-03 (GLS) - Changed references to 'file_delete' to 'ssw_file_delete'
in order to avoid conflict with IDL 5.5 'file_delete'
command.
Ver 1.36 02-Jun-2003 (TRM) - Allow DPE=0 short exposures before the
first entrance filter failure.
[Previous]
[Next]
NAME:
mk_sdc
PURPOSE:
Generate the SXT Dark Current SDA image (SDC) file from the
SFR files of all unique (exposure and resolution) dark current
images excluding SAA and non-100% images
OPTONAL INPUT:
infil - A list of the SFR file names that were used to make
the SDL file. If this parameter is not passed, the
program will use FINDDIR to get the directory for that
week of data and then use FINDFILE.
KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
/correct_col_blem = call sdc_verify a second time to correct
column blemishes, when necessary.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GET_NBYTES, RD_XDA [1], RD_XDA [2]
REF_STRUCT, Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
SDC_VERIFY, STR2ARR [1], STR2ARR [2], SXT_BAKEOUT_IN, SXT_STRUCT, UNIQ [1], UNIQ [2]
UNIQ [3], anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1], ex2week [2]
file_list [1], file_list [2], finddir [1], finddir [2], gt_dpe, gt_expdur [1]
gt_expdur [2], gt_filta, gt_filtb, gt_pfi_ffi, gt_res, gt_shape_cmd, gt_temp_ccd
int2secarr [1], int2secarr [2], rd_roadmap [1], rd_sdl, saa_in [1], saa_in [2]
sav_sda [1], sav_sda [2], sav_sda [3], sel_timrange [1], sel_timrange [2]
ssw_time_compare, sxt_mksdc_history, tim2dset [1], tim2dset [2]
CALLED BY:
mk_sdcs
HISTORY:
Written 20-Apr-92 by M.Morrison
Ver 1.11 26-May-92 (MDM) - Changed to write a temporary file and then
move it to on-line after finished generating it
8-Jul-92 (MDM) - added "outfil"
13-May-93 (MDM) - Changed GT_EXPDUR call to have /NOCORR to not
correct for the shutter error
- Added check for upper/lower half image (for FR)
Ver 1.12 16-May-93 (MDM) - Patch to exclude BLS dark images taken "11-APR-93"
which were "Qrtr Dark DPE=11 (38.0 )"
18-Aug-93 (MDM) - Changed to use DIR_SXT_SDC and DIR_SXT_SDL
Ver 1.13 19-Aug-93 (MDM) - Added check to avoid the SLS images which are
QR, DPE=2, NaBan images which have scatter light
in them.
Ver 1.20 4-Aug-94 (MDM) - Modified to exclude dark images which have staturated
pixels
Ver 1.21 7-apr-95 (SLF) - avoid frames with fill data (show 100% "good")
Ver 1.22 6-Jul-95 (MDM) - Added check that the image is not a patrol image
- Updated ProgVerNo (it was not for Ver 1.21)
Ver 1.23 23-Mar-99 (TRM) - added call to sdc_verify to select the best dark
frame when multiple frames are available.
- Added check of filters. Before the Oct 1992
entrance filter failure any filter combination
is allowed. Between the Oct 92 and Nov 92
failures, only darks with a metal filter are
allowed. After the Nov 92 failure only darks
with AlMg filter are allowed.
Ver 1.24 11-May-99 (SLF) - add /CLEAR_COMPRESS in rd_xda call
Ver 1.30 12-May-99 (SLF) - !!SIMPLIFY!! use sav_sda instead of lower level...
use file_delete, /noshell etc.
Ver 1.31 15-May-99 (TRM) - Simplified the call to sdc_verify so that it is
only called when necessary. Added a second call
to sdc_verify to correct for column blemishes,
when necessary.
Ver 1.32 15-Jul-99 (TRM) - Make the default NOT to do the column blemish
correction.
Ver 1.33 28-jan-00 (PGS) - y2k fix: replaced sel_timrange with
ssw_time_compare
Ver 1.34 22-Nov-02 (TRM) - Added nbest keyword. Changed SAA flag to
use saa_in.pro rather than just
the RBM flag. Removed call to
get_sdl_info and changed code to reject
all darks from SAA times. Changed the
test around Nov 92 to allow gt_filtb GE 3
so that the thicker filters are not
rejected at that time. I also noticed that when
Phil did the y2k fix he did not update the
version number so there probably is no
1.33
Ver 1.35 02-Dec-02 (TRM) - Despike the short exposure darks.
- Added call to sxt_mksdc_history
- Added call to sxt_bakeout_in with a
cooling time of 12 hours to better
eliminate bakeouts.
[Previous]
[Next]
NAME:
mk_sdc
PURPOSE:
Generate the SXT Dark Current SDA image (SDC) file from the
SFR files of all unique (exposure and resolution) dark current
images excluding SAA and non-100% images
OPTONAL INPUT:
infil - A list of the SFR file names that were used to make
the SDL file. If this parameter is not passed, the
program will use FINDDIR to get the directory for that
week of data and then use FINDFILE.
KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
/correct_col_blem = call sdc_verify a second time to correct
column blemishes, when necessary.
/saa_only = write dark file with only SAA frames. Normally
this should never ever ever be set.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GET_NBYTES, RD_XDA [1], RD_XDA [2]
REF_STRUCT, Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
SDC_VERIFY, STR2ARR [1], STR2ARR [2], SXT_BAKEOUT_IN, SXT_STRUCT, UNIQ [1], UNIQ [2]
UNIQ [3], anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1], ex2week [2]
file_list [1], file_list [2], finddir [1], finddir [2], gt_dpe, gt_expdur [1]
gt_expdur [2], gt_filta, gt_filtb, gt_pfi_ffi, gt_res, gt_shape_cmd, gt_temp_ccd
int2secarr [1], int2secarr [2], rd_roadmap [1], rd_sdl, saa_in [1], saa_in [2]
sav_sda [1], sav_sda [2], sav_sda [3], sel_timrange [1], sel_timrange [2]
ssw_time_compare, sxt_mksdc_history, tim2dset [1], tim2dset [2]
CALLED BY:
mk_sdcs
HISTORY:
Written 20-Apr-92 by M.Morrison
Ver 1.11 26-May-92 (MDM) - Changed to write a temporary file and then
move it to on-line after finished generating it
8-Jul-92 (MDM) - added "outfil"
13-May-93 (MDM) - Changed GT_EXPDUR call to have /NOCORR to not
correct for the shutter error
- Added check for upper/lower half image (for FR)
Ver 1.12 16-May-93 (MDM) - Patch to exclude BLS dark images taken "11-APR-93"
which were "Qrtr Dark DPE=11 (38.0 )"
18-Aug-93 (MDM) - Changed to use DIR_SXT_SDC and DIR_SXT_SDL
Ver 1.13 19-Aug-93 (MDM) - Added check to avoid the SLS images which are
QR, DPE=2, NaBan images which have scatter light
in them.
Ver 1.20 4-Aug-94 (MDM) - Modified to exclude dark images which have staturated
pixels
Ver 1.21 7-apr-95 (SLF) - avoid frames with fill data (show 100% "good")
Ver 1.22 6-Jul-95 (MDM) - Added check that the image is not a patrol image
- Updated ProgVerNo (it was not for Ver 1.21)
Ver 1.23 23-Mar-99 (TRM) - added call to sdc_verify to select the best dark
frame when multiple frames are available.
- Added check of filters. Before the Oct 1992
entrance filter failure any filter combination
is allowed. Between the Oct 92 and Nov 92
failures, only darks with a metal filter are
allowed. After the Nov 92 failure only darks
with AlMg filter are allowed.
Ver 1.24 11-May-99 (SLF) - add /CLEAR_COMPRESS in rd_xda call
Ver 1.30 12-May-99 (SLF) - !!SIMPLIFY!! use sav_sda instead of lower level...
use file_delete, /noshell etc.
Ver 1.31 15-May-99 (TRM) - Simplified the call to sdc_verify so that it is
only called when necessary. Added a second call
to sdc_verify to correct for column blemishes,
when necessary.
Ver 1.32 15-Jul-99 (TRM) - Make the default NOT to do the column blemish
correction.
Ver 1.33 28-jan-00 (PGS) - y2k fix: replaced sel_timrange with
ssw_time_compare
Ver 1.34 22-Nov-02 (TRM) - Added nbest keyword. Changed SAA flag to
use saa_in.pro rather than just
the RBM flag. Removed call to
get_sdl_info and changed code to reject
all darks from SAA times. Changed the
test around Nov 92 to allow gt_filtb GE 3
so that the thicker filters are not
rejected at that time. I also noticed that when
Phil did the y2k fix he did not update the
version number so there probably is no
1.33
Ver 1.35 02-Dec-02 (TRM) - Despike the short exposure darks.
- Added call to sxt_mksdc_history
- Added call to sxt_bakeout_in with a
cooling time of 12 hours to better
eliminate bakeouts.
11-Mar-03 (GLS) - Changed references to 'file_delete' to 'ssw_file_delete'
in order to avoid conflict with IDL 5.5 'file_delete'
command.
Ver 1.36 02-Jun-2003 (TRM) - Allow DPE=0 short exposures before the
first entrance filter failure by turning
off the exp test for these images. Also
added an absolute cut on the time since
uv flood. Added /saa_only keyword.
[Previous]
[Next]
NAME:
mk_sdc
PURPOSE:
Generate the SXT Dark Current SDA image (SDC) file from the
SFR files of all unique (exposure and resolution) dark current
images excluding SAA and non-100% images
OPTONAL INPUT:
infil - A list of the SFR file names that were used to make
the SDL file. If this parameter is not passed, the
program will use FINDDIR to get the directory for that
week of data and then use FINDFILE.
KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
/correct_col_blem = call sdc_verify a second time to correct
column blemishes, when necessary.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GET_NBYTES, RD_XDA [1], RD_XDA [2]
REF_STRUCT, Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
SDC_VERIFY, STR2ARR [1], STR2ARR [2], SXT_BAKEOUT_IN, SXT_STRUCT, UNIQ [1], UNIQ [2]
UNIQ [3], anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1], ex2week [2]
file_list [1], file_list [2], finddir [1], finddir [2], gt_dpe, gt_expdur [1]
gt_expdur [2], gt_filta, gt_filtb, gt_pfi_ffi, gt_res, gt_shape_cmd, gt_temp_ccd
int2secarr [1], int2secarr [2], rd_roadmap [1], rd_sdl, saa_in [1], saa_in [2]
sav_sda [1], sav_sda [2], sav_sda [3], sel_timrange [1], sel_timrange [2]
ssw_time_compare, sxt_mksdc_history, tim2dset [1], tim2dset [2]
CALLED BY:
mk_sdcs
HISTORY:
Written 20-Apr-92 by M.Morrison
Ver 1.11 26-May-92 (MDM) - Changed to write a temporary file and then
move it to on-line after finished generating it
8-Jul-92 (MDM) - added "outfil"
13-May-93 (MDM) - Changed GT_EXPDUR call to have /NOCORR to not
correct for the shutter error
- Added check for upper/lower half image (for FR)
Ver 1.12 16-May-93 (MDM) - Patch to exclude BLS dark images taken "11-APR-93"
which were "Qrtr Dark DPE=11 (38.0 )"
18-Aug-93 (MDM) - Changed to use DIR_SXT_SDC and DIR_SXT_SDL
Ver 1.13 19-Aug-93 (MDM) - Added check to avoid the SLS images which are
QR, DPE=2, NaBan images which have scatter light
in them.
Ver 1.20 4-Aug-94 (MDM) - Modified to exclude dark images which have staturated
pixels
Ver 1.21 7-apr-95 (SLF) - avoid frames with fill data (show 100% "good")
Ver 1.22 6-Jul-95 (MDM) - Added check that the image is not a patrol image
- Updated ProgVerNo (it was not for Ver 1.21)
Ver 1.23 23-Mar-99 (TRM) - added call to sdc_verify to select the best dark
frame when multiple frames are available.
- Added check of filters. Before the Oct 1992
entrance filter failure any filter combination
is allowed. Between the Oct 92 and Nov 92
failures, only darks with a metal filter are
allowed. After the Nov 92 failure only darks
with AlMg filter are allowed.
Ver 1.24 11-May-99 (SLF) - add /CLEAR_COMPRESS in rd_xda call
Ver 1.30 12-May-99 (SLF) - !!SIMPLIFY!! use sav_sda instead of lower level...
use file_delete, /noshell etc.
Ver 1.31 15-May-99 (TRM) - Simplified the call to sdc_verify so that it is
only called when necessary. Added a second call
to sdc_verify to correct for column blemishes,
when necessary.
Ver 1.32 15-Jul-99 (TRM) - Make the default NOT to do the column blemish
correction.
Ver 1.33 28-jan-00 (PGS) - y2k fix: replaced sel_timrange with
ssw_time_compare
Ver 1.34 22-Nov-02 (TRM) - Added nbest keyword. Changed SAA flag to
use saa_in.pro rather than just
the RBM flag. Removed call to
get_sdl_info and changed code to reject
all darks from SAA times. Changed the
test around Nov 92 to allow gt_filtb GE 3
so that the thicker filters are not
rejected at that time. I also noticed that when
Phil did the y2k fix he did not update the
version number so there probably is no
1.33
Ver 1.35 02-Dec-02 (TRM) - Despike the short exposure darks.
- Added call to sxt_mksdc_history
- Added call to sxt_bakeout_in with a
cooling time of 12 hours to better
eliminate bakeouts.
[Previous]
[Next]
Name: mk_sdcs
Purpose: make many sdcs (one week or mission)
Input Parameters:
NONE
Optional Keyword Parameters:
weeks - optional list of desired weeks to process (default=mission)
start_week - optional start week (default = launch week)
may be useful for restarts of mission long dbase
Output Parameters:
NONE
Output:
generates an sdc per WEEKS (default is mission)
CALLS: ***
BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DELVARX [1]
DELVARX [2], DELVARX [3], DELVARX [4], FILE_EXIST [2], concat_dir [4], delvarx [5]
file_exist [1], file_exist [3], file_list [1], file_list [2], get_logenv [1]
get_logenv [2], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3], last_nelem
mk_sdc [1], mk_sdc [2], mk_sdc [3], mk_sdc [4], week_loop [1], week_loop [2]
week_loop [3]
History:
[Previous]
[Next]
NAME:
mk_sdl
PURPOSE:
Generate the SXT Dark current log (SDL) file from the SFR file
INPUT:
infil - A string array with a list of the SFR file
names. It should include the directory
path. The inputfiles can be derived if the
"week" option is used.
outfil - The output filename to create. The output
file can be derived if the "week" option is used
OPTIONAL INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2]
GET_NBYTES, KeySea [1], KeySea [2], OPEN_DA_FILE, RD_XDA [1], RD_XDA [2], REF_STRUCT
Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SXT_STRUCT
WRT1P_FH, anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1], ex2week [2]
file_list [1], file_list [2], finddir [1], finddir [2], fmt_tim [1], fmt_tim [2]
rd_roadmap [1], rdwrt [1], rdwrt [2], rdwrt [3], wrtsxtmap
HISTORY:
Written 15-Apr-92 by M.Morrison
Ver 1.10 20-Apr-92 (MDM) - Changed from SDC to SDL
- Changed to use structures for data
Ver 1.11 26-May-92 (MDM) - Adjusted how weekid is derived
- Changed to write a temporary file and then
move it to on-line after finished generating it
Ver 1.12 12-Jul-93 (MDM) - Build/save the roadmap
18-Aug-93 (MDM) - Modified to use DIR_SXT_SDL directory
19-Aug-93 (MDM) - Corrected typo in 18-Aug-93 fix
[Previous]
[Next]
NAME:
mk_sdm
PURPOSE:
To create the weekly average SXT dark image database
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATA_PATHS, FILE_EXIST [2], POLY
POLY_FIT, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], UNIQ [1], UNIQ [2], UNIQ [3]
anytim2ints [1], anytim2ints [2], anytim2weekid [1], anytim2weekid [2]
concat_dir [4], file_compress [1], file_compress [2], file_exist [1]
file_exist [3], file_list [1], file_list [2], file_uncompress [1]
file_uncompress [2], fmt_tim [1], fmt_tim [2], gt_dpe, gt_res, his_index
rd_roadmap [1], restgen [1], restgen [2], sav_sda [1], sav_sda [2], sav_sda [3]
str_replace [1], str_replace [2], sxt_decomp [1], sxt_decomp [2], tbeep [1]
tbeep [2], tbeep [3], tim2dset [1], tim2dset [2], weekid2ex [1], weekid2ex [2]
weekid2ex [3]
HISTORY:
Written Mar-95 by M.Morrison
V1.1 11-Jul-95 (MDM) - Modified to write the output to /1d3/yohkoh/sdm
V1.11 12-Jul-95 (MDM) - Modified to correct minor bug
V1.12 - Fixed bug when no short exposure is available
[Previous]
[Next]
NAME:
mk_sdmi
PURPOSE:
To make the SDM Input database "SDMI" which holds
information on most of the dark current images
and is used to select which images are used for SDM
SAMPLE CALLING SEQUENCE:
mk_sdmi,v,test=[92,50]
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], POLY_FIT, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], STDEV
anytim2ints [1], anytim2ints [2], break_file [4], concat_dir [4], fid2ex [1]
fid2ex [2], file_list [1], file_list [2], finddir [1], finddir [2], get_sdm_val
gt_corner, gt_day [1], gt_day [2], gt_dpe, gt_percentd, gt_res, gt_temp_ccd
gt_time [1], gt_time [2], mk_dset_str [1], mk_dset_str [2], rd_obs, rd_roadmap [1]
savegen [1], savegen [2], sxt_decomp [1], sxt_decomp [2], tim2orbit [1]
tim2orbit [2], week2ex [1], week2ex [2]
HISTORY:
Written 27-Mar-95 by M.Morrison using CHECK_SDM and
SDM_CHECK2BIN
28-Mar-95 (MDM) - Modified the logic somewhat
- Added TEST option
31-Mar-95 (MDM) - Modified to have keyword RUN_TIME
18-Oct-96 (GLS) - Changed '/ydb' ref to '$ydb'
[Previous]
[Next]
NAME:
mk_sdp
PURPOSE:
Given a set of PFI files, read the roadmaps and save the
dark images into a weekly file
INPUT:
infil - an array of input file names
outdir - the output directory where the file should be written
It uses $DIR_SXT_SDP by default.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], MASK, RD_SDA [1], RD_SDA [2]
RD_SDA [3], Rd_Roadmap [2], concat_dir [4], fmt_tim [1], fmt_tim [2], gt_expmode
mk_dset_str [1], mk_dset_str [2], rd_roadmap [1], sav_sda [1], sav_sda [2]
sav_sda [3], tim2orbit [1], tim2orbit [2]
HISTORY:
Written 3-Aug-94 by M.Morrison
[Previous]
[Next]
Name: mk_sfc
Purpose: convert one or more SFT files to SFC files (via sfc_prep)
Input Parameters:
week - week string(s) in form YY_WW
Calling Sequence:
mk_sfc, week_str [param_file='filename', /check_param, /online, $
/noconfirm, /testing, /no_mail ]
Calling Examples:
mk_sfc,'95_50',/online,/noconfirm ; process SFTs for 95_50
mk_sfc,/check_param ; just show current parameter
; settings (show param file)
Optional Keyword Parameters:
online - if set, put the sfcs online (DIR_SXT_SFC)
noconfirm - if set, dont prompt for sfc/sft dirs
sftdir - if set, alternate sft output directory
sfcdir - if set, alternate sfc output directory
no_mail - if set, dont send mail
check_params - if set, just show current SFC parameter values
param_file - optional SFC parameter file (Def: $ys/sxt/doc/mk_sfc.param)
min_att_status1 - minimum ATT Status1 value to accept
Default is 4, which accepts ATT STATUS1 >= 4 (4 and 8)
CALLS: ***
ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
FILE_EXIST [2], IMGINFO, MORE [1], MORE [2], RD_SDA [1], RD_SDA [2], RD_SDA [3]
STR2ARR [1], STR2ARR [2], anytim2ex [1], anytim2ex [2], anytim2ints [1]
anytim2ints [2], concat_dir [4], ex2fid [1], ex2fid [2], file_append [1]
file_append [2], file_exist [1], file_exist [3], file_info2 [1], file_info2 [2]
file_list [1], file_list [2], fmt_tim [1], fmt_tim [2], get_logenv [1]
get_logenv [2], get_user [1], get_user [2], get_yo_dates [1], get_yo_dates [2]
get_yo_dates [3], gt2exe [1], gt2exe [2], gt_dpe, gt_filta, gt_filtb, gt_res
int2secarr [1], int2secarr [2], mail [1], mail [2], match_index [1]
match_index [2], pr_status [1], pr_status [2], prstr [1], prstr [2], rd_att
rd_tfile [1], rd_tfile [2], sav_sda [1], sav_sda [2], sav_sda [3]
sel_timrange [1], sel_timrange [2], sfc_prep [1], sfc_prep [2], str2cols [1]
str2cols [2], str_replace [1], str_replace [2], strjustify, tbeep [1], tbeep [2]
tbeep [3], tim2dset [1], tim2dset [2], tim2orbit [1], tim2orbit [2], ut_time [1]
ut_time [2]
History:
4-may-1995 (SLF) - Archive version (from orig written 15-mar)
Add auto-update, auto-mail, time window
29-Jun-1995 (SLF) - write log to DIR_SITE_LOGS (not REFORMAT_SC)
23-aug-1995 (SLF) - add Leak ERA criteria
8-nov-1995 (SLF) - DPE filter , use parameter file for DPE, seperation
add CHECK_PARAMS keyword (verify param table)
18-dec-1995 (SLF) - parameterize Tim2Sunset (in param table)
9-jan-1995 (SLF) - fix status messages
16-apr-1996 (SLF) - update documentation header, add PARAM_FILE keyword
21-may-1996 (SLF) - return with no action if NO SFTs found
3-mar-1997 (JRL) - Give the file date (not current date) if /check_param
20-jan-1997 (SLF) - filter out all but half-res
22-apr-1999 (pgs) - replaced =- hour interval with att_offset keywork & hour default
modified status check from att.status1 eq 4 to att.status1 ge 4
4-may-1999 (SLF) - permit SAA, write to parallel directory ...sfcsaa/..
23-sep-1999 (SLF) - filter ccd temp > -20.
18-Nov-1999 (SLF) - dont re-create if sfc in$DIR_SXT_SFC/offline/...
5-Jan-2000 (SLF) - add NOGRILL keyword (pass to sfc_pro)
17-dec-2001 (SFL) - save updated index->sfc file / enable cdd temp filter
9-oct-2002 (SFL) - add MIN_ATT_STATUS1 KEYWORD and function (default=4)
[Previous]
[Next]
Name: mk_sfc
Purpose: convert one or more SFT files to SFC files (via sfc_prep)
Input Parameters:
week - week string(s) in form YY_WW
Calling Sequence:
mk_sfc, week_str [param_file='filename', /check_param, /online, $
/noconfirm, /testing, /no_mail ]
Calling Examples:
mk_sfc,'95_50',/online,/noconfirm ; process SFTs for 95_50
mk_sfc,/check_param ; just show current parameter
; settings (show param file)
Optional Keyword Parameters:
online - if set, put the sfcs online (DIR_SXT_SFC)
noconfirm - if set, dont prompt for sfc/sft dirs
sftdir - if set, alternate sft output directory
sfcdir - if set, alternate sfc output directory
no_mail - if set, dont send mail
check_params - if set, just show current SFC parameter values
param_file - optional SFC parameter file (Def: $ys/sxt/doc/mk_sfc.param)
CALLS: ***
ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
FILE_EXIST [2], IMGINFO, MORE [1], MORE [2], RD_SDA [1], RD_SDA [2], RD_SDA [3]
STR2ARR [1], STR2ARR [2], anytim2ex [1], anytim2ex [2], anytim2ints [1]
anytim2ints [2], concat_dir [4], ex2fid [1], ex2fid [2], file_append [1]
file_append [2], file_exist [1], file_exist [3], file_info2 [1], file_info2 [2]
file_list [1], file_list [2], fmt_tim [1], fmt_tim [2], get_logenv [1]
get_logenv [2], get_user [1], get_user [2], get_yo_dates [1], get_yo_dates [2]
get_yo_dates [3], gt2exe [1], gt2exe [2], gt_dpe, gt_filta, gt_filtb, gt_res
int2secarr [1], int2secarr [2], mail [1], mail [2], match_index [1]
match_index [2], pr_status [1], pr_status [2], prstr [1], prstr [2], rd_att
rd_tfile [1], rd_tfile [2], sav_sda [1], sav_sda [2], sav_sda [3]
sel_timrange [1], sel_timrange [2], sfc_prep [1], sfc_prep [2], str2cols [1]
str2cols [2], str_replace [1], str_replace [2], strjustify, tbeep [1], tbeep [2]
tbeep [3], tim2dset [1], tim2dset [2], tim2orbit [1], tim2orbit [2], ut_time [1]
ut_time [2]
History:
4-may-1995 (SLF) - Archive version (from orig written 15-mar)
Add auto-update, auto-mail, time window
29-Jun-1995 (SLF) - write log to DIR_SITE_LOGS (not REFORMAT_SC)
23-aug-1995 (SLF) - add Leak ERA criteria
8-nov-1995 (SLF) - DPE filter , use parameter file for DPE, seperation
add CHECK_PARAMS keyword (verify param table)
18-dec-1995 (SLF) - parameterize Tim2Sunset (in param table)
9-jan-1995 (SLF) - fix status messages
16-apr-1996 (SLF) - update documentation header, add PARAM_FILE keyword
21-may-1996 (SLF) - return with no action if NO SFTs found
3-mar-1997 (JRL) - Give the file date (not current date) if /check_param
20-jan-1997 (SLF) - filter out all but half-res
[Previous]
[Next]
NAME:
mk_sfd
PURPOSE:
Given a set of files, read the roadmaps and find where there
is a long and short exposure. Make a composite image and remove
the saturated pixels. Write images to an output file.
INPUT:
infil - an array of input file names
outdir - the output directory where the file should be written
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], GET_NBYTES, GetObsID, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2]
break_file [4], concat_dir [4], file_append [1], file_append [2], fmt_tim [1]
fmt_tim [2], get_dc_image [1], get_dc_image [2], get_dc_image [3], get_info [1]
get_info [2], get_info [3], get_info [4], gt_day [1], gt_day [2], gt_dpe
gt_expdur [1], gt_expdur [2], gt_expmode, gt_filta, gt_filtb, gt_res, gt_shape_cmd
gt_temp_ccd, gt_time [1], gt_time [2], his_index, int2secarr [1], int2secarr [2]
leak_sub [1], leak_sub [2], leak_sub [3], mk_dset_str [1], mk_dset_str [2]
rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3], sgn [1], sgn [2], sxt_cen [1]
sxt_cen [2], sxt_decomp [1], sxt_decomp [2], tim2orbit [1], tim2orbit [2]
CALLED BY:
yoyo_man2
OPTIONAL KEYWORD INPUT:
interactive- If set, display the results to the screen as the
processing occurs.
outfil - The output file name (excluding the directory)
float - If set, bypass SFD compression and write floating type
KEYWORD OUTPUT:
filename- the output file name as derived from the input file list
HISTORY:
draft version: 28 January 1992 (KTS)
20-Mar-92 (MDM) - Took Keith Strong's program "db_desat.pro"
and made the procedure "mk_desat"
7-Apr-92 (KTS) - Put IFLAG in to avoid error if first image
is rejected
14-Apr-92 (KTS) - 'PREFIX' parameter hardwired for 'sfd'
- Added automatic week # feature
- Better generated dark frame algorithm
- Avoid night images algorithm
Ver 2.0 16-Apr-92 (KTS) - Added dark frame library read
16-Apr-92 (MDM) - Changed file name definition to use the
"progverno" variable to determine the extension
- Put the prefix parameter back in (so it would work
with old existing programs)
20-Apr-92 (MDM) - Added RUN_TIME parameter
21-Apr-92 (KTS) - Included LWA/MDM desat technique
- Included MDM DC routine
Ver 2.1 22-Apr-92 (MDM) - Added "roadmap" to the RD_SDA calls (speeds
things up since it will not re-read the roadmap
for each call)
- Adjusted the format of the code so MDM can
read it more easily
- Fixed DC subtraction to use the whole image,
not just one pixel
- Put the call to GET_DC_IMAGE for the short
exposure images outside the loop.
- Moved the check for apropriate short exposure
to before the RD_SDA (use the roadmap info)
- Replaced RD_SDA with RD_XDA
23-Apr-92 (MDM) - Added "ist" input option to skip to image
"ist" in the loop (for recovery from bombout)
Ver 2.2 26-Apr-92 (MDM) - Corrected bug in background subtraction. For
quarter res images, it was subtracting them
wrong. data1-dark1(*,*,i) does not work if
dark1 is 512x512xN and data1 is 256x256. But
data1-dark1 will work even if dark1 is 512x512!
- Renamed from "mk_desat" to "mk_sfd"
Ver 2.21 26-Apr-92 (MDM) - Adjusted search to look at the image maximum
and only choose images with max greater than 150
DN (high-8). There are images which are being
taken after the sun has set, so they are dark
images.
Ver 2.22 26-Apr-92 (MDM) - Added the warm dark current image subtraction
capability (calling "get_dc_warm")
Ver 2.23 27-Apr-92 (MDM) - Fixed bug (induced by me) where the "m1"
search was being performed on the exposure
normalized short image. It was grabbing too
many pixels.
Ver 2.24 27-Apr-92 (MDM) - Added a check to see that the dark image
subtraction is at least close when taking
warm images.
Ver 2.25 30-Jul-92 (MDM) - Check to see how many minutes before predicted
night the image was taken. Exclude images taken
less than 2 minute before night. Removed the
img_max > 150 check (tried to do the same thing)
Ver 3.00 17-Aug-92 (MDM) - Updated version number to 3.00 to make a new
file extension because of 2.25 changes that
result in a reduced number of images selected.
- Added "filename" parameter
Ver 3.01 24-Aug-92 (MDM) - Passed PROGVERNO and PROGNAME to SAV_SDA
Ver 3.02 28-Aug-92 (MDM) - Return without doing anything if cannot find
any proper images
- Passed PROVERNO*1000 to SAV_SDA
Ver 3.03 20-Oct-92 (MDM) - Added "OUTFIL" input parameter
Ver 3.04 21-Oct-92 (MDM) - Modified selection of images to process
changed exposure range and technique used
OLD: Used ROADMAP.EXPLEVMODE directly (MBE)
NEW: Use GT_DPE
OLD Long Exposure Bracket: DPE 17-23 (MBE 10-16)
OLD Short Exposure Bracket: DPE 9-14 (MBE 2- 7)
New Long Exposure Bracket: DPE 17-25
New Short Exposure Bracket: DPE 9-15
Range changed because dagwood short/long exposures
where changed from DPE 13/23 to 15/25 around 7-Oct.
Ver 3.05 22-Oct-92 (MDM) - Futhur mod/fix from Ver 3.04 (missed one WHERE)
7-Jan-93 (MDM) - Added QDEBUG and QSTOP keywords
Ver 4.00 7-Jan-93 (MDM) - Made change to GT_EXPDUR which corrected for
returning a zero exposure duration (was causing
saturated images)
- Put in a call to LEAK_SUB to remove the thin Al
pin hole scattered light leak
- Put in code to try to eliminate images with bleed
from insufficient flushes (from previous staturated
image)
Ver 4.01 8-Jan-93 (MDM) - Corrected code to remove bleed images to do so
in the short exposure images also
Ver 5.00 14-Jan-93 (MDM) - New patch to the LEAK_SUB routine to work properly
with quarter resolution images
Ver 6.00 3-Feb-93 (MDM) - LEAK_SUB had been updated to correct for AlMg leak
also. Started use of /SAVE option for LEAK_SUB.
** BOGUS ** - see Ver 7.00 below
8-Feb-93 (MDM) - Trapped on case where files exist, but are empty
Ver 7.00 26-Mar-93 (MDM) - Enabled using LEAK_SUB for AlMg filters
Ver 8.00 21-Jul-93 (MDM) - Changed the insertion of the short exposure for
pixels over 90 DN to only be done where the long
exposure is saturated.
** This fixes the glitch in the SXL histograms **
23-Jul-93 (SLF) - Use temporary function for memory management
Ver 9.00 26-Aug-93 (MDM) - Enabled history records
- Enabled interpolation for the dark images
- Updated the SFC leak image to be used (was
using Nov-92, now uses Aug-93 image)
Ver 9.01 31-Aug-93 (MDM) - The "Ver 2.25 30-Jul-92" patch to check to see
how many minutes before predicted night was not
done in the final selection of the short exposure
"where" command. It is fixed now.
V 10.00 29-Nov-93 (MDM) - Select only images taken with Filter A open
(don't select neutral density images)
V 11.00 3-Dec-93 (MDM) - Added rough alignment of short and long exposures
V 11.01 3-Jan-94 (MDM) - Corrected a bug which caused subscript out of range
(was looking at m1 instead of m1s for -1)
24-Jan-94 (DMZ) - removed VMS version numbers from infile
V 12.00 12-apr-95 (SLF) - Filter out fill data images
V 12.01 9-oct-95 (SLF) - Filter out non-square images
V 12.02 3-mar-97 (HSH) - Added /float switch (don't change progverno)
5-mar-97 (TRM) - Fixed the logic of the /float change
[Previous]
[Next]
NAME:
mk_sfd
PURPOSE:
Given a set of files, read the roadmaps and find where there
is a long and short exposure. Make a composite image and remove
the saturated pixels. Write images to an output file.
INPUT:
infil - an array of input file names
outdir - the output directory where the file should be written
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], GET_NBYTES, GetObsID, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2]
break_file [4], concat_dir [4], file_append [1], file_append [2], fmt_tim [1]
fmt_tim [2], get_dc_image [1], get_dc_image [2], get_dc_image [3], get_info [1]
get_info [2], get_info [3], get_info [4], gt_day [1], gt_day [2], gt_dpe
gt_expdur [1], gt_expdur [2], gt_expmode, gt_filta, gt_filtb, gt_res, gt_shape_cmd
gt_temp_ccd, gt_time [1], gt_time [2], his_index, int2secarr [1], int2secarr [2]
leak_sub [1], leak_sub [2], leak_sub [3], mk_dset_str [1], mk_dset_str [2]
rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3], sgn [1], sgn [2], sxt_cen [1]
sxt_cen [2], sxt_decomp [1], sxt_decomp [2], tim2orbit [1], tim2orbit [2]
CALLED BY:
yoyo_man2
OPTIONAL KEYWORD INPUT:
interactive- If set, display the results to the screen as the
processing occurs.
outfil - The output file name (excluding the directory)
KEYWORD OUTPUT:
filename- the output file name as derived from the input file list
HISTORY:
draft version: 28 January 1992 (KTS)
20-Mar-92 (MDM) - Took Keith Strong's program "db_desat.pro"
and made the procedure "mk_desat"
7-Apr-92 (KTS) - Put IFLAG in to avoid error if first image
is rejected
14-Apr-92 (KTS) - 'PREFIX' parameter hardwired for 'sfd'
- Added automatic week # feature
- Better generated dark frame algorithm
- Avoid night images algorithm
Ver 2.0 16-Apr-92 (KTS) - Added dark frame library read
16-Apr-92 (MDM) - Changed file name definition to use the
"progverno" variable to determine the extension
- Put the prefix parameter back in (so it would work
with old existing programs)
20-Apr-92 (MDM) - Added RUN_TIME parameter
21-Apr-92 (KTS) - Included LWA/MDM desat technique
- Included MDM DC routine
Ver 2.1 22-Apr-92 (MDM) - Added "roadmap" to the RD_SDA calls (speeds
things up since it will not re-read the roadmap
for each call)
- Adjusted the format of the code so MDM can
read it more easily
- Fixed DC subtraction to use the whole image,
not just one pixel
- Put the call to GET_DC_IMAGE for the short
exposure images outside the loop.
- Moved the check for apropriate short exposure
to before the RD_SDA (use the roadmap info)
- Replaced RD_SDA with RD_XDA
23-Apr-92 (MDM) - Added "ist" input option to skip to image
"ist" in the loop (for recovery from bombout)
Ver 2.2 26-Apr-92 (MDM) - Corrected bug in background subtraction. For
quarter res images, it was subtracting them
wrong. data1-dark1(*,*,i) does not work if
dark1 is 512x512xN and data1 is 256x256. But
data1-dark1 will work even if dark1 is 512x512!
- Renamed from "mk_desat" to "mk_sfd"
Ver 2.21 26-Apr-92 (MDM) - Adjusted search to look at the image maximum
and only choose images with max greater than 150
DN (high-8). There are images which are being
taken after the sun has set, so they are dark
images.
Ver 2.22 26-Apr-92 (MDM) - Added the warm dark current image subtraction
capability (calling "get_dc_warm")
Ver 2.23 27-Apr-92 (MDM) - Fixed bug (induced by me) where the "m1"
search was being performed on the exposure
normalized short image. It was grabbing too
many pixels.
Ver 2.24 27-Apr-92 (MDM) - Added a check to see that the dark image
subtraction is at least close when taking
warm images.
Ver 2.25 30-Jul-92 (MDM) - Check to see how many minutes before predicted
night the image was taken. Exclude images taken
less than 2 minute before night. Removed the
img_max > 150 check (tried to do the same thing)
Ver 3.00 17-Aug-92 (MDM) - Updated version number to 3.00 to make a new
file extension because of 2.25 changes that
result in a reduced number of images selected.
- Added "filename" parameter
Ver 3.01 24-Aug-92 (MDM) - Passed PROGVERNO and PROGNAME to SAV_SDA
Ver 3.02 28-Aug-92 (MDM) - Return without doing anything if cannot find
any proper images
- Passed PROVERNO*1000 to SAV_SDA
Ver 3.03 20-Oct-92 (MDM) - Added "OUTFIL" input parameter
Ver 3.04 21-Oct-92 (MDM) - Modified selection of images to process
changed exposure range and technique used
OLD: Used ROADMAP.EXPLEVMODE directly (MBE)
NEW: Use GT_DPE
OLD Long Exposure Bracket: DPE 17-23 (MBE 10-16)
OLD Short Exposure Bracket: DPE 9-14 (MBE 2- 7)
New Long Exposure Bracket: DPE 17-25
New Short Exposure Bracket: DPE 9-15
Range changed because dagwood short/long exposures
where changed from DPE 13/23 to 15/25 around 7-Oct.
Ver 3.05 22-Oct-92 (MDM) - Futhur mod/fix from Ver 3.04 (missed one WHERE)
7-Jan-93 (MDM) - Added QDEBUG and QSTOP keywords
Ver 4.00 7-Jan-93 (MDM) - Made change to GT_EXPDUR which corrected for
returning a zero exposure duration (was causing
saturated images)
- Put in a call to LEAK_SUB to remove the thin Al
pin hole scattered light leak
- Put in code to try to eliminate images with bleed
from insufficient flushes (from previous staturated
image)
Ver 4.01 8-Jan-93 (MDM) - Corrected code to remove bleed images to do so
in the short exposure images also
Ver 5.00 14-Jan-93 (MDM) - New patch to the LEAK_SUB routine to work properly
with quarter resolution images
Ver 6.00 3-Feb-93 (MDM) - LEAK_SUB had been updated to correct for AlMg leak
also. Started use of /SAVE option for LEAK_SUB.
** BOGUS ** - see Ver 7.00 below
8-Feb-93 (MDM) - Trapped on case where files exist, but are empty
Ver 7.00 26-Mar-93 (MDM) - Enabled using LEAK_SUB for AlMg filters
Ver 8.00 21-Jul-93 (MDM) - Changed the insertion of the short exposure for
pixels over 90 DN to only be done where the long
exposure is saturated.
** This fixes the glitch in the SXL histograms **
23-Jul-93 (SLF) - Use temporary function for memory management
Ver 9.00 26-Aug-93 (MDM) - Enabled history records
- Enabled interpolation for the dark images
- Updated the SFC leak image to be used (was
using Nov-92, now uses Aug-93 image)
Ver 9.01 31-Aug-93 (MDM) - The "Ver 2.25 30-Jul-92" patch to check to see
how many minutes before predicted night was not
done in the final selection of the short exposure
"where" command. It is fixed now.
V 10.00 29-Nov-93 (MDM) - Select only images taken with Filter A open
(don't select neutral density images)
V 11.00 3-Dec-93 (MDM) - Added rough alignment of short and long exposures
V 11.01 3-Jan-94 (MDM) - Corrected a bug which caused subscript out of range
(was looking at m1 instead of m1s for -1)
24-Jan-94 (DMZ) - removed VMS version numbers from infile
V 12.00 12-apr-95 (SLF) - Filter out fill data images
V 12.01 9-oct-95 (SLF) - Filter out non-square images
[Previous]
[Next]
NAME:
mk_sfd
PURPOSE:
Given a set of files, read the roadmaps and find where there
is a long and short exposure. Make a composite image and remove
the saturated pixels. Write images to an output file.
INPUT:
infil - an array of input file names
outdir - the output directory where the file should be written
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], GET_NBYTES, GetObsID, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2]
break_file [4], concat_dir [4], file_append [1], file_append [2], fmt_tim [1]
fmt_tim [2], get_dc_image [1], get_dc_image [2], get_dc_image [3], get_info [1]
get_info [2], get_info [3], get_info [4], gt_day [1], gt_day [2], gt_dpe
gt_expdur [1], gt_expdur [2], gt_expmode, gt_filta, gt_filtb, gt_res, gt_shape_cmd
gt_temp_ccd, gt_time [1], gt_time [2], his_index, int2secarr [1], int2secarr [2]
leak_sub [1], leak_sub [2], leak_sub [3], mk_dset_str [1], mk_dset_str [2]
rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3], sgn [1], sgn [2], sxt_cen [1]
sxt_cen [2], sxt_decomp [1], sxt_decomp [2], tim2orbit [1], tim2orbit [2]
CALLED BY:
yoyo_man2
OPTIONAL KEYWORD INPUT:
interactive- If set, display the results to the screen as the
processing occurs.
outfil - The output file name (excluding the directory)
float - If set, bypass SFD compression and write floating type
KEYWORD OUTPUT:
filename- the output file name as derived from the input file list
HISTORY:
draft version: 28 January 1992 (KTS)
20-Mar-92 (MDM) - Took Keith Strong's program "db_desat.pro"
and made the procedure "mk_desat"
7-Apr-92 (KTS) - Put IFLAG in to avoid error if first image
is rejected
14-Apr-92 (KTS) - 'PREFIX' parameter hardwired for 'sfd'
- Added automatic week # feature
- Better generated dark frame algorithm
- Avoid night images algorithm
Ver 2.0 16-Apr-92 (KTS) - Added dark frame library read
16-Apr-92 (MDM) - Changed file name definition to use the
"progverno" variable to determine the extension
- Put the prefix parameter back in (so it would work
with old existing programs)
20-Apr-92 (MDM) - Added RUN_TIME parameter
21-Apr-92 (KTS) - Included LWA/MDM desat technique
- Included MDM DC routine
Ver 2.1 22-Apr-92 (MDM) - Added "roadmap" to the RD_SDA calls (speeds
things up since it will not re-read the roadmap
for each call)
- Adjusted the format of the code so MDM can
read it more easily
- Fixed DC subtraction to use the whole image,
not just one pixel
- Put the call to GET_DC_IMAGE for the short
exposure images outside the loop.
- Moved the check for apropriate short exposure
to before the RD_SDA (use the roadmap info)
- Replaced RD_SDA with RD_XDA
23-Apr-92 (MDM) - Added "ist" input option to skip to image
"ist" in the loop (for recovery from bombout)
Ver 2.2 26-Apr-92 (MDM) - Corrected bug in background subtraction. For
quarter res images, it was subtracting them
wrong. data1-dark1(*,*,i) does not work if
dark1 is 512x512xN and data1 is 256x256. But
data1-dark1 will work even if dark1 is 512x512!
- Renamed from "mk_desat" to "mk_sfd"
Ver 2.21 26-Apr-92 (MDM) - Adjusted search to look at the image maximum
and only choose images with max greater than 150
DN (high-8). There are images which are being
taken after the sun has set, so they are dark
images.
Ver 2.22 26-Apr-92 (MDM) - Added the warm dark current image subtraction
capability (calling "get_dc_warm")
Ver 2.23 27-Apr-92 (MDM) - Fixed bug (induced by me) where the "m1"
search was being performed on the exposure
normalized short image. It was grabbing too
many pixels.
Ver 2.24 27-Apr-92 (MDM) - Added a check to see that the dark image
subtraction is at least close when taking
warm images.
Ver 2.25 30-Jul-92 (MDM) - Check to see how many minutes before predicted
night the image was taken. Exclude images taken
less than 2 minute before night. Removed the
img_max > 150 check (tried to do the same thing)
Ver 3.00 17-Aug-92 (MDM) - Updated version number to 3.00 to make a new
file extension because of 2.25 changes that
result in a reduced number of images selected.
- Added "filename" parameter
Ver 3.01 24-Aug-92 (MDM) - Passed PROGVERNO and PROGNAME to SAV_SDA
Ver 3.02 28-Aug-92 (MDM) - Return without doing anything if cannot find
any proper images
- Passed PROVERNO*1000 to SAV_SDA
Ver 3.03 20-Oct-92 (MDM) - Added "OUTFIL" input parameter
Ver 3.04 21-Oct-92 (MDM) - Modified selection of images to process
changed exposure range and technique used
OLD: Used ROADMAP.EXPLEVMODE directly (MBE)
NEW: Use GT_DPE
OLD Long Exposure Bracket: DPE 17-23 (MBE 10-16)
OLD Short Exposure Bracket: DPE 9-14 (MBE 2- 7)
New Long Exposure Bracket: DPE 17-25
New Short Exposure Bracket: DPE 9-15
Range changed because dagwood short/long exposures
where changed from DPE 13/23 to 15/25 around 7-Oct.
Ver 3.05 22-Oct-92 (MDM) - Futhur mod/fix from Ver 3.04 (missed one WHERE)
7-Jan-93 (MDM) - Added QDEBUG and QSTOP keywords
Ver 4.00 7-Jan-93 (MDM) - Made change to GT_EXPDUR which corrected for
returning a zero exposure duration (was causing
saturated images)
- Put in a call to LEAK_SUB to remove the thin Al
pin hole scattered light leak
- Put in code to try to eliminate images with bleed
from insufficient flushes (from previous staturated
image)
Ver 4.01 8-Jan-93 (MDM) - Corrected code to remove bleed images to do so
in the short exposure images also
Ver 5.00 14-Jan-93 (MDM) - New patch to the LEAK_SUB routine to work properly
with quarter resolution images
Ver 6.00 3-Feb-93 (MDM) - LEAK_SUB had been updated to correct for AlMg leak
also. Started use of /SAVE option for LEAK_SUB.
** BOGUS ** - see Ver 7.00 below
8-Feb-93 (MDM) - Trapped on case where files exist, but are empty
Ver 7.00 26-Mar-93 (MDM) - Enabled using LEAK_SUB for AlMg filters
Ver 8.00 21-Jul-93 (MDM) - Changed the insertion of the short exposure for
pixels over 90 DN to only be done where the long
exposure is saturated.
** This fixes the glitch in the SXL histograms **
23-Jul-93 (SLF) - Use temporary function for memory management
Ver 9.00 26-Aug-93 (MDM) - Enabled history records
- Enabled interpolation for the dark images
- Updated the SFC leak image to be used (was
using Nov-92, now uses Aug-93 image)
Ver 9.01 31-Aug-93 (MDM) - The "Ver 2.25 30-Jul-92" patch to check to see
how many minutes before predicted night was not
done in the final selection of the short exposure
"where" command. It is fixed now.
V 10.00 29-Nov-93 (MDM) - Select only images taken with Filter A open
(don't select neutral density images)
V 11.00 3-Dec-93 (MDM) - Added rough alignment of short and long exposures
V 11.01 3-Jan-94 (MDM) - Corrected a bug which caused subscript out of range
(was looking at m1 instead of m1s for -1)
24-Jan-94 (DMZ) - removed VMS version numbers from infile
V 12.00 12-apr-95 (SLF) - Filter out fill data images
V 12.01 9-oct-95 (SLF) - Filter out non-square images
V 12.02 3-mar-97 (HSH) - Added /float switch (don't change progverno)
5-mar-97 (TRM) - Fixed the logic of the /float change
V 12.03 24-may-99 (SLF) - only apply fill data check to short
(after last ent failure, all longs were filtered out'
[Previous]
[Next]
NAME:
mk_sfd
PURPOSE:
Given a set of files, read the roadmaps and find where there
is a long and short exposure. Make a composite image and remove
the saturated pixels. Write images to an output file.
INPUT:
infil - an array of input file names
outdir - the output directory where the file should be written
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], GET_NBYTES, GetObsID, MK_SFD_NEW, RD_XDA [1], RD_XDA [2]
Rd_Roadmap [2], break_file [4], concat_dir [4], file_append [1], file_append [2]
fmt_tim [1], fmt_tim [2], get_dc_image [1], get_dc_image [2], get_dc_image [3]
get_info [1], get_info [2], get_info [3], get_info [4], gt_day [1], gt_day [2]
gt_dpe, gt_expdur [1], gt_expdur [2], gt_expmode, gt_filta, gt_filtb, gt_res
gt_shape_cmd, gt_temp_ccd, gt_time [1], gt_time [2], his_index, int2secarr [1]
int2secarr [2], leak_sub [1], leak_sub [2], leak_sub [3], mk_dset_str [1]
mk_dset_str [2], rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3], sgn [1]
sgn [2], sxt_cen [1], sxt_cen [2], sxt_decomp [1], sxt_decomp [2], tim2orbit [1]
tim2orbit [2]
CALLED BY:
yoyo_man2
OPTIONAL KEYWORD INPUT:
interactive- If set, display the results to the screen as the
processing occurs.
outfil - The output file name (excluding the directory)
KEYWORD OUTPUT:
filename- the output file name as derived from the input file list
HISTORY:
draft version: 28 January 1992 (KTS)
20-Mar-92 (MDM) - Took Keith Strong's program "db_desat.pro"
and made the procedure "mk_desat"
7-Apr-92 (KTS) - Put IFLAG in to avoid error if first image
is rejected
14-Apr-92 (KTS) - 'PREFIX' parameter hardwired for 'sfd'
- Added automatic week # feature
- Better generated dark frame algorithm
- Avoid night images algorithm
Ver 2.0 16-Apr-92 (KTS) - Added dark frame library read
16-Apr-92 (MDM) - Changed file name definition to use the
"progverno" variable to determine the extension
- Put the prefix parameter back in (so it would work
with old existing programs)
20-Apr-92 (MDM) - Added RUN_TIME parameter
21-Apr-92 (KTS) - Included LWA/MDM desat technique
- Included MDM DC routine
Ver 2.1 22-Apr-92 (MDM) - Added "roadmap" to the RD_SDA calls (speeds
things up since it will not re-read the roadmap
for each call)
- Adjusted the format of the code so MDM can
read it more easily
- Fixed DC subtraction to use the whole image,
not just one pixel
- Put the call to GET_DC_IMAGE for the short
exposure images outside the loop.
- Moved the check for apropriate short exposure
to before the RD_SDA (use the roadmap info)
- Replaced RD_SDA with RD_XDA
23-Apr-92 (MDM) - Added "ist" input option to skip to image
"ist" in the loop (for recovery from bombout)
Ver 2.2 26-Apr-92 (MDM) - Corrected bug in background subtraction. For
quarter res images, it was subtracting them
wrong. data1-dark1(*,*,i) does not work if
dark1 is 512x512xN and data1 is 256x256. But
data1-dark1 will work even if dark1 is 512x512!
- Renamed from "mk_desat" to "mk_sfd"
Ver 2.21 26-Apr-92 (MDM) - Adjusted search to look at the image maximum
and only choose images with max greater than 150
DN (high-8). There are images which are being
taken after the sun has set, so they are dark
images.
Ver 2.22 26-Apr-92 (MDM) - Added the warm dark current image subtraction
capability (calling "get_dc_warm")
Ver 2.23 27-Apr-92 (MDM) - Fixed bug (induced by me) where the "m1"
search was being performed on the exposure
normalized short image. It was grabbing too
many pixels.
Ver 2.24 27-Apr-92 (MDM) - Added a check to see that the dark image
subtraction is at least close when taking
warm images.
Ver 2.25 30-Jul-92 (MDM) - Check to see how many minutes before predicted
night the image was taken. Exclude images taken
less than 2 minute before night. Removed the
img_max > 150 check (tried to do the same thing)
Ver 3.00 17-Aug-92 (MDM) - Updated version number to 3.00 to make a new
file extension because of 2.25 changes that
result in a reduced number of images selected.
- Added "filename" parameter
Ver 3.01 24-Aug-92 (MDM) - Passed PROGVERNO and PROGNAME to SAV_SDA
Ver 3.02 28-Aug-92 (MDM) - Return without doing anything if cannot find
any proper images
- Passed PROVERNO*1000 to SAV_SDA
Ver 3.03 20-Oct-92 (MDM) - Added "OUTFIL" input parameter
Ver 3.04 21-Oct-92 (MDM) - Modified selection of images to process
changed exposure range and technique used
OLD: Used ROADMAP.EXPLEVMODE directly (MBE)
NEW: Use GT_DPE
OLD Long Exposure Bracket: DPE 17-23 (MBE 10-16)
OLD Short Exposure Bracket: DPE 9-14 (MBE 2- 7)
New Long Exposure Bracket: DPE 17-25
New Short Exposure Bracket: DPE 9-15
Range changed because dagwood short/long exposures
where changed from DPE 13/23 to 15/25 around 7-Oct.
Ver 3.05 22-Oct-92 (MDM) - Futhur mod/fix from Ver 3.04 (missed one WHERE)
7-Jan-93 (MDM) - Added QDEBUG and QSTOP keywords
Ver 4.00 7-Jan-93 (MDM) - Made change to GT_EXPDUR which corrected for
returning a zero exposure duration (was causing
saturated images)
- Put in a call to LEAK_SUB to remove the thin Al
pin hole scattered light leak
- Put in code to try to eliminate images with bleed
from insufficient flushes (from previous staturated
image)
Ver 4.01 8-Jan-93 (MDM) - Corrected code to remove bleed images to do so
in the short exposure images also
Ver 5.00 14-Jan-93 (MDM) - New patch to the LEAK_SUB routine to work properly
with quarter resolution images
Ver 6.00 3-Feb-93 (MDM) - LEAK_SUB had been updated to correct for AlMg leak
also. Started use of /SAVE option for LEAK_SUB.
** BOGUS ** - see Ver 7.00 below
8-Feb-93 (MDM) - Trapped on case where files exist, but are empty
Ver 7.00 26-Mar-93 (MDM) - Enabled using LEAK_SUB for AlMg filters
Ver 8.00 21-Jul-93 (MDM) - Changed the insertion of the short exposure for
pixels over 90 DN to only be done where the long
exposure is saturated.
** This fixes the glitch in the SXL histograms **
23-Jul-93 (SLF) - Use temporary function for memory management
Ver 9.00 26-Aug-93 (MDM) - Enabled history records
- Enabled interpolation for the dark images
- Updated the SFC leak image to be used (was
using Nov-92, now uses Aug-93 image)
Ver 9.01 31-Aug-93 (MDM) - The "Ver 2.25 30-Jul-92" patch to check to see
how many minutes before predicted night was not
done in the final selection of the short exposure
"where" command. It is fixed now.
V 10.00 29-Nov-93 (MDM) - Select only images taken with Filter A open
(don't select neutral density images)
V 11.00 3-Dec-93 (MDM) - Added rough alignment of short and long exposures
V 11.01 3-Jan-94 (MDM) - Corrected a bug which caused subscript out of range
(was looking at m1 instead of m1s for -1)
24-Jan-94 (DMZ) - removed VMS version numbers from infile
V 12.00 12-apr-95 (SLF) - Filter out fill data images
[Previous]
[Next]
Name: mk_sff_pair
Purpose: make pairings for SXT full disk composites.
The logic chooses
Input Parameters:
infil - list of SFR files OR SXT INDEX records
CALLS: ***
BOX_MESSAGE, MATCH_SAA_STATE, RD_XDA [1], RD_XDA [2], SXT_SATSCREEN, anytim [1]
anytim [2], anytim [3], anytim [4], anytim [5], data_chk [1], data_chk [2]
get_yo_dates [1], get_yo_dates [2], get_yo_dates [3], gt_dpe, gt_expmode, gt_filta
gt_filtb, gt_percentd, gt_res, gt_shape_cmd, gt_temp_ccd, int2secarr [1]
int2secarr [2], saa_in [1], saa_in [2], sort_index [1], sort_index [2]
sxt_bleedtest, tim2dset [1], tim2dset [2], tim2orbit [1], tim2orbit [2]
CALLED BY:
mk_ssc [1], mk_ssc [2]
NOTE: If infil is an INDEX structure then keyword
indat=indat must contain the corresponding data array.
Output Paramters:
ssl - subscripts of LONG exposures matching criteria
ssm - subscripts of Medium (if /triplet set)
sss - subscripts of associated SHORT exposures
Keyword Ouput
count, used by mk_ssc.
Optional Keyword Output
outindex, index structure used in making sff_pairs
outdata, data cube used in making sff_pairs.
Optional Keyword Input Parameters:
/triplet - make 3-exposure composites
/al_only - only do Al.1 images
/almg_only - only do AlMg images
NOTE: It doesn't work to use both /al_only and /almg_only.
/nuden_ok - don't reject data using filter (Default is to reject.)
maxdt - maximum deltaT to allow LONG:SHORT - in seconds
(Default: maxdt=660)
saa_state - choose where to make SSCs w/t SAA (default is off)
SAA_STATE = undefined => don't care about SAA (ie, all)
SAA_STATE = 1 => ONLY include SAA images
SAA_STATE = 0 => Only include NON-SAA images
History:
14-apr-1998 - S.L.Freeland - break/rework mk_sfd
31-Jan-2000 - S.L.Freeland - enable /TRIPLET
7-Nov-2003 - S.L.Freeland - made DELTA = maximum delta (pair or triplet)
added MAXDT keyword/function
19-nov-2003 - S.L.Freeland - required INDEX, not ROADMAPs
(CCD Temp check added)
13-Jan-2004 - LWA - Removed filta=1 requirement for short and med.
Widened short to 4-15 dpe and med to 16-26 dpe.
Permit warm CCD before 2-oct-91 09:05.
19-Jan-2004 - LWA - Lowered required percentd to gt 95.
Increased default maxdt to 660 seconds.
Major rewrite of flow of pairing process.
20-Jan-2004 - LWA - Installed test for images with CCD bleed.
For short and medium exposures ignore lost
data outside of active latitudes (rows 150:405 in HR)
and permit one minor frame of missing data
within the active latitude band.
24-Jan-2004 - LWA - Added test for image data completeness of LONG
exposures because percentd not always reliable.
Added test for unsaturated long/medium exposures.
Will pass -1 in ssm or sss to mk_ssc for these cases.
26-Jan-2004 - LWA - Debugged spaghetti logic.
31-Jan-2004 - LWA - Corrected inconsistency in image counting.
25-Mar-2004 - LWA - Fixed bug in short image logic.
26-Mar-2004 - LWA - Fixed bug in "nearest short" logic.
17-Aug-2004 - LWA - Added keyword indat.
27-Sep-2004 - LWA - Hardwired variable "junk" to deal with a
limited number of pathological long exposures.
Now require percentd=100 for NuDen short exposures.
1-Oct-2004 - LWA - Restricted NuDen images from use as mid exposures
in triplets.
18-Nov-2004 - LWA - Reversed edit of 1-Oct-2004.
Incorporated SSC7 guideline to
use no filtA=6 (NuDen) images post-14Nov92.
20-Nov-2004 - LWA - Tested and debugged.
17-Mar-2005 - LWA - In case of multiple short exposures with a variety
of DPE values now use unsaturated short with largest
DPE value that is closest in time to long exposure.
Deleted development print and help commands.
18-Mar-2005 - LWA - Fixed a bug in line 338.
Deleted non-functional keyword delta.
Added keyword nuden_ok.
1-Feb-2006 - LWA - Added keywords outindex and outdata.
2-Feb-2006 - LWA - Corrected old errors introduced with NuDen business.
[Previous]
[Next]
Name: mk_sff_pair
Purpose: make pairings for SXT full disk composite movies
Input Parameters:
infil - list of SFR files OR roadmaps
Output Paramters:
ssl - subscripts of LONG exposures matching criteria
ssm - subscripts of Medium (if /triplet set)
sss - subscripts of associated SHORT exposures
delta - deltaT (long:short)
CALLS: ***
BOX_MESSAGE, MATCH_SAA_STATE, RD_XDA [1], RD_XDA [2], SXT_SATSCREEN, anytim [1]
anytim [2], anytim [3], anytim [4], anytim [5], data_chk [1], data_chk [2]
get_yo_dates [1], get_yo_dates [2], get_yo_dates [3], gt_dpe, gt_expmode, gt_filta
gt_filtb, gt_percentd, gt_res, gt_shape_cmd, gt_temp_ccd, int2secarr [1]
int2secarr [2], saa_in [1], saa_in [2], sort_index [1], sort_index [2]
sxt_bleedtest, tim2dset [1], tim2dset [2], tim2orbit [1], tim2orbit [2]
CALLED BY:
mk_ssc [1], mk_ssc [2]
History:
14-apr-1998 - S.L.Freeland - break/rework mk_sfd
31-Jan-2000 - S.L.Freeland - enable /TRIPLET
[Previous]
[Next]
NAME:
mk_sfs
PURPOSE:
Given a set of FFI files, read the roadmaps and save the
open/open, diffuser (compressed), and UV flood images
INPUT:
infil - an array of input file names
outdir - the output directory where the file should be written
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], MASK, RD_SDA [1], RD_SDA [2]
RD_SDA [3], Rd_Roadmap [2], concat_dir [4], fmt_tim [1], fmt_tim [2], gt_comp
gt_expmode, gt_filta, gt_filtb, mk_dset_str [1], mk_dset_str [2], rd_roadmap [1]
sav_sda [1], sav_sda [2], sav_sda [3], tim2orbit [1], tim2orbit [2]
HISTORY:
Written 7-Aug-92 by M.Morrison
29-Nov-93 (MDM) - Modified to deleted the output file first
[Previous]
[Next]
NAME:
mk_sft
PURPOSE:
Given a set of FFI files, read the roadmaps and save the
terminator images (SFT images)
INPUT:
infil - an array of input SFR file names
outdir - the output directory where the file should be written
It defaults to $DIR_SXT_SFT
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], MASK, RD_SDA [1]
RD_SDA [2], RD_SDA [3], Rd_Roadmap [2], concat_dir [4], file_exist [1]
file_exist [3], file_list [1], file_list [2], finddir [1], finddir [2]
fmt_tim [1], fmt_tim [2], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3]
gt_comp, gt_dpe, gt_expmode, gt_filta, gt_res, his_suncen, mk_dset_str [1]
mk_dset_str [2], rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3]
sel_timrange [1], sel_timrange [2], tim2orbit [1], tim2orbit [2]
OPTIONAL KEYWORD INPUT:
append - If set, append to an existing file if it exists.
week - If set, find the appropriate directory and make the
SFR file listing from it.
HISTORY:
Written 19-Nov-93 by M.Morrison
11-Dec-94 (SLF) - add/update history records with sun_center
7-Feb-95 (SLF) - update selection criteria based upon
LWA/JRL reccomendations
V1.01 19-Nov-93 (MDM) - Added SAA check
[Previous]
[Next]
NAME:
mk_sft
PURPOSE:
Given a set of FFI files, read the roadmaps and save the
terminator images (SFT images)
INPUT:
infil - an array of input SFR file names
outdir - the output directory where the file should be written
It defaults to $DIR_SXT_SFT
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], MASK, RD_SDA [1]
RD_SDA [2], RD_SDA [3], Rd_Roadmap [2], concat_dir [4], file_exist [1]
file_exist [3], file_list [1], file_list [2], finddir [1], finddir [2]
fmt_tim [1], fmt_tim [2], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3]
gt_comp, gt_dpe, gt_expmode, gt_filta, gt_res, his_suncen, mk_dset_str [1]
mk_dset_str [2], rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3]
sel_timrange [1], sel_timrange [2], tim2orbit [1], tim2orbit [2]
OPTIONAL KEYWORD INPUT:
append - If set, append to an existing file if it exists.
week - If set, find the appropriate directory and make the
SFR file listing from it.
filtr_saa - If set, filter out all SAA files. Default is to allow
them as sft candidates.
HISTORY:
Written 19-Nov-93 by M.Morrison
11-Dec-94 (SLF) - add/update history records with sun_center
7-Feb-95 (SLF) - update selection criteria based upon
LWA/JRL reccomendations
04-May-99 (PGS) - Added filtr_saa keyword 'switch'
V1.01 19-Nov-93 (MDM) - Added SAA check
[Previous]
[Next]
NAME:
mk_sfw
PURPOSE:
Given a set of files, read the roadmaps and find where there
are complete narrow band images. Write the subset to a datafile.
INPUT:
infil - an array of input file names
outdir - the output directory where the file should be written
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GetObsID, RD_SDA [1], RD_SDA [2]
RD_SDA [3], Rd_Roadmap [2], concat_dir [4], fmt_tim [1], fmt_tim [2], gt_adoor
gt_comp, gt_day [1], gt_day [2], gt_expmode, gt_filta, gt_res, gt_time [1]
gt_time [2], int2secarr [1], int2secarr [2], mk_dset_str [1], mk_dset_str [2]
rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3], tim2orbit [1]
tim2orbit [2]
OPTIONAL KEYWORD INPUT:
interactive- If set, display the results to the screen as the
processing occurs.
HISTORY:
draft version: 28 January 1992 (KTS)
20-Mar-92 (MDM) - Took Keith Strong's program "db_wlext.pro"
and made the procedure "mk_desat_wl"
14-Apr-92 (KTS) - Removed prefix option and set to 'sfw'
- Changed so as to output week id (91_51a.01)
16-Apr-92 (MDM) - Changed file name definition to use the
"progverno" variable to determine the extension
20-Apr-92 (MDM) - Added RUN_TIME parameter
Ver 2.1 26-Apr-92 (MDM) - Renamed from "mk_desat_wl" to "mk_sfw"
- Added check for compressed data.
Ver 2.11 30-Apr-92 (MDM) - Fixed bug where couldn't tell if should
open a new file if first image is skipped
Ver 2.12 30-Jul-92 (MDM) - Check to make sure image was taken at least
2 minutes before predicted night fall.
Ver 3.00 17-Aug-92 (MDM) - Changed to match SFD extension *.03
Ver 3.01 28-Aug-92 (MDM) - Simply return if no matches
Pass PROVERNO and PROGNAME to SAV_SDA
Ver 3.02 31-Aug-92 (MDM) - Fixed typo in SAV_SDA command - wasn't saving
the images
Ver 3.03 11-Nov-92 (MDM) - Updated to use GT_ADOOR to check if the
aspect door is open.
Ver 3.04 25-Nov-92 (MDM) - Updated to not select files after 13-Nov-92
[Previous]
[Next]
NAME:
mk_sl
PURPOSE:
Generate the SXT Leak Dark image (SLD) or SXT Leak scatter (SLS)
log from the SFR files. It also generates the SXT X-ray Average
(SXA) files from the SFD files.
INPUT:
infil - A string array with a list of the SFR file
names. It should include the directory
path. The inputfiles can be derived if the
"week" option is used.
REQUIRED KEYWORD INPUT:
prefix - The prefix of the output file. Either SLS, SLD, or SXA
OPTIONAL INPUT:
outfil - The output filename to create. The output
file can be derived from the input file list.
OPTIONAL INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2]
GET_NBYTES, OPEN_DA_FILE, RD_XDA [1], RD_XDA [2], REF_STRUCT, Rd_Roadmap [2]
Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SPLIT_FILES, SXT_STRUCT, WRT1P_FH
anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1], ex2week [2]
file_list [1], file_list [2], finddir [1], finddir [2], fmt_tim [1], fmt_tim [2]
gt_comp, gt_dpe, gt_expmode, gt_filta, gt_filtb, gt_res, int2secarr [1]
int2secarr [2], mk_dset_str [1], mk_dset_str [2], rd_roadmap [1], rdwrt [1]
rdwrt [2], rdwrt [3], sfd_decomp, sxt_decomp [1], sxt_decomp [2], tim2orbit [1]
tim2orbit [2], wrtsxtmap
HISTORY:
Written 8-Dec-92 by M.Morrison
Ver 1.01 (8-Dec-92) MDM - Exclude full resolution images
Ver 1.02 (15-Jan-93) MDM - Added check to make sure it is past 11-oct-92
Ver 1.03 ( 9-Mar-93) MDM - Changed code to use lower case for the
filename prefix
Ver 1.04 (12-Jul-93) MDM - Build/Save the roadmap
Ver 1.05 (11-Oct-93) MDM - Added option of creating SXA files.
Ver 1.06 (28-mar-97) SLF - filter out non-square data for SLS
[Previous]
[Next]
NAME:
mk_sl
PURPOSE:
Generate the SXT Leak Dark image (SLD) or SXT Leak scatter (SLS)
log from the SFR files. It also generates the SXT X-ray Average
(SXA) files from the SFD files.
INPUT:
infil - A string array with a list of the SFR file
names. It should include the directory
path. The inputfiles can be derived if the
"week" option is used.
REQUIRED KEYWORD INPUT:
prefix - The prefix of the output file. Either SLS, SLD, or SXA
OPTIONAL INPUT:
outfil - The output filename to create. The output
file can be derived from the input file list.
OPTIONAL INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2]
GET_NBYTES, OPEN_DA_FILE, RD_XDA [1], RD_XDA [2], REF_STRUCT, Rd_Roadmap [2]
Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SPLIT_FILES, SXT_STRUCT, WRT1P_FH
anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1], ex2week [2]
file_list [1], file_list [2], finddir [1], finddir [2], fmt_tim [1], fmt_tim [2]
gt_comp, gt_dpe, gt_expmode, gt_filta, gt_filtb, gt_res, int2secarr [1]
int2secarr [2], mk_dset_str [1], mk_dset_str [2], rd_roadmap [1], rdwrt [1]
rdwrt [2], rdwrt [3], sfd_decomp, sxt_decomp [1], sxt_decomp [2], tim2orbit [1]
tim2orbit [2], wrtsxtmap
HISTORY:
Written 8-Dec-92 by M.Morrison
Ver 1.01 (8-Dec-92) MDM - Exclude full resolution images
Ver 1.02 (15-Jan-93) MDM - Added check to make sure it is past 11-oct-92
Ver 1.03 ( 9-Mar-93) MDM - Changed code to use lower case for the
filename prefix
Ver 1.04 (12-Jul-93) MDM - Build/Save the roadmap
Ver 1.05 (11-Oct-93) MDM - Added option of creating SXA files.
[Previous]
[Next]
NAME:
mk_sot
PURPOSE:
Generate the SXT Optical (Aspect) Telescope (SOT) file
from the SFR file
INPUT:
infil - A string array with a list of the SFR file
names. It should include the directory
path. The inputfiles can be derived if the
"week" option is used.
OPTIONAL INPUT:
outfil - The output filename to create. The output
file can be derived from the input file list.
OPTIONAL INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2]
GET_NBYTES, GO_FIND_LIM2, OPEN_DA_FILE, RD_XDA [1], RD_XDA [2], REF_STRUCT
Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SPLIT_FILES
SXT_STRUCT, WRT1P_FH, anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1]
ex2week [2], file_list [1], file_list [2], finddir [1], finddir [2], fmt_tim [1]
fmt_tim [2], get_box_avg, gt_adoor, gt_comp, gt_expdur [1], gt_expdur [2]
gt_expmode, gt_filta, gt_res, int2secarr [1], int2secarr [2], mk_dset_str [1]
mk_dset_str [2], ocenter, rd_roadmap [1], rdwrt [1], rdwrt [2], rdwrt [3]
tim2orbit [1], tim2orbit [2], wrtsxtmap
HISTORY:
Written 20-Apr-92 by M.Morrison
Ver 1.1 21-Apr-92 (MDM) - flux was not being calculated properly. Needed
to divide by sum^2
Ver 1.11 26-May-92 (MDM) - Changed to write a temporary file and then
move it to on-line after finished generating it
Ver 2.00 17-Aug-92 (MDM) - New version of FIND_LIMB was used. Also added
OCENTER results to the structure, and avoided
sunset or night pictures
Ver 2.01 11-Nov-92 (MDM) - Modified to check that the aspect door is
open.
Ver 2.02 25-Nov-92 (MDM) - Modification to return if running a week after
92_46 (13-Nov-92 entrance filter failure)
- Also don't process any images after 13-Nov-92 17:06
Ver 2.03 12-Jul-93 (MDM) - Build/save the roadmap
[Previous]
[Next]
NAME:
mk_soup_hcat
PURPOSE:
To make the catalog of the SOUP headers of files that
are currently on-line.
SAMPLE CALLING SEQUENCE:
mk_soup_hcat
mk_soup_hcat, dirs='/umbra/data1/soup'
mk_soup_hcat, dirs='/umbra/data0/soup', files='*001.rid'
mk_soup_hcat, dirs='/umbra/data1/soup', outfil='$ydb/soup/soup_hcat'
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], SOUP_OBS, break_file [4], concat_dir [4], int2secarr [1]
int2secarr [2], prstr [1], prstr [2], rd_soup, savegen [1], savegen [2]
OPTIONAL KEYWORD INPUT:
dirs - The list of directory names to use. If not
set, it will use:
/umbradata0/soup
/umbradata1/soup
files - The list of files to look at in the selection.
If not set, it will use:
*001.rig*
NOTE: You need to specify 001 in the name because of listing
restrictions.
outfil - The name of the saved output file. If not
set, it will not save the results to a file.
qplot - If set, call SOUP_OBS and display the results
sort - If set, the time sort the output
OPTIONAL KEYWORD OUTPUT:
headers - The headers of the SOUP data files which were found
HISTORY:
Written Mar-93 by M.Morrison
15-Mar-93 (MDM) - Modified into a procedure
16-Apr-93 (MDM) - Modified to look for files *001.rig* instead of
*001.rig and *001.rigd
- Added step to save default directory and set
yourself back there after doing the search
- Added /SORT option
[Previous]
[Next]
Name: mk_spd
Purpose: make a processed version of an spr file (spd)
Input Parameters:
sprs - file or file list of SPRs to process
outfile - output file name (default replaces SPR with SPD)
conf_file - name of configuration file (default $ys/sxt/doc/spd.config
mostfov - switch , if set, only do most frequen FOV
Calling Sequence:
mk_spd,sprs [,conf_file=configuration_file , /mostfov, outfile=outfile]
Method:
call sxt_uniqfov to identify uniq SXT pointings within spr files
call sxt_prep2 to prepare the data
Read selection/filter criteria from configuration file
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DELVARX [1], DELVARX [2]
DELVARX [3], DELVARX [4], FILE_EXIST [2], RD_SDA [1], RD_SDA [2], RD_SDA [3]
Rd_Roadmap [2], SXT_UNIQFOV, concat_dir [4], delvarx [5], file_exist [1]
file_exist [3], gt2exe [1], gt2exe [2], prstr [1], prstr [2], rd_roadmap [1]
rd_tfile [1], rd_tfile [2], rem_elem [1], rem_elem [2], sav_sda [1], sav_sda [2]
sav_sda [3], sfd_comp, str_replace [1], str_replace [2], sxt_prep [1]
sxt_prep [2], sxt_prep [3], tim2orbit [1], tim2orbit [2], wc_where [1]
wc_where [2]
History:
7-Sep-1993 (SLF) Proto version written
9-Dec-1993 (SLF) compress flag, sav_sda , sxt_prep call changes
13-Dec-1993 (SLF) change re-compressfrom from sxt_comp to sfd_comp
3-Feb-1995 (SLF) tweaked documentation
17-may-1995 (SLF) add despike_thresh and width to sxt_prep call
[Previous]
[Next]
Name: mk_ssc
Purpose: make SXT "Final" science composite movie - de-spagetti mk_sfd
Input Parameters:
week - the week to process
ifiles - explicit filelist (in lieu of WEEK string)
BEWARE! This program is designed to be driven by go_ssc_batch
which causes SFR files to be ingested one day at a time.
This program reads ALL files in ifiles=ifiles, or for an
entire week if the input week is used. Thus, one can readily
exceed the memory capacity of the computer if discretion
is not used.
Output Parameters:
NONE
Keyword Parameters:
nodeka - dont deka normalize (default)
vignette - call sxt_off_axis to correct for vignetting.
novignette - dont vignette correct (default)
noleak - don't do straylight correction (default is to do it)
no_second_order_leak - don't do 2nd straylight (default is to do it)
noclean or nokleen - dont call sxt_clean (default is to clean)
noscatter - dont call sxt_scatter (default)
scatter - call sxt_scatter
triplet - make 3-image composite SSTs
prefix - output file prefix (default='ssc' (pair), 'sst' implies triple
outdir - output directory
subdir - optional subdirectory
filename_only - if set, just derive planned filename and return in OUTFILE
ss - Set ss to limit the number of composites made to ss (saves time)
debug - Stop before return for debugging
loud - Print out some messages.
destreak - call sxt_xsaa to remove cosmic ray streaks.
nodestrak - don't call sxt_xsaa (default)
nonormalize - don't normalize to 1 sec exposure (default is to do it)
yyyy - Put the output in a specified yyyy subdirectory (normally automatic)
uncert - Create uncertainty arrays (default not to do it)
synsfc - Use SynSFCs, override internal guidelines
saa_state - choose where to make SSCs w/t SAA (default is off)
SAA_STATE = undefined => don't care about SAA (ie, all)
SAA_STATE = 1 => ONLY include SAA images
SAA_STATE = 0 => Only include NON-SAA images
nuden_ok - Eliminates rejection of images using ND filter.
CALLS: ***
BOX_MESSAGE, BOX_MESSGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], FILE2TIME, FILE_EXIST [2]
RD_SDA [1], RD_SDA [2], RD_SDA [3], RD_XDA [1], RD_XDA [2], TIME2FILE, anytim [1]
anytim [2], anytim [3], anytim [4], anytim [5], cdrom_files [1], cdrom_files [2]
choose_sfc, concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2]
deka_norm [1], deka_norm [2], delvarx [5], file_exist [1], file_exist [3]
get_info [1], get_info [2], get_info [3], get_info [4], get_logenv [1]
get_logenv [2], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3]
gt_expdur [1], gt_expdur [2], gt_filta, his_index, int2secarr [1], int2secarr [2]
mk_sff_pair [1], mk_sff_pair [2], mnr_frm_fix, sav_sda [1], sav_sda [2]
sav_sda [3], sxt_decon [1], sxt_decon [2], sxt_deleak [1], sxt_deleak [2]
sxt_dn_unc, sxt_off_axis, sxt_prep [1], sxt_prep [2], sxt_prep [3]
sxt_sff_composite [1], sxt_sff_composite [2], tim2dset [1], tim2dset [2]
Side Effects:
generates an 'ssc' file - floating point, normalized to counts/sec/pix
Rules for choice of Synthetic or Terminator SFCs.
-------- Set up Syn/Term SFC boundaries ----------
ent(0) - 24 Jul 93 use TermSFC
24 Jul 93 - 16 Sep 94 use SynSFC
16 Sep 94 - ent(3) use TermSFC
ent(3) - ent(5) use SynSFC
ent(5) - ent(7) use TermSFC
ent(7) - ent(9) use SynSFC
NOTE: Syn/Term choice is based upon time of first index
record and that selection is used for that SSC or SST.
-------------------------------------------------
History:
14-Sep-1998 - S.L.Freeland - Written (YPOP/MSU)
16-Sep-1998 - Various mods - include proc flags in file name.
17-Sep-1998 - Add scattered light correction and /NOSCATTER
18-Dec-1998 - Change normalization-> from deka-norm->counts/sec/pixel
Change default prefix to SSC (Sxt Science Composite)
Triplet-> SST
21-Mar-1999 - S.L.Freeland - change /sxt_kleen->sxt_clean
Add /destreak (sxt_xsaa)hook/logic
21-apr-1999 - S.L.Freeland - allow filelist in lieu of week string
12-aug-1999 - S.L.Freeland - add /YYYY, /YYYYMM, and /YYYYMMDD keywords
(subdirectory formats)
29-Sep-1999 - S.L.Freeland - add /FILENAME_ONLY keyword and function
26-Oct-1999 - S.L.Freeland - add /NOLEAK ( -> sxt_prep )
18-Jan-2001 - S.L.Freeland - add /UNCERT
8-May-2001 - S.L.Freeland - add /SYNSFC and flag (appended)
11-Dec-2001 - D.McKenzie - revised handling of uncertainties to
work for composites, including normalization and
output. My hacks are on lines 197, 232, 241, 248, 264.
23-jul-2003 - S.L.Freeland - add statistical uncertainties
via sxt_dn_unc per NN, 3MK default
7-Nov-2003 - S.L.Freeland - set MAXDT=600 in call to mk_sff_pair
(maximum permitted dT pair seperation)
10-nov-2003 - S.L.Freeland - add SYNSFC to box-message output
and optionally look at environmental
(fixes file name... )
13-nov-2003 - S.L.Freeland - change MAXDT from 600 -> 660
19-nov-2003 - S.L.Freeland - move 2nd order leak correction to
this routine following compositing
step (don't pass keyword -> sxt_prep)
18-dec-2003 - S.L.Freeland - change mk_sff_pair call
for two image case
2-jan-2004 - LWA - Restored 2nd order leak in sxt_prep call, line 234.
7-jan-2004 - LWA - Edited boxmessage to handle triplets.
8-jan-2004 - S.L.Freeland - avoid sxt_deleak call if pre-1st
entrance filter failure
9-jan-2004 - LWA - Restricted McKenzie boxmessages to loud=1.
- Cleaned up code, removed all ^M from DOS edits.
- Put sxt_deleak step back into sxt_prep.
- Commented out Sam's changes of 19-nov-2003.
10-Jan-2004 - LWA - Deleted obsolete keyword refresh.
- Removed forced uncert processing.
16-jan-2004 - S.L.Freeland - sxt_scatter2 -> sxt_decon updates merged
19-Jan-2004 - LWA - Inserted test for images with severe CCD bleed.
20-Jan-2004 - LWA - Now reading xdata with "roadmap" for use in
mk_sff_pairs. Include in common block.
Moved bleed test to mk_sff_pair.pro.
24-Jan-2004 - LWA - Now doing all image selection tasks , including
sxt-satscreen, within mk_sff_pair.pro.
27-Jan-2004 - LWA - Debugs and fiddles.
20-aug-2004 - S.L.Freeland - set normalization .HIS algorithm flag
3-Sep-2004 - LWA - Moved sxt_deleak (2nd order leak) to final step.
9-Sep-2004 - LWA - Now handles pre-firstleak cases.
25-Sep-2004 - LWA - For NuDen shorts now do 2nd order leak in sxt_prep.
13-Oct-2004 - S.L.Freeland - set 2nd order leak flag in proper place
3-Nov-2004 - LWA - Incorp. mnr_frm_fix to zero missing minor frames.
Deleted useless yn= keyword in final call to sxt_deleak.
4-Nov-2004 - LWA - Replaced "useless" keyword needed for .HIS.
18-Nov-2004 - S.L.Freeland - inhibit sxt_deleak for NuDen case
(handled via sxt_prep,/second)
18-Nov-2004 - S.L.Freeland - re-think per lwa previous NuDen fix...
19-Nov-2004 - LWA - Incorporated SSC7 guidelines for SSC choice..
Major update of header.
20-Nov-2004 - LWA - Tiny NuDen mod for single exposure "doublet."
Repaired box message for NuDen roadmap alteration.
20-Nov-2004 - LWA - Corrected final stupid blunder.
18-Mar-2005 - LWA - Added nuden_ok keyword.
4-Oct-2005 - LWA - Added /uncert test a couple of places.
8-Feb-2006 - LWA - Added indat to the calls to mk_sff_pair.
14-Apr-2006 - LWA - Reconciled different versions, mk_ssc_version='.2'
16-May-2006 - LWA - Removed de-vignette step from sxt_prep.
Changed post_prep processing to the following order:
Prep -> 2nd-order-leak -> de-scatter -> de-vignette.
19-May-2006 - LWA - Removed . in 2^15. to cure IDL 6.2 problem.
[Previous]
[Next]
Name: mk_ssc
Purpose: make SXT "Final" science composite movie - de-spagetti mk_sfd
Input Parameters:
week - the week to process
Output Parameters:
NONE
Keyword Parameters:
nodeka - dont deka normalize
novignette - dont vignette correct
noclean - dont call sxt_clean (despike and optional)
noscatter - dont call sxt_scatter
prefix - output file prefix (default='ssc' (pair), 'sst' implies triple
ifiles - explicit filelist (in lieu of WEEK string)
subdir - optional subdirectory
filename_only - if set, just derive planned filename and return in OUTFILE
CALLS: ***
BOX_MESSAGE, BOX_MESSGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], FILE2TIME, FILE_EXIST [2]
RD_SDA [1], RD_SDA [2], RD_SDA [3], RD_XDA [1], RD_XDA [2], TIME2FILE, anytim [1]
anytim [2], anytim [3], anytim [4], anytim [5], cdrom_files [1], cdrom_files [2]
choose_sfc, concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2]
deka_norm [1], deka_norm [2], delvarx [5], file_exist [1], file_exist [3]
get_info [1], get_info [2], get_info [3], get_info [4], get_logenv [1]
get_logenv [2], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3]
gt_expdur [1], gt_expdur [2], gt_filta, his_index, int2secarr [1], int2secarr [2]
mk_sff_pair [1], mk_sff_pair [2], mnr_frm_fix, sav_sda [1], sav_sda [2]
sav_sda [3], sxt_decon [1], sxt_decon [2], sxt_deleak [1], sxt_deleak [2]
sxt_dn_unc, sxt_off_axis, sxt_prep [1], sxt_prep [2], sxt_prep [3]
sxt_sff_composite [1], sxt_sff_composite [2], tim2dset [1], tim2dset [2]
Side Effects:
generates an 'ssc' file - floating point, normalized to counts/sec/pix
History:
14-Sep-1998 - S.L.Freeland - Written (YPOP/MSU)
16-Sep-1998 - Various mods - include proc flags in file name.
17-Sep-1998 - Add scattered light correction and /NOSCATTER
18-Dec-1998 - Change normalization-> from deka-norm->counts/sec/pixel
Change default prefix to SSC (Sxt Science Composite)
Triplet-> SST
21-Mar-1999 - S.L.Freeland - change /sxt_kleen->sxt_clean
Add /destreak (sxt_xsaa)hook/logic
21-apr-1999 - S.L.Freeland - allow filelist in lieu of week string
12-aug-1999 - S.L.Freeland - add /YYYY, /YYYYMM, and /YYYYMMDD keywords
(subdirectory formats)
29-Sep-1999 - S.L.Freeland - add /FILENAME_ONLY keyword and function
26-Oct-1999 - S.L.Freeland - add /NOLEAK ( -> sxt_prep )
18-Jan-2001 - S.L.Freeland - add /UNCERT
8-May-2001 - S.L.Freeland - add /SYNSFC and flag (appended)
7-Mar-2003 - S.L.Freeland - add /LOUD and made default quieter
[Previous]
[Next]
Name: mk_ssc
Purpose: make SXT "Final" science composite movie - de-spagetti mk_sfd
Input Parameters:
week - the week to process
Output Parameters:
NONE
Keyword Parameters:
nodeka - dont deka normalize
novignette - dont vignette correct
noclean - dont call sxt_clean (despike and optional)
noscatter - dont call sxt_scatter
prefix - output file prefix (default='ssc' (pair), 'sst' implies triple
ifiles - explicit filelist (in lieu of WEEK string)
subdir - optional subdirectory
filename_only - if set, just derive planned filename and return in OUTFILE
Side Effects:
generates an 'ssc' file - floating point, normalized to counts/sec/pix
History:
14-Sep-1998 - S.L.Freeland - Written (YPOP/MSU)
16-Sep-1998 - Various mods - include proc flags in file name.
17-Sep-1998 - Add scattered light correction and /NOSCATTER
18-Dec-1998 - Change normalization-> from deka-norm->counts/sec/pixel
Change default prefix to SSC (Sxt Science Composite)
Triplet-> SST
21-Mar-1999 - S.L.Freeland - change /sxt_kleen->sxt_clean
Add /destreak (sxt_xsaa)hook/logic
21-apr-1999 - S.L.Freeland - allow filelist in lieu of week string
12-aug-1999 - S.L.Freeland - add /YYYY, /YYYYMM, and /YYYYMMDD keywords
(subdirectory formats)
29-Sep-1999 - S.L.Freeland - add /FILENAME_ONLY keyword and function
26-Oct-1999 - S.L.Freeland - add /NOLEAK ( -> sxt_prep )
18-Jan-2001 - S.L.Freeland - add /UNCERT
8-May-2001 - S.L.Freeland - add /SYNSFC and flag (appended)
Circa 1-jun-2001 - Add TIMES keyword and option
Restrictions:
Beta-Test version of mk_ssc which only generates SSC images
matching TIMES input vector - may become a released mk_ssc.pro
option, but not today..
[Previous]
[Next]
Name: mk_ssc_batch
Purpose: generate and optionally submit a customized mk_ssc batch job
Input Paramters:
time0 - start day of desired time range
time1 - stop day of desired time range
Keyword Paramters:
DAYS - vector of one or more days (in leiu of time0/time1 range)
SUBMIT - (switch) - if set, submit the job ~now via ssw_batch
YEAR - do full year (ex: YEAR=1991) in leiu of time range or DAYS
nimages - for testing only, number of images/day to process
(generally used for infrastructure TESTING only)
For example, NIMAGES=5 only does 1st 5 images of each DAY
beta - (switch) - use $YOARCH/ssc_beta instead of $YOARCH/ssc
(only software/yohkoh accounts - ignored for others)
ssc_topdir - optional full path for output SSC parents - defaults
derived from $SSW_YOARCH and user info
release - (switch) if set, use 'release' online area instead of user-personal area
online - (siwtch) - synonym for /RELEASE (only authorized users allowed)
prefix - optional prefix for output files; default is 'ssc'
quiet - if set, suppress /LOUD in call to mk_ssc
JOB_DESCRIPTION - optional descriptive buzzword to innclude in job/log
derived JobNames (used for *pro and *log names)
JobName> USER_yyyymmdd_hhmm + _JOB_DESCRIPTION + {.pro,.log}
| | |^^^^^^^^^^^^^^^
| --Derived------| |-- Optional --|
|user+time of run| | Default=null |
---- mk_ssc processing control ----
vignette - (switch) if set, ENABLE vignette
scatter - (switch) if set, ENABLE scatter correction
destreak - (switch) if set, ENABLE destreak
second - (switch) if set, ENABLE second order leak correction
nonormalize - (switch) if set, DISABLE SSC normalization (DN/S/Pixel)
clean - (switch) if set, ENABLE despiking
synthetic_sfc - (switch) if set, ENABLE synthetic SFC leak correction
--------------------------------------------------------
------ xxx_beta switches for overriding released ydb input dbases
sfc_beta - NN -> version of $SSWDB/ydb_beta/sfc_NN
sdc_beta - NN -> version of $SSWDB/ydb_beta/sdc_NN
att_beta - NN -> version of $SSWDB/ydb_beta/att_NN
fem_beta - NN -> version of $SSWDB/ydb_beta/fem_NN
synsfc_beta - NN -> version of $SSWDB/ydb_beta/synsfc_NN
----------------------------------------------------------
Calling Sequence:
IDL> go_ssc_batch,t0,t1 [,processing flags] [,B-ydb flags][,SUBMIT]
Calling Examples:
------ defaults for time range & run -----
IDL> go_ssc_batch,'1-mar-1997','10-mar-1997',/SUBMIT - all defaults
----- add 2nd order leak, use ydb_beta SFC version 2
IDL> go_ssc_batch,'1-mar-1997','10-mar-1997',/SECOND, SFC_BETA=2,/SUB
----- discrete DAYS vector instead of contiguious time range ---
IDL> go_ssc_batch,DAYS=['1-sep-2000','15-nov-1999'],/SUBMIT
IDL> go_ssc_batch,YEAR=1992,/SUBMIT,/SECOND ; do full year
----- mission long run --------------
IDL> go_ssc_batch,get_yo_dates(/launch), $
last_nelem(get_yo_dates(/ent)),/sub,/second,job_desc='MISSION'
CALLS: ***
ARR2STR [1], Arr2Str [2], BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], FILE_EXIST [2], GO_SSC_BATCH, POPD, PUSHD, STR2ARR [1], STR2ARR [2]
STRTAB2VECT, TIME2FILE, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2]
file_append [1], file_append [2], file_exist [1], file_exist [3], get_logenv [1]
get_logenv [2], get_user [1], get_user [2], is_member [1], is_member [2]
pr_status [1], pr_status [2], rd_tfile [1], rd_tfile [2], reltime [1], reltime [2]
ssw_path, str2cols [1], str2cols [2], str_replace [1], str_replace [2]
ut_time [1], ut_time [2], write_access [1], write_access [2], yesnox [1]
yesnox [2]
History:
5-Mar-2003 - S.L.Freeland
7-Mar-3003 - S.L.Freeland add OUT param to batch cmd spawn
(avoid some kind of frozen pipe on some Linux)
Add YEAR keyword and function
18-Apr-2003 - S.L.Freeland added /ONLINE and /RELEASE (synonyms)
12-jan-2004 - S.L.Freeland - to enable /SCATTER, needed to fix a historical typo
(destreak flag was inccorrectly named /FSCAT; chg -> /FSTREAK)
19-Apr-2004 - S.L.Freeland add /QUIET switch and make /LOUD default in
call to mk_ssc
1-Oct-2004 - S.L.Freeland add /TRIPLET keyword&function
[Previous]
[Next]
Name: mk_ssc_batch
Purpose: generate and optionally submit a customized mk_ssc batch job
Input Paramters:
time0 - start day of desired time range
time1 - stop day of desired time range
Keyword Paramters:
DAYS - vector of one or more days (in leiu of time0/time1 range)
SUBMIT - (switch) - if set, submit the job ~now via ssw_batch
YEAR - do full year (ex: YEAR=1991) in leiu of time range or DAYS
nimages - for testing only, number of images/day to process
(generally used for infrastructure TESTING only)
For example, NIMAGES=5 only does 1st 5 images of each DAY
beta - (switch) - use $YOARCH/ssc_beta instead of $YOARCH/ssc
(only software/yohkoh accounts - ignored for others)
ssc_topdir - optional full path for output SSC parents - defaults
derived from $SSW_YOARCH and user info
release - (switch) if set, use 'release' online area instead of user-personal area
online - (siwtch) - synonym for /RELEASE (only authorized users allowed)
prefix - optional prefix for output files; default is 'ssc'
JOB_DESCRIPTION - optional descriptive buzzword to innclude in job/log
derived JobNames (used for *pro and *log names)
JobName> USER_yyyymmdd_hhmm + _JOB_DESCRIPTION + {.pro,.log}
| | |^^^^^^^^^^^^^^^
| --Derived------| |-- Optional --|
|user+time of run| | Default=null |
---- mk_ssc processing control ----
vignette - (switch) if set, ENABLE vignette
scatter - (switch) if set, ENABLE scatter correction
destreak - (switch) if set, ENABLE destreak
second - (switch) if set, ENABLE second order leak correction
nonormalize - (switch) if set, DISABLE SSC normalization (DN/S/Pixel)
clean - (switch) if set, ENABLE despiking
--------------------------------------------------------
------ xxx_beta switches for overriding released ydb input dbases
sfc_beta - NN -> version of $SSWDB/ydb_beta/sfc_NN
sdc_beta - NN -> version of $SSWDB/ydb_beta/sdc_NN
att_beta - NN -> version of $SSWDB/ydb_beta/att_NN
fem_beta - NN -> version of $SSWDB/ydb_beta/fem_NN
syncoeff_beta - NN -> version of $SSWDB/ydb_beta/synsfc_NN
----------------------------------------------------------
Calling Sequence:
IDL> go_ssc_batch,t0,t1 [,processing flags] [,B-ydb flags][,SUBMIT]
Calling Examples:
------ defaults for time range & run -----
IDL> go_ssc_batch,'1-mar-1997','10-mar-1997',/SUBMIT - all defaults
----- add 2nd order leak, use ydb_beta SFC version 2
IDL> go_ssc_batch,'1-mar-1997','10-mar-1997',/SECOND, SFC_BETA=2,/SUB
----- discrete DAYS vector instead of contiguious time range ---
IDL> go_ssc_batch,DAYS=['1-sep-2000','15-nov-1999'],/SUBMIT
IDL> go_ssc_batch,YEAR=1992,/SUBMIT,/SECOND ; do full year
----- mission long run --------------
IDL> go_ssc_batch,get_yo_dates(/launch), $
last_nelem(get_yo_dates(/ent)),/sub,/second,job_desc='MISSION'
CALLS: ***
ARR2STR [1], Arr2Str [2], BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], FILE_EXIST [2], GO_SSC_BATCH, POPD, PUSHD, STR2ARR [1], STR2ARR [2]
STRTAB2VECT, TIME2FILE, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2]
file_append [1], file_append [2], file_exist [1], file_exist [3], get_logenv [1]
get_logenv [2], get_user [1], get_user [2], is_member [1], is_member [2]
pr_status [1], pr_status [2], rd_tfile [1], rd_tfile [2], reltime [1], reltime [2]
ssw_path, str2cols [1], str2cols [2], str_replace [1], str_replace [2]
ut_time [1], ut_time [2], write_access [1], write_access [2], yesnox [1]
yesnox [2]
History:
5-Mar-2003 - S.L.Freeland
7-Mar-3003 - S.L.Freeland add OUT param to batch cmd spawn
(avoid some kind of frozen pipe on some Linux)
Add YEAR keyword and function
18-Apr-2003 - S.L.Freeland added /ONLINE and /RELEASE (synonyms)
[Previous]
[Next]
NAME:
mk_ssl
PURPOSE:
Generate the SXT Summary Log (SSL) file from the SPR and
SFR files. Also need the output from MK_SEL.
OPTONAL INPUT:
indir - The input directories where the SFR and SPR files
reside. If not defined, "week" must be passed
and the program will find the files in the week
directory.
outfil - The output file name. If undefined, it derives
a week ID filename from the first data file.
KEYWORD INPUT:
week - a string with the year/week if the format
91_49 where 91 is the year, 49 is the week
This is required input.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2]
GET_NBYTES, MASK, OPEN_DA_FILE, RD_XDA [1], RD_XDA [2], REF_STRUCT, Rd_Roadmap [2]
Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SXT_STRUCT, UNIQ [1], UNIQ [2]
UNIQ [3], WRT1P_FH, anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1]
ex2week [2], file_list [1], file_list [2], finddir [1], finddir [2], get_explat
gt_dp_mode [1], gt_dp_mode [2], gt_expdur [1], gt_expdur [2], gt_expmode, gt_filta
gt_filtb, gt_mbe [1], gt_mbe [2], gt_pfi_ffi, mk_ssl_sub1, rd_roadmap [1], rdwrt [1]
rdwrt [2], rdwrt [3]
HISTORY:
Written 23-Apr-92 by M.Morrison
Ver 1.01 28-Apr-92 (MDM) - Changed logging of expdur to be in
microseconds instead of millisec. Also, GT_EXPDUR
had been modified to return the corrected expdur.
Ver 1.02 1-May-92 (MDM) - Fixed bug where # images were 1 and a sort was
being attempted on it
Ver 1.03 26-May-92 (MDM) - Changed to write a temporary file and then
move it to on-line after finished generating it
Ver 1.04 9-Jul-92 (MDM) - Modified to not access the TEMP files from the
reformating
Ver 1.05 16-Oct-92 (MDM) - Modified SERNUM extraction. Last serial num of
selected files was sometimes bad, so when it is
less than the starting serial num, then find the
maximum instead.
[Previous]
[Next]
NAME:
mk_ssl_sub1
PURPOSE:
MK_SSL subprocedure #1 counts the number of images of a given filter
and saves the total exposure through that filter.
INPUT/OUTPUT:
outrec
INPUT:
index
ss
isub
CALLS: ***
gt_expdur [1], gt_expdur [2]
CALLED BY:
mk_ssl
HISTORY:
Written 24-Apr-92 by M.Morrison
[Previous]
[Next]
NAME:
MK_SSX
PURPOSE:
Generate the weekly SXT Synoptic slice files (SSX) from the SFD file.
INPUT:
INFIL - SFD file name. It should include the directory
path.
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], DR_CARR [1], DR_CARR [2], DR_CARR [3], RD_SDA [1], RD_SDA [2]
RD_SDA [3], RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], break_file [4], concat_dir [4]
get_rb0p [1], get_rb0p [2], gt_filta, gt_filtb, gt_res, gt_shape_cmd, int2secarr [1]
int2secarr [2], rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3]
str_copy_tags [1], str_copy_tags [2], str_copy_tags [3], str_copy_tags [4]
sxt_cen [1], sxt_cen [2], tim2orbit [1], tim2orbit [2]
OPTIONAL KEYWORD INPUT:
wid_fac - ?? units?
type - 0 = East portion (SSE), 1 = Central portion (SSC),
2 = west portion (SSW). If undefined, it uses type=1.
outdir - The output directory. If not specified, it uses
$DIR_SXT_SSX
qstop - If set, then stop within the program
OPTIONAL KEYWORD OUTPUT:
RUN_TIME - Time required to run the routine
HISTORY:
Ver 1.00 23-Aug-92 (GLS) - Using MDM's MK_SXL as the starting point
Ver 1.01 31-Aug-92 (MDM) - Added return if the input file does not exist
Ver 1.02 31-Aug-92 (MDM) - Added return if no matches found
Ver 1.03 1-Sep-92 (MDM) - Modified to write GT_HXA results from GET_PNT to
INDEX.GEN.PNTG_ANGLE(0:1)
Ver 1.04 2-Sep-92 (MDM) - OUTDIR option added
- Greg Slater made several changes to GET_SSX_SLICE
Ver 1.05 4-Sep-92 (