[Next]
NAME:
accum_counts
CALLING SEQUENCE:
total_cnts = accum_counts(data, ss_start, ss_end)
PURPOSE:
Given this will total counts for a series of intervals,
given by start and end subscripts, ss_start and ss_end
INPUT:
data= a vector, or 2 or 3d array, the last index is totaled
ss_start = the starting subscripts of the intervals chosen
ss_end = the ending subscripts of the chosen intervals
OUTPUT:
total_counts = the data summed over the intervals given by
ss_start and ss_end.
CALLED BY:
goes_teem, goesem_eqn [1], goest_eqn [1], grs32_fsp, grsl_fsp, hsi_ok_intv [1]
hsi_ok_intv [2], hxs_fsp, hxsgrs_fsp, hxt_fsp, hxt_fsp1, sxthxt_fsp, sxtth_hxt
HISTORY:
30-Mar-95, jmm
[Previous]
[Next]
NAME: ACGAUNT
PURPOSE: Calculate continuum gaunt factor using approximations
of R. Mewe (18-JUN-85) to full calculations of
paper VI (Arnaut and Rothenflug for ion balances).
CATEGORY:
CALLING SEQUENCE: cgauntf = acgaunt( wave, te_6)
cgauntf = acgaunt( wave, te_6, G1=gff, G2=gfb, G3=g2p)
INPUTS: wave = Wavelength in Angstrom (1-d vector or scalar)
te_6 = Temperature in 10^6 K (1-d vector or scalar)
OPTIONAL INPUTS: none.
OUTPUTS: Function result
= cgauntf(n_elements(te_6), n_elements(wave))
= array of approximate continuum gaunt factors.
OPTIONAL OUTPUTS:
G1 = Free-free Gaunt factor
G2 = Free-bound Gaunt factor
G3 = 2-photon Gaunt factor
CALLS: ***
INDD [1], INDD [2], MKDARR [1], MKDARR [2]
CALLED BY:
BREM_49, CONFLX [1], CONFLX [2]
COMMON BLOCKS: none
SIDE EFFECTS: none
RESTRICTIONS: none
PROCEDURE: see a paper of R. Mewe et al. (A & Ap)
MODIFICATIONS: written by N.Nitta from a Fortran version, March 1991.
31-jul-93, JRL, Added a check on the exponent to prevent floating underflow message
23-Jun-94, DMZ, made Gaunt factors double precision
[Previous]
[Next]
NAME:
ACOPY
PURPOSE:
Copy archive tapes and log the results.
OPTIONAL INPUT:
destin- The destination for the tape.
0 = Hawaii
1 = Stanford
2 = Berkeley
3 = Karen Harvey
4 = LPARL
5 = NSSDC
6 = NAOJ
7 = BCS
8 = Acton
9 = Other
10 = No log
11 = ISAS
12 = SDAC
in_gen- The copy generation of the source tape. If it is a
master, then in_gen=0. If it is a copy of a master, then
in_gen=1. If it has been copied twice since the master,
then in_gen=2...
CALLS: ***
ADDTIME [1], ADDTIME [2], RD_YDBTAPDIR, Rd_TapDir, STR2ARR [1], STR2ARR [2]
anytim2ex [1], anytim2ex [2], arctap2tap, def_tapd [1], def_tapd [2], def_tapd [3]
fitstap2tap [1], fitstap2tap [2], get_host [1], get_host [2], input [1], input [2]
mail [1], mail [2], mt, mtcmd [1], mtcmd [2], str_replace [1], str_replace [2]
tbeep [1], tbeep [2], tbeep [3], vmscopytape, wrttcplog, ydbtap2tap
OPTIONAL KEYWORD INPUT:
non_interactive - If set, do not ask any questions. "destin"
is required input when using this option.
ydb - if set, this is a ydbcopy
soon - if soon tapename, this is a soon tape copy
METHOD:
Calls mt, rd_tapdir, and arctap2tap to read and copy the tapes.
RESTRICTIONS:
Master tape must be in drive 0
Copy tape must be in drive 1
MODIFICATION HISTORY:
Written, 31-mar-92, J. R. Lemen, LPARL
modified, 16-Apr-92, to split-out log-file writing section, gal, Japan
modified, 22-Oct-92, added Acton type tapes, M. G. Chen, LPARL
modified, 20-Nov-92 (MDM) changed from a program to a procedure
- sends mail when finished
- ejects the tapes when running at LPARL
modified, 23-Nov-92 (MDM) Patch to tape ejection ("indrive" variable
was being corrupted.
modified, 24-Nov-92 (MDM) Modified copy completion mail message
- Modified to have a different eject command for SGI
- Turned logging of each command off (in ARCTAP2TAP)
- Removed call to beep
modified, 21-apr-93 - (JRL) Added ISAS to the list
25-May-93 (MDM) - Modified to search through the log file and see
if there were any errors
26-May-93 (MDM) - Modified error mail message
25-Jan-93 (SLF) - add ydb support
5-Aug-94 (SLF) - add soon tape support, use mtcmd, add sdca
26-Sep-94 (GAL) - add a error trap for dd i/o errors on tape copys,
using jabort keyword from arctap2tap.
[Previous]
[Next]
NAME:
ACOPY
PURPOSE:
Copy archive tapes and log the results.
METHOD:
Calls mt, rd_tapdir, and arctap2tap to read and copy the tapes.
RESTRICTIONS:
Master tape must be in drive 0
Copy tape must be in drive 1
MODIFICATION HISTORY:
Written, 31-mar-92, J. R. Lemen, LPARL
modified, 16-Apr-92, to split-out log-file writing section, gal, Japan
mod, 26-Sep-94, handle job aborts from arctap2tap., GAL
[Previous]
[Next]
NAME:
ACOPY_TEST
CALLS:
[Previous]
[Next]
NAME:
ACRIM_READER
PURPOSE:
reads a data file containing the UARS data from the ACRIM-II
sensor, as provided by Dick Willson 5/20/93
CALLING SEQUENCE:
acrim_reader,t1,t2,index,data,/plot
INPUTS
start and end times, t1, t2 (needed for /plot)
OUTPUTS:
index and data, daily values of total solar irradiance
WARNING:
presently hard-wired to a specific file. Should be put into
a projected ys ASCII data base for little things like this
CALLS: ***
RDFILE [1], RDFILE [2], UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5]
UTPLOT [6], tim2dset [1], tim2dset [2]
MODIFICATION HISTORY:
HSH, May 22, 1993
[Previous]
[Next]
NAME:
ada2str
PURPOSE:
Generate the ATR structure from the ADA files
INPUT:
infil - A single ADA file name with the directory path
INPUT/OUTPUT:
last_tim- The time of the last entry in the ATR structure
OUTPUT:
outrec - The ATR data structure for that ADA file.
METHOD:
Difference from PNT
* Take second HXA address set, not the first
* Take the first IRU value, not the average of 8 values
* Take the first TFSS value, not the average of 4 values
* Added DP_RATE and DP_MODE
* Corrected the extraction of the TFSS values
CALLS: ***
ADA2ATR, ATT_STRUCT [1], ATT_STRUCT [2], MASK, RD_ADA, Rd_fHeader [1]
Rd_fHeader [2], Rd_fHeader [3], UNSIGN, data_chk [1], data_chk [2], fmt_tim [1]
fmt_tim [2], int2secarr [1], int2secarr [2], tim2dset [1], tim2dset [2]
HISTORY:
Written 16-Jul-93 by M.Morrison (using MK_PNT as a starting point)
V1.01 17-Jul-93 (MDM) - Allowed logging of reformatter and program version number
V1.02 14-Dec-93 (MDM) - Modified to correct for the case where
An input file is totally contained in a
previous file
V1.03 20-Jun-94 (MDM) - Added check to see if there are any datasets in the
ADA file
V1.10 27-Sep-94 (MDM) - Save ALL major frames, even night (previously it
did not save night DP mode major frame records).
V1.11 8-Dec-94 (MDM) - Corrected so that it would recognize when a full
file is included in the previous file
V1.12 17-Jan-95 (MDM) - Turned debug print statements on again
V1.13 26-Jan-95 (SLF) - filter last_tim values (string or structure only)
[Previous]
[Next]
NAME:
add2str
PURPOSE:
Add up to 30 fields to a structure by redefining the structure. If the
input structure is not defined, it will be created.
CATEGORY:
CALLING SEQUENCE:
result = add2str(structure,tag,newvar0,newvar1,...)
INPUTS:
structure = structure to add field to
tag = string array of tag names for new fields
newvar0...newvar20 = variable to add into the structure
OPTIONAL INPUT PARAMETERS:
OPTIOAL KEYWORD PARAMETERS:
sname = root name for structure
unique = number to attach to root name to make it unique
quiet = don't print anything after new structure is formed
delete = string array of tag names to delete (before adding any new
tags).
OUTPUTS:
result = structure with additional field
CALLS: ***
get_def, makestr, strstat [1], strstat [2]
CALLED BY:
GET_LATLON, HXT_QLOOK, PIXSQUARE
COMMON BLOCKS:
uadd2strstr: iunique = 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:
Doesn't work well with anonymous structures (IDL problem??).
PROCEDURE:
Defines a new structure type to hold the old structure plus the new
field
MODIFICATION HISTORY:
5/91 T. Metcalf
4/2003 TRM addes sletter and last_stime to common block
[Previous]
[Next]
NAME:
add2str
PURPOSE:
Add up to 30 fields to a structure by redefining the structure. If the
input structure is not defined, it will be created.
CATEGORY:
CALLING SEQUENCE:
result = add2str(structure,tag,newvar0,newvar1,...)
INPUTS:
structure = structure to add field to
tag = string array of tag names for new fields
newvar0...newvar20 = variable to add into the structure
OPTIONAL INPUT PARAMETERS:
OPTIOAL KEYWORD PARAMETERS:
sname = root name for structure
unique = number to attach to root name to make it unique
quiet = don't print anything after new structure is formed
delete = string array of tag names to delete (before adding any new
tags).
OUTPUTS:
result = structure with additional field
CALLS: ***
get_def, makestr, strstat [1], strstat [2]
CALLED BY:
GET_LATLON, HXT_QLOOK, PIXSQUARE
COMMON BLOCKS:
uadd2strstr: iunique = 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:
Doesn't work well with anonymous structures (IDL problem??).
PROCEDURE:
Defines a new structure type to hold the old structure plus the new
field
MODIFICATION HISTORY:
5/91 T. Metcalf
4/2003 TRM addes sletter and last_stime to common block
[Previous]
[Next]
Name: add_pro
Purpose: perform rudimentary checks on input idl module(s) and place it
online if everything copecetic
Input Parameters
module - name of module(s) (including path) or directory containing
multiple modules to check
Calling Sequence:
add_pro, module [,/doc]
CALLS:
[Previous]
[Next]
Name:
AdjUsrTim
Purpose:
Adjust and return new user input times, such that
the times corresponds to the earliest start time
of the data and the latest time of the data as a
result of key searches on the data.
CALLING SEQUENCE:
newt = AdjUstTim( usrTim, [sxtp=sxtp, sxtf=sxtf,
bcs=bcs, hxt=hxt, wbs=wbs])
INPUT:
usrTim user input start and stop times.
Input/Keyword:
sxtp sxtp data vector and times
sxtf sxtf data vector and times
bcs bcs data vector and times
hxt hxt data vector and times
wbs wbs data vector and times
Returned:
newt new start and stop times
CALLS: ***
Ex2Int [1], Ex2Int [2], Get1st, GetLast, Int2Ex [1], Int2Ex [2]
CALLED BY:
TrimTim
History:
written 21-June-91 by GAL
[Previous]
[Next]
NAME:
ads2att
PURPOSE:
Driver to call ads_into_att for each input file
SAMPLE CALLING SEQUENCE:
ads2att, week=week
ads2att, adsfiles
OPTIONAL INPUT:
infil - The list of input ADS files
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], ads_into_att, adsdirs [1]
adsdirs [2], break_file [4], file_list [1], file_list [2]
OPTIONAL KEYWORD INPUT:
week - The week number to process
OPTIONAL KEYWORD OUTPUT:
run_time - Approximate run time of this module in minutes
HISTORY:
Written 11-Aug-93 by M.Morrison (using DO_AIT as starting point)
31-Mar-94 (MDM) - Modified logic slightly on finding if there
are ADS files available (because /yd19 has
NFS mount problems a bunch)
[Previous]
[Next]
NAME:
ads_into_att
PURPOSE:
Insert the ADS results into the ATT file
INPUT:
infil - the ADS filename to be inserted into ATT files
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], INTERPOL, RD_ADS
Rd_NewOrb_p [1], Rd_NewOrb_p [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
UNIQ [1], UNIQ [2], UNIQ [3], anytim2ints [1], anytim2ints [2], concat_dir [4]
file_exist [1], file_exist [3], fmt_tim [1], fmt_tim [2], int2secarr [1]
int2secarr [2], rd_att, rdwrt [1], rdwrt [2], rdwrt [3], sel_timrange [1]
sel_timrange [2], tim2dset [1], tim2dset [2], tim2orbit [1], tim2orbit [2]
CALLED BY:
ads2att, do_ads
OPTIONAL KEYWORD INPUT:
attdir - the directory that has the ATT files.
if not defined, it uses $DIR_GEN_ATT
match_week - If set, only update the ATT file for the week set here.
HISTORY:
Written 11-Aug-93 by M.Morrison (using ADS_INTO_PNT as the start)
- Added MATCH_WEEK option
17-Aug-93 (MDM) - Added check to see that the ATT file exists.
29-Aug-94 (MDM) - Modified print statement
- Added /NOBACKUP option to RD_ATT call
[Previous]
[Next]
NAME:
ads_into_pnt
PURPOSE:
Insert the ADS results into the PNT file
INPUT:
infil - the ADS filename to be inserted into PNT files
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], RD_ADS, Rd_NewOrb_p [1]
Rd_NewOrb_p [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], UNIQ [1]
UNIQ [2], UNIQ [3], anytim2ints [1], anytim2ints [2], concat_dir [4], fmt_tim [1]
fmt_tim [2], int2secarr [1], int2secarr [2], rd_pnt, rdwrt [1], rdwrt [2], rdwrt [3]
tim2dset [1], tim2dset [2], tim2orbit [1], tim2orbit [2]
CALLED BY:
do_aip
OPTIONAL KEYWORD INPUT:
pntdir - the directory that has the PNT files.
if not defined, it uses $DIR_GEN_PNT
HISTORY:
Written 18-Jul-92 by M.Morrison
27-Aug-92 (MDM) - Allowed an array of input file names
30-Mar-93 (MDM) - Corrected bug which was resulting in the last
orbit of data in the ADS file not being written
out to the PNT file
1-Apr-93 (MDM) - Removed error - was clearing ADS bit, but that
is not good when two ADS files update different
parts of the same orbit.
[Previous]
[Next]
Name: adsdirs
Purpose: return current ads directory queue pathnames
optionally make new and delete old if week rollover
Input Parameters:
weekid - (optional) week directory to create
Output:
function returns ads queue path , string array of n elements where
element(0) - oldest and element(n-1) is newest
Optional Keyword Parameters:
doq - if set, make directories which dont exist and delete old
nodel - if set, dont delete oldest event if mknew is set
nweeks - number of weeks in queue (default is most recent 4 weeks)
all - If set, then return the "old" week directories too
Calling Sequence:
adsq=adsdirs() ; current ads queue pathname array
adsq=adsdirs(/doq) ; make new queue entry if required
adsq=adsdirs(/doq,/nodel) ; same but dont delete oldest
adsq=adsdirs(t0,nweeks=1,/doq) ; make a non-standard dir (ex catchup)
adsq=adsdirs(/actual) ; read all ads queue (new + catchup)
Categories:
pointing, site , system, swmaint
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], UNIQ [1], UNIQ [2], UNIQ [3]
anytim2ints [1], anytim2ints [2], concat_dir [4], dir_list [1], dir_list [2]
syst2ex [1], syst2ex [2], syst2ex [3], tim2orbit [1], tim2orbit [2]
CALLED BY:
ads2att, do_adsftp [1], do_adsftp [2]
History:
slf - 21-oct-92
mdm - 29-Mar-93 - Added /ALL keyword option
- Also added $DIR_SITE_ADSFTP2
slf - 1-apr-93 - replace dir search logic with call to dir_list.pro
slf - fixed Y2K problem in file list generation
[Previous]
[Next]
Name: adsdirs
Purpose: return current ads directory queue pathnames
optionally make new and delete old if week rollover
Input Parameters:
weekid - (optional) week directory to create
Output:
function returns ads queue path , string array of n elements where
element(0) - oldest and element(n-1) is newest
Optional Keyword Parameters:
doq - if set, make directories which dont exist and delete old
nodel - if set, dont delete oldest event if mknew is set
nweeks - number of weeks in queue (default is most recent 4 weeks)
all - If set, then return the "old" week directories too
Calling Sequence:
adsq=adsdirs() ; current ads queue pathname array
adsq=adsdirs(/doq) ; make new queue entry if required
adsq=adsdirs(/doq,/nodel) ; same but dont delete oldest
adsq=adsdirs(t0,nweeks=1,/doq) ; make a non-standard dir (ex catchup)
adsq=adsdirs(/actual) ; read all ads queue (new + catchup)
Categories:
pointing, site , system, swmaint
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], UNIQ [1], UNIQ [2], UNIQ [3]
anytim2ints [1], anytim2ints [2], concat_dir [4], dir_list [1], dir_list [2]
syst2ex [1], syst2ex [2], syst2ex [3], tim2orbit [1], tim2orbit [2]
CALLED BY:
ads2att, do_adsftp [1], do_adsftp [2]
History:
slf - 21-oct-92
mdm - 29-Mar-93 - Added /ALL keyword option
- Also added $DIR_SITE_ADSFTP2
slf - 1-apr-93 - replace dir search logic with call to dir_list.pro
[Previous]
[Next]
NAME:
agl2cut
PURPOSE
extract ROI with cylindrical coordinate
INPUT
data:dark subtracted data
index
rs: inner radius, re: outer radius
agls: start of position angle
agle: endd of position angle
OUTPUT
tot; Intensity from whole sunDN/sec
ptot: Intensity from ROI
pnum: Number of pixels in ROI
KEYWORD
disp: display ROI
sfd : use if data is sfd file.
HISTORY
H.Hara, 17-Jul-1993
CALLS:
[Previous]
[Next]
NAME:
AHK_CONV
PURPOSE:
convert Yohkoh DHK entries into physical units
CATEGORY:
CALLING SEQUENCE:
print, ahk_conv(data_in, frame_no, fi, noverb=noverb)
INPUTS:
data_in, the (digital housekeeping) datum to be converted
frame_no, the location in telemetry
fi, handles odd/even subcommutation
OPTIONAL (KEYWORD) INPUT PARAMETERS:
noverb turns off printing of conversion factors
OUTPUTS:
CALLED BY:
ANAL_BCS_PHA, FIND_CAL [1], FIND_CAL [2], SUMM_CALS, gt_hxt_hk_temp, gt_temp_hk
hxt_hk_temp, sxt_temps
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
MDM, 9-Nov-91, Written
HSH, 20-Feb-97, documented (see above) and /noverb added
[Previous]
[Next]
NAME:
Ai_1pl
PURPOSE:
the inital values of a for the single power law..
CALLING SEQUENCE:
a=Ai_1pl(fy,sfy,e,nch)
INPUT:
fy=Log(Photon Flux),
sfy=Unc. in fy squared,
e=log(channel energies),
nch=no. of channels
OUTPUT:
a=initial values for a, the fit parameters
CALLS: ***
lfit
CALLED BY:
Ainit, hsi_qlook_init_apar [1], hsi_qlook_init_apar [2]
HISTORY:
Spring,' 92 JMcT
[Previous]
[Next]
NAME:
Ai_1pl_ecut
PURPOSE:
the inital values of a for the power law that cuts off below e0
CALLING SEQUENCE:
a=Ai_1pl_ecut(fy,sfy,e,nch)
INPUT:
fy=Log(Photon Flux),
sfy=Unc. in fy squared,
e=log(channel energies),
nch=no. of channels
OUTPUT:
a=initial values for a, the fit parameters
CALLS: ***
BREAK_PL, lfit
CALLED BY:
Ainit
HISTORY:
29-mar-94, JMM
[Previous]
[Next]
NAME:
Ai_1pl_flat
PURPOSE:
the inital values of a for the power law that flattens below e0
CALLING SEQUENCE:
a=Ai_1pl_flat(fy,sfy,e,nch)
INPUT:
fy=Log(Photon Flux),
sfy=Unc. in fy squared,
e=log(channel energies),
nch=no. of channels
OUTPUT:
a=initial values for a, the fit parameters
CALLED BY:
Ainit
HISTORY:
29-mar-94, JMM
[Previous]
[Next]
NAME:
Ai_1th
PURPOSE:
the inital values of a for the single thermal..
CALLING SEQUENCE:
a=Ai_1th(fy,sfy,e,nch)
INPUT:
fy=Log(Photon Flux),
sfy=Unc. in fy squared,
e=log(channel energies),
nch=no. of channels
OUTPUT:
a=initial values for a, the fit parameters
CALLED BY:
Ai_thp2pl, Ai_thppl, Ainit, Axi7, hsi_qlook_init_apar [1], hsi_qlook_init_apar [2]
HISTORY:
Spring,' 92 JMcT
[Previous]
[Next]
NAME:
Ai_1th_l
PURPOSE:
the inital values of a for the single thermal..
for now it's the same as ainit3.pro
CALLING SEQUENCE:
a=Ai_1th_l(fy,sfy,e,nch)
INPUT:
fy=Log(Photon Flux),
sfy=Unc. in fy squared,
e=log(channel energies),
nch=no. of channels
OUTPUT:
a=initial values for a, the fit parameters
CALLED BY:
Ai_thppl_l
HISTORY:
Spring,' 93 JMcT
[Previous]
[Next]
NAME:
Ai_2pl
PURPOSE:
the inital values of a for the double power law..
CALLING SEQUENCE:
a=Ai_2pl(fy,sfy,e,nch)
INPUT:
fy=Log(Photon Flux),
sfy=Unc. in fy squared,
e=log(channel energies),
nch=no. of channels
OUTPUT:
a=initial values for a, the fit parameters
CALLS: ***
BREAK_PL
CALLED BY:
Ainit, hsi_qlook_init_apar [1], hsi_qlook_init_apar [2]
HISTORY:
Spring,' 92 JMcT
[Previous]
[Next]
NAME:
Ai_2th
PURPOSE:
the inital values of a for the double thermal fit..
CALLING SEQUENCE:
a=Ai_2th(fy,sfy,e,nch)
INPUT:
fy=Log(Photon Flux),
sfy=Unc. in fy squared,
e=log(channel energies),
nch=no. of channels
OUTPUT:
a=initial values for a, the fit parameters
CALLED BY:
Ainit
HISTORY:
Spring,' 92 JMcT
[Previous]
[Next]
NAME:
Ai_3pl
PURPOSE:
the inital values of a for the triple P.L..
CALLING SEQUENCE:
a=Ai_3pl(fy,sfy,e,nch)
INPUT:
fy=Log(Photon Flux),
sfy=Unc. in fy squared,
e=log(channel energies),
nch=no. of channels
OUTPUT:
a=initial values for a, the fit parameters
CALLS: ***
BREAK_PL2
CALLED BY:
Ainit
HISTORY:
Spring,' 92 JMcT
[Previous]
[Next]
NAME:
Ai_plppl
PURPOSE:
the inital values of a for the sum of two power laws..
CALLING SEQUENCE:
a=Ai_plppl(fy,sfy,e,nch)
INPUT:
fy=Log(Photon Flux),
sfy=Unc. in fy squared,
e=log(channel energies),
nch=no. of channels
OUTPUT:
a=initial values for a, the fit parameters
CALLS: ***
BREAK_PL, lfit
CALLED BY:
Ainit
HISTORY:
Spring,' 92 JMcT
[Previous]
[Next]
NAME:
Ai_thbpl
PURPOSE:
the inital values of a for the thermal below Ebr, p.l. above..
CALLING SEQUENCE:
a=Ai_thbpl(fy,sfy,e,nch)
INPUT:
fy=Log(Photon Flux),
sfy=Unc. in fy squared,
e=log(channel energies),
nch=no. of channels
OUTPUT:
a=initial values for a, the fit parameters
CALLS: ***
Axi7
CALLED BY:
Ainit
HISTORY:
Spring,' 92 JMcT
[Previous]
[Next]
NAME:
Ai_thp2pl
PURPOSE:
the inital values of a for the thermal + double P.L..
CALLING SEQUENCE:
a=Ai_thp2pl(fy,sfy,e,nch)
INPUT:
fy=Log(Photon Flux),
sfy=Unc. in fy squared,
e=log(channel energies),
nch=no. of channels
OUTPUT:
a=initial values for a, the fit parameters
CALLS: ***
Ai_1th, BREAK_PL2, fx_2pl
CALLED BY:
Ainit, hsi_qlook_init_apar [1], hsi_qlook_init_apar [2]
HISTORY:
Spring,' 92 JMcT
[Previous]
[Next]
NAME:
Ai_thppl
PURPOSE:
the inital values of a for the thermal + power law..
CALLING SEQUENCE:
a=Ai_thppl(fy,sfy,e,nch)
INPUT:
fy=Log(Photon Flux),
sfy=Unc. in fy squared,
e=log(channel energies),
nch=no. of channels
OUTPUT:
a=initial values for a, the fit parameters
CALLS: ***
Ai_1th, BREAK_PL
CALLED BY:
Ainit, hsi_qlook_init_apar [1], hsi_qlook_init_apar [2]
HISTORY:
Spring,' 92 JMcT
[Previous]
[Next]
NAME:
Ai_thppl_l
PURPOSE:
the inital values of a for the thermal + power law..
Same as ainit4 for now
CALLING SEQUENCE:
a=Ai_thppl_l(fy,sfy,e,nch)
INPUT:
fy=Log(Photon Flux),
sfy=Unc. in fy squared,
e=log(channel energies),
nch=no. of channels
OUTPUT:
a=initial values for a, the fit parameters
CALLS: ***
Ai_1th_l, BREAK_PL
HISTORY:
Spring,' 92 JMcT
[Previous]
[Next]
NAME:
Ainit
PURPOSE:
Obtain initial values for a for the spectral fit,
CALLING SEQUENCE:
a=Ainit(tyspec,ma,a0,ffx,yo,s2,ech)
INPUT:
tyspec=type of spectrum,
ma=no of spectral parameters,
a0=the fit parameters, may be set or not, depending on
ffx= 0 if the associated parameter is free, 1 if fixed at a
user defined value, 2 if fixed at the value initially
given by ainit
yo=observed count rate,
s2=sigma(yo)^2,
ech=channel enrgies
OUTPUT:
a=initial values of a, the fit parameters
CALLS: ***
Ai_1pl, Ai_1pl_ecut, Ai_1pl_flat, Ai_1th, Ai_2pl, Ai_2th, Ai_3pl, Ai_plppl, Ai_thbpl
Ai_thp2pl, Ai_thppl, Countrate, fx_1pl
CALLED BY:
fitspec
HISTORY:
Written Spring '92 by JMcT
[Previous]
[Next]
NAME:
ALIGN1BIGGRAM
PURPOSE:
overlay a full-res Kitt Peak magnetogram on an SXT image
on a PFI.
CATEGORY:
Yohkoh
CALLING SEQUENCE:
mag = align1biggram(index, data_in=data_in, mag_in=mag_in, /blink)
INPUTS:
mag = FITS file ID for full-res KPNO magnetogram (string)
data = SXT PFI data
index entry of SXT data
ew_shift is an empirical displacement, in SXT pixel units, which
moves the magnetogram to the W
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED
DSK_LOCB, GT_CENTER, STEPPER, CONV_P2H etc., SXT_CEN, RFITS2,
CONGRID, DIFF_ROT, INT2SECARR, ANYTIM, GT_CENTER, etc, etc
OUTPUTS:
Magnetogram in same format, scale, pixelization,
and alignment as the target PFI
CALLS: ***
CONGRID [1], CONGRID [2], CONGRID [3], DIFF_ROT [1], DIFF_ROT [2], RFITS2 [1]
RFITS2 [2], STEPPER [1], STEPPER [2], STEPPER [3], STEPPER [4], STEPPER [5]
STEPPER [6], STEPPER [7], anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
conv_h2p [1], conv_h2p [2], dsk_locb, fits2time [1], fits2time [2], fits2time [3]
fmt_tim [1], fmt_tim [2], get_rb0p [1], get_rb0p [2], gt_center, gt_corner
gt_pix_size, gt_res, gt_shape, int2secarr [1], int2secarr [2], sxt_cen [1]
sxt_cen [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
WARNING:
Only tested on one event thus far! These big magnetograms aren't
available except by special request.
MODIFICATION HISTORY:
6-Apr-96, HSH, written (based on LAY1GKM)
[Previous]
[Next]
NAME:
align1img
PURPOSE:
To align a single image
INPUT/OUTPUT:
index
data - The data will be changed by this routine.
INPUT:
xc - The X CCD address which should be the lower left corner
of the output image
yc - The Y CCD address which should be the lower left corner
of the output image
nx - The number of x pixels
ny - The number of y pixels
outres - The output resolution
CALLS: ***
ROT, ext_subimg3, fmt_tim [1], fmt_tim [2], gt_corner, gt_pix_size, gt_res, gt_shape
his_index, mod_res
CALLED BY:
get_leak_image [1], get_leak_image [2], get_leak_image [3], rest_low8_cube [1]
rest_low8_cube [2], sxt_prep [1], sxt_prep [2], sxt_prep [3]
OPTIONAL KEYWORD INPUT:
fast - If set, then perform the registration in "FAST" mode which
is simple full pixel shifts instead of POLY2D.
qcor - Set if corrections were enabled for this data
typ_in - The data type of the input
typout - The data type of the output
override- If set, pass to MOD_RES and override the protection against
changing the resolution on a byte type image.
norm_fact - If set to 1, then do not normalize the signal level
for the number of pixels binned/spread.
The default is to divide by the number of pixels that
the charge is being spread into.
For example, when going from HR to FR the signal is
from one pixel is spread into 4 pixels. The default
is to divide the signal by 4. /NORM_FACTOR will
leave the signal as is.
If set to 2, then normalize by the sqrt(# pixels
the charge is spread into. For the example above,
divide the signal by 2. This is used for the handling
the uncertainty arrays.
OPTIONAL KEYWORD OUTPUT:
oy -
HISTORY:
Written 16-Aug-93 by M.Morrison (breaking up ALIGN_PFI)
16-Sep-93 (MDM) - Added NORM_FACT option for MOD_RES
18-Nov-93 (MDM) - Minor mod
- Added FIX statement to SXT_SUBIMG3 call
ext_subimg3(index, data, fri=fix([xc,yc]), ...)
V1.01 19-Nov-93 (MDM) - Corrected logging of ARCSEC_SHIFT. It was not
logging the arceseconds properly for HR and QR cases
V1.02 24-Nov-93 (MDM) - Corrected error with OR assembly. The problem was
with EXT_SUBIMG3. Added the /TRIM option to the
EXT_SUBIMG3 call
V2.00 4-Jan-94 (MDM) - Added ROLL keyword option
- Incorporated the shift correction of the optical images to
be aligned with the x-ray images
V2.01 22-Feb-94 (MDM) - Added FAST option
V2.02 14-Nov-94 (MDM) - Corrected error which was resulting in no POLY2D sub-pixel
adjustment being performed if "xoffset" or "yoffset" was
zero (conditional used AND instead of OR). The number
of cases where this would have caused an error is probably
none because of the resolution of the pointing.
V2.10 20-Nov-98 (DMcK)- Adjusted definition of ox0,oy0 by replacing
"fix" with "round". Results in more consistent
output for different values of nx,ny (which come
from OUTSIZE optional input of SXT_PREP).
[Previous]
[Next]
NAME:
align1img
PURPOSE:
To align a single image
INPUT/OUTPUT:
index
data - The data will be changed by this routine.
INPUT:
xc - The X CCD address which should be the lower left corner
of the output image
yc - The Y CCD address which should be the lower left corner
of the output image
nx - The number of x pixels
ny - The number of y pixels
outres - The output resolution
CALLS: ***
ROT, ext_subimg3, fmt_tim [1], fmt_tim [2], gt_corner, gt_pix_size, gt_res, gt_shape
his_index, mod_res
CALLED BY:
get_leak_image [1], get_leak_image [2], get_leak_image [3], rest_low8_cube [1]
rest_low8_cube [2], sxt_prep [1], sxt_prep [2], sxt_prep [3]
OPTIONAL KEYWORD INPUT:
fast - If set, then perform the registration in "FAST" mode which
is simple full pixel shifts instead of POLY2D.
qcor - Set if corrections were enabled for this data
typ_in - The data type of the input
typout - The data type of the output
override- If set, pass to MOD_RES and override the protection against
changing the resolution on a byte type image.
norm_fact - If set to 1, then do not normalize the signal level
for the number of pixels binned/spread.
The default is to divide by the number of pixels that
the charge is being spread into.
For example, when going from HR to FR the signal is
from one pixel is spread into 4 pixels. The default
is to divide the signal by 4. /NORM_FACTOR will
leave the signal as is.
If set to 2, then normalize by the sqrt(# pixels
the charge is spread into. For the example above,
divide the signal by 2. This is used for the handling
the uncertainty arrays.
OPTIONAL KEYWORD OUTPUT:
oy -
HISTORY:
Written 16-Aug-93 by M.Morrison (breaking up ALIGN_PFI)
16-Sep-93 (MDM) - Added NORM_FACT option for MOD_RES
18-Nov-93 (MDM) - Minor mod
- Added FIX statement to SXT_SUBIMG3 call
ext_subimg3(index, data, fri=fix([xc,yc]), ...)
V1.01 19-Nov-93 (MDM) - Corrected logging of ARCSEC_SHIFT. It was not
logging the arceseconds properly for HR and QR cases
V1.02 24-Nov-93 (MDM) - Corrected error with OR assembly. The problem was
with EXT_SUBIMG3. Added the /TRIM option to the
EXT_SUBIMG3 call
V2.00 4-Jan-94 (MDM) - Added ROLL keyword option
- Incorporated the shift correction of the optical images to
be aligned with the x-ray images
V2.01 22-Feb-94 (MDM) - Added FAST option
V2.02 14-Nov-94 (MDM) - Corrected error which was resulting in no POLY2D sub-pixel
adjustment being performed if "xoffset" or "yoffset" was
zero (conditional used AND instead of OR). The number
of cases where this would have caused an error is probably
none because of the resolution of the pointing.
[Previous]
[Next]
NAME:
ALIGN_AR
PURPOSE:
Do an alignment of PFI data which track an AR as it rotates.
CATEGORY:
CALLING SEQUENCE:
newdata = align_ar(data,index)
INPUTS:
data = data cube of PFI data to be aligned. Usually this will be the
output from the sel_ar function.
index = index structure for the data cube
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
ref_image = image number which is the others are referred to. The
default is the middle image (middle to avoid limbs as much
as possible)
ref_sunc = sun center (full res pixels) at the time of the reference image
ref_xy = FOV center for reference image (full res pixels)
ref_ll = reference latitude and longitude
ref_day = day79 at which the reff_ll is valid
missing = the vaue which the portions of the output array which are left
unspecified is set to. If not nefined on input, the default
value is returned.
ar_size = 2 element vector giving the x and y dimensions of the resulting
data cube (in full-res pixels).
The heliographic position to track (optional):
center_lat = latitude of the center of the aligned array.
center_lon = longitude of the center of the aligned array.
center_date = date the AR was at center_lat,center_lon
korrel = if set, run the korrel program at the end to get the alignment
better than the simple blind alignment done initially.
OUTPUTS:
newdata = the aligned data cube
CALLS: ***
ARCMIN2HEL, DIFF_ROT [1], DIFF_ROT [2], Ex2Int [1], Ex2Int [2], GET_SUNCENTER [1]
GET_SUNCENTER [2], HEL2ARCMIN [1], HEL2ARCMIN [2], Int2Ex [1], Int2Ex [2], KORREL
MK_MOSAIC, SXT_FOV_CENTER, anytim2ex [1], anytim2ex [2], fmt_tim [1], fmt_tim [2]
gt_day [1], gt_day [2], gt_pix_size, gt_res, gt_time [1], gt_time [2]
int2secarr [1], int2secarr [2], rd_fem, rd_pnt, tim2dset [1], tim2dset [2]
CALLED BY:
RD_AR, SXT_PREP0, sxt_average
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
o The PFI data is converted to full resolution.
o The korrel program can introduce spuious drifts of the image.
PROCEDURE:
The data is first aligned "blind" by putting the appropriate
heliographic coordinate for the active region at the center of the data
array. This coordinate is computed using an expression for the
differential rotation of the Sun. After this blind alignment, a
correlation can be done between images by specifying the korrel
keyword. This usually improves on the jittery blind alignment, however,
it can introduce an incorrect drift and should not be used in that
case.
EXAMPLES:
See the go_ar.pro driver routine.
IDL> sel_ar,flist,ss,lon=-2,lat=19,date='9-DEC-91 00:00:00',road=roadmap
IDL> rd_ar,flist,ss,index,data,roadmap ; Calls align_ar.pro
MODIFICATION HISTORY:
T. Metcalf May 5, 1992
T. Metcalf June 23, 1992
o Added the center latitude/longitude
o Added the ar_size keyword
[Previous]
[Next]
NAME:
align_cube
PURPOSE:
To align a data cube of full disk images to a consistant sun center.
These can be either SXT or GBO or both, and the SXT images may be of
mixed resolutions.
METHOD:
Find the centroid and radii of the target and then feed each image
into IMGSCL. A "bit-map" of 1's and 0's indicates which images are
SXT and which GBO. There must be an index entry for each SXT image.
There is no restriction on the ordering of the images, except that
the indices must appear in the same order as the corresponding SXT
images (interviening GBO images are factored in). The target image
can be any where in the cube.
When using the target keyword to pass it in from outside, you MUST
add put an extra '0' or `1' on the end of sxtmsk and set IT to index that
last value.
CALLING SEQUENCE:
cube=align_cube(cube,sxtmsk,i,index[,target=trgt][,/rough][,/cir]
[,/inter][,/quiet])
PARAMETERS:
cube the datacube to be aligned
sxtmsk a msk of 1s and 0s indicating SXT/GBO data
index corresponding index elements
it the index of the image to align the others to
KEYWORDS: rough tells it to use the /ROUGH option for the SXT
limbfinder. This makes it MUCH faster, with a
slight reduction in accuracy (less than 1 FR pixel).
target a 6 component vector which contains: the CENTROID (0,1),
the DIAMETERS(horizontal,vertical;2,3), and the pixel
size (x,y:4,5) of the target image.
***See notes above****
quiet pass through to DSK_LOCG, no display.
inter pass through to DSK_LOCG, interactive point edit.
WARNING: This uses the same cube for out put as input, in order to
allow larger data cubes. If you want to keep your un-aligned cube,
you must save it first.
CALLED BY:
wl_process
RESTRICTIONS:The target can generally be anything, but if it is a GBO image
the SXT sizes must be the same to within about 5%.
RETURN TYPE: Same as input.
CALLS: ***
GEN_LOC, IMGSCL2, his_index
HISTORY:
drafted by A. McAllister. 8-May-92.
changed to avoid centering traget each time. By A.McA. 6-Oct-92.
added target keyword, AMcA, 3-june-93.
Added HIS_INDEX calls, AMcA, 4-april-94.
Added pass-through keywords QUIET and INTER, AMcA, 24-aug-94.
Added pass-through keyword CIR, AMcA, 2-sep-94.
Corrected initial traps to handle all GBO case, AMCA, 22-mar-95.
[Previous]
[Next]
INPUT:
image: groundbased image
xx, yy: coordinates at which the groundbased image should be
located.
rr: radius of the new groundbased image
i_thres: threshold value to find preliminary solution in
find_limb_gen
CALLS:
[Previous]
[Next]
NAME:
align_hxi
PURPOSE:
To align HXI images
CATEGORY:
Yohkoh HXT
INPUT/OUTPUT:
index
data - The data will be changed by this routine, if it is
of byte-type, it will be un-normailzed, using HXI_UNNORM
INPUT:
xy = the HXT coordinates you want the final images aligned to,
this can be either an array of (2, n_images), or a set of
SXT indices note that only FULL RESOLUTION images will be used
for the latter case the coordinates will be time interpolated.
CALLS: ***
INTERPU_1D, anytim2ints [1], anytim2ints [2], dude, gt_center, hxi_unnorm
int2secarr [1], int2secarr [2], interpu_2d [1], interpu_2d [2], strip_data
HISTORY:
28-Mar-95, jmm
[Previous]
[Next]
NAME:
ALIGN_MAN
PURPOSE:
Compare one image with a reference image,
shift it in x and y direction,
and compare the two images again.
You can find the best fitting position by
iterating this operation.
All operations can be done by mouse.
CATEGORY:
CALLING SEQUENCE:
result = align_man(IMAGE, reference=IMAGE0, /part)
INPUTS:
reference=IMAGE0 : 2-D ARRAY = A REFERENCE IMAGE
(You must specify this keyword)
IMAGE : 2-D ARRAY = an image to be shifted
* IMAGE0 and IMAGE must be the same size.
OPTIONAL KEYWORDS:
part : when specified, you can select smaller
part for blinking comparison.
When your machine is not powerful and
it takes fairy long time to blink two
images, this option is useful.
Even when this option is specified, whole size
image is shifted and returned.
OUTPUTS: aligned image (2-D array)
OPERATION:
1) (when /PART key word is set)
Select comparison part (using BOX_CURSOR)
2) Compare shifted image and reference image by blinking.
Click mouse button in "image window".
left button : blink
right button: stop blinking
3) Determine shift quantity.
Click mouse button in "select shift window"
click thick arrow : change in 10 pixels unit
click thin arrow : change in 1 pixel unit
(less than 1 pixel shift is not supported now)
Displayed number means relative shift to the
present image (not the total shift).
After selecting the appropriate shift, click 'OK'.
Then you go back to the operation 2).
If you click 'OK' without specifying shift,
you exit the loop and shifted image data is returned.
CALLS: ***
BLINK, BOX_CURSOR, CLOSE_SSH_WIN, DEL_DIGIT, INCR_X, INCR_Y, IS_LARGE_DN
IS_LARGE_LEFT, IS_LARGE_RIGHT, IS_LARGE_UP, IS_OK, IS_SMALL_DN, IS_SMALL_LEFT
IS_SMALL_RIGHT, IS_SMALL_UP, OPEN_SSH_WIN, SELECT_SHIFT
COMMON BLOCKS:
SIDE DEFFECTS:
RESTRICTIONS:
ALIGN_MAN can neither magnify nor rotate the image.
Less than 1 pixel shift is not supported.
HISTORY:
Goro Kawai 27 Jan., 1993
EXAMPLES:
[Previous]
[Next]
NAME:
align_prep
PURPOSE:
This routine takes an index and figures out the location on the CCD
for the extraction. It is used by SXT_PREP
INPUT:
index - The roadmap or index (not just times since the filter
information is needed)
CALLS: ***
GT_SXT_AXIS, anytim2ints [1], anytim2ints [2], conv_a2p [1], conv_a2p [2]
gt_center, gt_pix_size, sxt_cen [1], sxt_cen [2], track_h2a [1], track_h2a [2]
track_h2a [3]
CALLED BY:
sxt_prep [1], sxt_prep [2], sxt_prep [3]
OPTIONAL KEYWORD INPUT:
See SXT_PREP for the definitions
qroll - If set, then the roll correction will be applied and adjust
the field of view location appropriately.
OUTPUT:
xx - The X CCD IDL coordinate for each image for the position
specified in "suncoord" or "helio"
yy - The Y CCD IDL coordinate for each image for the position
specified in "suncoord" or "helio"
sc - The sun center (x,y) coordinate for each image
OPTIONAL KEYWORD OUTPUT:
roll - The S/C roll in degrees
HISTORY:
Written 16-Aug-93 by M.Morrison
18-Aug-93 (MDM) - Replaced call to GET_SUNCENTER with SXT_CEN
9-Oct-93 (MDM) - Fixed typo
4-Jan-94 (MDM) - Incorporated the shift correction of the optical images to
be aligned with the x-ray images
- Added ROLL keyword output
8-Feb-94 (MDM) - Added QROLL keyword input to correct for the location selection
25-Feb-94 (MDM) - Corrected the logic so that it works properly for CCDCOORD
option (it was accessing roll when it didn't need it, and
it wasn't defined)
14-Nov-94 (MDM) - Modified to return an array of elements for CCDCOORD
instead of two scalars
25-Apr-99 (GLS) - Corrected transformation of suncoords and helio coords
by including call to conv_a2p.
28-Apr-99 (GLS) - Removed references to roll_use because this was a case of
MDM-bogosity (roll should ALWAYS be used in the determination
of pixel coordinates of the extracted fov regardless of whether
the images are to be 'de-rolled' after extraction (qroll=1)
or not (qroll=0).
12-Nov-05 (LWA) Added keyword ffi_shift to handle case of conv_a2p for FFI.
[Previous]
[Next]
NAME:
align_prep
PURPOSE:
This routine takes an index and figures out the location on the CCD
for the extraction. It is used by SXT_PREP
INPUT:
index - The roadmap or index (not just times since the filter
information is needed)
CALLS: ***
GT_SXT_AXIS, anytim2ints [1], anytim2ints [2], conv_a2p [1], conv_a2p [2]
gt_center, gt_pix_size, sxt_cen [1], sxt_cen [2], track_h2a [1], track_h2a [2]
track_h2a [3]
CALLED BY:
sxt_prep [1], sxt_prep [2], sxt_prep [3]
OPTIONAL KEYWORD INPUT:
See SXT_PREP for the definitions
qroll - If set, then the roll correction will be applied and adjust
the field of view location appropriately.
OUTPUT:
xx - The X CCD IDL coordinate for each image for the position
specified in "suncoord" or "helio"
yy - The Y CCD IDL coordinate for each image for the position
specified in "suncoord" or "helio"
sc - The sun center (x,y) coordinate for each image
OPTIONAL KEYWORD OUTPUT:
roll - The S/C roll in degrees
HISTORY:
Written 16-Aug-93 by M.Morrison
18-Aug-93 (MDM) - Replaced call to GET_SUNCENTER with SXT_CEN
9-Oct-93 (MDM) - Fixed typo
4-Jan-94 (MDM) - Incorporated the shift correction of the optical images to
be aligned with the x-ray images
- Added ROLL keyword output
8-Feb-94 (MDM) - Added QROLL keyword input to correct for the location selection
25-Feb-94 (MDM) - Corrected the logic so that it works properly for CCDCOORD
option (it was accessing roll when it didn't need it, and
it wasn't defined)
14-Nov-94 (MDM) - Modified to return an array of elements for CCDCOORD
instead of two scalars
25-Apr-99 (GLS) - Corrected transformation of suncoords and helio coords
by including call to conv_a2p.
28-Apr-99 (GLS) - Removed references to roll_use because this was a case of
MDM-bogosity (roll should ALWAYS be used in the determination
of pixel coordinates of the extracted fov regardless of whether
the images are to be 'de-rolled' after extraction (qroll=1)
or not (qroll=0).
[Previous]
[Next]
NAME:
align_prep
PURPOSE:
This routine takes an index and figures out the location on the CCD
for the extraction. It is used by SXT_PREP
INPUT:
index - The roadmap or index (not just times since the filter
information is needed)
CALLS: ***
GT_SXT_AXIS, anytim2ints [1], anytim2ints [2], conv_a2p [1], conv_a2p [2]
gt_center, gt_pix_size, sxt_cen [1], sxt_cen [2], track_h2a [1], track_h2a [2]
track_h2a [3]
CALLED BY:
sxt_prep [1], sxt_prep [2], sxt_prep [3]
OPTIONAL KEYWORD INPUT:
See SXT_PREP for the definitions
qroll - If set, then the roll correction will be applied and adjust
the field of view location appropriately.
OUTPUT:
xx - The X CCD IDL coordinate for each image for the position
specified in "suncoord" or "helio"
yy - The Y CCD IDL coordinate for each image for the position
specified in "suncoord" or "helio"
sc - The sun center (x,y) coordinate for each image
OPTIONAL KEYWORD OUTPUT:
roll - The S/C roll in degrees
HISTORY:
Written 16-Aug-93 by M.Morrison
18-Aug-93 (MDM) - Replaced call to GET_SUNCENTER with SXT_CEN
9-Oct-93 (MDM) - Fixed typo
4-Jan-94 (MDM) - Incorporated the shift correction of the optical images to
be aligned with the x-ray images
- Added ROLL keyword output
8-Feb-94 (MDM) - Added QROLL keyword input to correct for the location selection
25-Feb-94 (MDM) - Corrected the logic so that it works properly for CCDCOORD
option (it was accessing roll when it didn't need it, and
it wasn't defined)
14-Nov-94 (MDM) - Modified to return an array of elements for CCDCOORD
instead of two scalars
25-Apr-99 (GLS) - Corrected transformation of suncoords and helio coords
by including call to conv_a2p.
[Previous]
[Next]
NAME:
ALL_VALS
PURPOSE:
Return (in ascending order) all the values in an array.
CALLING SEQUENCE:
out = ALL_VALS(array)
INPUTS:
array input array
OUTPUTS:
out Vector containing all the values in the array in
ascending order. Only one of each value returned.
CALLS: ***
UNIQ [1], UNIQ [2], UNIQ [3]
CALLED BY:
ANAL_BCS_PHA, ANAL_STIMS, BCS_SPMOVIE [1], BCS_SPMOVIE [2], FIND_CAL [1]
FIND_CAL [2], GOOD_MAX [1], GOOD_MAX [2], MEMCHK_TIMES, OBS_PLOT, SUMM_CALS
SXT_TVEC, TRACE_SSWHERE [1], WBS_TVEC, ext_bcschan [1], ext_bcschan [2]
plot_fov [1], plot_goesp, plot_ssw_fov, plotbft [1], pr_plan_area [1]
pr_plan_area [2], read_trace, ssw_fs_cat2db, ssw_install [2], ssw_swmap_uniqinfo
trace_sswhere [2], trace_sswhere [3], trace_sswhere [4]
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
RDB, MSSL, 11-May-91
To emulate a user supplied IDL V1 routine
[Previous]
[Next]
NAME:
Alt_tim_sel
PURPOSE:
Given a time structure and data, choose a time range.
An alternative to plot_lcur, without the need for the x-windows
interface.
CALLING SEQUENCE:
ss = Alt_tim_sel(times, lc, title=title, ytitle=ytitle)
INPUT:
time= Input time, can be any YOHKOH format,
lc= data to plot, array(n_elements(times), Nchannels)
OUTPUT:
ss= the subscripts of the chosen times
KEYWORDS:
title=plot title
ytitle= y-axis title
t_ltc= Times are in lt_curve format
CALLS: ***
anytim2ints [1], anytim2ints [2], fmt_tim [1], fmt_tim [2], yesnox [1], yesnox [2]
CALLED BY:
choose_interval
HISTORY:
From the original Hxsrts.pro, 19-jul-94, Jmm
[Previous]
[Next]
NAME:
amoeba_hxi
PURPOSE:
Minimizes a function of a function, using the downhill simplex
method, copied out of Numerical Recipies, sec. 10.6.
CALLING SEQUENCE:
amoeba_hxi, p, y, iter, ftol=ftol, alpha=alpha, beta=beta, $
gamma=gamma, itmax=itmax, /look
INPUT:
p = starting values of the simplex, an (N+1, N) vector where N
is the number of parameters in the minimization.
y = the values of the function, at the N+1 points defined by p
KEYWORDS:
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
look= if set, look at results every 50 iterations
CALLS: ***
ftpts_chi2, te_scale
HISTORY:
10/4/94, jmm
3/11/95, dropped the fltarr declarations, to allow for double precision
if p and y are double, so will be the answer
3/15/95, optimized for hxi gaussian ftpt. calculations, this calls
a specific function.
[Previous]
[Next]
NAME:
amoeba_hxi1
PURPOSE:
Minimizes a function of a function, using the downhill simplex
method, copied out of Numerical Recipies, sec. 10.6.
CALLING SEQUENCE:
amoeba_hxi1, p, y, iter, ftol=ftol, alpha=alpha, beta=beta, $
gamma=gamma, itmax=itmax, /look
INPUT:
p = starting values of the simplex, an (N+1, N) vector where N
is the number of parameters in the minimization.
y = the values of the function, at the N+1 points defined by p
KEYWORDS:
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
look= if set, look at results every 50 iterations
CALLS: ***
ftpts_chi21, te_scale
HISTORY:
10/4/94, jmm
3/11/95, dropped the fltarr declarations, to allow for double precision
if p and y are double, so will be the answer
3/15/95, optimized for hxi gaussian ftpt. calculations, this calls
a specific function.
[Previous]
[Next]
NAME:
amoeba_x
PURPOSE:
Minimizes a function of a function, using the downhill simplex
method, copied out of Numerical Recipies, sec. 10.6.
CALLING SEQUENCE:
amoeba_x, p, y, func_name, iter, ftol=ftol, alpha=alpha, beta=beta, $
gammx=gammx, itmax=itmax, /quiet
INPUT:
p = starting values of the simplex, an (N+1, N) vector where N
is the number of parameters in the minimization.
y = the values of the function, at the N+1 points defined by p
func_name= function name, call should be func_name(a), where
a is the input vector.
KEYWORDS:
ftol = fractional tolerance that we'll iterate to, default is 1.0e-5
alpha, beta, gammx= iteration parameters, defaults are 1.0, 0.5, 2.0
alpha controls the reflection of the high point on the
simplex through the face, beta controls the contraction of
the simplex in 1d, gammx controls the extrapolation of
the point in a good direction. See numerical recipies,
Chapter 10.
itmax= max number of iterations, default is 500
quiet= if set, do not print out messages
HISTORY:
10/4/94, jmm, out of Numerical Recipies, translated into IDL
3/11/95, dropped the fltarr declarations, to allow for double precision
if p and y are double, so will be the answer
15-aug-1997, jmm, changed gamma keyword to gammx, to avoid odd
IDL conflicts
[Previous]
[Next]
NAME:
ANAL_BCS_PHA
PURPOSE:
Extracts BCS PHA data and analyses it
CATEGORY:
CALLING SEQUENCE:
anal_bcs_pha,fileid,dp_sync,qs
INPUTS:
fileid ID of file being processed
dp_sync dp_sync data of this file
qs qs data from this file
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
plot if set, plots result to screen
if !d.name='PS', plots to "phFILNAM.ps" on curr. dir.
log if set, writes log to "gain_log.dat" on curr. dir.
verbose if set, print aditional information
OUTPUTS:
OPTIONAL OUTPUT PARAMETERS:
CALLS: ***
ADDTIME [1], ADDTIME [2], AHK_CONV, ALL_VALS [1], ALL_VALS [2], FUNCT, GAUSSFIT [1]
GAUSSFIT [2], GAUSSFIT [3], GAUSSFIT [4], GAUSSFIT [5], LOADCT, SET_XY, Sel_QS
anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2], clearplot [1]
clearplot [2], fmt_tim [1], fmt_tim [2], get_logenv [1], get_logenv [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
Only tested with source cals
PROCEDURE:
Finds Source Cal within suppilied data, extracts an analyses
Logs results if required
MODIFICATION HISTORY:
RDB 26-Apr-94 Written
RDB 19-May-94 Documented; return (after logging) in no cal.
RDB 22-May-94 Fixed bug that stopped remote execution
RDB 1-Jun-94 Trapped cases (tests?) where only single channel
RDB 3-Aug-94 Only use PHA bins 0-30 when determining max. value
RDB 9-Feb-95 Pick up log name from CAL_LOG if defined...
[Previous]
[Next]
NAME:
ANAL_STIMS
PURPOSE:
Extracts BCS stim data and analyses it
CATEGORY:
CALLING SEQUENCE:
anal_stims,fileid,index,data,dp_sync,qs
INPUTS:
fileid ID of file being processed
index index array of this file
data data array of this file
dp_sync dp_sync data of this file
qs qs data from this file
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
plot if set, plots result to screen
if !d.name='PS', plots to "stFILNAM.ps" on curr. dir.
log if set, writes log to "posn_log.dat" on curr. dir.
verbose if set, print aditional information
pause if set, pauses within routine (<crtl>c to break)
OUTPUTS:
OPTIONAL OUTPUT PARAMETERS:
CALLS: ***
ADDTIME [1], ADDTIME [2], ALL_VALS [1], ALL_VALS [2], BCS_DECOMP, GAUSSFIT [1]
GAUSSFIT [2], GAUSSFIT [3], GAUSSFIT [4], GAUSSFIT [5], Int2Ex [1], Int2Ex [2]
PS_LONG [1], PS_LONG [2], PS_LONG [3], PS_RESET [1], PS_RESET [2], PS_RESET [3]
Sel_QS, XSTDEV, anytim2ints [1], anytim2ints [2], fmt_tim [1], fmt_tim [2]
get_logenv [1], get_logenv [2], tim2dset [1], tim2dset [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
Finds stim data within supplied data, locates stim positions,
and does standard deviation on each. Logs results if required
MODIFICATION HISTORY:
RDB 22-Mar-94 Written
RDB 19-May-94 Documented
RDB 9-Feb-95 Pick up log name from CAL_LOG if defined...
[Previous]
[Next]
NAME:
angles.pro
PURPOSE
To produce an array of azimuthal angles, theta, with respect
to an origin x,y.
CALLING SEQUENCE
angles,x,y,theta
INPUT
x : x coordinate of origin
y : y coordinate of origin
OUTPUT
theta : array of azimuthal angles
OPTIONAL OUTPUT
none
OPTIONAL KEYWORD INPUT
none
RESTRICTION
some
HISTORY
Written CAF 12 Nov 95 : caf@mssl.ucl.ac.uk
CALLS:
CALLED BY
azi_calc
[Previous]
[Next]
NAME:
any_decay_time
PURPOSE:
The decay time a function, normalized to the 1/e decay time
CALLING SEQUENCE:
dt = any_decay_time(y, tim_arr, min_fraction=min_fraction, $
max_fraction=max_fraction, nonorm=nonorm, $
max_time=max_time, max_value=max_value, $
quiet=quiet,maxpt=maxpt)
INPUT:
y = an array of (ntimes) of emission measures
tim_arr = an array of times, any yohkoh format
OUTPUT:
dt = the decay time, normalized to 1/e decay
KEYWORDS:
min_fraction= the decay time will be made from em_max to
min_fraction*sqrt(em_max), the default is 1/e,
max_fraction= if the decay phase does not last until
em = max_fraction*sqrt(em_max), we won't use the
dt. The default is min_frac++0.05
nonorm= if set don't normalize to 1/e time
max_time = the time at the maximum.
max_value= maximum value of y
quiet= if set run quietly
maxpt= the subscript of the maximum
CALLS: ***
ADDTIME [1], ADDTIME [2], anytim2ex [1], anytim2ex [2], anytim2ints [1]
anytim2ints [2]
HISTORY:
feb-96, jmm
[Previous]
[Next]
NAME:
any_fsp
CALLING SEQUENCE:
any_fsp,index,detector,itim,dti,btim,dtb,cnts,bcnts,sdel=sdel,$
fit_pars,sc_par,ch_dta,outfile=outfile,pfile=pfile,$
nsigmas=nsigmas, tyspec=tyspec,$
fix_a=fix_a, sat_flag=sat_flag, $
noplot=noplot, erange=erange, sys_err=sys_err, $
ucnts=ucnts, init_a=init_a, amoeba=amoeba
PURPOSE:
Given photon counts from any of the Yohkoh instruments,
fit spectra..
INPUT:
index= data info. structure, can be an internal time structure
detector= string array or variable with the appropriate
instrument name(s)
itim= interval start times, any Yoh format
dti= interval time, in seconds
btim= background start time(s), any Yoh format
dtb= background interval time
cnts= an array of counts, fltarr(nchannels) or fltarr(nchannels,ntimes)
bcnts= an array of background counts, fltarr(nchannels)
OUTPUT:
fit_pars, a structure of type {fitinfo}, for each interval, with tags:
tyspec= type of spectrum
ma= no. of parameters fit
alabels = labels for the fit parameters
t= the interval START times, in the 7 element array
dt= the interval lengths
a= the fit parameters, a fltarr(6)
NOTE ON UNITS: for Power laws, K is the differential flux
at 1keV, in photons/(sec-cm^2-keV).
Break energies (ebr) are in keV.
For thermal fits, em is the Emission Measure
in cm^(-3) but the output EM is normalized
by 1.0e47. T is in Kelvin, but the output
temperatures are in MK. (T/10^6)
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
sa= uncertainties in the fit parameters
ffx= 0 if the associated parameter is free, 1 if fixed at a
user defined value, 2 if fixed at the value initially
given by ainit.
chi2= chi^2
nch= the number of channels for each interval
fluxc= flux correction if any
nsig= # of sigmas above background for good channels.
flags= saturated flag, incomplete flag, channel event
was found in, highest channel included in fit,
mro flag.
sc_par, a structure containing data for each sc channel, tags:
e10= channel low energy edges
e20= channel high energy edges
eb0= channel midpt energy
bck= background count rates, for the two bck intervals, fltarr(2)
sbck= Uncertainty in bck
tb= the background START time for two background intervals, an array of(7, 2)
dtb= the bck time interval, fltarr(2)
ch_dta, a structure containing data for each channel for each interval
y0= total (i.e., not background subtracted) incident count rates
sy0= Uncertainty in y0
chok=channel flag, 0 for channels used in fit ,
1 for channel not used
b0 = background count rate
sb0 = uncertainty in b0
f0 = photon flux in the channel, for most cases f0 is
the flux at the channel energy, for thermal + line fits
f0 is the average photon flux in that channel.
Note that f0 = model flux * ((y0-b0)/c0)
sf0 = uncertainty in f0.
c0 = Model Excess count rates
KEYWORD INPUT:
sdel= the channels you want to delete, if not set, the program
prompts for the appropriate channels, if set to -1, no prompt,
no channels deleted.
outfile= the output file, a keyword
pfile= a file for spectral plots
nsigmas= the number of sigmas above background for a "good" channel,
=3.0 as a default
tyspec=the spectral type, if not set, the program prompts you
= 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 for thermal plus double p.l.
= 9 for triple p.l.
= 10 thermal including line emission
= 11 for p.l. + thermal, includes SXR lines
= 12 for a p.l. that flattens below e0
= 13 for a p.l. with an exponential cut-off below e0
= 14 for 2 thermal components including SXR lines
fix_a= an array, corresponding to a for the fit parameters,
gives the values of a chosen to remain fixed by the
user. If fix_a(j)=0.0, the parameter is free, if fix_a(j)
is set to -1, then you choose the jth parameter in a
routine called fix_pars, if fix_a(j)=-2, then the parameter
will be chosen in ainit, but will remain fixed during the fit.
or a scalar, /fix_a will enable you to make choices for
any or all parameters.
VARIOUS DATA FLAGS:
ch_found = channel used to find fit
incomplete = 1 if missing frames, or data gap, otherwise 0
sat_flag= an array of saturation flags, to warn for
spectral distortion in HXS, one per interval, or one
for all intervals.
noplot= if set, no screen plot
erange= an energy range to be used for the spectral fit, channels with
middle energies between the two limits are included. Channels
specified in sdel are still not included in the fit, but the
user is not prompted for channels to delete if erange is passed in
sys_err= a 'systematic error', pass in if you don't trust the
errors you get from counting stats, or to arbitrarily
push down chi^2 values, or in cases where different
instruments cause counts mismatches. The default is 0.0
This makes the error in the rate = sqrt(cps/dt)+sys_err*cps.
ucnts= the uncertainty in cnts, if this is not passed in, Poisson
uncertainties are assumed, the sys_err will be used also if
the sys_err keyword is set. Ucnts must be an array of (nchannels)
or (nchannels, ntimes).
init_a= initial values for the fit parameters, can be an array
of (number of fit parameters, ntimes)
amoeba= if set, use the routine amoeba_x to get fit
CALLS: ***
ADDTIME [1], ADDTIME [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
anytim2ex [1], anytim2ex [2], concat_dir [4], fix_pars0, fsp_11, yesnox [1]
yesnox [2]
CALLED BY:
box_sxthxt_fsp, box_sxtth_hxt, grs32_fsp, grsl_fsp, hxs_fsp, hxsgrs_fsp, hxt_fsp
hxt_fsp1, hxtbox_fsp, sxt_fsp, sxtbox_fsp, sxthxt_fsp, sxtth_hxt
HISTORY:
Written Dec '92 by JMcT
Different output structures, 26-jul-95, jmm
Added ucnts keyword, 27-sep-95, jmm
Added Goes detector, 11-oct-95, jmjm
Added init_a keyword, for real, 23-oct-95, jmjm
[Previous]
[Next]
NAME:
anyrts
CALLING SEQUENCE:
anyrts,index,detector,itim,dti,btim,dtb,cnts,bcnts,$
outfile=outfile,sat_flag=sat_flag,sys_err=sys_err,$
sdel=sdel,ch_found=ch_found,incomplete=incomplete
PURPOSE:
Given photon counts from any of the Yohkoh instruments,
output it into a file formatted to obtain spectra, using
fsp_proc.pro
INPUT:
index= data info. structure
detector= string array or variable with the appropriate
instrument name(s)
itim= interval start times, any Yoh format
dti= interval time, in seconds
btim= background start time, any Yoh format
dtb= background interval time
cnts= an array of counts, fltarr(nchannels) or fltarr(nchannels,ntimes)
bcnts= an array of background counts, fltarr(nchannels)
KEYWORDS:
outfile=output file, a keyword, otherwise the routine will
prompt you for the filename.
VARIOUS DATA FLAGS:
sat_flag= an array of saturation flags, to warn for
spectral distortion in HXS, one per interval, or one
for all intervals
sdel = channels to be deleted from the fit
ch_found = channel used to find fit
incomplete = 1 if missing frames, or data gap, otherwise 0
sys_err= a 'systematic error', pass in if you don't trust the
errors you get from counting stats, or to arbitrarily
push down chi^2 values, or in cases where different
instruments cause counts mismatches. The default iz 0.0
This makes the error in the rate = sqrt(cps/dt)+sys_err*cps.
OUTPUT:
A file with the apporopriate format to be fitted
CALLS: ***
ADDTIME [1], ADDTIME [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
anytim2ex [1], anytim2ex [2], concat_dir [4]
CALLED BY:
grs32_fsp, grsl_fsp, hxs_fsp, hxsgrs_fsp, hxt_fsp, hxt_fsp1, hxtbox_fsp, sxt_fsp
sxtbox_fsp
HISTORY:
Written Nov, '91 by J.McTiernan
Different output structures, 26-jul-95, jmm
[Previous]
[Next]
Name: anystr2tim
Purpose: convert various time strings to Yohkoh internal or External Format
History:
11-Mar-1994 (SLF) - vectorization of timstr2ex
CALLS: ***
TIMSTR2TIM, anytim2ints [1], anytim2ints [2], gt_day [1], gt_day [2], strsplit
Restrictions: proto for testing
[Previous]
[Next]
NAME:
ANYTIM2MSV
PURPOSE:
converts anytime to msec vector from start or base time
CATEGORY:
CALLING SEQUENCE:
msv = anytim2msv(time)
msv = anytim2msv(time,base=time0)
msv = anytim2msv(time,base=time0,start=start)
INPUTS:
time array of times in any format
KEYWORD PARAMETERS:
base base time for msec vector - only date is used!
OUTPUTS:
msv millisec vector
OPTIONAL OUTPUT PARAMETERS:
start internal structure containing start time used
CALLS: ***
anytim2ints [1], anytim2ints [2]
CALLED BY:
HXT_4CHPLOT, HXT_TVEC, SXT_TVEC, WBS_TVEC
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
RDB 17-Jan-94 Written
RDB 23-Jan-94 Made sure 0th element used for tstart
[Previous]
[Next]
NAME:
anytim2weekid
PURPOSE:
Convert time in any format to Yohkoh week ID
CALLING SEQUENCE:
Week_ID = anytim2weekid(index(0))
Week_ID = anytim2weekid() ; Current Week ID
Week_ID = anytim2weekid(index,t1,t2,ndays)
Week_ID = anytim2weekid(index(0),/str) ; return as YY_WW string
RETURNS:
Week_ID is Yohkoh week number
OPTIONAL INPUTS:
intime = Time in any Yohkoh format
OPTIONAL KEYWORD INPUTS:
string = Set to return as YY_WW string
OPTIONAL OUTPUTS:
t1, t2 = Time range of specified week(s) (string-type)
ndays = Number of days in the week (integer)
OPTIONAL KEYWORD OUTPUTS:
year = Year number
CALLS: ***
anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2], ex2week [1]
ex2week [2], gt_day [1], gt_day [2], week2ex [1], week2ex [2]
CALLED BY:
UPDATE_SXT_CO_INDEX, bcs_path, get_utevent [1], get_utevent [2], get_visible
mk_sdm, pr_tim2week [1], pr_tim2week [2], pr_visible, ref_term [2], selsis_week
show_contacts, sxt_plan, tim2dbase, tim2pass, weekid2ex [1], weekid2ex [2]
weekid2ex [3]
PROCEDURE:
Calls anytim2ex, ex2week, week2ex, anytim2ints, gt_day
This differs from anytim2weeks in that:
1. Returns week numbers for specified input times
(anytim2weeks returns a range of week numbers)
2. Does not back up 90 min if near 00:00 UT on Sunday
Warning - this is an obsolete routine (2 digit years only)
New softare should use 'anytim2weekinfo.pro'
MODIFICATION HISTORY:
22-jan-94, J. R. Lemen, Written
4-jan-2000, S. L. Freeland - Y2K modification (2000->00)
3-jul-2000, B. N. Handy - Fix the Y2K mod
[Previous]
[Next]
NAME:
anytim2weekid
PURPOSE:
Convert time in any format to Yohkoh week ID
CALLING SEQUENCE:
Week_ID = anytim2weekid(index(0))
Week_ID = anytim2weekid() ; Current Week ID
Week_ID = anytim2weekid(index,t1,t2,ndays)
Week_ID = anytim2weekid(index(0),/str) ; return as YY_WW string
RETURNS:
Week_ID is Yohkoh week number
OPTIONAL INPUTS:
intime = Time in any Yohkoh format
OPTIONAL KEYWORD INPUTS:
string = Set to return as YY_WW string
OPTIONAL OUTPUTS:
t1, t2 = Time range of specified week(s) (string-type)
ndays = Number of days in the week (integer)
OPTIONAL KEYWORD OUTPUTS:
year = Year number
CALLS: ***
anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2], ex2week [1]
ex2week [2], gt_day [1], gt_day [2], week2ex [1], week2ex [2]
CALLED BY:
UPDATE_SXT_CO_INDEX, bcs_path, get_utevent [1], get_utevent [2], get_visible
mk_sdm, pr_tim2week [1], pr_tim2week [2], pr_visible, ref_term [2], selsis_week
show_contacts, sxt_plan, tim2dbase, tim2pass, weekid2ex [1], weekid2ex [2]
weekid2ex [3]
PROCEDURE:
Calls anytim2ex, ex2week, week2ex, anytim2ints, gt_day
This differs from anytim2weeks in that:
1. Returns week numbers for specified input times
(anytim2weeks returns a range of week numbers)
2. Does not back up 90 min if near 00:00 UT on Sunday
Warning - this is an obsolete routine (2 digit years only)
New softare should use 'anytim2weekinfo.pro'
MODIFICATION HISTORY:
22-jan-94, J. R. Lemen, Written
4-jan-2000, S. L. Freeland - Y2K modification (2000->00)
[Previous]
[Next]
NAME:
AOS2EX
PURPOSE:
convert AOSLOS time format to "external" format
CATEGORY:
Yohkoh
CALLING SEQUENCE:
ex2aos, t
INPUTS:
time in AOSLOS format (string 'yy mm dd hh mm ss')
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
time in external format: hh,mm,ss,msec,dd,mm,yy (integer)
CALLED BY:
ORBIT_DN, YOHKOH_TERM_PREDICT
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
HSH, written 16-jun-97
[Previous]
[Next]
Routine: aoslos_files
Purpose: Manage the files on the aoslos directory.
Task 1: Run script to copy aoslos.data from Facom Mainframe.
Task 2: Convert the aoslos.ebcdic file to *.ascii.
Task 3: Run pr_orbit_sum to create the *.summ file.
Modification History:
Written, 28-oct-91, JRL (V1.0)
Updated, 12-nov-91, JRL (V1.1) Minor mods
Updated, 15-jan-92, JRL (V1.2) Restore working directory at exit
Updated, 13-mar-92, JRL (V1.3) No longer write *.sum2 file.
Updated, 7-Apr-92, GAL (v1.4) option to copy either 16 (default) or
60 second aoslos files.
Updated, 6-jul-92, JRL (v1.5) Reversed the sense of GAL's question.
[Previous]
[Next]
NAME:
AR_AREAS
PURPOSE:
plot areas of given NOAA sunspots
CATEGORY:
CALLING SEQUENCE:
ar_areas,t1,t2,noaa,nar
INPUTS:
t1 and t2 are start and stop times
noaa is the 4-digit NOAA AR number, or a vector of them
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED
rd_gxd, rd_nar
OUTPUTS:
nar is an output structure with the NOAA data
CALLS: ***
RD_NAR, UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6]
UTPLOT_IO [1], UTPLOT_IO [2], UTPLOT_IO [3], rd_gxd [1], rd_gxd [2], rd_gxd [3]
COMMON BLOCKS:
SIDE EFFECTS:
makes a plot of AR area vs time, and GOES flux vs time
RESTRICTIONS:
has no intelligence regarding reappearances of AR's
MODIFICATION HISTORY:
HSH, written 30-Aug-96
HSH, documented for Dale Gary 14-Nov-96
[Previous]
[Next]
NAME: ar_prep
PURPOSE: To setup the inputs to RD_AR.
METHOD: Input a reference image to use for getting location
and reference time for RD_AR. Call RD_LONLAT to
interactively select the regions center. Calculate
or query for other needed inputs.
CALLING SEQUENCE: ar_prep,image,index,lonlat,date,ar_siz
[,/close][,/table]
PARAMETERS: image Reference image.
index Index for same.
lonlat The longitude(0) and latitude(1).
date the reference time.
ar_size The region size, [xs,ys], in FR pixels.
KEYWORDS: region The edges of the selected region in image
pixels.
close If set window is closed before exitting.
table If set allows option of setting the
color table.
CALLS: ***
STR2ARR [1], STR2ARR [2], SXT_GRID [1], SXT_GRID [2], SXT_GRID [3], TARGET [1]
XLOADCT [1], XLOADCT [2], XLOADCT [3], anytim2ex [1], anytim2ex [2]
draw_boxcorn [1], draw_boxcorn [2], gt_res, new_win, rd_lonlat, target [2]
yesnox [1], yesnox [2]
CALLED BY:
ffi_prep
HISTORY: Drafted by A.McAllister, 18-mar-93
Swithed to RD_LONLAT, AMcA, 23-jun-93.
Changed target call to /rough, AMcA, 23-jun-93.
Set box in the correct place, AMcA, 29-jun-93.
Fixed up handling of QR case, AMcA, 2-jul-93.
[Previous]
[Next]
NAME:
AR_SPECTRUM
PURPOSE:
driver for SLOFO
CATEGORY:
CALLING SEQUENCE:
ar_spectrum, t1, t2, freq, power
INPUTS:
t1, t2 the start and stop times
OPTIONAL (KEYWORD) INPUT PARAMETERS:
hi_cut, low_cut to limit the flux range sampled
OUTPUTS:
CALLS: ***
CLEAR_UTPLOT [1], CLEAR_UTPLOT [2], OUTPLOT [1], OUTPLOT [2], OUTPLOT [3], SLOFO
UTPLOT_IO [1], UTPLOT_IO [2], UTPLOT_IO [3], clearplot [1], clearplot [2]
int2secarr [1], int2secarr [2], rd_gxd [1], rd_gxd [2], rd_gxd [3]
COMMON BLOCKS:
SIDE EFFECTS:
grabs the current window; prints SLOFO messages to screen;
takes a lot of time for more than 2,000 points
RESTRICTIONS:
just does GOES-9 low channel data from the ISAS database;
5-minute sampling hardwired
AMBITIONS:
time-series preparation, e.g. filters, filling, etc.
MODIFICATION HISTORY:
HSH, written 4-Sep-96
[Previous]
[Next]
This function adjusts angle by increments of 360 degrees such that
the center of the 360 degree range is given by center.
For example, suppose you want an angle in the range -180 to + 180.
Then use arange(angle,0) since the center of the range is at 0.
This is useful when subtracting angles.
For example, if you want angle1-angle2, you must worry about how each
angle is defined. If angle1=-179 and angle2=+179, the difference is
-358 but the correct answer is 2. This routine corrects this problem:
use difference=arange(angle1,angle2)-angle2.
CALLED BY
PQ2RSS
[Previous]
[Next]
NAME:
ARC2LEN
PURPOSE:
Return the length on the solar surface at the given time.
CALLING SEQUENCES:
out= ARC2LEN(index, /sec, /cm) for cm/arcsec
out= ARC2LEN(index, /sec, /km) for km/arcsec
out= ARC2LEN('10:10 31-DEC-93', /sec, /km)
INPUTS:
time - A structure or scalar. It can be an array.
The "standard" 7 element external representation
of time (HH,MM,SS,MSEC,DD,MM,YY)
"20-Aug-92" format is also allowed.
OPTIONAL INPUTS:
sec - from 1 ARCSEC
min - from 1 ARCMIN
deg - from 1 DEGREE
cm - to centimeter
meter - to meter
km - to Kilometer
default: /sec, /km
OUTPUTS:
out - the length on the solar surface.
CALLS: ***
get_rb0p [1], get_rb0p [2], gt_day [1], gt_day [2]
CALLED BY:
LP_VELMAP
PROCEDURE:
Use "SUN_R" to get the solar radius and assume 696,000km of the
solar radius.
HISTORY:
19 June, 1993 written by T.Shimizu (Univ. of Tokyo)
16 September, 1993 Allow structure and string as a input parameter.
29 October, 1993 Revise "GET_RB0P"
[Previous]
[Next]
NAME: archive_ck
Purpose: Check an archive copy for completeness. It checks the
file names to ensure that all files were copied and it
ensures that the file sizes are correct.
Default is to do both checks.
Calling Sequence:
badfiles = archive_ck(path, [filename=filename,
filesize=filesize, output=output, xbd_path=xbd_path]
where:
badfiles is a list of files missing files or
files with incorrect sizes.
'' null string indicates NO bad files found!
'-1' -1 string indicates possible error in that
there were NO file found in the given path.
INPUT:
path full path of archive to check. eg.
path='/yd1/feb93/'
range first and last valid fileid to check
for a range of archive files. eg.
range=['930208.1324','930212.1856']
option not available yet...
weeks list of archive weeks to check found
in the path. eg. weeks=['93_07','93_08']
Optional Inputs:
DEFAULTS to checks of filenames and filesizes:
filename Only check that all files were copied.
filesize Only check files sizes of copied files.
The following options not available yet:
output Write the names of the missing or bad
files to a file.
xbd_path specify the path to the "xbd" files if
they are located in a non-standard dir.
CALLS: ***
FILE_STAT [1], FILE_STAT [2], file_stat [3], gen_file_id [1], gen_file_id [2]
get_afile_size [1], get_afile_size [2]
History:
written 5-May-94, gal.
[Previous]
[Next]
nAME:
aRCHsCRPT
purpose:
cREATE AN ascii SCRIPT FILE FOR WRITING THE DATA
ARCHIVE TAPE.
calling sequence:
aRCHsCRPT, HDRS, DIRFN, [INFILE=INFILE, ARCHDIR=ARCHDIR,
SUBMIT=SUBMIT]
input/keyword:
DRCS DATA_RECORDS WITH THE FILE idS FOR EACH CPIO
ARCHIVE FILE
TdIRFN NAME OF THE BINARY tAPE-DIRECTORY-FILE.
DEFFILE {FUTURE] NAME OF INPUT DEFAULTS FILE TO AVOID
USER PROMPTS AND KEYBOARD ANSWERS.
ARCHDIR FULL PATH NAME OF THE REFORMATTED DATA DIRECTORY
SUBMIT THE TIME TO EXCUTE THE SCRIPT FILE.
SOFTW IF NOT NULL STRING WRITE SOFTWARE TAR FILES
DEV SELECTED TAPE DRIVE
CDIDXPOS INDEX POSITION FOR "CD" COMMANDS
ARCHDIR WEEKLY DIR FILES
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], MAKE_STR [1], MAKE_STR [2]
break_file [4]
CALLED BY:
mktap
history:
WRITTEN BY gal 24-sEP-91
UPDATE FOR MULT-DIRS 14-fEB-92
UPDATE FOR TAPE DIR. FILE NAMES 18-fEB-92
UPDATE FOR REWIND AT BEGIN AND END..
UPDATE FOR WEEKDIR, weekly files from weekly dir
update for cp -f on tape dir files cause some people
have set cp -i as default!!! which hangs things
mod typo correction and added status message for cpio
cmds 22-apr-92
mod removed -f switch on cp tape copy and added
"unalias cp" command.!!!! 24-Apr-92
[Previous]
[Next]
Name:arctap2tap
Purpose: kludge for now - unix tape to tape copy routine
Input Parameters:
d1no - drive name for source (input) - string or #
d2no - drive name for destination (output) - string or #
(note - type of d1no must=type of d2no)
Calling Examples:
arctap2tap, '/dev/nrmt0h','/dev/nrmt1h' ;drive0->drive1
arctap2tap,0,1 ;same (on ultrix)
arctap2tap,0,1,/nofault ;same as above except user gets no prompts
;to recheck source and destination drives
arctap2tap,0,1,/log,block=1024 ;blocking factor
Optional Keyword Parameters:
nofault - if set, will not prompt the user with drive config for copy
log - if set, log file written to current directory
block - blocking factor
jabort- output: returned flag for aborted jobs due to i/o errors.
CALLS: ***
Rd_TapDir, ckdderr, def_tapd [1], def_tapd [2], def_tapd [3], mk_script [1]
mk_script [2], mt
CALLED BY:
ACOPY [1]
Restrictions: unix only
HISTORY:
updated 10-Mar-92, to copy entire archive tape, gal
updated 26-Mar-92, added rewind and close tape drives after
copy.
updated 21-Apr-92, added -f switch to cp and changed status
comments
mod 24-Apr-92, removed -f switch to cp commands and added
"unalias cp" command.
found a bug in tape positioning.
mod 23-Sep-94, added checks for dd failures and to abort
when these error are found
mod 26-Sep-94, added job abort status keyword. jabort=1
means i/o error detected and abort job. jabort=0,
means no error detected.
mod 29-Jun-95, added "\" to escape from user defined
uses of cp.
[Previous]
[Next]
NAME: area_mean
PURPOSE: To produce a mean value pixel by pixel from a data cube
METHOD: The default is to sort the pixels in each column and then
take the mean one.
Alternatively a straight average can be done (IDL 3.0)
or gaussian fitting of histograms can be selected.
CALLING SEQUENCE: mn_ar=area_mean(data,ss,[type=ave])
PARAMETERS: data input data cube
ss ss string of pixels to be treated
mn_ar array with results
KEYWORDS: type indicates the type of mean
default take mean
"ave": straight average
"hist": use histograms
NOTES: The MODE_FIT option requires considerable time
CALLS: ***
coord_l2v, mode_fit
CALLED BY:
wl_process
HISTORY: Drafted by A. McAllister 2-jun-93
[Previous]
[Next]
NAME:
ars2_plan
PURPOSE:
Given a reference time and and CCD coordinates, predict CCD coordinates
some future time.
Calls LWA's g_h routine.
CALLING SEQUENCE:
ars2_plan,ref_time,future_time,ns_ref,ew_ref,ns_future,ew_future
INPUTS:
ref_time Reference time
future_time Future time when coordinates are desired
NS_REF NS coordinate in SXT quarter res. image - reference time
EW_REF EW coordinate in SXT quarter res. image - reference time
OUTPUTS:
NS_future NS coordinate in SXT quarter res. image - predicted at future
EW_future EW coordinate in SXT quarter res. image - predicted at future
MDOIFICATION HISTORY:
11-jun-92, Written, J. R. Lemen
CALLS:
[Previous]
[Next]
NAME:
ars_exp
PURPOSE
Program to form patrol macro-pixel dark images for different exposures.
and to test for ARS success.
CALLING SEQUENCE
out = ars_exp(index,data,dark_data,dp3=dpe)
INPUT
index,data : qr index and data arrays
sel=sel ; indices of selected data images
dark_data : DPE=2 QR dark frame
dpe = dpe
vector of DPE exposures to test
OUTPUT
out : QR patrol images for dpe exposures.
EFFECTS
lwa_ars_show will be called for each exposure for interactive
testing of ARS region selection.
HISTORY
4/14/94 LWA
CALLS:
[Previous]
[Next]
NAME:
ass_or
PURPOSE:
Assemble multiple exposure observing regions into single images
CALLING SEQUENCE:
data = ass_or(data, index, subs)
INPUT:
index - the index structure
data - the 3-D data array
CALLS: ***
gt_pfi_ffi
CALLED BY:
RD_AR, xspr [1], xspr [2]
OPTIONAL KEYWORD INPUT:
only_full- If set, only return the observing images for which
all of the "pfi strips" are available.
OUTPUT:
returns the assembled 3-D array
OPTIONAL OUTPUT:
subs - The subscripts of the first image used for the
assembly
RESTRICTIONS:
If there is an image in "data" that has already been assembled
into an observing region image, and then saved to a file
(makes .PFI_FFI b0:b1 values equal to 2) then it just returns
the input. This means that you cannot mix assembled OR images
with PFI strips which still require assembly on the input
HISTORY:
Written Fall '92 by M.Morrison
20-Oct-92 (MDM) - Modified to simply return the input if it
it is already assembled observing regions.
- Added document header
30-May-93 (MDM) - Added code to guard against garbage telemetry
[Previous]
[Next]
NAME:
atr2hxa_dbase
PURPOSE:
generate database that contains the solar radii as seen by the
HXA detector. database is used for the HXA limb reconstruction
in hxa2hxaxy.
CATEGORY:
CALLING SEQUENCE:
atr2hxa_dbase,weeks,years
INPUTS:
weeks = list of week numbers to be read
years = year of the week(s) to b read. Either scalar or vector
of same size as weeks
KEYWORDS (INPUT):
dir = directory for ATR files (default is DIR_GEN_ATR)
dbname = name of the database file to be updated (or created)
OUTPUTS:
KEYWORDS (OUTPUT):
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FORZONES [1], FORZONES [2]
HXA_PARMS [1], HXA_PARMS [2], HXA_PARMS [3], anytim2ints [1], anytim2ints [2]
concat_dir [4], get_rb0p [1], get_rb0p [2], int2secarr [1], int2secarr [2], rd_atr
restgen [1], restgen [2], savegen [1], savegen [2], sel_timrange [1]
sel_timrange [2], tim2orbit [1], tim2orbit [2]
COMMON BLOCKS:
None.
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
Calculates average values for each week.
To catch a fast transition, such as a HXA gain change,
a search for up to one significant transition within the
week is done.
MODIFICATION HISTORY:
JPW, 17-sep-96
JPW, 12-sep-98 changed dfmax from 0.05 to 0.25
[Previous]
[Next]
NAME: att_exst
PURPOSE: check if there are ATT files
CALLING SEQUENCE: ans=att_exst(index)
PARAMETERS: times list of times
CALLS: ***
UNIQ [1], UNIQ [2], UNIQ [3], file_list [1], file_list [2], tim2orbit [1]
tim2orbit [2]
CALLED BY:
GEN_LOC
HISTORY: Cut out from SXT_CEN(MDM), 12-jan-94, AMcA.
[Previous]
[Next]
NAME:
ATT_OLD_STRUCT
PURPOSE:
Define the following ATT specific database structures
* ATT_2101_Data_Rec
* ATT_60E1_Data_Rec
CALLING SEQUENCE:
ATT_OLD_STRUCT
CALLED BY:
RD_ADA, RD_ADA_DATA, RD_HXA
HISTORY:
written by Mons Morrison, Fall 90.
[Previous]
[Next]
NAME:
ATT_STRUCT
PURPOSE:
Define the following ATT specific database structures
* ATT_Data_Rec
* ATT_Roadmap_Rec
* HXA_Scan_Head_Rec
* HXA_Scan_Rec
CALLING SEQUENCE:
ATT_STRUCT
CALLED BY:
RD_ADA, RD_ADA_DATA, RD_HXA, ada2str, ext1ada, kluge_att, mk_att [1], mk_att [2], mk_gx
mk_pnt, mk_week_file [1], mk_week_file [2], pnt2atr, rd_roadmap [1]
rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
show_hxafid, weekid [2], ydb_exist [2]
HISTORY:
written by Mons Morrison, Fall 90.
22-Sep-1994 (SLF) - Documentation only (STATUS2 field)
7-Mar-1995 (MDM) - Documentation only (STATUS1 field)
17-oct-2005 (SLF) - Documentation only (STATUS1 field)
[Previous]
[Next]
NAME:
ATT_STRUCT
PURPOSE:
Define the following ATT specific database structures
* ATT_Data_Rec
* ATT_Roadmap_Rec
* HXA_Scan_Head_Rec
* HXA_Scan_Rec
CALLING SEQUENCE:
ATT_STRUCT
CALLED BY:
RD_ADA, RD_ADA_DATA, RD_HXA, ada2str, ext1ada, kluge_att, mk_att [1], mk_att [2], mk_gx
mk_pnt, mk_week_file [1], mk_week_file [2], pnt2atr, rd_roadmap [1]
rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
show_hxafid, weekid [2], ydb_exist [2]
HISTORY:
written by Mons Morrison, Fall 90.
22-Sep-1994 (SLF) - Documentation only (STATUS2 field)
7-Mar-1995 (MDM) - Documentation only (STATUS1 field)
[Previous]
[Next]
NAME:
attcmd_funct
PURPOSE:
Define the function describing the ATT-CMD pointing drift
CALLS: ***
ATTCMD_FUNCT1
HISTORY:
Written 8-Mar-95 by M.Morrison
[Previous]
[Next]
NAME:
attcmd_funct
PURPOSE:
Define the function describing the ATT-CMD pointing drift
CALLS: ***
ATTCMD_FUNCT2
HISTORY:
Written 8-Mar-95 by M.Morrison
[Previous]
[Next]
NAME:
attlog_copy
PURPOSE:
To copy the ATTLOG program output from the Mainframe and to update
the commanded pointing log file.
HISTORY:
Written 5-Oct-93 by M.Morrison
3-Jan-94 (MDM) - Changed mailing list
15-Nov-94 (MDM) - Changed to read ATSA.ATTLOG.DATA in addition
to S88239.ATTLOG.DATA(TOBAN)
- Modified to use FTP_COPY
15-Nov-94 (MDM) - Check for duplicates in "new" before trying
to append
14-sep-96 (SLF) - taught to use PW file (ads/att single point maint)
[Previous]
[Next]
NAME:
auto_bck_find
PURPOSE:
Given a stream of data, find the appropriate background
levels, and the times, for the background interval and
for where the data is a certain specified level above
the background.
CALLING SEQUENCE:
ratio_f = auto_bck_find(time, data, bck_trange, dtb_max=dtb_max, $
dtb_min=dtb_min, dt_dat=dt_dat, channel=channel, $
zero_ok=zero_ok, two=two, use_minimum=use_minimum, $
quiet=quiet, sig_ratio=sig_ratio, subscripts=subscripts, $
data_is_a_rate=data_is_a_rate, dtb_inc=dtb_inc, $
b_ratio=b_ratio, stops=stops)
INPUT:
time = time array for data, can be seconds from 1970,
or any Yohkoh time format
data = an array of (nchannels, ndset) or (ndset)
OUTPUT:
ratio_f = is the final value of the ratio of sigma(counts)/sqrt(counts),
-1 is passed out, if we're not satisfied with the result.
bck_trange= start and end times for background interval(s)
KEYWORDS:
dtb_max = the interval in seconds, that you want the background
accumulated for, the default is 2.0 minutes or 120.0 seconds.
But the actual interval time may be somewhat less, depending
on how good the data is, also the background is accumulated
for an integral number of intervals, This number of
intervals, when summed, may not equal the input dtb.
dtb_min = minimum interval, in seconds, for the background
accumulation, default is 10.0. This is automatically
reset to max(interval time) if it is smaller than
the largest interval. HXT-LO data almost invariably
gets to this point.
dtb_inc = interval increment, in seconds, for the background
accumulation, default is 10.0.
dt_dat = accumulation times or exposure times for the data,
if not set, dt(i)=time(i+1)-time(i). REMEMBER that
you'll need this even if you passed in index as a
time array.
channel = the channel used to find the interval, the default is 0,
If an array is passed in, the routine will sum over the
channels.
zero_ok = if set, this will allow zero values in the data.
two = if set, find two intervals, one before the max value
and one after. dtb_max and dtb_min may be given two values
the background level will be found by interpolation.
quiet = if set, don't plot the data and show intervals.
data_is_a_rate = set this if you pass in a count rate, and not counts
sig_ratio = the routine will reject intervals if
sigma(counts)/sqrt(counts) is greater than this value,
and will reduce dtb to try again. Default is (3.0/2.0)
b_ratio = the routine will reject intervals if the chosen background
level over the minimum is more than this value. Default is
(3.0/2.0)
subscripts= if set, pass the ranges out as subscripts of the input
array.
use_minimum= short circuits the whole program, just use the interval
that has the minimum counts for the given time interval,
This is good for GOES
CALLS: ***
ADDTIME [1], ADDTIME [2], OUTPLOT [1], OUTPLOT [2], OUTPLOT [3], UTPLOT [1]
UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], anytim2ex [1]
anytim2ex [2], anytim2ints [1], anytim2ints [2], avsig_test
CALLED BY:
HXT_AUTOIMG, bck_interval, goes_teem, goesem_eqn [1], goest_eqn [1], grs32_fsp
grsl_fsp, hxsgrs_fsp, hxt_fsp1, sxthxt_fsp, sxtth_hxt
RESTRICTIONS:
Use some sense, this is designed to find the background levels near
a flare, don't use it on a whole days worth of data. Don't use it
if there are big gaps in the data, if there are long stretches of
zeros, don't set the zero_ok keyword. If it looks like the flare
starts before the data, as if you're only have flare mode data,
don't use the two keyword.
HISTORY:
27-jul-94, JMM
12-jul-95, added the /two option, finally, nbcks and nsigmas keywords
and trange output are gone, they don't make sense without
doing the interpolation...
26-jul-95, changed the name from bck_finder to auto_bck_find
12-feb-96, jmm, added use_minimum keyword
[Previous]
[Next]
NAME:
auto_toban
PURPOSE:
To run GO_TOBAN for each of the KSC station contacts
CALLS: ***
anytim2doy [1], anytim2doy [2], anytim2ex [1], anytim2ex [2], anytim2ints [1]
anytim2ints [2], fmt_tim [1], fmt_tim [2], go_toban, gt_day [1], gt_day [2]
gt_time [1], gt_time [2], int2secarr [1], int2secarr [2], prstr [1], prstr [2]
rd_fem
OPTIONAL KEYWORD INPUT:
init - If set, just submit the batch job for the next KSC station
contact. Do not run GO_TOBAN.
delay - The number of minutes after the end of the KSC station
contact that GO_TOBAN should be started. Default is 30 min.
DESCRIPTION:
AUTO_TOBAN
1. Check to see if AUTO_TOBAN is already running. Simply exit if
it is.
2. Figure out when the next station contact is and submit the batch
job which will run at that time. This is done before GO_TOBAN in
the case that GO_TOBAN crashes while running.
3. Run GO_TOBAN
The batch job writes a log file to /ys/site/logs/auto_tobanYYMMDD.HHMM
for every run that it makes.
There is a chron job MONITOR_AUTO_TOBAN which checks to see that either
AUTO_TOBAN is running, or that there is a batch job waiting to be run.
If it does not find this to be true, it submits INIT_AUTO_TOBAN so
that it is re-started. MONITOR_AUTO_TOBAN runs every 30 minutes.
HISTORY:
Written 3-Dec-92 by M.Morrison
8-Dec-92 (MDM) - Changed call to GO_TOBAN. Use the /MAIL switch
- Fixed a bug which was recognizing the KSC contacts
incorrectly
- Removed call to MAIL after GO_TOBAN
- Added check to see if the batch job has already
been submitted
10-Dec-92 (MDM) - Corrected an error on how it figured out the next
KSC contact (dealing with how RD_FEM works).
5-Jan-93 (MDM) - Added YEAR keyword
[Previous]
[Next]
NAME:
auto_toban2
PURPOSE:
To run GO_TOBAN whenever there is new SIRIUS temporary data (from
KSC station contacts)
DESCRIPTION:
What AUTO_TOBAN2 Does:
1. Check if the file: $ys/site/setup/data/inhibit_auto_toban
exists. If it does, then simply exit.
2. Check to see if AUTO_TOBAN2 is hung on SRSPAS_RUN stage. Kill hung
jobs if they exist.
3. Check to see if AUTO_TOBAN2 is hung on SRSGET stage. Kill hung
jobs if they exist.
4. Check to see if AUTO_TOBAN2 is already running. The check is by
doing a "ps -aux" and looking for "script/auto_toban" which is the
AUTO_TOBAN script. Simply exit if it is already running.
5. Run SRSPAS which polls the mainframe for new data in SIRIUS
SRSPAS files hold the list of the KSC real and playback data that
is in SIRIUS. When SRSPAS runs, it gets a new list from SIRIUS
named SRSPAS.NEW.
6. Look for new passes in the SRSPAS listing which shows data from
KSC passes (compare the SRSPAS.NEW file to SRSPAS.OLD).
Default is now NOT to copy the SRSPAS.NEW to SRSPAS.OLD
7. If there are new passes, Run GO_TOBAN. Run GO_TOBAN separately for
each KSC contact. Only run the later stages (making obs log,
atr/att log, ...) after the last KSC contact if there is a block of
new KSC contact data. This only happens if the data did not come
near-realtime from KSC. When SRSGET and REFORMATing of the last
KSC contact in the block is done, then it copies the SRSPAS.NEW
file to SRSPAS.OLD (this is the new default as of 2-Dec-93)
8. GO_TOBAN starts another batch job, DAILY_FORECAST. For the first
and 4th passes, it looks for new SXT images which meet a certain
criteria. If it finds images, it FTPs the images (does a "put")
to eight different institutions.
The batch job writes a log file to /ys/site/logs/auto_tobanYYMMDD.HHMM
for every run that it makes. If there is no new data, this log file is
deleted, so that only logs of "real" runs are saved.
Trouble shooting AUTO_TOBAN
*. Check to see if AUTO_TOBAN has been running (that the cron job has
been kicking off). The easiest way is to type "tail_auto". Look
over the times that have been listed. The time at the bottom should
be fairly recent (within the last hour or so - within 10 minutes if
there is no new data)
*. Check that the SRSPAS results are being written ok. Check the date
on the /ys/site/logs/srspas.new file. It should be within the last
10 minutes (unless AUTO_TOBAN is running on previous pass at this
time). The file should be owned by "sxt" and the logs directory
needs world write protection.
*. Check to see if there is new data on the SIRIUS system. Do a
TO INF command and see if there is data that SRSPAS is not
seeing for some reason. If the expected data is not there, it
is a KSC to ISAS transfer problem and check with Kato and Shuto.
If it is there, but does not show up in the SRSPAS results, then
it is a Shuto problem.
*. If the same contacts are being run over and over, then there is
probably a problem with the protection on the
/ys/site/logs/srspas.old file (the .new file cannot be copied to
the .old file).
*. On 2-Dec-93, AUTO_TOBAN2 was modified to have the copying of the
SRSPAS.NEW file to SRSPAS.OLD done AFTER the reformatting is
accomplished. This can be VERY dangerous, and we need to keep an
eye out for the same dataset being reformatted over and over again.
This would happen if there is a crash in the reformatter for a
particular set, and therefore the SRSPAS results are not updated,
and it keeps trying the same pass over and over. This can be
overcome manually by logging in as "software", setting default
to /ys/site/logs, and doing a "cp -p srspas.new srspas.old"
In the case when there are multiple KSC contacts that show up at the
same time, I reformat them separately. The SRSPAS file is only
updated after the LAST new contact is reformatted. If AUTO_TOBAN
finished one or two contacts out of a block of 5 new passes, and
then there was network problems, then the next time AUTO_TOBAN
starts up, it will do those one or two over again, and move on
to the one's it has not done.
We can disable this mode of operating by removing the /NOCOPY
command from the GO_TOBAN call which is in AUTO_TOBAN2 (the default
is to copy the SRSPAS.NEW file to .OLD)
*. There are IDL log files for the last 20 runs of AUTO_TOBAN. Check
the log file for errors.
*. A sample of the "tail_auto" command is shown below. The first 4
lines are listed right after checking the SRSPAS results and before
GO_TOBAN is called. The "RFS: SRSGET/REF took: ..." line is printed
after all stages of AUTO_TOBAN have finished. Check to see that
there is a "RFS" line for each "REF" line.
30-Nov-1993 10:31:16.00 NEW: SA229 9311300100 93/11/29 23:21:35 23:29:51 015872
30-Nov-1993 10:31:16.00 NEW: SA229 9311300101 93/11/29 23:44:59 00:54:15 065536
30-Nov-1993 10:31:16.00 NEW: SA228 9311300100 93/11/30 00:53:11 01:06:10 024882
30-Nov-1993 10:31:17.00 REF: GO_TOBAN to run from 29-NOV-93 23:21:35 to 30-NOV-93 01:07:10 ( 1.75972 hours)
30-Nov-1993 11:13:04.00 RFS: SRSGET/REF took: 26.62 min, and OBS, EVN, PNT SFD, and SL stages took: 14.33 min
1-Dec-1993 05:31:29.00 NNW: No new data since 30-Nov-1993 11:21:12.00 ( 110 checks)
*. If AUTO_TOBAN has trouble during the SRSGET stage, it aborts and will
not re-attempt reformatting that latest block of data. It sends
a mail message to the list of users ($MAIL_TOBAN_ERROR). It is
necessary to run MANUAL_TOBAN for this KSC contact. Use option #1
in AUTO_TOBAN to select the pass which was not processed properly.
*. Do not change the commands in the crontab file. If you put spaces
into the command, then the string "script/auto_toban" is not seen
from the "ps -aux" result and it does not know that AUTO_TOBAN2 is
already running. This condition can be recognized by some wierd
formatting in the "tail_auto" listing (lines not properly aligned)
The cron job is run from the "software" account on flare8. The
file ~/crontab.src has the following line in it:
0,10,20,30,40,50 * * * * rsh flare8 'source ~/.yslogin > /dev/null ; "$ys"/site/script/auto_toban2 > /dev/null'
Use the command "crontab -l" to see what is online with the system
and use the command "crontab crontab.src" to put a modified version
of that file on-line.
*. It has never happened, but if AUTO_TOBAN2 hangs for some unknown
reason and does not exit, then the job needs to be killed (since
new jobs will never start if it is running)
*. It is possible to run GO_TOBAN manually. If you wish to get DSN
data and to not interfer with AUTO_TOBAN, try something like:
go_toban, srsget=2, sttim='1-nov-93', entim='2-nov-93', /int
Use MANUAL_TOBAN when trying to simply recover from an AUTO_TOBAN
error.
*. The DAILY_FORECAST program is called each time from AUTO_TOBAN, but
it only sends new data on the first pass of the day (which also has
the needed images), and starts looking again on the 4th pass.
It sends two sets a day. I check the 4th pass because of problems
defining passes (which passes KSC will use/discard), and it does
give backup in the case that there are problems with the 5th
pass.
To trigger the DAILY_FORECAST program manually, use the software
account and type "idl_batch go_forecast". It should check for
new data and send the images if it should.
*. IMPORTANT -- NOTE FILE OWNERSHIPS AND PROTECTIONS!
chown sxt /ys/site/logs/srspas.new
chown software /ys/site/logs/srspas.old
chmod 777 /ys/site/logs
HISTORY:
Written 20-Jan-93 by M.Morrison
22-Jan-93 (MDM) - Changed log file purging technique
25-Jan-93 (MDM) - Changed log file printing command
26-Jan-93 (MDM) - Change "ps -w" to "ps -auxw" to spot if auto_toban2
is already running. Adjusted the logic for recognizing
that it is running already
- Put in code to kill a hung SRSPAS_RUN job. It should
not be running 10 minutes after the previous call...
- Adjusting purging of log files
8-Feb-93 (MDM) - Added code to kill a job that is hung during the
loggin to FLARE1 for SRSGET.
- Added code to only run the programs after REFORMAT
for the last set of station contacts
9-Feb-93 (MDM) - Corrected to find last time properly
19-Jun-93 (MDM) - Modified to check for hung "rsh flare1 -l sxt ps -a"
jobs and kill them if they exist
25-Aug-93 (MDM) - Removed spurious reference to flare2 (replaced with flare1)
27-Aug-93 (MDM) - Changed to have the cron jobs submit "/ys/site/script/auto_toban2'
so that "flare8" machine can recognize when it is running
30-Aug-93 (MDM) - Corrected some of the logic for checking to see if the
AUTO_TOBAN2 job is already running
30-Sep-93 (MDM) - Corrected some of the logic for checking to see if the
AUTO_TOBAN2 job is already running
7-Oct-93 (MDM) - Changed to use $ys instead of /ys
- Added a line to copy the SRSPAS.OLD file to isass2
backup software tree
16-Oct-93 (MDM) - Adjusted logic to recognize when it is already running
(had to be done because changed cron job to use
$ys instead of /ys)
8-Nov-93 (SLF) - Inhibit if file: $ys/site/setup/data/inhibit_auto_toban exists
8-Nov-93 (MDM) - Modified the header information/description
- Made 'srspas.new' copy to use "cp -f" instead of "cp"
15-Nov-93 (MDM) - Made IDL log file delete the log file if inihibit is
enabled.
30-Nov-93 (MDM) - Updated header - described how to trouble shoot AUTO_TOBAN2
1-Dec-93 (MDM) - Updated header
2-Dec-93 (MDM) - Modified to do the SRSPAS.NEW copy to SRSPAS.OLD
from within GO_TOBAN (after successful reformatting)
- Added /DAILY_FORECAST keyword switch to GO_TOBAN
- Several modifications to header
18-Apr-94 (MDM) - Modified to do the reformatting in the reverse time order
when more than one pass is available.
8-Jun-94 (SLF) - document ps command / avoid alias / file_delete
host dependent count (already running check)
6-Mar-95 (MDM) - Modified to work on Alpha - the "ps" command
had to be changed
- Added DEBUG_TOBAN_PAUSE
[Previous]
[Next]
NAME:
av_chflux
PURPOSE:
Calculates the average photon flux for spectrometer channels
CALLING SEQUENCE:
f=av_chflux(a,tyspec,e1,e2,npts=npts)
INPUT:
a= fit parameters
tyspec= type of fit. (try doc_library,'fitspec' for deinitions
e1= low channel limit
e2= high channel limit
KEYWORD INPUT:
npts= the number of intervals for the integration, for each channel
20 is the default. Since the integration uses Simpson's
rule, an even npts is preferable, and if an odd number is
input, i'll add one.
OUTPUT:
f= the average photon flux in each channel
CALLS: ***
fx_phflux, simp_rule
HISTORY:
4-nov-93 by jmm
[Previous]
[Next]
NAME:
av_den
PURPOSE:
A routine to find the average density of a flare,
here we estimate the volume by V=(area)^1.5, where
area is the number of pixels.
CALLING SEQUENCE:
av_den,lpix,em0,uem0,npix,d0,ud0,v0,uv0,u_npix=u_npix,$
cyl_aspect=cyl_aspect, /sphere
INPUT:
lpix=pixel width in km
em0=Total Log(em), can now be an array
uem0=Unc. in em0
npix=No. of pixels with emission, a scalar or an array
OUTPUT:
d0=Log(Density)
ud0=Unc. in d0
v0=Log(volume)
uv0=unc. in volume
KEYWORDS:
u_npix=uncertainty in npix, default is 0.0
cyl_aspect= if passed in the flare will be treated as
if it were a cylinder of length cyl_aspect*r
then area = 2*cyl_aspect*r^2,
and volume = (!pi/2)*(1/sqrt(2*cyl_aspect))*area^(3/2)
sphere= vol = 4/(3*sqrt(!pi)) * area^(3/2)
CALLED BY:
sxt_tfl, sxt_tflx
HISTORY:
Written May '92 by J.McTiernan
changed units to em from e47 12-jul-94, jmm
Added output volume, rewrote to replace av_den_arr.pro,
11-19-94, jmm
Added cyl_aspect and sphere keywords.
[Previous]
[Next]
NAME:
AVE_CTS
PURPOSE:
To obtain average count rates (counts/sec/subcollimator) of HXT
in the four energy bands.
CALLING SEQUENCE:
ave = AVE_CTS(index,data)
ave = AVE_CTS(index,data,/ser,time=time)
ave = AVE_CTS(index,data,bgd)
INPUT:
index - HXT index
data - HXT data
CALLS: ***
FRAME2SERIAL, HXT_HALFSEC2, HXT_PRESTORE [1], HXT_PRESTORE [2], HXT_PRESTORE [3]
HXT_PRESTORE [4], HXT_PRESTORE [5], SBT_HXT_DATA, SUM64, mk_timarr [1]
mk_timarr [2]
CALLED BY:
HXT_4CHPLOT, HXT_DUMP, HXT_POWERLAW, HXT_THERMAL, NEUPERT_PLOT, hxt_impulsivness
OPTIONAL KEYWORD INPUT :
serial - If set, then the output data format is
ave = fltarr(4,*) [= (Ch,4*MF)]
instead of the default ave = fltarr(4,4,*) = (Ch,1/4MF,MF).
sf - If set, then the output data format is
ave = fltarr(4,*) = (Ch,MF). The output now contains
average count rates (in the four energy bands) per each MF.
time - Returns time tag for each `ave' data.
Utplot will be done, for instance, as follows:
utplot,time,ave(0,*,*,*),inex(0)
bgd - HXT background data structure variable. If this is set,
then background-subtracted data is obtained.
OUTPUT:
ave - Average count rates of HXT in the four energy bands, in
units of CTS/S/SC.
HISTORY:
version 1.0 93.02.19 (Fri)
T.Sakao written.
version 1.1 93.03.22 (Mon)
Option ser is added. If this option is set return value s is
s(4,*), otherwise s is s(4,4,*).
Option sf is also added. If this option is set counts are summed up
every 1SF; s = s(4,*).
version 1.2 93.03.24 (Wed)
Greatly modified so that this program well work in both FL and QT
mode, as well as in Bit HI, MED, and L.
version 1.3 93.05.14 (Fri)
time = time(4,*) unless option ser is set.
version 1.4 93.05.19 (Wed)
Option bgd is added. BGD subtraction can be done with this option.
Note the variable bgd is an HXT data structure.
version 1.5 93.06.17 (Thu)
bgd was changed to be an argument from an option.
version 1.6 93.06.18 (Fri)
A bug in time option was fixed.
version 1.7 93.07.01 (Thu)
A bug, which appears in bit MED case when BGD subtraction is specified,
was fixed.
version 1.8 93.07.28 (Wed)
One of the arguments for mk_timarr was changed from data to indgen(4).
This is to avoid error in case QT data is passed.
version 1.9 93.12.24 (Fri)
A bug in time option was fixed. The bug appeared when the option /sf
was specified.
version 2.0 94.06.17 (Fri) by M.Morrison
Modified the call to MK_TIMARR.
Used to be: time = mk_timarr(index,indgen(4))-hxt_prestore(index)
Now is: time = mk_timarr(index,4)-hxt_prestore(index)
version 2.1 96.01.22 (Mon) Added documentation.
version 2.2 96.01.23 (Mon) by SLF - Merged changes (MDM + Sakao san)
version 2.3 97.01.08 (Wed) by SLF - change 'prestore' call to 'hxt_prestore'
[Previous]
[Next]
PROJECT:
YOHKOH
CATEGORY:
HXT, INSTRUMENT
NAME:
AVE_CTS2
PURPOSE:
This function returns the counts/sec/subcollimator value from given data(....,64,....).
Note that 'data' should be in unit of cts / 0.5 sec for each sensor
(should be decompressed from 8 to 12 bit beforehand).
N.B. data should not be decompressed when use CALIBRATION data
These data are stored into 8 bit counters only so are transmitted
without compression.
CALLING SEQUENCE:
hxt_rate = ave_cts2( index, data, time=time $
[,sf=sf] [,ser=ser] [,dt=dt]
INPUTS:
index - index returned by yodat for hda file
data - data array returned by yodat corresponding to index
OPTIONAL INPUTS:
sf - average over the frames
ser - serial, return with hxt_rate = fltarr(4,4*n_index)
time = fltarr(4*n_index)
datarectypes - if this value is 2, then these are calibration data
which is 64 channels x 64 detectors every 8 seconds
uses only the first value whether array or not
so let caller beware.
OUTPUTS:
hxt_rate - hxt cnt rate in each energy bin per second per
subcollimator
returned as fltarr(4,4,n_index) where n_index is
the number of elements in index
OPTIONAL OUTPUTS:
time - time in seconds relative to the time given by index(0)
time is centered within the accumulation interval
dt - accumulation time for each sample
iout64- index structure for 64 channel hxt data
dout64- data records for 64 channel hxt data (intarr(64, 64, n)
CALLED BY:
HXT_CAL_FIX [1], HXT_CAL_FIX [2], read_yohkoh_4_spex [1]
read_yohkoh_4_spex [2]
PROCEDURE: data is extracted and converted in groups of 64 major
frames to avoid page fault delays
CALLS: ***
FCHECK, F_DIV, HXT_PRESTORE [1], HXT_PRESTORE [2], HXT_PRESTORE [3]
HXT_PRESTORE [4], HXT_PRESTORE [5], HX_DECOMP, RESTORE_OVERFLOW, dprate2sec [1]
dprate2sec [2], gt_dp_mode [1], gt_dp_mode [2], mk_timarr [1], mk_timarr [2]
reform_hxtcal2
RESTRICTIONS:
MODIFICATION HISTORY:
19-apr-94 R.Schwartz, adopted from ave_cts.pro
eradicated do loops and added documentation
21-jun-94, ras, replace div with f_div
22-jun-94, ras, changed mk_timarr
01-jul-94, ras, fixed bug induced from dprate2sec not returning a vector
for a single element
16-jan-1996, ras, add calibration data format
31-jan-1996, ras, added calibration data overflow correction, dout64, iout64
2-may-1996, ras, fixed error in subscripting non-existent dtypes
8-jan-1996, ras, prestore==>hxt_prestore
15-jan-1996, ras, protect use of dtype
9-feb-1997, ras, switch to hx_decomp from hxt_decomp, use the McTiernan version
CONTACT:
richard.schwartz@gsfc.nasa.gov
[Previous]
[Next]
Name: aver_img
Purpose: return the normalize average image from a pair of images.
Calling Sequence:
nimg = aver_img(index1,data1,index2,data2)
or
nimg = aver_img(index,data,sub=sub,[em=em,ave_em=ave_em,
unc_data=unc_data, nunc_data=nunc_data])
sub pair of indices to average (data and em).
em optional input: log(total(em)) to compute the
average EM.
ave_em optional output: average EM.
unc_data is the uncertainties
OUTPUT:
Returned image is normalized to DN/sec.
nunc_data is the normalized average uncertainty.
CALLS: ***
gt_expdur [1], gt_expdur [2]
CALLED BY:
bkg_sub
History:
written by GAL 10-Jul-93.
21-Oct-93, added errors cals
-----------------------------------------------------------
[Previous]
[Next]
NAME:
avinput
PURPOSE
To calculate the average intensity in a radial direction, for
a three dimensional data cube.
CALLING SEQUENCE
avinput,data,index=index,origin=origin,xxx,out,rrrr,full,xy=xy
INPUT
OUTPUT
OPTIONAL OUTPUT
OPTIONAL KEYWORD INPUT
RESTRICTION
none
HISTORY
Written CRF 12 Nov 95 : caf@mssl.ucl.ac.uk
CALLS:
[Previous]
[Next]
NAME:
avsig_1
PURPOSE:
Average and dispersion of an array, zeros can be not included,
CALLING SEQUENCE:
xbar=avsig_1(x, sigma, no_zeros=no_zeros, sig_mean=sig_mean, dimension=dimension, /fractional)
INPUT:
x = an array
OUTPUT:
xbar = mean, total(x)/n_elements(x)
sigma = standard deviation, sqrt(total((x-xbar)^2/(nx-1)))
KEYWORDS:
no_zeros= if set, strip out zeros, note that this option does
not work if the dimension keyword is used. At least not as of
2-13-95...
sig_mean = sigma/sqrt(nx), the standard deviation of the mean of the array
dimension = the dimension of the array to find the mean in,
passed into the total command, it must be a scalar.
fractional = the fractional error is passed out as sigma,
don't use this if zero is a valid value of xbar...
CALLED BY:
fsp_avsig, hsi_flare_list_fill [1], hsi_flare_list_fill [2]
hsi_monthly_average, hsi_obs_summ_allrates [1], hsi_obs_summ_bck
hsi_obs_summ_fill [1], hsi_obs_summ_fill [2], hxtimg_accum
HISTORY:
12-9-94, jmm
2-13-95, jmm added dimension keyword, switched from ok_zeros to no_zeros
[Previous]
[Next]
NAME:
avsig_test
PURPOSE:
Calculates the average and the sigma of an array,
passes out (Av counts*Av time interval), and
the uncertainty in that quantity.
CALLING SEQUENCE:
Avsig_test, x, xbar, sigx2, dt=dt, No0=no0, plot=plot
INPUT:
x is an array
OUTPUT:
xbar = average count rate*average time interval
sigx2 = sigma(x)^2
KEYWORDS:
No0 = if set drop out zeros, this will crash if there
are only zeors.
dt = interval times, default is 1.0
plot = if set, plot up a histogram, with a poisson distribution.
CALLS: ***
dist_histo, plot_histo_j
CALLED BY:
auto_bck_find
RESTRICTIONS:
Don't pass in a count rate, things'll get messy
HISTORY:
27-jul-94, jmm
[Previous]
[Next]
NAME:
Axi7
PURPOSE:
the inital values of a for the thermal + P.L..
CALLING SEQUENCE:
a=Axi7(fy,sfy,e,nch)
INPUT:
fy=Log(Photon Flux),
sfy=Unc. in fy squared,
e=log(channel energies),
nch=no. of channels
OUTPUT:
a=initial values for a, the fit parameters
CALLS: ***
Ai_1th, BREAK_PL
CALLED BY:
Ai_thbpl
HISTORY:
Spring,' 92 JMcT
[Previous]
[Next]
NAME
azi_calc
PURPOSE
To obtain the radially averaged intensity about the azimuth.
CALLING SEQUENCE
azi_calc,img,index,x0,y0,rr,source,xy=xy,new=new,xxx,out,deg,fitxxx,fitout,fitxo
INPUT
img : The image data.
index : The corresponding index.
x0 : X Coordinate of origin
y0 : Y Coordinate of origin
deg : The angular step size in degrees relative to Zero latitude on eastern limb.
degs : Starting angle
degf :
OPTIONAL INPUT
xy : The region of interest pixel addresses
OUTPUT
rr : Data Cube same size as image data, containing the radial
distance from origin for each pixel.
fitxxx : The radial pixel distance from origin.
fitout : Intensity value, at ditance fitxxx from origin
fitxo : The resultant azimuthally averaged image cube, over 'deg' degrees.
OPTIONAL OUTPUT
none
OPTIONAL KEYWORD INPUT
new : Select new Region of interest.
RESTRICTION
some.
HISTORY
Written CRF 12 NOV 95 : caf@mssl.ucl.ac.uk
CALLS:
[Previous]
[Next]
NAME:
azicalc
PURPOSE
To form an array of azimuthal angles with respect
to the eastern limb zero latitude
CALLING SEQUENCE
azicalc,x,y,theta
INPUT
x and y the pivotal point for the azimuthal angles.
OUTPUT
Theta an array of dimensions 512X512 containing azimuthal angles.
OPTIONAL OUTPUT
none.
OPTIONAL KEYWORD INPUT
none.
RESTRICTION
512X512 arry at moment
HISTORY
written CRF 28 Oct 95 : caf@mssl.ucl.ac.uk
CALLS:
[Previous]
[Next]
NAME:
azimuth_avg
PURPOSE
To compute the azimuthally-averaged radial intensity distribution from
some origin -- either the center of the sun or an input location.
Radial totals, not averaged over azimuth, can be returned also for
use in SXT_TEEM which requires actual total DN if error bars are
be put on the temperatures.
CALLING SEQUENCE
azimuth_avg,image,index=index,xxx,sig,rr,fullsig,origin=origin, $
xy=xy,new=new,fit_param=fit_param,yfit=yfit,$
noplot=noplot,multiple=multiple,unc_data=unc_data,$
unc_sig=unc_sig,unc_fullsig=unc_fullsig,azipix=azipix
azimuth_avg,image,index=index,xxx,sig
azimuth_avg,image,origin=[361,400],xxx,sig, $
fit_param=fit_param,yfit=yfit,multiple=2
azimuth_avg,image,index=index,xxx,sig,rr,/new,/origin,/noplot
INPUT
img - Fully corrected image.
Either: index, origin or both.
OPTIONAL OUTPUT
xxx - linear array of R values for plotting
sig - array of signal values, averaged over annuli, function of R
units are DN/pixel for pixel size in image
rr - array of radii of all distances from origin
units are pixels (pixel size of image)
xy - array of pixels included in the analysis
unc_sig - compression uncertainties on azimuthly averaged values
fullsig - radial totals, not averaged over azimuth, for
use with SXT_TEEM
unc_fullsig - compression errors on azimuth totals
azipix - number of pixels at each R position, needed for
renormalizing emission measure after SXT_TEEM is run
OPTIONAL INPUT
rr, return from first run and input for subsequent runs
to save time.
OPTIONAL KEYWORD INPUT
index - to permit getting suncenter from the data base
and labelling of output figures
origin - origin of coordinates for azimuth averaging, if this is
specified it takes priority over suncenter from index
but one or the other must be provided.
CALLS: ***
POLY_FIT, WDEF [1], WDEF [2], fmt_tim [1], fmt_tim [2], gt_corner, gt_filtb, gt_res
plusmark, sfd_comp, tbeep [1], tbeep [2], tbeep [3], wdefroi [1], wdefroi [2]
wdefroi [3], wdefroi [4]
CALLED BY:
avinput, azimuth_teem [1], azimuth_teem [2]
Note: origin = [x0,y0] chooses x0,y0 as origin of coordinates.
/origin allows choosing origin by click on image.
xy - array defining target area,
default is to read from image with WDEFROI
/new - set if rr array exists but you wish to recompute it
forces recomputation of xy also.
fit_param - set this to execute and plot a log10-log10 fit
to xxx vs. sig and, if you wish, return the parameters
yfit - values of the fitted log10-log10 curve at xxx
/noplot - causes program to skip plotting of raw data, saves time.
multiple - Use for 2 or more disconnected regions (e.g., multiple=3)
unc_data - array of uncertainties of values in image from SXT_PREP
skip - array of indices to be excluded from analysis. This is
a good way to eliminate unwanted features that can be
identified with a "where" analysis before using azimuth_avg.
PROGRAMS CALLED
sfd_comp, cursor, plots, plusmark, gt_corner, wdefroi, where,
findgen, rebin, reform, sqrt, wdef, xyouts, plot, fix, max,
total, float, n_elements, indgen, gt_res, alog10, poly_fit, print
HISTORY
LWA 26-June-94, wrote original program.
LWA 2-Dec-94, added capability for non-suncenter origin.
LWA 26-Jan-95, cleaned up header and fixed /new omission.
Changed order of variables in call.
LWA 29-Jan-95, added keyword for disconnected regions.
LWA 16-Mar-95, replaced sxt_cen with -gt_corner(index,/from_sc)
and made index a keyword.
LWA 23-Mar-95, Corrected to include negative values in averages.
and added keyword /noplot.
LWA 6-Apr-95, Added computation of uncertainties. Eliminated "img".
LWA 8-Apr-95, Added fullsig and unc_fullsig and changed "out" to "sig".
LWA 1-Jun-95, Added skip keyword.
LWA 14-Jun-95, Changed name to AZIMUTH_AVG.PRO
LWA 2-Jan-96, Added azipix keyword.
[Previous]
[Next]
NAME:
azimuth_teem.pro
PURPOSE
To select a region of interest over which the temperature and emission
measure are measured radially. The data is averaged over the ranges
entered.
CALLING SEQUENCE
azimuth_av_teem,index,data,ooo=ooo,maxr,minv,xxy=xy,xy=xy
INPUT
index : The SXT index
data : The SXT data Cube, must contain thin/thick filter pair.
range : An array of radial distances in solar radii, over which the
data should be averaged
OUTPUT
te :
em :
dte :
dem :
xxr :
OPTIONAL OUTPUT
OPTIONAL KEYWORD INPUT
t1 : Exposure duration in milliseconds for filter 1
t2 : Exposure duration in milliseconds for filter 2
RESTRICTION
?
HISTORY
Written CAF 15 NOV 95 : caf@mssl.ucl.ac.uk
CAF 4 DEC 95 ; added plotted output, with x and y error bars.
CAF 20April97 added origin keyword
CALLS:
[Previous]
[Next]
NAME:
azimuth_teem.pro
PURPOSE
To select a region of interest over which the temperature and emission
measure are measured radially. The data is averaged over the ranges
entered.
CALLING SEQUENCE
azimuth_teem,index,data,te,em,dte,dem,xxr,$
[0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0],xxy=xy1,xy=xy1,t1=15108.,t2=15108.
INPUT
index : The SXT index
data : The SXT data Cube, must contain thin/thick filter pair.
range : An array of radial distances in solar radii, over which the
data should be averaged
OUTPUT
te :
em :
dte :
dem :
xxr :
OPTIONAL OUTPUT
OPTIONAL KEYWORD INPUT
t1 : Exposure duration in milliseconds for filter 1
t2 : Exposure duration in milliseconds for filter 2
RESTRICTION
?
HISTORY
Written CRF 15 NOV 95 : caf@mssl.ucl.ac.uk
CRF 4 DEC 95 ; added plotted output, with x and y error bars.
CALLS: