[Previous]
[Next]
NAME:
back_off
PURPOSE:
Returns background subtracted flux spectra in noback_data structure
(replacing bsc_data structure).
CALLING SEQUENCE:
back_off,bsc_index,bsc_data,noback_data,back_index,back_data,
factor,base_flux=base_flux
INPUTS:
bsc_index
bsc_data
back_index ;index with the backgnd spec (bsc_index(nn) format; nn=elem num).
back_data ;data with the backgnd spec (bsc_data(nn) format; nn=elem num).
factor ;factor to multiply background by before subtraction.
KEYWORDS:
base_flux ;Adds a constant base to flux to avoid negative numbers.
(not added to counts field)
USAGE:
PROCEDURES:
OUTPUTS:
noback_data = structure corresponding to bsc_data, but has
background flux removed from flux array.
CALLS: ***
BSC_ERRCAL [1], BSC_ERRCAL [2]
HISTORY:
Written 31-Oct-94 by A. Sterling
25-Aug-98, ACS. Now needs background index and data structure.
Sets negative fluxes to zero.
Can handle single-element structure.
Fixed calculation of counts
[Previous]
[Next]
NAME:
back_off_single
PURPOSE:
Returns background subtracted flux spectra in noback_data structure
(replacing bsc_data structure), for a single element spectrum.
CALLING SEQUENCE:
back_off,bsc_index,bsc_data,noback_data,back_flux
INPUTS:
bsc_index
bsc_data
back_flux ;flux of background spectrum (bsc_data(nn).flux format).
KEYWORDS:
none
USAGE:
PROCEEDURES:
OUTPUTS:
noback_data = structure corresponding to bsc_data, but has
background flux removed from flux array.
HISTORY:
Written Oct-96 by A. Sterling
[Previous]
[Next]
NAME: background
PURPOSE: Calculate the featureless background of an optical image.
Also referred to as the limbdarkening profile.
METHOD: Find the center and do toroidal fourier transform. Keep ndnm modes
and transform back. Nearest neighbor averaging is used to fill in
pixels missed by the ring generation algorythm.
CALLING SEQUENCE:
profile=background(image,target=trgt,modes=mdnm)
PARAMETERS:
image image from which to create the profile.
profile the calculated profile.
KEYWORDS:
target contains the centroid and radius of the input image,
in pixels. If this is missing they will be calculated.
modes the number of modes to keep.
1, gives basic limb-darkening, average value at each r.
2, takes out components with a wavelength equal to 2 pi.
>2, removes increasingly high frequency components.
Note that there is no inherent correlation from one ring
to the next.
Modes (starting at 0) less than MDNM are kept, so setting
MDNM = 1 keeps one mode (i.e. the 0 mode).
A default value of 2 is used if the keyword is omitted.
CAUTIONS: The raw background still shows the effects of intense features
in the original data, due in part to limited accuracy in the FT.
Smoothing 2 or 3 times with a box of 5 helps alot, but affects
the limb.
The input is assumed to have been corrected for any artificial
oblateness.
RETURN TYPE: FLOAT
CALLS: ***
TARGET [1], crcle, r_coord, target [2]
CALLED BY:
rm_darklimb
HISTORY: drafted apr. 1992, A. McAllister
added target and modes keywords, nov. 1992 AHMcA.
added nearest neighbor averaging for missing pixels, jan 1993. AHMcA.
changed to only calculate to the limb, mar. 1993, AHMcA.
[Previous]
[Next]
IDL routine program to generate and load a new version of the
SXT root window background
PRO background_new
Gets most current SXT SFD image, converts to 1-bit, saves and
displays on root window. Works on any Unix platform running X11.
Routines called: NEWSFD, STUFF_YO_LOGO,
MK_ROOT_BITMAP
Written April 29, 1993 Barry LaBonte
May 7, 1993 Uses NEWSFD to get image (BJL)
CALLS:
[Previous]
[Next]
NAME:
bad_a
PURPOSE:
Takes fit parameters, and sets them to zero,
if they do'nt fall within reasonable ranges,
kind of subjective, basically we restrict
spectral indices to be between 1.0 and 12.0
and temperatures to be between 0.0 and 1000.0
CALLING SEQUENCE:
bad_a,a,ma,tyspec,/no_zeros
INPUT:
a = fit parameters
ma = number of parameters in fit
tyspec = type of spectrum
OUTPUT:
a, with bad points set to zero..
KEYWORDS:
no_zeros = if set, if any fit parameter is less than zero,
they all are set to zero, as of 10.25.94 this is
the default in fitspec.pro, this is done instead
of the actual limits.
CALLED BY:
fitspec, fsp_mc
HISTORY:
1-Jul-93, JM
10/25/94, added no_zeros keyword
[Previous]
[Next]
ROUTINE:
batch_TEST_RD
PURPOSE:
Read BCS reformatted data files in batch mode. (to avoid interactive
questions). The data file specification must be stored in the variable
infil before running this routine.
CALLING: infil = 'disk$data:bda911023.0123' (for example)
.run batch_test_rd
HISTORY:
CDP 5-Dec-91 Formed from standard test_rd
[Previous]
[Next]
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], anytim2ex [1], anytim2ex [2]
anytim2ints [1], anytim2ints [2], concat_dir [4], fl_suntoday [1]
fl_suntoday [2], fl_suntoday [3], gt_day [1], gt_day [2], mail [1], mail [2]
HISTORY:
Written Jun-92 by M.Morrison
20-Nov-92 (MDM) - Modified to use node suncub.bbso.caltech.edu (or 192.76.121.2)
instead of sundog.caltech.edu
- Also moved to directory "fulldisk" to get the files
- The file names have a extra letter "a" after the date
25-Jan-93 (MDM) - Modified to use environment variables $MAIL_BBSO_COPY
to send mail instead of fixed list
14-May-93 (MDM) - Changed to use $ydb_raw and $ys
26-May-93 (MDM) - Changed to use /ys/site/script instead of /ys/gen/script
19-Aug-93 (MDM) - Removed /SELF switch from MAIL call
30-aug-94 (SLF) - add fl_suntoday call
22-May-98 (PGS) - changed ftp site from suncub.bbso.caltech.edu to
ftp.bbso.njit.edu
(how frequent are fts files there? change to jpg?)
[Previous]
[Next]
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], anytim2ex [1], anytim2ex [2]
anytim2ints [1], anytim2ints [2], concat_dir [4], fl_suntoday [1]
fl_suntoday [2], fl_suntoday [3], gt_day [1], gt_day [2], mail [1], mail [2]
HISTORY:
Written Jun-92 by M.Morrison
20-Nov-92 (MDM) - Modified to use node suncub.bbso.caltech.edu (or 192.76.121.2)
instead of sundog.caltech.edu
- Also moved to directory "fulldisk" to get the files
- The file names have a extra letter "a" after the date
25-Jan-93 (MDM) - Modified to use environment variables $MAIL_BBSO_COPY
to send mail instead of fixed list
14-May-93 (MDM) - Changed to use $ydb_raw and $ys
26-May-93 (MDM) - Changed to use /ys/site/script instead of /ys/gen/script
19-Aug-93 (MDM) - Removed /SELF switch from MAIL call
30-aug-94 (SLF) - add fl_suntoday call
[Previous]
[Next]
NAME:
bbso_name_fix
PURPOSE:
Convert the BBSO filename to the Yohkoh convention
CALLING SEQUENCE:
bbso_name_fix, 'hapr01.fts', /move
INPUT:
infil - The input file(s). The leading character
must be a "h", "k", "c" or "w".
OPTIONAL INPUT:
outdir - The output directory to move the files to.
If not passed, it calls FIND_GBO_DIR to find
the proper GBO weekly directory.
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], FIND_GBO_DIR, RFITS [1], RFITS [2], RFITS [3], anytim2ex [1]
anytim2ex [2], break_file [4], concat_dir [4], ex2fid [1], ex2fid [2]
OPTIONAL KEYWORD INPUT:
move - If set, move the input file to the output
directory with the new file name
OPTIONAL OUTPUT:
outfil - The new filename for the input file(s)
HISTORY:
Written 29-Jun-92 by M.Morrison
27-Jan-93 (MDM) - Modified to use FIND_GBO_DIR to find the
proper weekly GBO directory.
28-Jan-93 (MDM) - Fixed 27-Jan-93 fix
19-Aug-94 (MDM) - Patch to handle blank DATE-OBS and TIME-OBS fields
[Previous]
[Next]
NAME:
BCHAN_PNT
PURPOSE:
Generates pointers to start of each channel in DATA array
CALLING SEQUENCE:
chanp = BCHAN_PNT(chan_len)
INPUT:
chan_len 4*N array containing no. of bins per channel
OUTPUT:
bchan_pnt 2*4*N array containing start and end pointer
for each channel for each of the N elements
of the array.
OPTIONAL OUTPUT:
HISTORY
RDB 18-Feb-92 Written
[Previous]
[Next]
NAME:
bck_interp.pro
PURPOSE:
Given two background intervals, and a fit interval, interpolate the
background from those two intervals to get the background at the
fit time. Note that this assumes that the 2nd bck interval is
after the first one, and all of the fits, the error checking
will be done somewhere else....
CALLING SEQUENCE:
bck_interp, fit_pars, sc_par, ch_dta
INPUT/OUTPUT:
Everything happens in the structures, fit_pars, sc_par, ch_dta
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)
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
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= incident count rates
sy0= Uncertainty in y0
chok=channel flag, 0 for channels used in fit ,
1 for channel not used
fmiss= # of missing frames in data
b0 = background count rate
sb0 = uncertainty in b0
This routine calculates ch_dta.b0 and ch_dta.sb0
CALLS: ***
ADDTIME [1], ADDTIME [2]
CALLED BY:
fsp_11, fsp_mc
HISTORY:
12-Jul-95, jmm
[Previous]
[Next]
NAME:
bck_interval
CALLING SEQUENCE:
bck_interval,tim_arr,dt_data,data,ib1,ib2,,channel=channel,$
bck_time=bck_time,bck_dt=bck_dt,plot_title=plot_title,$
alt_tsel=alt_tsel,two_bck=two_bck, quiet=quiet
PURPOSE:
Obtain the background interval for a *_fsp routine
INPUT:
tim_arr=a time array, in yoh. format
dt_data=the interval time for each data point
data= an array of ntimes, or (nchannels, ntimes) the count rates
OUTPUT:
ib1 = the start subscript of the background interval(s)
ib2 = the end subscript of the interval(s)
KEYWORDS:
channel = a channel to use for chosing, if you've got a 2d array
bck_time= a background time, in any yohkoh format, if there are two
intervals, pass in two bck_times
bck_dt= the background accumulation time, bck_time must be set,
If bck_dt is not set dtb=120.0 seconds is used.
auto_bck= if set, the background interval is obtained automatically
alt_tsel = uses ALT_TIM_SEL to obtain interval, rather than PLOT_LCUR
Useful if you don't have x-windows.
two_bck= choose two background intervals, the default is to choose one,
plot_title = a title for the plots used for choosing
quiet = run quietly
auto_bck 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.
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: ***
anytim2ints [1], anytim2ints [2], auto_bck_find, choose_interval
CALLED BY:
hxs_fsp, hxt_fsp
HISTORY:
Hacked out of HXS_FSP, 12-19-95, jmm
[Previous]
[Next]
NAME:
BCS2SXSPC
PURPOSE:
Estimate SXS-PC counting rate with electron
temperature and emission measure derived from
BCS. Because this procedure read BFT-file,
you must made the BFT-file.
INPUT:
You can input file-name. But even if the string
null-string, it's no problem.
OUTPUT:
** Structure BCS2SXS, 5 tags,
FE26 STRUCT -> PCFE25
FE25 STRUCT -> PCFE26
CA STRUCT -> PCCA
SA STRUCT -> PCSA
STTIM STRING -> '(start time)'
CALLS: ***
READBFT, file_menu [1], file_menu [2]
EXAMPLE:
idl> pc_data=bcs2sxspc(file_name)
PLOT:
Use UTPLOT in the following,
idl> utplot,pc_data.fe25.time,pc_data.fe25.pc11,sttim
idl> utplot,pc_data.sa.time,pc_data.sa.pc12,sttim
HISTORY:
M.Takahashi (Tokai Univ.) 16-Aug-93
[Previous]
[Next]
NAME:
BCS_24HR_PLOT
PURPOSE:
Plots the light curve of the reformatted data for the requested BCS
channel as four panels of 6 hours, with SAA and Night indicated.
CALLING SEQUENCE:
BCS_24HR_PLOT,date
INPUTS:
date required date in either format '30-mar-92' or in the
format yymmdd, e.g. '920621'
KEYWORDS:
chan requested channel in range 1-4 [Def = 3, Ca XIX]
files if present, the files used are listed
nobid if present, supress blockid list on extreme right
pause pauses at end of each 6hr segment for debug...
bda if present, use available BDA files (Def is OBS log)
ref if present, uses files of ref directories (FLARE machines)
OUTPUTS:
OPTIONAL OUTPUTS:
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CLEAR_UTPLOT [1]
CLEAR_UTPLOT [2], DATA_PATHS, Ex2Int [1], Ex2Int [2], GOOD_MAX [1], GOOD_MAX [2]
Int2Ex [1], Int2Ex [2], OUTPLOT [1], OUTPLOT [2], OUTPLOT [3], PS_LONG [1]
PS_LONG [2], PS_LONG [3], PS_RESET [1], PS_RESET [2], PS_RESET [3], Rd_Roadmap [2]
Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SET_XY, TRIM, UTPLOT [1], UTPLOT [2]
UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], YOHKOH_EVENTS, anytim2ints [1]
anytim2ints [2], bcs_channels, break_file [4], clearplot [1], clearplot [2]
fid2ex [1], fid2ex [2], file_list [1], file_list [2], fmt_tim [1], fmt_tim [2]
gt_total_cnts [1], gt_total_cnts [2], int2secarr [1], int2secarr [2], rd_obs
rd_roadmap [1], timstr2ex [1], timstr2ex [2], week_loop [1], week_loop [2]
week_loop [3]
CALLED BY:
BCS_BROWSE24, MANY_DAYS
RESTRICTIONS:
uses the common block UTCOMMON from UTPLOT
produces common block FILES_24HR,inff,nffq,ffff
PROCEDURE:
Reads the ROADMAP from all the files and plots the curve.
MODIFICATION HISTORY:
CDP May 92 Written
RDB Jun 92 Reworked to include SAA and Night, and improve
plot scaling; Fixed some titles; Get first file.
RDB 19-Jun-92 Fixed file search for UNIX by using FILE_LIST.
RDB 21-jun-92 Various improvments for data gaps
RDB 22-Jun-92 Modified plot of YOHKOH_EVENTS arrays
Input date can also be yymmdd format
Extra checks when few data files
FILES switch option
RDB 23-Jun-92 Few extra catches for improper data
PAUSE switch option
RDB 30-Jun-92 Modified peak search routine
RDB 1-Jul-92 Set !p.psym=0 at start in case UTPLOT had screwed up
RDB 6-Jul-92 Map the use of BLOCKID in roadmap
NOBID keyword
RDB 7-Jul-92 Corrected error in qx logic - file at end of
day could make code think one at end of this day
Get file headers when FILES switch used
RDB 9-Jul-92 Corrected selection of orbit at end of prev. day
RDB 22-Jul-92 Added CLEARPLOT at end
RDB 30-Oct-92 Increased size of chars on plot
RDB 11-Nov-92 Added CLEAR_UTPLOT, and changed way letter size incr.
RDB 18-Nov-92 Modified to use OBServing log if /OBS switch used.
Also, supress compressed files (_Z or .Z) when using
the BDA roadmaps.
CDP Apr-93 Tidy header documentation.
RDB 26-May-93 Modified to use new OBD files - BCS part of obs. log
Some error message printed if not nobid
RDB 13-Jul-93 Made window larger on x-windows display
Corrected fault where files not listed under /obs
RDB 6-Aug-93 Switched so uses OBS logs by default.
Removed /obs, installed /bda
RDB 11-Aug-93 Put clearplot, etc at start, those at end conditional
RDB 24-Sep-93 Added Channel to main title
RDB 4-Jan-94 Still plot page even if no data on given date
Some reorganization in prep. for plotting other instruments.
RDB 5-Jan-94 Fixed problem in OBS logs if previous day missing
RDB 11-Jan-94 Declare which week data in for OBS plot
RDB 7-Mar-94 Modified to fix errors that resulted after updates to UTPLOT...
RDB 14-Mar-94 Corrected one of fixes of 7-Mar-94...
RDB 17-Nov-94 Corrected logic error in plotting file markers using OBS
RDB 10-Feb-95 Improved file seach on flare machines (ref keyword)
Improved plot of saa and night bars
RDB 20-Nov-97 Fixed charsize problem of extension names that came in with V5
DMZ 1-Mar-02 Corrected time conversion problems
[Previous]
[Next]
NAME:
BCS_24HR_PLOT
PURPOSE:
Plots the light curve of the reformatted data for the requested BCS
channel as four panels of 6 hours, with SAA and Night indicated.
CALLING SEQUENCE:
BCS_24HR_PLOT,date
INPUTS:
date required date in either format '30-mar-92' or in the
format yymmdd, e.g. '920621'
KEYWORDS:
chan requested channel in range 1-4 [Def = 3, Ca XIX]
files if present, the files used are listed
nobid if present, supress blockid list on extreme right
pause pauses at end of each 6hr segment for debug...
bda if present, use available BDA files (Def is OBS log)
ref if present, uses files of ref directories (FLARE machines)
OUTPUTS:
OPTIONAL OUTPUTS:
CALLED BY:
BCS_BROWSE24, MANY_DAYS
RESTRICTIONS:
uses the common block UTCOMMON from UTPLOT
produces common block FILES_24HR,inff,nffq,ffff
PROCEDURE:
Reads the ROADMAP from all the files and plots the curve.
MODIFICATION HISTORY:
CDP May 92 Written
RDB Jun 92 Reworked to include SAA and Night, and improve
plot scaling; Fixed some titles; Get first file.
RDB 19-Jun-92 Fixed file search for UNIX by using FILE_LIST.
RDB 21-jun-92 Various improvments for data gaps
RDB 22-Jun-92 Modified plot of YOHKOH_EVENTS arrays
Input date can also be yymmdd format
Extra checks when few data files
FILES switch option
RDB 23-Jun-92 Few extra catches for improper data
PAUSE switch option
RDB 30-Jun-92 Modified peak search routine
RDB 1-Jul-92 Set !p.psym=0 at start in case UTPLOT had screwed up
RDB 6-Jul-92 Map the use of BLOCKID in roadmap
NOBID keyword
RDB 7-Jul-92 Corrected error in qx logic - file at end of
day could make code think one at end of this day
Get file headers when FILES switch used
RDB 9-Jul-92 Corrected selection of orbit at end of prev. day
RDB 22-Jul-92 Added CLEARPLOT at end
RDB 30-Oct-92 Increased size of chars on plot
RDB 11-Nov-92 Added CLEAR_UTPLOT, and changed way letter size incr.
RDB 18-Nov-92 Modified to use OBServing log if /OBS switch used.
Also, supress compressed files (_Z or .Z) when using
the BDA roadmaps.
CDP Apr-93 Tidy header documentation.
RDB 26-May-93 Modified to use new OBD files - BCS part of obs. log
Some error message printed if not nobid
RDB 13-Jul-93 Made window larger on x-windows display
Corrected fault where files not listed under /obs
RDB 6-Aug-93 Switched so uses OBS logs by default.
Removed /obs, installed /bda
RDB 11-Aug-93 Put clearplot, etc at start, those at end conditional
RDB 24-Sep-93 Added Channel to main title
RDB 4-Jan-94 Still plot page even if no data on given date
Some reorganization in prep. for plotting other instruments.
RDB 5-Jan-94 Fixed problem in OBS logs if previous day missing
RDB 11-Jan-94 Declare which week data in for OBS plot
RDB 7-Mar-94 Modified to fix errors that resulted after updates to UTPLOT...
RDB 14-Mar-94 Corrected one of fixes of 7-Mar-94...
RDB 17-Nov-94 Corrected logic error in plotting file markers using OBS
RDB 10-Feb-95 Improved file seach on flare machines (ref keyword)
Improved plot of saa and night bars
RDB 20-Nov-97 Fixed charsize problem of extension names that came in with V5
Khan (MSSL/ISAS) 2001 Apr 05 Fixed infil determination bug for year 2001-2009
[Previous]
[Next]
NAME:
BCS_24HR_PLOT
PURPOSE:
Plots the light curve of the reformatted data for the requested BCS
channel as four panels of 6 hours, with SAA and Night indicated.
CALLING SEQUENCE:
BCS_24HR_PLOT,date
INPUTS:
date required date in either format '30-mar-92' or in the
format yymmdd, e.g. '920621'
KEYWORDS:
chan requested channel in range 1-4 [Def = 3, Ca XIX]
files if present, the files used are listed
nobid if present, supress blockid list on extreme right
pause pauses at end of each 6hr segment for debug...
bda if present, use available BDA files (Def is OBS log)
ref if present, uses files of ref directories (FLARE machines)
OUTPUTS:
OPTIONAL OUTPUTS:
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CLEAR_UTPLOT [1]
CLEAR_UTPLOT [2], DATA_PATHS, Ex2Int [1], Ex2Int [2], GOOD_MAX [1], GOOD_MAX [2]
Int2Ex [1], Int2Ex [2], OUTPLOT [1], OUTPLOT [2], OUTPLOT [3], PS_LONG [1]
PS_LONG [2], PS_LONG [3], PS_RESET [1], PS_RESET [2], PS_RESET [3], Rd_Roadmap [2]
Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SET_XY, TRIM, UTPLOT [1], UTPLOT [2]
UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], YOHKOH_EVENTS, anytim2ints [1]
anytim2ints [2], bcs_channels, break_file [4], clearplot [1], clearplot [2]
fid2ex [1], fid2ex [2], file_list [1], file_list [2], fmt_tim [1], fmt_tim [2]
gt_total_cnts [1], gt_total_cnts [2], int2secarr [1], int2secarr [2], rd_obs
rd_roadmap [1], timstr2ex [1], timstr2ex [2], week_loop [1], week_loop [2]
week_loop [3]
CALLED BY:
BCS_BROWSE24, MANY_DAYS
RESTRICTIONS:
uses the common block UTCOMMON from UTPLOT
produces common block FILES_24HR,inff,nffq,ffff
PROCEDURE:
Reads the ROADMAP from all the files and plots the curve.
MODIFICATION HISTORY:
CDP May 92 Written
RDB Jun 92 Reworked to include SAA and Night, and improve
plot scaling; Fixed some titles; Get first file.
RDB 19-Jun-92 Fixed file search for UNIX by using FILE_LIST.
RDB 21-jun-92 Various improvments for data gaps
RDB 22-Jun-92 Modified plot of YOHKOH_EVENTS arrays
Input date can also be yymmdd format
Extra checks when few data files
FILES switch option
RDB 23-Jun-92 Few extra catches for improper data
PAUSE switch option
RDB 30-Jun-92 Modified peak search routine
RDB 1-Jul-92 Set !p.psym=0 at start in case UTPLOT had screwed up
RDB 6-Jul-92 Map the use of BLOCKID in roadmap
NOBID keyword
RDB 7-Jul-92 Corrected error in qx logic - file at end of
day could make code think one at end of this day
Get file headers when FILES switch used
RDB 9-Jul-92 Corrected selection of orbit at end of prev. day
RDB 22-Jul-92 Added CLEARPLOT at end
RDB 30-Oct-92 Increased size of chars on plot
RDB 11-Nov-92 Added CLEAR_UTPLOT, and changed way letter size incr.
RDB 18-Nov-92 Modified to use OBServing log if /OBS switch used.
Also, supress compressed files (_Z or .Z) when using
the BDA roadmaps.
CDP Apr-93 Tidy header documentation.
RDB 26-May-93 Modified to use new OBD files - BCS part of obs. log
Some error message printed if not nobid
RDB 13-Jul-93 Made window larger on x-windows display
Corrected fault where files not listed under /obs
RDB 6-Aug-93 Switched so uses OBS logs by default.
Removed /obs, installed /bda
RDB 11-Aug-93 Put clearplot, etc at start, those at end conditional
RDB 24-Sep-93 Added Channel to main title
RDB 4-Jan-94 Still plot page even if no data on given date
Some reorganization in prep. for plotting other instruments.
RDB 5-Jan-94 Fixed problem in OBS logs if previous day missing
RDB 11-Jan-94 Declare which week data in for OBS plot
RDB 7-Mar-94 Modified to fix errors that resulted after updates to UTPLOT...
RDB 14-Mar-94 Corrected one of fixes of 7-Mar-94...
RDB 17-Nov-94 Corrected logic error in plotting file markers using OBS
RDB 10-Feb-95 Improved file seach on flare machines (ref keyword)
Improved plot of saa and night bars
[Previous]
[Next]
NAME:
BCS_ACCUM
PURPOSE:
to accumulate spectra in BDA data array
CALLING SEQUENCE:
BCS_ACCUM,BDA_INDEX,BDA_DATA,BSC_INDEX,BSC_DATA,DT_FAC=DT_FAC
INPUTS:
BDA_INDEX - BDA index structure
BDA_DATA - BDA data in [4,*] array
BSC_INDEX - BSC_INDEX created by MKBSA
KEYWORDS:
DT_FAC - Dead-time correction factors in [4,*] array
VERBOSE - be verbose
OUTPUTS:
BSC_DATA - accumulated BSC data structure with spectra in .COUNTS
BSC_INDEX - updated BSC_INDEX
CALLED BY:
MK_BSC_DATA [1], MK_BSC_DATA [2]
PROCEDURE:
Uses information in BSC_INDEX to determine
how BDA spectral data will be accumulated
If DTFAC is a [4,*] array then the BDA data will
be dead-time corrected before each accumulation.
CALLS: ***
BCS_DECOMP, DATATYPE [1], DATATYPE [2], DATATYPE [3], MK_BSC_STR [1]
MK_BSC_STR [2], ext_bcschan [1], ext_bcschan [2], gt_day [1], gt_day [2]
gt_time [1], gt_time [2]
RESTRICTIONS:
Records with zero dead-time correction factors are
not accumulated.
Spectra are not degrouped nor corrected for S/C
pointing shifts and offsets.
HISTORY:
Written Oct. 1992 by D. Zarro (Applied Research Corp).
Modified Apr'93 (DMZ,ARC) - cleaned up deadtime
Modified Feb'95 (DMZ,ARC) - added call to EXT_BCSCHAN
Modified Apr'95 (DMZ,ARC) - fixed bug for single spectrum case
18-Dec-95 (DMZ, ARC) - ensure that default channel bins
are used when NBINS=0
14-Mar-97 (DMZ, ARC) - added /verbose
[Previous]
[Next]
NAME:
BCS_ACCUM
PURPOSE:
to accumulate spectra in BDA data array
CALLING SEQUENCE:
BCS_ACCUM,BDA_INDEX,BDA_DATA,BSC_INDEX,BSC_DATA,DT_FAC=DT_FAC
INPUTS:
BDA_INDEX - BDA index structure
BDA_DATA - BDA data in [4,*] array
BSC_INDEX - BSC_INDEX created by MKBSA
KEYWORDS:
DT_FAC - Dead-time correction factors in [4,*] array
OUTPUTS:
BSC_DATA - accumulated BSC data structure with spectra in .COUNTS
BSC_INDEX - updated BSC_INDEX
CALLED BY:
MK_BSC_DATA [1], MK_BSC_DATA [2]
PROCEDURE:
Uses information in BSC_INDEX to determine
how BDA spectral data will be accumulated
If DTFAC is a [4,*] array then the BDA data will
be dead-time corrected before each accumulation.
CALLS: ***
BCS_DECOMP, DATATYPE [1], DATATYPE [2], DATATYPE [3], MK_BSC_STR [1]
MK_BSC_STR [2], ext_bcschan [1], ext_bcschan [2], gt_day [1], gt_day [2]
gt_time [1], gt_time [2]
RESTRICTIONS:
Records with zero dead-time correction factors are
not accumulated.
Spectra are not degrouped nor corrected for S/C
pointing shifts and offsets.
HISTORY:
Written Oct. 1992 by D. Zarro (Applied Research Corp).
Modified Apr'93 (DMZ,ARC) - cleaned up deadtime
Modified Feb'95 (DMZ,ARC) - added call to EXT_BCSCHAN
Modified Apr'95 (DMZ,ARC) - fixed bug for single spectrum case
18-Dec-95 (DMZ, ARC) - ensure that default channel bins
are used when NBINS=0
[Previous]
[Next]
NAME:
BCS_ADD-GOES
PURPOSE:
Combine the raw BCS catalogue file and GOES listing.
CALLING SEQUENCE:
IDL> bcs_add_goes, 'bcs_file', 'goes_file', 'outfile'
INPUTS:
bcs_file - the output from procedure BCS_CAT
goes-file - the output from procedure PR_GEV with outfile option
OPTIONAL INPUT PARAMETERS:
None
KEYWORD PARAMETERS:
None
OUTPUTS:
outfile - the final BCS catalogue file, can be read by BCS_LOAD_CAT
OPTIONAL OUTPUT PARAMETERS:
None
CALLS: ***
BCS_ADD_GOES, Bell, Ex2Int [1], Ex2Int [2], anytim2ex [1], anytim2ex [2]
PROCEDURE:
Reads each input file in its own format and converts times etc to
standard format and looks for GOES events within the BDA file timespan
Outputs a line for each GOES event that is within a BDA file ie. BDA
files may appear more than once in the list.
MODIFICATION HISTORY:
Written CDP Feb 1993
[Previous]
[Next]
NAME: bcs_bpc2c.pro
PURPOSE: fix missing two component fits
CALLING SEQUENCE: bcs_bpc2c,data,chan,specrange
INPUTS: data - bpc_structure
chan - 0,3 bcs channel
specrange - array of subscripts
OPTIONAL INPUTS: none
OUTPUTS: none
OPTIONAL OUTPUTS: none
CALLED BY:
BCS_FIXBPC
RESTRICTIONS: nearest neighbour method. see bcs_bpcfs for details
PROCEDURE: if missing 2 component find closest spectrum that
has one - transfer + scale intensities
MODIFICATION HISTORY: atp 1993 from hacked version of do_2_comp.pro
[Previous]
[Next]
NAME: bcs_bpcckspec
PURPOSE: superficial check of bpc spectral data
CALLING SEQUENCE: bcs_bpcckspec,data,channel,specrange
INPUTS: data - bpc_structure
channel - 0-3 channel
specrange - array of spectra subscripts
OPTIONAL INPUTS: none
OUTPUTS: none
OPTIONAL OUTPUTS: none
CALLED BY:
BCS_FIXBPC
RESTRICTIONS: -
PROCEDURE: loop through specrange. - depending on channel
check validity of options.
MODIFICATION HISTORY: written atp 1993
[Previous]
[Next]
NAME: bcs_bpcfs.pro
PURPOSE: fill in missing spectra
CALLING SEQUENCE: bcs_bpcfs,bpc_struct,chan,specrange
INPUTS: bpc_structure,channel(0-3),
specrange(0-n_elements(bpc_structure))
OPTIONAL INPUTS: none
OUTPUTS: report on changes to bpc_struct
OPTIONAL OUTPUTS: none
CALLS: ***
Ex2Int [1], Ex2Int [2], Int2Ex [1], Int2Ex [2]
CALLED BY:
BCS_FIXBPC
RESTRICTIONS: SDGI must not change across missing spectra.
data are not interpolated, just copied.
uses nlines as a test for existence, this
is fooled sometimes.
PROCEDURE: find the gaps, find the closest neighbour
and guess the correct time
MODIFICATION HISTORY: cleaned up (!) version of fil_spec atp 1993
[Previous]
[Next]
NAME:
bcs_broad
PURPOSE:
Return Gaussian FWHM for a specified Doppler Temperature
or
Return the Doppler Temperature for a specified FWHM
or
Return the Doppler Velocity
CALLING SEQUENCE:
-- In --
GAUSSW = bcs_broad(Chan,ROCKW=ROCKW) ; (Null)
Td6 = bcs_broad(Chan,wave,DOPPW=DOPPW) ; DOPPW (No GAUSSW)
Td6 = bcs_broad(Chan,wave,TDOPPW=TDOPPW) ; TDOPPW (includes GAUSSW)
Td6 = bcs_broad(Chan,wave,OBSW=OBSW) ; OBSW (Observed FWHM)
TDOPPW = bcs_broad(Chan,wave,Td6=Td6,/Gauss) ; Td6
TDOPPW = bcs_broad(Chan,wave,DOPPW=DOPPW,/Gauss) ; DOPPW (No GAUSSW)
TDOPPW = bcs_broad(Chan,wave,OBSW=OBSW,/Gauss) ; OBSW (Observed FWHM)
Vel = bcs_broad(Chan,wave,Td6=Td6,/vel) ; Td6
Vel = bcs_broad(Chan,wave,DOPPW=DOPPW,/vel) ; DOPPW (No GAUSSW)
Vel = bcs_broad(Chan,wave,TDOPPW=TDOPPW,/vel) ; TDOPPW (includes GAUSSW)
Vel = bcs_broad(Chan,wave,OBSW=OBSW,/vel) ; OBSW (Observed FWHM)
RETURNS:
Depending on the /vel, /Gauss or /Temp (default) control switches, returns
Td6 (Doppler Temperature in MK), TDOPPW (Ang, total Gaussian width) or
Vel (km/s, the Doppler velocity).
If only chan is specfied, then returns
GAUSSW = (Ang) Instrumental Gaussian Broadening (FWHM)
INPUTS:
Chan = BSC Channel structure or
chan number (1 to 4) 1=Fe XXVI, 2=Fe XXV, 3=Ca XIX, 4= S XV
(Must be a scalar)
OPTIONAL INPUTS:
wave = The wavelength at which the quantity is desired (may be a vector)
(If not specified, uses w-line wavelength for requested channel)
OPTIONAL INPUT KEYWORDS:
Input data (These are mutually exclusive)
Td6 = (MK) Doppler Broadening Temperature
DOPPW = (Ang) Gaussian Broadening (doesn't include instrumental)
TDOPPW = (Ang) = sqrt( DOPPW^2 + GAUSSW^2 )
OBSW = (Ang) Observed FWHM of the Voight Profile
Control switches (These are mutually exclusive):
/Temp = to return temperature (this is the default)
/Gauss = to return TDOPPW
/Vel = to return velocities
Note 1: Td6, DOPPW, TDOPPW, OBSW are mutually exclusive
Note 2: Td6, DOPPW, TDOPPW, and OBSW may be vectors, but must equal
the length of wave or wave must be a scalar.
Note 3: /Temp, /Gauss, and /Vel are mutually exclusive
OPTIONAL OUTPUT KEYWORDS:
ROCKW = (Ang) Crystal Rocking Curve (output) (FWHM)
bincal = The BCS calibration structure -- e.g., contains rocking width
CALLS: ***
DOC_LIBRARY, GT_BSC_BINCAL [1], GT_BSC_BINCAL [2], GT_BSC_CHAN [1]
GT_BSC_CHAN [2], get_atomic [1], get_atomic [2]
CALLED BY:
bcs_funct, bcs_spec, bcs_velres, bsc_vturb, cal_bsc, fit_bsc, fit_bsc_as, fit_bsc_plot
get_bsc_anno
MODIFICATION HISTORY:
18-sep-93, J. R. Lemen (LPARL), Written.
4-Mar-94, Zarro (ARC) ensured that Td6 > 0
16-Mar-98, Zarro (SAC) ensured that ROCKW < OBSW
[Previous]
[Next]
NAME:
bcs_broad
PURPOSE:
Return Gaussian FWHM for a specified Doppler Temperature
or
Return the Doppler Temperature for a specified FWHM
or
Return the Doppler Velocity
CALLING SEQUENCE:
-- In --
GAUSSW = bcs_broad(Chan,ROCKW=ROCKW) ; (Null)
Td6 = bcs_broad(Chan,wave,DOPPW=DOPPW) ; DOPPW (No GAUSSW)
Td6 = bcs_broad(Chan,wave,TDOPPW=TDOPPW) ; TDOPPW (includes GAUSSW)
Td6 = bcs_broad(Chan,wave,OBSW=OBSW) ; OBSW (Observed FWHM)
TDOPPW = bcs_broad(Chan,wave,Td6=Td6,/Gauss) ; Td6
TDOPPW = bcs_broad(Chan,wave,DOPPW=DOPPW,/Gauss) ; DOPPW (No GAUSSW)
TDOPPW = bcs_broad(Chan,wave,OBSW=OBSW,/Gauss) ; OBSW (Observed FWHM)
Vel = bcs_broad(Chan,wave,Td6=Td6,/vel) ; Td6
Vel = bcs_broad(Chan,wave,DOPPW=DOPPW,/vel) ; DOPPW (No GAUSSW)
Vel = bcs_broad(Chan,wave,TDOPPW=TDOPPW,/vel) ; TDOPPW (includes GAUSSW)
Vel = bcs_broad(Chan,wave,OBSW=OBSW,/vel) ; OBSW (Observed FWHM)
RETURNS:
Depending on the /vel, /Gauss or /Temp (default) control switches, returns
Td6 (Doppler Temperature in MK), TDOPPW (Ang, total Gaussian width) or
Vel (km/s, the Doppler velocity).
If only chan is specfied, then returns
GAUSSW = (Ang) Instrumental Gaussian Broadening (FWHM)
INPUTS:
Chan = BSC Channel structure or
chan number (1 to 4) 1=Fe XXVI, 2=Fe XXV, 3=Ca XIX, 4= S XV
(Must be a scalar)
OPTIONAL INPUTS:
wave = The wavelength at which the quantity is desired (may be a vector)
(If not specified, uses w-line wavelength for requested channel)
OPTIONAL INPUT KEYWORDS:
Input data (These are mutually exclusive)
Td6 = (MK) Doppler Broadening Temperature
DOPPW = (Ang) Gaussian Broadening (doesn't include instrumental)
TDOPPW = (Ang) = sqrt( DOPPW^2 + GAUSSW^2 )
OBSW = (Ang) Observed FWHM of the Voight Profile
Control switches (These are mutually exclusive):
/Temp = to return temperature (this is the default)
/Gauss = to return TDOPPW
/Vel = to return velocities
Note 1: Td6, DOPPW, TDOPPW, OBSW are mutually exclusive
Note 2: Td6, DOPPW, TDOPPW, and OBSW may be vectors, but must equal
the length of wave or wave must be a scalar.
Note 3: /Temp, /Gauss, and /Vel are mutually exclusive
OPTIONAL OUTPUT KEYWORDS:
ROCKW = (Ang) Crystal Rocking Curve (output) (FWHM)
bincal = The BCS calibration structure -- e.g., contains rocking width
CALLS: ***
DOC_LIBRARY, GT_BSC_BINCAL [1], GT_BSC_BINCAL [2], GT_BSC_CHAN [1]
GT_BSC_CHAN [2], get_atomic [1], get_atomic [2]
CALLED BY:
bcs_funct, bcs_spec, bcs_velres, bsc_vturb, cal_bsc, fit_bsc, fit_bsc_as, fit_bsc_plot
get_bsc_anno
MODIFICATION HISTORY:
18-sep-93, J. R. Lemen (LPARL), Written.
4-Mar-94, Zarro (ARC) ensured that Td6 > 0
[Previous]
[Next]
NAME:
BCS_BROWSE24
PURPOSE:
Runs bcs_24hr_plot over a period of many days
Allows cursor to be used on Xwindows device to identify/log file
CALLING SEQUENCE:
bcs_browse24,date,ndays
INPUTS:
date start date for plots
ndays number of days to be plotted
KEYWORD INPUTS:
nbid if set, no blockid will be output (see BCS_24HR_PLOT)
print if set, plots are sent to PS printer
bda if set, BDA files are used
OUTPUTS:
creates and prints plot file if to PS device
OPTIONAL OUTPUTS:
appends to log file if one specfified
CALLS: ***
BCS_24HR_PLOT [1], BCS_24HR_PLOT [2], BCS_24HR_PLOT [3], CURSOR_4X6HR
Ex2Int [1], Ex2Int [2], Int2Ex [1], Int2Ex [2], anytim2ex [1], anytim2ex [2]
ex2fid [1], ex2fid [2], fmt_tim [1], fmt_tim [2], pprint [1], pprint [2]
timstr2ex [1], timstr2ex [2]
RESTRICTIONS:
Only pauses between plots on Xterminals
Log option with cursor only logs if a file is defined in
environment variable/logical "CUR24LOG".
PROCEDURE:
Calls BCS_24HR_PLOT for each day requested. NBID and BDA switches
are passed.
MODIFICATION HISTORY:
CDP Aug 92
RDB 27-Oct-92 Added NOBID switch
RDB 04-Oct-93 Added /BDA to call to BCS_24HR_PLOT since now
defaults to OBServing logs.
RDB 17-Jan-94 Renamed BCS_BROWSE24 (was many_days)
Modified BDA (added switch), added PRINT switch
Added cursor file ident. with logging.
[Previous]
[Next]
NAME:
BCS_CAT
PURPOSE:
To give information on the maximum count rate etc. in BDA files.
CALLING SEQUENCE:
BCS_CAT,data_file_name [,catalogue_file]
INPUT:
DATA_FILE_NAME Specifies the file(s) to be inspected. Do not include
directories (standard data search paths used). Wild
cards can be included.
CATALOGUE_FILE if specified, gives the output file for the catalogue
information. Default = 'BCS_CAT.DAT'
OUTPUT:
Information is stored in the output file.
USE: bcs_cat,'bda9110*.*' catalogue the files of Oct 91
in the default output file
bcs_cat.dat
bcs_cat,'bda91*.*','all_91.dat' catalogue 1991 data files and
output to file all_91.dat
HISTORY
CDP February 1993 Written
CDP Update to fit into scheme of bcs_create_cat Apr 93
CALLS:
CALLED BY
BCS_CREATE_CAT
[Previous]
[Next]
Function to pick up the current bin limits for each channel in the
data record being used
Input:
index - the standard index structure from access routines
dataset - the number of the dataset that is taken as the std
Returned:
returns a vector (8 elements) containing start stop bins
for each spectrum
Use:
IDL> chans = bcs_chan_rng(index,dataset)
CDP March 92
CALLED BY
bcs_survey
[Previous]
[Next]
Function to return title of channel in use.
Calling: chan_name = bcs_channels(n) (where n=0,3)
Returned: Fe XXVI, Fe XXV, Ca XIX, S XV (as n=0,3)
CALLED BY:
BCS_24HR_PLOT [1], BCS_24HR_PLOT [3], BCS_SPMOVIE [1], BCS_SPMOVIE [2], LIST_BDA
OBS_PLOT, bcs_survey
History: RDB?
[Previous]
[Next]
NAME:
bcs_chi_norm
PURPOSE:
compute level 1 fit given te6, td6, and wshift to compute em50 and cnorm
CALLING SEQUENCE:
fit=bcs_chi_norm(wave,flux,eflux,fit_par)
INPUTS:
wave - wavelength array
flux - flux array
eflux - error in flux
fit_par - [chan,te6,td6,em50,wshift,cnorm] - first guess
OUTPUTS:
fit - level 1 fitted spectrum
OPTIONAL KEYWORDS:
subs(in) - indicies for chi^2 calculation
waveo(out) - wavelength centers of computed flux
chi2 (out) - chi^2 for fit
ainfo (out) - atomic information
nfree (out) - no. of free parameters
CALLS: ***
CHI_NORM [1], CHI_NORM [2], CHKARG, UNIQ [1], UNIQ [2], UNIQ [3], bcs_spec
CALLED BY:
fit_bsc, fit_bsc_as
PROCEDURE:
calls CHI_NORM to compute best fit em50 and cnorm
HISTORY:
Oct'93, D. Zarro (ARC) - written
28 Oct'93, Zarro - fixed bug in fit_par
17 Feb'94, Zarro - added check for unique values of sub
[Previous]
[Next]
NAME:
BCS_CLEAN
PURPOSE:
to clean BDA INDEX (or ROADMAP) of records with
mode/block id changes and SAA/NIGHT transitions
CALLING SEQUENCE:
clean=bcs_clean(bda_index)
INPUTS:
bda_index - BDA index (or roadmap) structure
OUTPUTS:
clean - index vector of clean records
KEYWORDS:
modeid - modeid to filter out (def = none)
blockid - blockid to filter out (def = none)
err - 1 if no clean records found, 0 otherwise
CALLS: ***
COMDIM2
CALLED BY:
WBDA [1], WBDA [2]
PROCEDURE:
Uses simple WHERE on MODEID, BLOCKID, and BCS_STATUS
fields in structure
HISTORY:
Written, Nov. 1992 by D. Zarro (Applied Research Corp).
Modified, Jan 1995 by Zarro to accept all BLOCKIDS
[Previous]
[Next]
NAME:
BCS_CLEAN
PURPOSE:
to clean BDA INDEX (or ROADMAP) of records with
mode/block id changes and SAA/NIGHT transitions
CALLING SEQUENCE:
clean=bcs_clean(bda_index)
INPUTS:
bda_index - BDA index (or roadmap) structure
OUTPUTS:
clean - index vector of clean records
KEYWORDS:
modeid - modeid to filter out (def = none)
blockid - blockid to filter out (def = none)
err - 1 if no clean records found, 0 otherwise
CALLS: ***
COMDIM2
CALLED BY:
WBDA [1], WBDA [2]
PROCEDURE:
Uses simple WHERE on MODEID, BLOCKID, and BCS_STATUS
fields in structure
HISTORY:
Written, Nov. 1992 by D. Zarro (Applied Research Corp).
Modified, Jan 1995 by Zarro to accept all BLOCKIDS
[Previous]
[Next]
NAME:
bcs_clock_fix
PURPOSE:
Use one BCS clock "tie" point which covers many days, even though
the BCS clock rolls over every 2.2 hours and there is a 0.2 sec
per day drift in the clock. It was needed because an SEU caused
BCS clock value to be unavailable from 16-Jul-92 17:00 to
20-Jul-92 14:50. The output does correct for the 0.2 sec per day
drift.
INPUT:
daytim - 7 element time of current major frame
OUTPUT:
bcs_clock_ref- A structure with the reference day/time and the
derived BCS clock value for that time
CALLS: ***
anytim2ints [1], anytim2ints [2], fmt_tim [1], fmt_tim [2], int2secarr [1]
int2secarr [2]
HISTORY:
Written 22-Jul-92 by M.Morrison
[Previous]
[Next]
NAME:
BCS_COMP
PURPOSE:
Compresses real*4 data to 8-bit using BCS compression scheme
CALLING SEQUENCE:
dd = bcs_comp(data)
INPUTS:
data floating array of data
OPTIONAL INPUTS:
OUTPUTS:
dd compressed 8-bit array
OPTIONAL OUTPUTS:
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], concat_dir [4]
file_exist [1], file_exist [3], restgen [1], restgen [2]
RESTRICTIONS:
Not sure that routine totally correct. Certainly recompresses
correctly, but boundaries may be slightly out...
PROCEDURE:
MODIFICATION HISTORY:
RDB 25-Oct-92 Written
RDB 3-Sep-94 Allow scaler value to be decompressed
SLF 6-Jan-95 Rewrote to use table (.genx file) look up
Common Block:
bcs_comp_blk store table after 1st read
[Previous]
[Next]
NAME: BCS_COMPARE
PURPOSE:
To compare the total counts in 2 channels (chan_a & chan_b)
and to produce a list of files for which
max_count(chan_a) <= N * max_count(chan_b)
CALLING SEQUENCE:
BCS_COMPARE,'file_name',chan_a,chan_b,factor
INPUT:
FILENAME Specifies the file(s) to be inspected. Do not include
directories (standard data search paths used). Wild
cards can be included.
CHAN_A First channel
CHAN_B Second channel
FACTOR Factor to check by
OUTPUT:
None
USE: BCS_COMPARE,'filename',4,3,3 will list files for which
SXV count is <= 3*CaXIX
HISTORY
CDP August 1992 Written
CALLS:
[Previous]
[Next]
NAME:
BCS_CONT
PURPOSE:
Plots contour map of BCS spectra (x-axis) against time (y-axis)
CALLING SEQUENCE:
BCS_CONT,index,data
INPUTS:
index index structure corresponding to data
data data array
KEYWORD INPUTS:
chan channel number to be plotted [Def = 3, Ca XIX]
range start and stop elements of data array to be plotted
bins limit of bin numbers to plot within the channel
smooth if set, the data is smoothed
decomp if set, the data is decompressed - it is also scaled
by the integration time (including fast-queue data!)
(Note: plotting in compressed counts can help with
low level features)
OUTPUTS:
OPTIONAL OUTPUTS:
CALLS: ***
BCS_DECOMP, BCS_NORM, Int2Ex [1], Int2Ex [2], anytim2ints [1], anytim2ints [2]
ext_bcschan [1], ext_bcschan [2], fmt_tim [1], fmt_tim [2]
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
04-Apr-92 RDB Written
27-Sep-92 RDB Paramater order changed, etc.
22-Oct-92 RDB Changed bin selection to ext_bcschan; major revamp
25-Oct-92 RDB Rounded time limits to nearest 20 sec before/after
14-Nov-97 rdb Exit if requested channel not found
[Previous]
[Next]
NAME:
BCS_CONT
PURPOSE:
Plots contour map of BCS spectra (x-axis) against time (y-axis)
CALLING SEQUENCE:
BCS_CONT,index,data
INPUTS:
index index structure corresponding to data
data data array
KEYWORD INPUTS:
chan channel number to be plotted [Def = 3, Ca XIX]
range start and stop elements of data array to be plotted
bins limit of bin numbers to plot within the channel
smooth if set, the data is smoothed
decomp if set, the data is decompressed - it is also scaled
by the integration time (including fast-queue data!)
(Note: plotting in compressed counts can help with
low level features)
OUTPUTS:
OPTIONAL OUTPUTS:
CALLS: ***
BCS_DECOMP, BCS_NORM, Int2Ex [1], Int2Ex [2], anytim2ints [1], anytim2ints [2]
ext_bcschan [1], ext_bcschan [2], fmt_tim [1], fmt_tim [2]
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
04-Apr-92 RDB Written
27-Sep-92 RDB Paramater order changed, etc.
22-Oct-92 RDB Changed bin selection to ext_bcschan; major revamp
25-Oct-92 RDB Rounded time limits to nearest 20 sec before/after
[Previous]
[Next]
NAME:
BCS_CONV
PURPOSE:
Converts Intel-hex ouput of cross-assembler to various loads
CATEGORY:
CALLING SEQUENCE:
.run bcs_conv
INPUTS:
used specified .hex files
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
OUTPUTS:
creates ".hgs" (NEC patch format) and ".hcx" (dc and bc commands)
files on current directory
OPTIONAL OUTPUT PARAMETERS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
RDB Autumn-90 Written, modelled on ROSAT WFC code
RDB 5-May-94 "PROG WRITE" only on new address segment
made hex chars lower case in .hcx file
RDB 17-May-94 Changed "BCS-" to "07-", the BCS instrument code
Documented.
[Previous]
[Next]
NAME:
BCS_CPU_STRUCT
PURPOSE:
Defines structures used by BCS micro management routines
CATEGORY:
CALLING SEQUENCE:
bcs_cpu_struct
INPUTS:
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
OUTPUTS:
OPTIONAL OUTPUT PARAMETERS:
CALLED BY:
BCS_GRP_PLAN, RD_PLAN_AREA
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
Call before structures needed
MODIFICATION HISTORY:
RDB Autumn-91
RDB 17-May-94 This doumentation.
(Command code changed to .planid for reformatter compatability)
[Previous]
[Next]
NAME:
BCS_CREATE_CAT
PURPOSE:
Create BCS catalogue of maximum counts and associated GOES events
CALLING SEQUENCE:
IDL> bcs_create_cat, bda_file_spec, catalogue_file [,/keep]
INPUTS:
bda_file_spec - the specification of the BDA files to be used
can use wild cards (standard search path used)
eg. 'BDA9302*.*' will catalogue Feb 93
OPTIONAL INPUT PARAMETERS:
None
KEYWORD PARAMETERS:
Keep - if present, the temporary BCS and GOES lists
will not be deleted.
OUTPUTS:
catalogue_file - name of catalogue file to be created
OPTIONAL OUTPUT PARAMETERS:
None
CALLS: ***
BCS_ADD_GOES, BCS_CAT, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], Bell
DATA_PATHS, Ex2Int [1], Ex2Int [2], Int2Ex [1], Int2Ex [2], break_file [4]
fid2ex [1], fid2ex [2], file_list [1], file_list [2], fmt_tim [1], fmt_tim [2]
pr_gev
PROCEDURE:
Packages the cataloguing routines to do the whole process
MODIFICATION HISTORY:
Written: CDP April 93
[Previous]
[Next]
Program: BCS_DECOMP
purpose: Decompression program for Solar_A BCS.
Given a compressed value of counts in a bin, produce
a true value of input counts.
Uses a compression scheme of "constant error" designed by
AF, produced by programm SCHEME_CONSTANT.PRO and
programmed into EPROM on 5-Dec-1990 by Ian Belchamber.
The maximum relative error (true-decompressed)/decompressed
of this scheme is:
0 for decompressed values less or equal to 35.
+- 0.0138 for decompressed values between 36.5 and 23724
(true input counts between 36 and 24051)
+- 0.002 for decompressed values between 24100 and 65431
(true input counts between 24052 and 65535)
The range of true values corresponding to the compressed
value j is then (rounded to the nearest integer):
from (1 - error)*value(j) to (1 + error)*value(j)
where 'error' is one of the above values 0, 0.0138, 0.002
input: J = a scalar value or an array of integer compressed values
A real number will be truncated to an integer.
IWRAP: a scalar value, indicates whether normal
decompression or wrapped around
set iwrap to 24052 when wrapped around (to anything else
when normal compression)
output: VALUE = an array of decompressed counts.
CALLED BY:
ANAL_STIMS, BCS_ACCUM [1], BCS_ACCUM [2], BCS_CONT [1], BCS_CONT [2]
BCS_DSPEC [1], BCS_DSPEC [2], BCS_MULTI [1], BCS_MULTI [2], BCS_SPMOVIE [1]
BCS_SPMOVIE [2], WBDA [1], WBDA [2], get_peak, plot_ref
history:
AF, MSSL 5-Dec-1990 written:
RDB Feb 1991 made into a function
RDB 18-Feb-91 renamed from DECOMPRESS to BCS_DECOMP
[Previous]
[Next]
Name:
bcs_do_diff
Purpose:
Do the difference between two DP_SYNC values
and check that there was no rollover in the
counter (val1-val2)
Input:
val1 - assumed to already be INTEGER*4
val2
Output:
bcs_do_diff - counts for that interval
History:
Written Oct-91 by M.Morrison
[Previous]
[Next]
NAME:
BCS_DP_CHECK
PURPOSE:
check that DP_SYNC and BCS times overlap
CALLING SEQUENCE:
OK=BCS_DP_CHECK(DP_SYNC,BDA_INDEX)
INPUTS:
DP_SYNC - DP_SYNC structure
BDA_INDEX - BDA index structure
OUTPUTS:
OK - 1 if overlap, 0 otherwise
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], gt_day [1], gt_day [2], gt_time [1]
gt_time [2]
CALLED BY:
bcs_dtfac [1], bcs_dtfac [2]
PROCEDURE:
simple check on min and max times
HISTORY:
Written Apr'93 (DMZ, ARC)
[Previous]
[Next]
Procedure to find which dp_sync records correspond to a given BCS roadmap
entry (within one dgi)
Input:
dp_sync usual dp_sync structure
roadmap usual roadmap structure
rm_idx array of indices corrsponding to entries in roadmap
for which a match in dp_sync in required
Output:
dp_idx(n,2) array of indices for which dp_sync time is within
the roadmap dgi. It is created with the size
(n_elements(roadmap.time),2) for convenience.
dp_idx(i,0) = first dp_sync datum in range
dp_idx(i,1) = last dp_sync satum in range
if no dp_sync datum corresponding to the roadmap
time interval is found then the dp_idx entries
are set to -1.
Use:
IDL> bcs_dp_sync,dp_sync,roadmap,rm_idx,dp_idx
Performance: Takes approx 25 secs to correlate a 1000 indices array.
Any suggestions for speed-up would be welcome.
CDP March 92
DMZ Oct 92 -- modified to accept DGI from BCS index (as well as ROADMAP)
CALLED BY
bcs_dtfac [1], bcs_dtfac [2]
[Previous]
[Next]
NAME:
BCS_DSPEC
PURPOSE:
Extracts, decompresses and normalizes the data for a single
channel from the BDA data array
CATEGORY:
CALLING SEQUENCE:
cspec = bcs_dspec(index,data)
cspec = bcs_dspec(index,data,chan=n)
cspec = bcs_dspec(index,data,ss=ss,new_index=cindex)
INPUTS:
index BDA index structure
data BDA data array
KEYWORD INPUT PARAMETERS:
chan channel to be extracted (def=3, Ca XIX)
ss vector of sub-array of times to be extracted
OUTPUTS:
array contains decompressed, normalized counts for selected channel
KEYWORD OUTPUT PARAMETERS:
new_index sub-array of index correspending to ss vector
CALLS: ***
BCS_DECOMP, BCS_NORM, ext_bcschan [1], ext_bcschan [2]
COMMON BLOCKS:
none
SIDE EFFECTS:
Last bin of data array of channel removed. This is catch-all for
position encodes whose total energy is marginal
RESTRICTIONS:
Only works on BDA data
PROCEDURE:
In approximation does:
cdata = bcs_norm(index,bcs_decomp(ext_bcschan(index,data,channel)))
MODIFICATION HISTORY:
RDB 7-Jan-94 Written
RDB 14-Nov-97 Exit if requested channel is not present
[Previous]
[Next]
NAME:
BCS_DSPEC
PURPOSE:
Extracts, decompresses and normalizes the data for a single
channel from the BDA data array
CATEGORY:
CALLING SEQUENCE:
cspec = bcs_dspec(index,data)
cspec = bcs_dspec(index,data,chan=n)
cspec = bcs_dspec(index,data,ss=ss,new_index=cindex)
INPUTS:
index BDA index structure
data BDA data array
KEYWORD INPUT PARAMETERS:
chan channel to be extracted (def=3, Ca XIX)
ss vector of sub-array of times to be extracted
OUTPUTS:
array contains decompressed, normalized counts for selected channel
KEYWORD OUTPUT PARAMETERS:
new_index sub-array of index correspending to ss vector
CALLS: ***
BCS_DECOMP, BCS_NORM, ext_bcschan [1], ext_bcschan [2]
COMMON BLOCKS:
none
SIDE EFFECTS:
Last bin of data array of channel removed. This is catch-all for
position encodes whose total energy is marginal
RESTRICTIONS:
Only works on BDA data
PROCEDURE:
In approximation does:
cdata = bcs_norm(index,bcs_decomp(ext_bcschan(index,data,channel)))
MODIFICATION HISTORY:
RDB 7-Jan-94 Written
[Previous]
[Next]
NAME:
BCS_DT_INTERP
PURPOSE:
interpolate out zero deadtime correction factors
CALLING SEQUENCE:
DTFAC=BCS_DT_INTERP(DTFAC,BDA_INDEX)
INPUTS:
DTFAC - [4,*] deadtime correction factors from BCS_DTFAC
BDA_INDEX - BDA index structure
OUTPUTS:
DT_FAC - interpolated correction factors for all BSC channels
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], INTERPOL, gt_day [1], gt_day [2]
gt_time [1], gt_time [2]
CALLED BY:
bcs_dtfac [1], bcs_dtfac [2]
PROCEDURE:
Uses INTERPOL
HISTORY:
Written Apr'93 (DMZ, ARC)
Modified, Mar'97 (DMZ, ARC) - abort interp if too
few points
[Previous]
[Next]
NAME:
BCS_DT_INTERP
PURPOSE:
interpolate out zero deadtime correction factors
CALLING SEQUENCE:
DTFAC=BCS_DT_INTERP(DTFAC,BDA_INDEX)
INPUTS:
DTFAC - [4,*] deadtime correction factors from BCS_DTFAC
BDA_INDEX - BDA index structure
OUTPUTS:
DT_FAC - interpolated correction factors for all BSC channels
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], INTERPOL, gt_day [1], gt_day [2]
gt_time [1], gt_time [2]
CALLED BY:
bcs_dtfac [1], bcs_dtfac [2]
PROCEDURE:
Uses INTERPOL
HISTORY:
Written Apr'93 (DMZ, ARC)
[Previous]
[Next]
NAME:
bcs_dtfac
PURPOSE:
to compute BSC deadtime correction factors
CALLING SEQUENCE:
dt_fac=bcs_dtfac(bda_index,dp_sync,type,interp=interp)
INPUTS:
dp_sync - DP synchronous data
bda_index - BDA index structures
type - method of computing correction
OUTPUTS:
dt_fac(4,n) - deadtime factors by which to multiply spectral counts.
KEYWORDS:
interp - 1 set zero deadtime factors to unity
- 2 keep zero deadtime factors as zero
- 3 interpolate out zero deadtime factors
PROCEDURE
Assumes the correction factor is LIM/ACC (type = 1)
or SUM(LIM)/SUM(ACC) (type = 2) where the summation
is taken over channels 1 & 2 or 3 & 4. The counts are corrected
for their own deadtime before use.
CALLS: ***
BCS_DP_CHECK, BCS_DT_INTERP [1], BCS_DT_INTERP [2], DATATYPE [1], DATATYPE [2]
DATATYPE [3], bcs_dp_sync, chekov, dt_corr
CALLED BY:
MK_BSC_DATA [1], MK_BSC_DATA [2]
RESTRICTIONS:
Must have dp_sync data
HISTORY:
Written by D. Zarro (ARC) Oct'92 -- based on D. Pike's DT_FACTOR
Modified, Zarro (ARC), Mar'97 -- fixed potential bug in interpolation
[Previous]
[Next]
NAME:
bcs_dtfac
PURPOSE:
to compute BSC deadtime correction factors
CALLING SEQUENCE:
dt_fac=bcs_dtfac(bda_index,dp_sync,type,interp=interp)
INPUTS:
dp_sync - DP synchronous data
bda_index - BDA index structures
type - method of computing correction
OUTPUTS:
dt_fac(4,n) - deadtime factors by which to multiply spectral counts.
KEYWORDS:
interp - 1 set zero deadtime factors to unity
- 2 keep zero deadtime factors as zero
- 3 interpolate out zero deadtime factors
PROCEDURE
Assumes the correction factor is LIM/ACC (type = 1)
or SUM(LIM)/SUM(ACC) (type = 2) where the summation
is taken over channels 1 & 2 or 3 & 4. The counts are corrected
for their own deadtime before use.
CALLS: ***
BCS_DP_CHECK, BCS_DT_INTERP [1], BCS_DT_INTERP [2], DATATYPE [1], DATATYPE [2]
DATATYPE [3], bcs_dp_sync, chekov, dt_corr
CALLED BY:
MK_BSC_DATA [1], MK_BSC_DATA [2]
RESTRICTIONS:
Must have dp_sync data
HISTORY:
Written by D. Zarro (ARC) Oct'92 -- based on D. Pike's DT_FACTOR
[Previous]
[Next]
NAME:
bcs_emiss (was bcs_counts)
PURPOSE:
This routine plots the following graphs for the resonance
lines of the Yohkoh BCS.
1) Temp vs G(Te) functions
2) Temp vs Fluxes
3) Temp vs Total counts
4) Temp vs Counts/S in peak bin.
CALLING SEQUENCE:
bcs_emiss
INPUTS:
G(t) fundtions taken from $DIR_BCS_CAL/emmsbcs.xdr
OPTIONAL INPUTS:
KEYWORD INPUTS:
channel Array of channel numbers (Default is [1,2,3,4])
Note: 1=FeXXVI, 2=FeXXV, 3=CaXIX, 4=SXV
abundance String, or array.
If array must be 4 elements long e.g.
bcs_emiss,abun=[4.47e-5,4.47e-5,4.47e-6,8.13e-6]
If string must be one of:
'GAD' 'MEWE' 'XRP' 'MEYER' (def=MEYER)
emeasure Specify value to be used (def = 1.e50 cm-3)
summary Creates a summary file called BCS_EMISS.OUT in
current directory
OUTPUTS:
Plots to current graphics device
OPTIONAL OUTPUTS:
CALLS: ***
BCS_EMISS, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], RD_BCSCAL [1]
RD_BCSCAL [2], SPLINE, concat_dir [4], insert [1], insert [2]
RESTRICTIONS:
PROCEDURE:
Read G(t) functions from file, calculate plots
MODIFICATION HISTORY:
RDB 24-Sep-88 Written
ATP 16-Jul-93 Rewritten for IDL 2
RDB 18-Aug-94 Ported for Unix
RDB 26-Aug-94 Allowed EM other than 1.e50 (emeasure keyword)
read instrument stuff from latest cal files
Some mods to plots
[Previous]
[Next]
NAME: BCS_FIXBPC
PURPOSE: Fix bpc files for 1) missing spectra
2) missing 2 components
CALLING SEQUENCE: bcs_fixbpc[,filename],/novel,channels='2-3',
bpc_data=bpc_data,out='output_file.name',reson=103.98
INPUTS: -
OPTIONAL INPUTS: filename - bpc filename to fix. Prompted if not given.
novel - Don't force a second comp velocity
channels - channels to do, either string, '1-3','*'
or array [1,2,3,4], default is '2,3'
See RESTRICTIONS.
bpc_data - A structure of type bpc_struct is returned.
This contains the bpc_data.
out - An alternative output filename instead of
'filename'+'_fixed'
reson - A scalar value, in bins, for the resonance
line position.
spectra - Only fix following spectra
spectra = [1,2,3, .... ,34]
A large number of spectra is advised,
or else the program will have difficulty
matching missing spectra.
OUTPUTS: A file is written with the fixed bpc data in it.
OPTIONAL OUTPUTS: bpc_data can be returned
CALLS: ***
BCS_GETFILE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], bcs_bpc2c
bcs_bpcckspec, bcs_bpcfs, break_file [4], range, rd_bpc, wr_bpc
RESTRICTIONS: This only really works for CaXIX and FeXXV channels,
bpc_struct is homebrew not part of mons *_STRUCT
hierarchy.
Written on a VAX. - ie. not tested under your
operating system.
PROCEDURE: 1) Use nearest neighbour search to fill in
missing spectra.
2) if wanted, force second components to resonance
lines.
3) check all spectra for sensible numbers and/ratios
MODIFICATION HISTORY: Chopped up ed_bpc ATP aug 1993
[Previous]
[Next]
NAME:
BCS_FREE_DATA
PURPOSE:
To give information on the maximum count rate in BDA files, to list
those whose maximum count rate is below a user-supplied limit and to
delete them if requested.
CALLING SEQUENCE:
BCS_FREE_DATA,'file_name',limit[,chan=n,/delete,/compress,/no_bell]
INPUT:
FILENAME Specifies the file(s) to be inspected. Wild cards
can be included, as can directories.
LIMIT The count rate (c/s) to use as the threshold
OPTIONAL INPUTS:
CHAN if present and non-zero, specifies channel to
be used [Def=3; CaXIX]
COMPRESS keyword if present will cause files with maximum
count rates below threshold to be COMPRESSED.
DELETE keyword if present will cause files with maximum
count rates below threshold to be DELETED.
NO_BELL switches offbell when confirmation required
LOG log file to be used; if only switch specified,
defaults to filename 'free_data.log'
(Note: routine exits after search)
OUTPUT:
None
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], Bell, DATA_PATHS, Rd_Roadmap [2]
break_file [4], file_list [1], file_list [2], rd_roadmap [1], yesno [1], yesno [2]
RESTRICTIONS:
The DELETE and COMPRESS keywords cannot be used together
USE:
bcs_free_data,'bda9110*.*',50 (just check CaXIX with
limit of 50 c/s)
bcs_free_data,'yd2:[bda]bda91*.*',100,/compress (check Ca XIX rate with
limit of 100 c/s and
compress all below limit)
bcs_free_data,'bda91*.*',100,chan=4,/delete (check SXV rate with
limit of 100 c/s and
delete all below limit)
HISTORY
CDP Aug-92 Written
RDB 12-Nov-92 Added COMPRESS keyword
CDP Jan-93 added NO_BELL keyword
CDP Mar-93 Test for compressed file, look for Z only in file name
not _Z to make OS independent.
RDB 2-Sep-93 Allowed directory specification in filename
RDB 20-Jan-94 Added logging option
[Previous]
[Next]
NAME:
bcs_funct
PURPOSE:
wrapper routine that makes BCS_SPEC
compatible with the input function required
by IDL CURVEFIT.
CALLING SEQUENCE:
f=bcs_funct(w,a,pder)
INPUTS:
w = independent array (wavelength start edges)
a = parameters of fit
a(0) = BCS channel (not actually varied)
a(1) = primary te6 (MK)
a(2) = primary td6 (MK)
a(3) = primary em50 (cm-3)
a(4) = wshift (A)
a(5) = cnorm
a(6) = secondary Te6_s
a(7) = secondary Td6_s
a(8) = secondary em50_s
a(9) = vel (km/s shift of second component relative to primary)
OUTPUTS:
f = computed function (at wavelength centers)
pder = (nx x na) array of partial derivative of 'f' wrt to each parameter
KEYWORDS:
extra = extra information returned by function
second= secondary component spectrum (if computed).
waveo = wavelengths of computed spectrum
CALLS: ***
bcs_broad [1], bcs_broad [2], bcs_spec, get_atomic [1], get_atomic [2]
CALLED BY:
fit_bsc, fit_bsc_as
MODIFICATION HISTORY:
Sept'93 , DMZ(ARC) -- written.
25 Oct'93, DMZ -- added logic for second component
9 Nov'93, DMZ -- added logic for linking blueshift to Doppler broadening
26 Nov'93, DMZ -- added SECOND keyword to pass-out secondary cmpt.
1 Dec'93, DMZ -- added COMMON for fit_model
fit_model= 0 (all parameters varied)
2^0= 1 (Te6_s = Te6)
2^1= 2 (Blueshift = Td6_s)
2^2= 4 (allow for redshifts)
2^3= 8 (line narrowing on)
12 Mar'93, DMZ -- added WAVEO keyword
20 Jun'94, DMZ -- relaxed assumption that blueshift must be negative
(thus allowing for possible redshifts)
23 Jun'94, Zarro - added facility to vary detector dispersion
14-Oct-94, Zarro - added U_ABUN variable to common
15-Oct-94, Zarro - added U_ATOCAL and U_IONCAL variables to common
22-Oct-94, Zarro - added lower limit Td6_s > Td6
9-nov-94, Lemen - added U_ION_MULT variable to common (specify ion fraction multipliers)
27-Dec-94, Zarro - added check for negative wavelength scale
3-Jan-95, Zarro - fixed two bugs :
(1) needed small correction [(1.-disp)*wres]
for resonance line wavelength when computing
dispersion.
(2) needed small correction (disp*f) for flux
when computing dispersion.
18-Dec-95, Zarro - lowered lower limits on EM50
[Previous]
[Next]
NAME: BCS_GETFILE
PURPOSE: Present a list of files for selection.
CALLING SEQUENCE: bcs_getfile,filename,defstr="bda*.*"
INPUTS: defstr - default file specification.
OUTPUTS: filename - filename chosen
OPTIONAL OUTPUTS: none
CALLED BY:
BCS_FIXBPC, PLOTBSD v306 IDL2, lcbsd, plotbft [1], plotbft [2], plotbth v30 IDL2
RESTRICTIONS: single file only chosen
- does not assume X-terminal
PROCEDURE: Uses code from test_rd.pro
MODIFICATION HISTORY: atp 1991 - Blatant rip off of MDM's test_rd
code.
[Previous]
[Next]
NAME:
BCS_GRP_PLAN
PURPOSE:
Return information about a BCS mode
CATEGORY:
CALLING SEQUENCE:
bcs_grp_plan, modeID, nGroup, Group, nSampPChan, qdefined
INPUTS:
modeID ID of BCS mode
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
OUTPUTS:
nGroup 4 long vector; No. of groups for each channel
Group m*4 array of group definition. "m" is derived
as max(ngroup)*2. See below for more info.
nSampPChan No. of sampes per channel
qdefined 1 if mode is defined, 0 if not.
group(*,ichan) = [nout1,nbin1, nout2,nbin2, nout3,nbin3, ...]
where ichan is then channel in question
nout1 is the number of output values
nbin1 is the number of raw input values binned
OPTIONAL OUTPUT PARAMETERS:
CALLS: ***
BCS_CPU_STRUCT, RD_CPU_DTB
CALLED BY:
GT_BSC_BINCAL [1], GT_BSC_BINCAL [2], plot_ref
COMMON BLOCKS:
hold_grp_plan stored database structure of grouper plans
SIDE EFFECTS:
RESTRICTIONS:
BCS modeID must be in range 0 to 189; not all are defined
PROCEDURE:
MODIFICATION HISTORY:
MDM Autumn-91 Written
RDB 18-May-94 Took out hardwired modes - use database
[Previous]
[Next]
NAME:
BCS_HVS
PURPOSE:
plots the relationship ofHV trim against monitored high
voltage for the BCS HVU's
CALLING SEQUENCE:
.run BCS_HVS
INPUTS:
data is held internally in a data statement
OUTPUTS:
OPTIONAL OUTPUTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
RDB 1991
[Previous]
[Next]
NAME:
BCS_HXRB
PURPOSE:
Allows user to select interval from plot produced by BCS_24hr_PLOT
using cursors, and plot lightcurve of BCS and BATSE data
CALLING SEQUENCE:
.run bcs_hxrb
INPUTS:
OPTIONAL INPUTS:
OUTPUTS:
OPTIONAL OUTPUTS:
Optionally writes start and stop times, and filename to file
"bcs_evs.dat" on current directory.
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
RDB Aug-93 Written
RDB 29-Nov-93 Fixed name collision with yodat (infil)
[Previous]
[Next]
NAME:
BCS_INFIL
PURPOSE:
convert a Yohkoh file name to the corresponding BDA file name
CATEGORY:
Yohkoh
CALLING SEQUENCE:
infil = bcs_infil(infil)
INPUTS:
any standard Yohkoh file name
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], STR2ARR [1], STR2ARR [2]
break_file [4]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
only does one filename at a time
MODIFICATION HISTORY:
HSH, written 1-mar-94
[Previous]
[Next]
NAME:
BCS_IONVEL
PURPOSE:
Return ion velocity (km/s) given the ion temperature
from calcium, iron or suphur lines.
CALLING SEQUENCE:
Velocity = BCS_IONVEL(T_ION,ELEMENT)
Velocity = BCS_IONVEL(T_ION,ELEMENT,SIZE)
INPUTS:
T_ION = Ion temperature in M K.
ELEMENT = 0,C or CA for Calcium
= 1,F or FE for Iron
= 2,S or S for Sulphur
OPTIONAL INPUT PARAMETERS:
SIZE = North-South (for Yohkoh BCS) source size (FWHM) in arc-min
CALLED BY:
plotbft [1]
Note: for SMM BCS it was East-West source size
OUTPUTS:
Function result = Vector containing ion velocities (km/s).
COMMON BLOCKS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
WIDTH must not be of complex type.
ELEMENT must not be of complex type.
PROCEDURE:
The excess velocity may be calculated by
VEL_EXC = BCS_IONVEL(T_ION-T_ELE,ELEMENT)
where T_ELE = electron temperature in M K.
----------------
The velocity is calculated according to:
VEL = sqrt( 2*k/mass * T_ION - (c^2/(4ln(2))) $
* ((alpha * SIZE )/wavelength)^2
alpha = channel dependent const. of proportionality between
arc-min and Ang.
alpha = dw * dB,
where:
Ca XIX Fe XXV S XV
dw = [1.5e-4, 3.6e-4, 4.75e-4] ; Approximate dispersions
; (Ang/single bin)
dB = [ 4.6 , 2.8 , 2.57] ; single Bins/arc-min (measured from
; plots done by RDB and CDP)
SIZE is set to 0 if the argument is omitted.
Invalid values of ELEMENT are flagged with a message,
and a single value of -1 is returned.
MODIFICATION HISTORY:
Sep, 1985, Written, J.R. Lemen, MSSL
Nov, 1991, A. Fludra: added Sulphur, converted to Solar-A
RDB 28-Feb-93 Changed name to BCS_IONVEL
[Previous]
[Next]
BCS_LC_PLOT
To plot a better BCS light curve. Uses output of GS_LC and can fit splines
as an overlay.
CDP August 92
[Previous]
[Next]
NAME:
bcs_line
PURPOSE:
Compute spectral line intensities in the BCS wavelength range.
Units are ph s-1 for EM=1.e50 cm^3 at the source (i.e., the Sun).
CALLING SEQUENCE:
bcs_line,Chan,Te6,wave,intensity
bcs_line,Chan,Te6,wave,intensity,Ainfo=Ainfo
bcs_line,Chan,Te6,wave,intensity,Ainfo=Ainfo,dens=dens
bcs_line,Chan,Te6,wave,intensity,/newcal
INPUTS:
Chan_struct = BCS Channel Number or BSC index
Te6 = Vector of temperatures (MK)
OUTPUTS:
wave = Wavlengths of calculated lines
intensity = Returned line intensities (ph s-1 for EM=1.e50 cm^3 at the source).
OPTIONAL INPUT PARAMETERS:
wave_range = Range of wavelengths to include (Not implemented yet) ;***
ioncal = The ionization balance calculation (def = 0)
atocal = Specify the atomic calculation to use (see get_atomic)
elem_num = The abundance table to use (check get_elemabun)
abun = If defined, allows the abundance value (relative to H) to be
directly specified
dens = log10(Density cm-3). Only available for S XV (chan=4).
newcal = To force a new calculation
ion_mult = Multipliers for the ionization fractions. This must be a
floating vector of length 10. If ion_mult is undefined, or
is vector that is less than 10 in length, then ion_mult will
be set to: ion_mult = replicate(1.,10) (i.e., all 1's).
OPTIONAL OUTPUT PARAMETERS:
Ainfo = Structure describing the atomic parameters data.
ion_data = Ionization balance structure
ato_data = Atomic data parameter structure
nel = Number of electrons in line
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], BSC_STRUCT [1], BSC_STRUCT [2]
GT_BSC_CHAN [1], GT_BSC_CHAN [2], break_file [4], collexc [1], collexc [2]
drexc [1], drexc [2], get_atomic [1], get_atomic [2], get_elemabun [1]
get_elemabun [2], get_ionbal [1], get_ionbal [2]
CALLED BY:
bcs_spec
COMMON BLOCKS:
bcs_line_comm = Holds the results from the previous call. Will speed things
up slightly if the chan and Te6 don't change.
RESTRICTIONS:
dens must be a scalar
MODIFICATION HISTORY:
8-oct-93, J. R. Lemen (LPARL), Written
27-oct-93, JRL, Improved Ainfo code. Made common block work for Te6 as a vector.
9-mar-94, JRL, No longer pre-define atocal before calling get_atomic
Added the dens=dens and newcal=newcal options
8-nov-94, JRL, Added ion_mult keyword
17-dec-94, JRL, Fixed a bug introduced with the last modification
[Previous]
[Next]
NAME: BCS_LOAD_CAT
PURPOSE: To read the BCS catalogue into an IDL structure.
CALLING SEQUENCE: IDL> bcs_load_cat, str_name, year
INPUTS: str_name name of the structure loaded
year year of the data to load. If this
input is type integer then the
standard catalogue for that year
is loaded. If it is type string
then it is taken to be the name of
a user catalogue file.
OPTIONAL INPUTS: none
OUTPUTS: IDL structure is returned
OPTIONAL OUTPUTS: None
CALLS: ***
Bell, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2]
anytim2ex [1], anytim2ex [2], concat_dir [4]
RESTRICTIONS: Note that files without an optically identified event
have their GOES position fields set to a value of 99
in both Latitude and Longitude.
PROCEDURE: Reads the catalogue file and loads structure fields
MODIFICATION HISTORY: Written: Feb 93 CDP
Apr 93 Include user catalogues
[Previous]
[Next]
Procedure BCS_LOCATE to suggest a location of a flare (north or south of
projected sun centre) based on the BCS lines positions and the old
calibration of bin number versus flare position
NB this does not take account of any pointing offsets.
Use:
must have used GS, GS_CUR and GS_SP first, then...
IDL> .run bcs_locate
use cursor to define region of resonance lines in succession
CDP June 92
[Previous]
[Next]
BCS_M_RDTAP
Procedure to ease the reading of multiple files from tape using the
basic rdtap routine.
Note that on workstations it is possible to use go_rdtap instead.
USE: .run bcs_m_rdtap and follow prompts
CDP Aug 92
CDP Jan 92 Extend to multiple prefix specification
[Previous]
[Next]
NAME:
BCS_MULTI
PURPOSE:
Plots many BCS spectra of a selected channel on a page.
CALLING SEQUENCE:
BCS_MULTI,index,data
INPUTS:
index index structure corresponding to data
data data array
KEYWORD INPUTS:
chan channel number to be plotted [Def = 3, Ca XIX]
range start and stop elements of data array to be plotted
bins limit of bin numbers to plot within the channel
decomp if set, the data is decompressed - it is also scaled
by the integration time (including fast-queue data!)
smooth if set, the spectra is smoothed
page if present, routine pauses ate end of each page when
plotting to X-windows display
OUTPUT:
OPTIONAL OUTPUT:
PROCEDURE
HISTORY
RDB Nov, 1991 Written
RDB 18-Feb-92 DECOMPRESS -> BCS_DECOMP
RDB 4-Apr-92 Some updates
RDB 25-Oct-92 Changed to procedure, major revamp
RDB 28-Feb-93 'q' kills if to screen; added clearplot
RDB 14-Nov-97 Exit if requested channel is not present
CALLS:
[Previous]
[Next]
NAME:
BCS_MULTI
PURPOSE:
Plots many BCS spectra of a selected channel on a page.
CALLING SEQUENCE:
BCS_MULTI,index,data
INPUTS:
index index structure corresponding to data
data data array
KEYWORD INPUTS:
chan channel number to be plotted [Def = 3, Ca XIX]
range start and stop elements of data array to be plotted
bins limit of bin numbers to plot within the channel
decomp if set, the data is decompressed - it is also scaled
by the integration time (including fast-queue data!)
smooth if set, the spectra is smoothed
page if present, routine pauses ate end of each page when
plotting to X-windows display
OUTPUT:
OPTIONAL OUTPUT:
PROCEDURE
HISTORY
RDB Nov, 1991 Written
RDB 18-Feb-92 DECOMPRESS -> BCS_DECOMP
RDB 4-Apr-92 Some updates
RDB 25-Oct-92 Changed to procedure, major revamp
RDB 28-Feb-93 'q' kills if to screen; added clearplot
CALLS:
[Previous]
[Next]
NAME:
BCS_NORM
PURPOSE:
Normalizes data recorded by the BCS for time, and extracts the
Fast Queue data if present.
CALLING SEQUENCE:
dspec = bcs_norm(index,data)
INPUTS:
index the index to the data array
data the decompressed data array
OPTIONAL INPUTS:
notime if present, only fast queue extraction is performed,
the data is not scalled for integration time.
nofq if set, fast queue data not specially treated ???
OUTPUTS:
The normalized array
OPTIONAL OUTPUTS:
None
CALLED BY:
BCS_CONT [1], BCS_CONT [2], BCS_DSPEC [1], BCS_DSPEC [2], BCS_MULTI [1]
BCS_MULTI [2], BCS_SPMOVIE [1], BCS_SPMOVIE [2]
RESTRICTIONS:
The data must have been decompressed prior to the call of this
routine.
If data has been "corrected", 100 should have been added to the
controltally field in the structure - such data is ignored by
this routine, and assumed to be normal.
PROCEDURE:
Fast queue data is extracted and then the is normalized to
counts per second.
Note: Although BCS_NORM will run on all the spectra bins in a mode,
a better correction can be made if each channel is dealt with
individually since frames with zero data can be handled better.
The call to correct a single channel is:
dspec = bcs_norm(index,bcs_decomp(ext_bcschan(index,data,channel)))
MODIFICATION HISTORY:
RDB 23-Oct-92 Written
RDB 25-Oct-92 Added nofq keyword, and check in incrementing of
control tally
RDB 26-Oct-92 Only correct control tallies between 1 and 99
RDB 27-Oct-92 Only BlockID's of 1
RDB 14-Dec-92 Modified wz - only if zeros, then zero (n val.)
[Previous]
[Next]
NAME:
BCS_OLD_STRUCT
PURPOSE:
Define the following BCS specific database structures
* BCS_QS_0211_Instr_Rec
* BCS_0211_Index_Rec
* BCS_2021_DP_Sync_Rec
CALLING SEQUENCE:
BCS_OLD_STRUCT
CALLED BY:
RD_BDA [1], RD_BDA_DP
HISTORY:
written by Mons Morrison, Fall 91.
[Previous]
[Next]
NAME:
bcs_path
PURPOSE:
Derives path name for BCS files. If Env. Variable BCS_PATH is
set, this defines search path (Default is "/bdat*/").
Intended for use at sites with large amount of BCS data online.
CATEGORY:
CALLING SEQUENCE:
dirs = bcs_path(options)
INPUTS:
options Can be:
1) Options supplied in YODAT; filename in Yohkoh style;
(e.g. bda970120 or bda970120.*) is 2nd parameter.
2) just filename in Yohkoh style
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
OUTPUTS:
dirs string containing directory spec. for filename
OPTIONAL OUTPUT PARAMETERS:
CALLS: ***
BCS_PATHS, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], anytim2weekid [1]
anytim2weekid [2], break_file [4], fid2ex [1], fid2ex [2], get_logenv [1]
get_logenv [2]
COMMON BLOCKS:
SIDE EFFECTS:
Adds .* to filename if not present
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
RDB 28-Nov-97 Written
[Previous]
[Next]
NAME:
BCS_PHA
PURPOSE:
Extract and plot PHA data from BCS Radioactive Source Calibration
CALLING SEQUENCE:
INPUT:
OUTPUT:
OPTIONAL OUTPUT:
HISTORY
RDB, 1989, with enhancements
16-Feb-92 Asks for approx. start time
[Previous]
[Next]
NAME:
BCS_POINT
PURPOSE:
Derives a solar N-S position from bin no. of BCS resonance line
CALLING SEQUENCE:
pos = bcs_point(wbin,chan [,/arcsec])
INPUTS:
wbin bin number of resonance line
OPTIONAL INPUTS:
chan=chan channel associated with wbin [def = 3]
/arcsec if specified, pos reruned in arcsecs [def = arcmins]
date=date string containing date to be used for heliocentric
angle determination
OUTPUTS:
pos N-S position in arcmins (North is +ve)
OPTIONAL OUTPUTS:
lat=lat if present, returns average heliocentric latitude
NOTE: needs date to de supplied.
CALLS: ***
ARCMIN2HEL, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4]
RESTRICTIONS:
PROCEDURE:
Uses file derived by determining the position of the resonance
lines from SXT for a large number of flares.
If date supplied, average latitude that is equivalent to this
N-S offset for the supplied epoch is calculated.
Reference file is $DIR_BCS_CAL/bcs_pointing.dat
MODIFICATION HISTORY:
RDB 04-Mar-93
RDB 10-Mar-93 Made channel 3 default; introduced chan parameter
RDB 13-Mar-93 Changed $DIR_BCS_CALDAT to $DIR_BCS_CAL
[Previous]
[Next]
NAME:
bcs_spec
PURPOSE:
Calculate a synthetic Yohkoh BCS spectrum in photons cm^2 s^-1 A^-1
for an EM=1.e50 cm^-3
CALLING SEQUENCE:
Spectrum = bcs_spec(Chan,Te6) ; Use default wavelengths
Spectrum = bcs_spec(Chan,Te6,Td6,Wave,waveo=waveo,Vel=Vel,Ainfo=Ainfo)
INPUTS:
Chan = BSC structure or
channel number (1 to 4) 1=Fe XXVI, 2=Fe XXV, 3=Ca XIX, 4= S XV
(Must be a scalar)
Te6 = Electron temperature in MK (Can be a vector)
OPTIONAL INPUTS:
Td6 = Doppler temperature in MK (Can be a vector -- must be the same
length as Te6). If not present, defaults to Td6=Te6
Wave = A vector describing the start wavelength of a vector of bins.
bcs_spec will return n_elements(wave)-1 bins.
Wave must be monotonically increasing or decreasing.
OPTIONAL INPUT KEYWORDS:
Velocity = Scalar velocity of the plasma in km/s (Negative is blue-shifted)
Ashift = Shift the entire spectrum by this amount
ioncal = Specify the ionization balance calculation (0=default)
atocal = Specify the atomic calculation file (0=default -- see get_atomic)
cnorm = Continuum normalization. Default is cnorm = 1.0
elem_num = To specify table of abundances to use (see get_elemabun routine)
abun = Value of abundance [N(Z)/N(H)] -- to override default list returned by get_elemabun
noline = If set, do not calculate the line contribution
nocont = If set, do not calculate the continuum contribution
uTDOPPW = User specified Gaussian Width (FWHM) in Ang.
This over-rides Td6 and detector width
dens = log10(Dens cm-3). Only available for S XV (chan=4).
newcal = To force a new calculation by bcs_line
ion_mult = Multipliers for the ionization fractions. This must be a
floating vector of length 10. If ion_mult is undefined, or
is vector that is less than 10 in length, then ion_mult will
be set to: ion_mult = replicate(1.,10) (i.e., all 1's).
OPTIONAL OUTPUT KEYWORDS:
waveout = The wavelengths of the centers of the output bins = (wave1(1:*)+wave1)/2.
bcs_cont = The continuum contribution only.
Ainfo = Structure giving information about the calculation
ion_data = Data structure containing the ionization balance calculation
ato_data = Data structure containing the atomic data for line calculation
edg_waveout = The wavelength edges of the output bins, if Wave is passed in
this should be the same array
CALLS: ***
BSC_STRUCT [1], BSC_STRUCT [2], CONFLX [1], CONFLX [2], DOC_LIBRARY
GT_BSC_CHAN [1], GT_BSC_CHAN [2], GT_BSC_WAVE [1], GT_BSC_WAVE [2]
bcs_broad [1], bcs_broad [2], bcs_line, mk_bcs_spec, sgn [1], sgn [2]
CALLED BY:
bcs_chi_norm, bcs_funct, bcs_syn_dem chan
MODIFICATION HISTORY:
8-oct-93, J. R. Lemen (LPARL), Written
27-oct-93, JRL, Fixed Ainfo for the case of Te6 as a vector
9-mar-94, JRL, Added the dens=dens keyword
9-nov-94, JRL, Added the ion_mult keyword
16-jan-95, JRL, Added the rockw keyword
19-dec-96, Jmm, Added edg_waveout keyword, to pass out bin edge array, no
alteration of the code needed.
[Previous]
[Next]
NAME:
BCS_SPMOVIE
PURPOSE:
Plots a movie of spectra of selected BCS channel.
Light curve is plotted - moving cursor is optional.
CALLING SEQUENCE:
bcs_spmovie,index,data
bcs_spmovie,index,data,/all
bcs_spmovie,index,data,ss=indgen(120)+60
INPUT:
index index structure corresponding to data
data data array
KEYWORD INPUTS:
chan channel number to be plotted [Def = 3, Ca XIX]
smooth if set, the data is smoothed
spmax supplied maximum for the spectra plot
lcmax supplied maximum for the lightcurve
psymbol plot symbol to be used for lightcurve
nocursor if present, the moving cursor on lightcurve is not plotted
range start and stop elements of data array to be plotted
all if present, includes all BLOCKID's except 2 and 3
ss vector of spectra to be used in display
modeid mode id to be used (only single one allowed)
slow delay value for fast processors (/slow == 1)
OUTPUT:
None
CALLS: ***
ADDTIME [1], ADDTIME [2], ALL_VALS [1], ALL_VALS [2], BCS_DECOMP, BCS_NORM, BCS_TVEC
CLEAR_UTPLOT [1], CLEAR_UTPLOT [2], LOADCT, SMUDGE_SPECTRA, UTPLOT [1], UTPLOT [2]
UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], anytim2ex [1], anytim2ex [2]
anytim2ints [1], anytim2ints [2], bcs_channels, clearplot [1], clearplot [2]
ext_bcschan [1], ext_bcschan [2], fmt_tim [1], fmt_tim [2]
PROCEDURE:
A colour map an light-curve of the selected channel are plotted
and then the routine steps through the spectra. The direction
and speed of movement through the data can be controlled by
key strokes.
HISTORY
rdb 26-Oct-92 Procedure created from SPMOVIE
Changed calls of roadmap to index
Removed use of dset_str
RDB 25-Nov-92 Added M, S and Q keystroke options.
Fixed bug when there are blockids other than 0,1
RDB 29-Nov-92 Changed lightcurve plot to use UTPLOT
RDB 20-Jan-93 Removed keyword in OPLOT (gave error under V3)
Delay loop for alpha
RDB 10-Mar-93 Return if not enough paramaters.
RDB 23-Jun-93 Added slow keyword for fast processors
RDB 20-Oct-93 Put lightcurve and spects plot in one window, vect. chars
Vertical line at position of overall peakbin
Used BCS_TVEC for time vector calcs.
RDB 10-May-94 Use ext_bcschan for channel extraction
Flip spectra for channels 1,2; added psym keyword
Corrected for UTPLOT changes; Some general tidying
ss vector and modeid keywords
RDB 12-May-94 Improved conditional masking of inputs
Improved info. printed, "R" option in keys
RDB 18-May-94 Modified delay loop code (accepts value)
RDB 14-Nov-97 Exit if request channel is not present
rdb 24-Nov-99 Slowed movie down - delay now defaults to 20 (was 1).
Modern processors are too fast...
[Previous]
[Next]
NAME:
BCS_SPMOVIE
PURPOSE:
Plots a movie of spectra of selected BCS channel.
Light curve is plotted - moving cursor is optional.
CALLING SEQUENCE:
bcs_spmovie,index,data
bcs_spmovie,index,data,/all
bcs_spmovie,index,data,ss=indgen(120)+60
INPUT:
index index structure corresponding to data
data data array
KEYWORD INPUTS:
chan channel number to be plotted [Def = 3, Ca XIX]
smooth if set, the data is smoothed
spmax supplied maximum for the spectra plot
lcmax supplied maximum for the lightcurve
psymbol plot symbol to be used for lightcurve
nocursor if present, the moving cursor on lightcurve is not plotted
range start and stop elements of data array to be plotted
all if present, includes all BLOCKID's except 2 and 3
ss vector of spectra to be used in display
modeid mode id to be used (only single one allowed)
slow delay value for fast processors (/slow == 1)
OUTPUT:
None
CALLS: ***
ADDTIME [1], ADDTIME [2], ALL_VALS [1], ALL_VALS [2], BCS_DECOMP, BCS_NORM, BCS_TVEC
CLEAR_UTPLOT [1], CLEAR_UTPLOT [2], LOADCT, SMUDGE_SPECTRA, UTPLOT [1], UTPLOT [2]
UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], anytim2ex [1], anytim2ex [2]
anytim2ints [1], anytim2ints [2], bcs_channels, clearplot [1], clearplot [2]
ext_bcschan [1], ext_bcschan [2], fmt_tim [1], fmt_tim [2]
PROCEDURE:
A colour map an light-curve of the selected channel are plotted
and then the routine steps through the spectra. The direction
and speed of movement through the data can be controlled by
key strokes.
HISTORY
rdb 26-Oct-92 Procedure created from SPMOVIE
Changed calls of roadmap to index
Removed use of dset_str
RDB 25-Nov-92 Added M, S and Q keystroke options.
Fixed bug when there are blockids other than 0,1
RDB 29-Nov-92 Changed lightcurve plot to use UTPLOT
RDB 20-Jan-93 Removed keyword in OPLOT (gave error under V3)
Delay loop for alpha
RDB 10-Mar-93 Return if not enough paramaters.
RDB 23-Jun-93 Added slow keyword for fast processors
RDB 20-Oct-93 Put lightcurve and spects plot in one window, vect. chars
Vertical line at position of overall peakbin
Used BCS_TVEC for time vector calcs.
RDB 10-May-94 Use ext_bcschan for channel extraction
Flip spectra for channels 1,2; added psym keyword
Corrected for UTPLOT changes; Some general tidying
ss vector and modeid keywords
RDB 12-May-94 Improved conditional masking of inputs
Improved info. printed, "R" option in keys
RDB 18-May-94 Modified delay loop code (accepts value)
[Previous]
[Next]
NAME:
BCS_STRUCT
PURPOSE:
Define the following BCS specific database structures
* BCS_QS_Instr_Rec
* BCS_QS_ModeInit_Rec
* BCS_QS_Conv_Rec
* BCS_QS_Group_Rec
* BCS_Index_Rec
* BCS_DP_Sync_Rec
* BCS_DPs_Head_Rec
* BCS_Roadmap_Rec
CALLING SEQUENCE:
BCS_STRUCT
CALLED BY:
RD_BDA [1], RD_BDA_DP, rd_roadmap [1]
HISTORY:
written by Mons Morrison, Fall 90.
[Previous]
[Next]
NAME:
bcs_survey
PURPOSE:
Plot two spectra selected from a light curve
CALLING SEQUENCE:
bcs_survey, index, data
INPUT:
index = index data structure
data = bcs data array from test_rd
OPTIONAL INPUT PARAMETERS
chan = BCS channel (default is 3, Ca XIX)
nrise = number of rise spectra to sum (default is 3)
nref = number of reference spectra to sum (default is 3)
/smooth = if set, smooth with 3-wide window, or number
/post = output to postscrit file, user prompted for name
/norm = produce normalized spectra (best way to do it)
OUTPUT:
for /post keyword, produces a postcript file
OPTIONAL OUTPUT:
x = abscissa array
y = ordinate array (2-dimensional)
CALLS: ***
UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], bcs_chan_rng
bcs_channels, get_15, get_19, get_25, get_26, gt_day [1], gt_day [2], gt_time [1]
gt_time [2], gt_total_cnts [1], gt_total_cnts [2]
HISTORY:
JTM: (7 May 1992) - from bcsfs1
JTM: (1 Jun 1992) - smoothing if desired
JTM: (18 Sep 1992) - differencing version, using utplot
JTM: (21 Sep 1992) - moment version
JTM: (25 Nov 1992) - revised to do simple plots for viewgraphs
[Previous]
[Next]
NAME: bcs_syn_dem, chan
CALLING SEQUENCE:
flux=bcs_syn_dem(chan, power_law=power_law, wave=wave)
INPUT PARAMETER:
chan: BCS channel number (1: FeXXVI, 2: FeXXV, 3: CaXIX, 4: SXV)
INPUT KEYWORDS (one of the following)
delta: [t0, y0, t1, y1,...], i.e. repeat of [temperature (in MK), emission measure (in 10^50)]
power_law: [t0, g0, t1, g1, t2,....,tn], i.e. temperatures and power law indices
g0 in [t0,t1], g1 in [t1,t2],....
pow_del: [t0, g0, t1, g1, t2,....tn, td, yd], i.e. power_law + T6 and EM50
OUTPUT parameter:
flux: flux in the BCS wavelength bins (the number of which depends on the channel).
OUTPUT KEYWORD:
wave: This will be necessary for further processing.
noline: If set, no calculation of the line contribution
nocont: If set, no calculation of the continuum contribution
OPTIONAL INPUT KEYWORDS:
dense: for SXV
ntime: the number of data points for each power law
HISTORY
written, N. Nitta, 26 October 1995.
CALLS:
[Previous]
[Next]
NAME:
bcs_trange
PURPOSE:
get user specified time range for an index structure
CALLING SEQUENCE:
bcs_trange,index,trange
INPUTS:
index = structure with time element
OUTPUTS:
ok = byte array with indicies of valid times set to 1
OPTIONAL OUTPUTS:
trange = 2-element structure array with selected start and end times
KEYWORDS:
count = no. of selected time points
PROCEDURE
uses standard GT_ routines
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], anytim2ints [1], anytim2ints [2]
fmt_tim [1], fmt_tim [2], gt_day [1], gt_day [2], gt_time [1], gt_time [2]
CALLED BY:
MK_BSC [1], MK_BSC [2]
HISTORY:
Written April'93 by D. Zarro (ARC)
[Previous]
[Next]
NAME:
BCS_TVEC
PURPOSE:
Extracts start time of BCS spectra and returns times that correspond
to the mid time of the integration.
CATEGORY:
CALLING SEQUENCE:
time = tvec(item)
time = tvec(item,ista,istp)
INPUTS:
item Normal yodat produced item, or selected part thereof
OPTIONAL INPUT PARAMETERS:
ista start item in array if needed
istp stop item in array if needed
KEYWORD PARAMETERS:
rel if present, output vector is relative to start time
OUTPUTS:
Vector of time, corrected for bcs spectral integration time
CALLS: ***
anytim2ints [1], anytim2ints [2]
CALLED BY:
BCS_SPMOVIE [1], BCS_SPMOVIE [2], OBS_PLOT
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
RDB 19-Oct-93 Written
RDB 25-Jan-94 Corrected error in flag name
RDB 2-Sep-94 Extract dgi according to structure type (Corr)
[Previous]
[Next]
BCS_UNPACK
Procedure to decompress BCS data files. VMS specific.
See BCS note 11 for further details.
Use: IDL> bcs_unpack, files [,/test]
where files specifies the files to be
decompressed. Wild cards are permitted.
keyword /test will just give a list of
files to decompress without actually
doing it.
IDL> bcs_unpack,'921010.*',/test
NOTE that this procedure expects the VMS '_Z' compressed flag on the input
file name, any file name without this will be ignored. Do not include any
disk or directory in the name, the normal search paths are used.
cdp Apr 93
cdp Apr 93 Cater for non-wild card in filename extension
CALLS:
CALLED BY
BCS_CAT
[Previous]
[Next]
NAME:
bcs_velres
PURPOSE:
Compute the velocity resolution of the BCS
CALLING SEQUENCE:
vel_res = bcs_velres() ; Returns a vector of four values
vel_res = bcs_velres(chan) ; Return a value for a specific channel
vel_res = bcs_velres(,/ver) ; Provide verbose messages
vel_res = bcs_velres(text=text) ; Provide verbose message as text string
vel_res = bcs_velres(/hc) ; Print verbose message
RETURNED:
Velocity resolution in km/s
Velocity resolution = c * FWHM / wavelength of resonance line
OPTIONAL INPUTS:
chan = BCS channel of interest (1=Fe XXVI, 2=Fe XXV, 3=Ca XIX, 4=S XV)
OPTIONAL INPUT KEYWORDS:
verbose = If set, print informational message to the screen
hc = If set, send informational message to printer
OPTIONAL OUTPUT KEYWORDS:
text = To pass informational message out.
CALLS: ***
GT_BSC_CHAN [1], GT_BSC_CHAN [2], bcs_broad [1], bcs_broad [2], get_atomic [1]
get_atomic [2], prstr [1], prstr [2]
PROCEDURE:
Calls bcs_broad to get instrumental parameters
MODIFICATION HISTORY:
14-jan-95, J. R. Lemen (LPARL), written.
[Previous]
[Next]
NAME:
BCS_VS_GOES
PURPOSE:
plots BCS counts against GOES class for all channels
CATEGORY:
CALLING SEQUENCE:
.run bcs_vs_goes
INPUTS:
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
OUTPUTS:
OPTIONAL OUTPUT PARAMETERS:
COMMON BLOCKS:
SIDE EFFECTS:
Will as continue question after each plot on Xterminal
RESTRICTIONS:
Only uses BCS catalogue for 1992
PROCEDURE:
MODIFICATION HISTORY:
TW 1993 Original for S XV
RDB 22-Jan-94 Updated...
RDB 17-Feb-94 Some tidying
[Previous]
[Next]
NAME:
BCSPRO
PURPOSE:
Runs the BCS F77 Programmes MKBSD, BSDCAL and BSDFIT
CALLING SEQUENCE:
.run BCSPRO
INPUTS:
filename Filename of dataset to be analysed by MKBSD.
- this should include the path.
Default is name of current TEST_RD file
directory Where the data is to be analysed (BSDCAL and BSDFIT only)
Default is the current directory
start_time Start time to be used in MKBSD run
Default is LH cursor from TEST_RD, option -44x
stop_time Stop time to be used in MKBSD run
Default is RH cursor from TEST_RD, option -44x
int_tim Integration time in seconds
Default is 24 seconds
chans Channels to be analysed
Default is 1,2,3,4
two_comp Whether two component fit should be done
Default is not
OUTPUTS:
Creates the .cfl files for MKBSD, BSDCAL and BSDFIT on current directory
OPTIONAL OUTPUTS:
RESTRICTIONS:
PROCEDURE:
Creates a .CFL file using the supplied filename, and start and
stop time. Spawns a command file to execute the required tasks.
MODIFICATION HISTORY:
24-Mar-92 RDB
26-Mar-92 RDB Coded UNIX part (not tested)
3-Apr-92 RDB Corrections to VMS part (/USER stuff)
5-Jun-92 RDB Corrected read of channel no's
Option to run wthout creating CFL
Corrected UNIX part - USED $DIR_BCS_EXE
16-Jun-92 RDB Only initialize ITIME array if not set
03-Jul-92 RDB Expended routine and renamed BCSPRO
Now runs all the F77 tasks.
06-Jul-92 RDB Changes to filename and default directory used
25-Jul-92 RDB Correct erro in UNIX part
28-Oct-92 RDB Added two component option
Some change of blocking of code
12-Mar-93 RDB Improved search for file (curr dir + exact dir)
Added message if not default times
6-Jun-93 RDB Corrected call to wrt_mkbsd_cfl so used ffil(0)
Changed all 3 wrt_*_cfl's to use supplied filename
New .cfl files are created with names of the form
'xxx911115_2135.cfl'
27-Oct-93 RDB All run_mkbsd scripts combined and spawn modified
29-Oct-93 RDB Put in warning for use on MIPS
19-nov-93 JRL Fixed the warning
[Previous]
[Next]
Purpose: return SMM-BCS wavelength array for chan
Written: 1-Mar-94, D. Zarro (ARC)
CALLED BY
BCS, GT_BSC_WAVE [1], GT_BSC_WAVE [2]
[Previous]
[Next]
NAME:
beta_fn
CALLING SEQUENCE:
b = beta_fn( w, z)
PURPOSE:
returns the Beta function B(p,q)=Int_0^1 u^(p-1)(1-u)^(q-1) du
or B(p,q)=gamma(p)*gamma(q)/gamma(p+q) Num. Rec. eq 6.1.8
INPUT:
w = a number
z = another number
OUTPUT:
b = B( w, z)
CALLS: ***
GAMMA
CALLED BY:
ee_pl_jcb
HISTORY:
Feb '93 by J McT
[Previous]
[Next]
NAME:
bethe_heitler.pro
PURPOSE:
compute Bethe-Heitler cross-section for bremsstrahlung
CATEGORY:
theory
CALLING SEQUENCE:
sigma = bethe_heitler(hnu, E)
INPUTS:
hnu and E are the photon and electron energies, respectively,
in keV
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
HSH written 7-Jun-95
[Previous]
[Next]
NAME:
BFITS
PURPOSE:
Reads a FITS magnetic field data file into a structure.
CATEGORY:
Input/Output.
CALLING SEQUENCE:
result = bfits(filename)
INPUTS:
filename = string containing the file name.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
index = nonnegative integer. If this parameter is present, a period
and the index number are appended to the filename (e.g., '.34').
This option makes handling of data in the MCCD file naming
convention easier.
KEYWORD PARAMETERS:
dec2sun = Convert DEC IEEE formatted data file to Sun IEEE format
sun2dec = Convert Sun IEEE formatted data file to DEC IEEE format
vax2sun = Convert VAX formatted data file to Sun IEEE format
sun2vax = Convert Sun IEEE formatted data file to VAX format
OUTPUTS:
result = Structure containing the FITS images.
OPTIONAL (KEYWORD) OUTPUT PARAMETERS:
date_obs = date of observation (string).
time_obs = time of observation (string).
header = string vector, containing the full FITS header (each element
of the vector contains one FITS keyword parameter).
barray = returns the 3D array from rfits if desired
CALLS: ***
GET_LATLON, RFITS [1], RFITS [2], RFITS [3], dec2sun [1], dec2sun [2], get_def
makestr, rkey, strstat [1], strstat [2], sun2vax [1], sun2vax [2], tag_index [1]
tag_index [2], vax2sun [1], vax2sun [2]
COMMON BLOCKS:
ubfitsstr: unique = Keeps track of number of calls to BFITS in order
to make a unique structure name each time BFITS
is called.
SIDE EFFECTS:
None.
RESTRICTIONS:
o Only magnetic field FITS files are read.
o FITS extensions (e.g., groups and tables) are not supported.
MODIFICATION HISTORY:
T. Metcalf: Nov, 1990
10/24/91 Using strstat to check whether structure name is ok.
1995-07-11 Fixed a problem with multiple tag names which appeared
with IDL 4.0
[Previous]
[Next]
NAME:
bgrab (Bruner Grab)
PURPOSE:
Mouse driven routine to extract a sub-array from a data cube
SAMPLE CALLING SEQUENCE:
sdata = bgrab(data)
sdata = bgrab(data, bin=4)
sdata = bgrab(data, siz=64)
sdata = bgrab(data, siz=[128,64])
sdata = bgrab(data, /corner)
INPUT:
data - The data cube to extract data from
CALLS: ***
BGRAB, BOX_CURSOR, GET_BOXCORN, draw_boxcorn [1], draw_boxcorn [2]
OPTIONAL KEYWORD INPUT:
siz - The size of the box. Default is 64x64. If the value
is scalar, X and Y size will be that value. The value
can have two elements which would be the X and Y size.
It is the number of pixels to extract from the input
image, not the number of pixels displayed (if mag does
not equal zero).
mag - The magnification factor that the image was displayed
with. Default is 1 (raw)
fixed_size - ??
corner - If set, user can click on the two corners to specify the
window to extract.
OPTIONAL KEYWORD OUTPUT:
xsubs - The starting and ending x subscripts that were extracted
ysubs - The starting and ending y subscripts that were extracted
HISTORY:
M. Bruner 4/13/93
13-Jun-93 (MDM) - Added header - change parameters some
- Added XSUBS and YSUBS options
- Added /CORNER option
21-Jun-93 (MDM) - Corrected sizing of the window when it is resized
interactively
- Corrected marking of the box (it was off by 1)
[Previous]
[Next]
NAME:
big_smooth
SAMPLE CALLING SEQUENCE:
out = big_smooth(data, 15) ; Boxcar averaged output.
out = big_smooth(data, /medsmooth) ; Median smoothed output.
PURPOSE:
To permit "boxcar" smoothing of an vector or an
image without producing the irritating
unsmoothed border at the boundaries.
This program forms an array bigger than the original
array by half of the smoothing width on each side and fills
the corners with valid average "near edge" data and then smooths
the extended array. It then plucks out and array the size of
the original out of the smoothed big array.
INPUT:
data = the 1-d or 2-d array to be smoothed
OPTIONAL INPUT:
width = the number of pixels over which to smooth.
[default=3]
OPTIONAL KEYWORD INPUT
/medsmooth forms a median array rather than an average array.
/noccd is for a normal image -- with "edge problems" of the CCD
OUTPUTS:
out = the smoothed array of same type as input array
(Note: Actual smoothing is done in floating point.)
CALLED BY:
sfc_prep [1], sfc_prep [2], sigma_klip [1], sigma_klip [2], sxl_clip
sxt_clean [1], sxt_clean [2], sxt_deleak [1], sxt_deleak [2], sxt_prep [1]
sxt_prep [2], sxt_prep [3]
RESTRICTIONS:
Use only on a single array at a time, not a data cube.
Edge treatment special for SXT case, otherwise use /noccd.
HISTORY:
Written by L. Acton on 2/22/94.
Corrected indexing errors, 2/23/94. LWA
Changed to extend the image with average data,
avoiding the "problem columns" at the edge. LWA 3/20/94
Modified to handle 1-d smoothing. LWA 3/20/94
Added median smoothing option and default width. LWA 10/20/96
Improved edge correction. LWA 10/21/96
Added /noccd keyword. LWA 10/27/96
Included /nan keyword in call to smooth. LWA 6/6/04
[Previous]
[Next]
NAME:
big_smooth
SAMPLE CALLING SEQUENCE:
out = big_smooth_dfsr(data, 15)
PURPOSE:
To permit "boxcar" smoothing of an vector or an
image without producing the irritating
unsmoothed border at the boundaries.
This program forms an array bigger than the original
array by half of the smoothing width on each side and fills
the corners with valid average "near edge" data and then smooths
the extended array. It then plucks out and array the size of
the original out of the smoothed big array.
INPUT:
data = the 1-d or 2-d array to be smoothed
width = the number of pixels over which to smooth.
OUTPUTS:
out = the smoothed array of same type as input array
(Note: Actual smoothing is done in floating point.)
CALLS: ***
BIG_SMOOTH_DFSR
CALLED BY:
sfc_prep [1], sfc_prep [2], sigma_klip [1], sigma_klip [2], sxl_clip
sxt_clean [1], sxt_clean [2], sxt_deleak [1], sxt_deleak [2], sxt_prep [1]
sxt_prep [2], sxt_prep [3]
RESTRICTIONS:
Use only on a single array at a time, not a data cube.
HISTORY:
Written by L. Acton on 2/22/94.
Corrected indexing errors, 2/23/94. LWA
Changed to extend the image with average data,
avoiding the "problem columns" at the edge. LWA 3/20/94
Modified to handle 1-d smoothing. LWA 3/20/94
Made from big_smooth for the purpose of sxt_diffuser2.pro.
LWA 4/29/94
[Previous]
[Next]
Name:
BinarySea
Purpose:
Binary search of time and day vectors (if present) for the
occurance of the value "stTime" and return the data index
value for the nearest match.
Calling Sequence:
index = BinarySea(errStat, stTime, day, time)
Inputs:
stTime value of the search keys (time and day) as follows:
stTime = {stru_Nam, time: LONG(0), day: FIX(0)}
where: time is milliseconds of the day and day is
days since 1-1-1979.
day primary search parameter: vector of the # of days
since 1-1-1979.
time secondary search parameter: vector of the # of
milliseconds of the day.
Outputs:
errStat = 1 indicates success
0 indicates failure to find any elements
which satisfy the input constraints.
-1 indicates input times at or outside the
range of the input search parameters.
Returned:
BinarySea element value of the input search parameters
which matches the search key value.
CALLED BY:
GetNarOrb get nearest orbit, GetSDAVec, Time2Dset, TrimOVec, timidx
Side Effects:
none
Restrictions:
1). Search parameters are assumed to be linear arrays of
equal length.
2). Both time and day must be present (ver. 1 limit)
3). Note that search key value is in the form of a structure.
HISTORY:
Written by GAL 25-Feb-1991
18-Apr-91 feature corrections
[Previous]
[Next]
function bisect_order,x
NAME:
BISECT_ORDER
PURPOSE:
Reorder a vector by repeatedly bisecting
CATEGORY:
CALLING SEQUENCE:
y = bisect_order(x)
INPUTS:
x = vector to be reordered
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
y = reordered vector
CALLS: ***
BISECT_MERGE
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
IDL> print,bisect_order([1,2,3,4,5,6,7,8,9])
5 3 8 1 6 4 9 2 7
MODIFICATION HISTORY:
T. Metcalf 1994-12-16
[Previous]
[Next]
NAME: bkg_sub
Purpose: Subtract a "background" image from a data set.
Calling Sequence:
bkg_sub, index, data, sub, em=em, ave_em=ave_em, $
unc_data=unc_data
CALLS: ***
BACK_SUB, aver_img
CALLED BY:
go_teem [1], go_teem [2], go_teem_nn, go_teem_t
HISTORY:
written 30-Aug-93, gal
21-Oct-93 added errors.
----------------------------------------------------------------
[Previous]
[Next]
NAME:
blank0
PURPOSE:
This function converts all blanks in a string to zeros. Thus " 1:38: 8"
becomes "01:38:08".
CALLING SEQUENCE:
outstr = blank0(instr)
PARAMETERS:
instr = input string
outstr = output string
MODIFICATON HISTORY:
Code fragment provided by T. R. Metcalf. Debugging and documentation
performed by J.-F. de La Beaujardiere. (1 June 1992)
[Previous]
[Next]
NAME: blank_circle
PURPOSE: Prepare circular mask for blanking parts of solar image
Return either a binary byte array of the blank circle
or annulus image or an array of indices of the areas of the
image which are NOT included in the circle or annulus
for use in, e.g., SECTOR_AVG.PRO.
CALLING SEQUENCE:
out = blank_circle(nx,ny,x0,y0,r_inner,r_outer,image=image)
indice_array = blank_circle(512,512,251.5,280.7,196,250)
image = blank_circle(512,512,251.5,280.7,196,250,/image)
INPUT:
nx, ny = # of x and y pixels in image.
x0, y0 = location of center of circle in pixels.
r_inner = radius of smaller circle in pixels.
OPTIONAL INPUT:
r_outer = radius of larger circle in pixels.
CALLED BY:
sxt_deleak [1], sxt_deleak [2], sxt_scatwings, sxt_xsaa, xy_lwa
OPTIONAL KEYWORD INPUT:
/image causes the program to return an image
rather than the array of indices.
RETURNED/OUTPUT:
out = 0,1 logic image of disk or annulus or
"where" array of locations of positive values.
HISTORY:
Written by LWA 25-Feb-94 by stealing from
MK_SXL.PRO
LWA 1-Dec-95, modified to handle annulus and
to return indices or image.
LWA 17-Oct-96, fixed header.
[Previous]
[Next]
NAME: blank_circle
PURPOSE: Prepare circular mask for blanking parts of solar image
Return either a binary byte array of the blank circle
or annulus image or an array of indices of the areas of the
image which are NOT included in the circle or annulus
for use in, e.g., SECTOR_AVG.PRO.
CALLING SEQUENCE:
out = blank_circle(nx,ny,x0,y0,r_inner,r_outer,image=image)
indice_array = blank_circle(512,512,251.5,280.7,196,250)
image = blank_circle(512,512,251.5,280.7,196,250,/image)
INPUT:
nx, ny = # of x and y pixels in image.
x0, y0 = location of center of circle in pixels.
r_inner = radius of smaller circle in pixels.
OPTIONAL INPUT:
r_outer = radius of larger circle in pixels.
CALLED BY:
sxt_deleak [1], sxt_deleak [2], sxt_scatwings, sxt_xsaa, xy_lwa
OPTIONAL KEYWORD INPUT:
/image causes the program to return an image
rather than the array of indices.
RETURNED/OUTPUT:
out = 0,1 logic image of disk or annulus or
"where" array of locations of positive values.
HISTORY:
Written by LWA 25-Feb-94 by stealing from
MK_SXL.PRO
LWA 1-Dec-95, modified to handle annulus and
to return indices or image.
LWA 17-Oct-96, fixed header.
[Previous]
[Next]
NAME:
BLEEDER
PURPOSE:
Simulate pixel blooming due to saturation.
CATEGORY:
Yohkoh
CALLING SEQUENCE:
INPUTS:
IMG_DATA, a floating-point image that may or may not have
pixel brightnesses greater than 4095. If any of
the pixels are greater than 4095, this program
will simulate pixel blooming. If not, then simply
returns the original image.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
SIM_SAT_IMG, output image with pixel blooming due to the
saturation.
CALLED BY:
FILT4_SIM
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
29-may-98, DMcK, written to support FILT4_SIM.PRO
[Previous]
[Next]
NAME:
bls_shifter
CALLLING SEQUENCE
bls_shifter,data,sbls=[1,5,8]
bls_shifter,data,sbls=ii
PURPOSE
To shift SXT images taken with BLS ON to match a normal image.
INPUT
data = sxt image array
sbls = vector array of image numbers with BLS ON
OUTPUT
data array with "BLS ON" images shifted to match normal images.
HISTORY
Written, 12-Aug-93 by LWA to correct his table screw-up.
Modified 18-Aug-93 to handle all resolutions, LWA
Corrected typo and fixed header 4-Sep-93, LWA
[Previous]
[Next]
NAME:
BONEHEAD_MASS_ESTIMATE
PURPOSE:
Estimate the mass of a structure seen in a soft X-ray image.
Requires an independent temperature estimate.
CATEGORY:
Yohkoh analysis
CALLING SEQUENCE:
mass = bonehead_mass_estimate(index, data, temperature, threshold)
INPUTS:
index, an SXT index record
data, an SXT image image (if BYTE, apply SXT_DECOMP)
temperature (log units or degrees)
OPTIONAL (KEYWORD) INPUT PARAMETERS:
FLORID gives you all the variables
OUTPUTS:
returns the mass in grams, based on V = A^1.5 above the
threshold, ie where(image ge threshold*image, area).
default threshold value = 0.5.
if you want volume, area, density, use /florid (all cgs)
CALLS: ***
gt_expdur [1], gt_expdur [2], gt_filtb, gt_pix_size, sxt_decomp [1]
sxt_decomp [2], sxt_flux [1], sxt_flux [2], sxt_flux [3]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
ROUTINES CALLED: GT_EXPDUR, GT_PIX_SIZE, SXT_FLUX, GT_FILTB
MODIFICATION HISTORY:
6-Sep-97, written (HSH)
8-Sep-97, generalized a bit and debugged (HSH, ACS)
[Previous]
[Next]
NAME:
BORN_AGAIN
PURPOSE:
apply Pat Bornmann's method for temperature limits in
SXT data
CATEGORY:
CALLING SEQUENCE:
born_again, index, data, 2, 3 (if thin Al and Dag)
INPUTS:
index and data variables from PREP for two filters, /norm
filter identifiers, in order of thickness
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
CALLS: ***
DEFROI [1], DEFROI [2], OUTPLOT [1], OUTPLOT [2], OUTPLOT [3], SPLINE, SXT_TEEM [1]
SXT_TEEM [2], UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6]
UTPLOT_IO [1], UTPLOT_IO [2], UTPLOT_IO [3], gt_filtb, gt_time [1], gt_time [2]
plot_lcur [1], plot_lcur [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
HSH, written 13-Aug-94
HSH, generalized 20-Aug-94
[Previous]
[Next]
NAME:
boundary
PURPOSE
To produce an image illustrating the area sampled by
radial_avg.pro
CALLLING SEQUENCE
boundary,xy,img [,bound]
INPUT PARAMETERS
xy, the array describing the selected area from radial_avg.
img, the image on which you want to superpose the bounday of
the xy region(s). Must be the same size as the image
used in radial_avg to get the xy array.
OUTPUT
img, the image with the boundaries drawn with color=255.
OPTIONAL OUTPUT
bound, the array describing the boundary of xy.
HISTORY
LWA - 6 April 1995
CALLS:
CALLED BY
XFLOW_DIAG [1], xflow_diag [2]
[Previous]
[Next]
NAME:
box1_draw
CALLING SEQUENCE:
box1_draw, boxq, ipix, jpix, label=label
PURPOSE:
given an array of subscripts for boxes chosen using lcur_image
this will draw the appropriate box. Calls draw_boxcorn.
INPUT:
boxq = box coordinates
ipix = no. of columns in image
jpix = no. of rows in image
KEYWORDS:
label = labels for the boxes,
CALLS: ***
draw_boxcorn [1], draw_boxcorn [2], twod_subs
CALLED BY:
te_scale
HISTORY:
11/12/94, jmm
[Previous]
[Next]
NAME:
BOX_LC
PURPOSE:
dump out a time series for an interactively determined box
of pixels within a given data cube. Calls STEPPER to present
an image to interact with. Does EXP_NORM. Plots the results.
CALLING SEQUENCE:
box_lc, index, timeseries, boxout, data=data, ave=ave, back=back, $
not_dn = not_dn, gt_zero = gt_zero, old_cube=old_cube
INPUT PARAMETERS:
data and index file from an spr
OUTPUT PARAMETERS:
time series, in DN/sec, and the box coordinates
WARNINGS:
* single-pixel light curves will only be good for dejittered cubes
* in odd-sized cubes composed (e.g.) with mk_mosaic, beware of the
edges - they are counted as zeros!
KEYWORDS:
/data is the data to be input, if not set, then the cube in
COMMON Ocube, will be used.
/ave gives the time series in DN/sec/pixel (the box average)
/back is the background you want to subtract.
/not_dn tells you that this is not SXT data numbers, so you
do not do background subtraction
/gt_zero you set all of the pixels less than zero to zero
SPECIAL TRICKS:
1) there is an invisible Q entry required to stop STEPPER
2) lower left first, then upper right please
3) right button quits
CALLS: ***
STEPPER [1], STEPPER [2], STEPPER [3], STEPPER [4], STEPPER [5], STEPPER [6]
STEPPER [7], UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6]
HISTORY:
Hugh Hudson, Sept. 24, 1992
HSH added keyword /ave Sept. 26
HSH added multiple box capability Oct. 2
HSH added general dimensions Oct. 5
jmm switched from exp_norm to dcube_norm, which uses dark
current subtraction for background, feb 27 93
jmm added /back and /not_dn keywords Feb 28
jmm changed data to a keyword, Mar. 1 93
MDM modification to allow /AVE option to work, 21-Apr-93
MDM modification to not STOP after exiting, 29-Apr-93
[Previous]
[Next]
NAME:
box_lc_array
PURPOSE:
You choose a box on an image given some SXT or HXT
data cube, using the routine lcur_image, box_lc_array
will return a light curve for each pixel in the box,
and plot it up using the routine lc_array1. One
box at a time, please.
CALLING SEQUENCE:
box_lc_array, index, data, boxq=boxq, bin=bin, $
same_bx=same_bx, scale=scale, filen0=filen0, $
title = title, lc_oplot=lc_oplot, $
tim_oplot = tim_oplot, clr_oplot = clr_oplot, $
psym=psym, oplot_psym=oplot_psym
INPUT:
index = index structure for data
data = data cube, must already be aligned and normailzed
and background subtracted
KEYWORDS:
boxq = the subscripts of the given box
bin = if set to something greater than 1, this will
sum the pixels within the box, to that many pixels.
same_bx = if set, use the values of the box coordinates in same_bx,
or boxq, if set
scale = set this keyword if you want the plots scaled globally
filen0 = if set, outputs the lc_array1 plot into a file called filen0
title = if set, a title for the plot
lc_oplot = a light curve to overplot the data, this can be a data cube
of the same size (in pixels, not necessarily time) as the input data.
similar to the pfdata keyword, that once existed. Note that the
BIN keyword will operate on lc_oplot if it is a cube.
tim_oplot = a time array (structure or seconds), for the overplotted lc, if
not passed in, the wave variable will be used, or index if wave
is not passed in.
clr_oplot = a color for the overplotted curve
psym= psym for the plot
oplot_psym = psym for the oplotted curve
CALLS: ***
LC_ARRAY1, dn_pix_sum, lcur_image, te_scale, twod_subs
HISTORY:
1-jul-94 jmm
Added oplot capability, 7-mar-95, jmm
[Previous]
[Next]
NAME: box_lc_plot
PURPOSE: To format output of BOX_LC for printing figures
METHOD: Takes the output of BOX_LC and creates finished figures.
The TYPE keyword allows various types of data presentation.
Default is to plot the data as is, i.e. TYPE=1.
CALLING SEQUENCE: box_lc_plot,index,values,boxes,backi[,title][,/bw]
[,type=#][,colors=colors][,/port][,/sym]
PARAMETERS: index index for data (as in call to BOX_LC)
values output of BOX_LCs TIMESERIES variable
boxes output of BOX_LCs BOXOUT variable
backi image to display boxes on
title string, to display as title
KEYWORDS: port portrait mode, the image at top, the plot underneath
bw don't use color for the plots
symbol when set display symbol index. Should be used with BW.
reset when set call XLOADCT to reset base color table.
colors colors to use for plots, use DOC_LIBRARY on LINECOLORS
type keyword for selecting the type of plot
1: straight forward plot.
2: each curve normalized to 1 at t=0.
3: log plot.
4: curves each normalized by peak.
5: first series used as refference for others.
NOTES: You can plot a selection of the boxes by appropriate indexing of the boxes and
values inputs.
SIDE-EFFECTS: Resets the color table. Old table saved in common block RGB2. Because
the colors are fixed in the color plot mode we can not guarentee good
contrast
COMMONS: RGB2
CALLS: ***
CONGRID [1], CONGRID [2], CONGRID [3], OUTPLOT [1], OUTPLOT [2], OUTPLOT [3]
UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], XLOADCT [1]
XLOADCT [2], XLOADCT [3], draw_boxcorn [1], draw_boxcorn [2], int2secarr [1]
int2secarr [2], linecolors [1], linecolors [2], new_win
HISTORY: Drafted, A.McAllister 7-May-93.
Various improvements and options added, AMcA 11-May-93.
Fixed to handle negative numbers, AMcA 14-May-93.
Reworked to allow color plotting, AMcA 16-Jun-93.
Ensure box outline contrast, AMcA 29-Jun-93.
Added NOSQUEEZE to LINECOLORS call, AMcA 10-Jul-93.
[Previous]
[Next]
NAME:
BOX_MAKER
PURPOSE:
Emulate the operation of a variable-sized box cursor (also known as
a "marquee" selector).
CATEGORY:
Interactive graphics.
CALLING SEQUENCE:
BOX_MAKER, x0, y0, nx, ny [, INIT = init, $
FIXED_SIZE = fixed_size, ASPECT = aspect]
INPUTS:
No required input parameters.
OPTIONAL INPUT PARAMETERS:
x0, y0, nx, and ny give the initial location (x0, y0) and
size (nx, ny) of the box if the keyword INIT is set. Otherwise, the
box is initially drawn in the center of the screen.
KEYWORD PARAMETERS:
INIT: If this keyword is set, x0, y0, nx, and ny contain the initial
parameters for the box.
FIXED_SIZE: If this keyword is set, nx and ny contain the initial
size of the box. This size may not be changed by the user.
ASPECT: Set equal to the desired aspect ration of the box. Then
this aspect ration is forced.
MESSAGE: If this keyword is set, print a short message describing
operation of the cursor.
OUTPUTS:
x0: X value of lower left corner of box.
y0: Y value of lower left corner of box.
nx: width of box in pixels.
ny: height of box in pixels.
The box is also constrained to lie entirely within the window.
COMMON BLOCKS:
None.
SIDE EFFECTS:
A box is drawn in the currently active window. It is erased
on exit.
RESTRICTIONS:
Works only with window system drivers.
PROCEDURE:
The graphics function is set to 6 for eXclusive OR. This
allows the box to be drawn and erased without disturbing the
contents of the window.
Operation is as follows:
Left mouse button: Move the box by dragging.
Middle mouse button: Resize the box by dragging. The corner
nearest the initial mouse position is moved.
Right mouse button: Exit this procedure, returning the
current box parameters.
MODIFICATION HISTORY:
DMS, April, 1990.
DMS, April, 1992. Made dragging more intutitive.
June, 1993 - Bill Thompson
prevented the box from having a negative size.
[Previous]
[Next]
NAME:
box_sxthxt_fsp
PURPOSE:
To fit spectra for sxt and hxt, using any_fsp.pro,
Needless to say, the data cubes must be aligned.
CALLING SEQUENCE:
Box_sxthxt_fsp, index, data, hindex, hdata, fitp, scpar, chdta, $
outfile=outfile, pfile=pfile, filt_no=filt_no, $
same_bx=same_bx, boxq=boxq, s_sdel=s_sdel, $
h_sdel=h_sdel, tyspec=tyspec, $
av_satpix=av_satpix, use_filters=use_filters, $
Sindex=sindex, Sdata=sdata, sys_err=sys_err
INPUT:
index= info. structure for SXT data from test_rd
data= compressed SXT data
hindex= info. structure for HXT images
hdata= HXT images
OUTPUT:
fitp, 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
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.
scpar, 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)
chdta, a structure containing data for each channel for each interval
y0= 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:
outfile= the output file
pfile= a file for spectral plot
filt_no=a filter no. to choose the SXT interval
same_bx= if set, use the values of the box coordinates in same_bx,
or boxq, if set
boxq= the output box subscripts,
s_sdel=SXT channels to delete
(0 = Al.1, 1 = AlMg, 2 = Mg3, 3 = Al12, 4 = Be119)
h_sdel=HXT channels to delete
s_bck= a scalar background for SXT images
av_satpix= if set, use sat_av.pro to average out the sat. pixels, this
is only invoked if SXT_PREP is called
tim_array = a time array, for plotting purposes
use_filters = an array of filter numbers, 2 is al.1, 3 is AlMG,
4 is Be119, 5 is Al12, 6 is Mg3, the default is
to use [2, 4, 5]. Be careful, SXT_INTERP is used,
so that if you tell it a filter that isn't used
near the time interval that you have, you may
get nonsense...
sindex, sdata= prepped index and data, so you need not do this every time
sys_err= 'systematic errors', useful for the mismatch in count rates
between SXT, HXT, or pass in if you don't trust the errors
you get from counting stats, or to arbitrarily push down chi^2
values, The default iz 0.0.
This makes the error in the rate = sqrt(cps/dt)+sys_err*cps.
CALLS: ***
DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], UTPLOT [1], UTPLOT [2]
UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], any_fsp, delvarx [5], dude
fmt_tim [1], fmt_tim [2], gt_expdur [1], gt_expdur [2], gt_filtb, hxi_interp
hxi_unnorm, lcur_image, plot_lcur [1], plot_lcur [2], sat_av_arr, strip_data
sxt_interp [1], sxt_interp [2], sxt_prep [1], sxt_prep [2], sxt_prep [3]
yesnox [1], yesnox [2]
HISTORY:
Written Mar, '93 by J.McTiernan
Added s_bck, 7-apr-94, JMM
Rewrote box_sxtth_hxt to box_sxthxt_fsp, 11-26-94, jmm
Rewrote it again, 5-24-95, jmm
Added sys_err, 6-24-95, jmm
New output formats, jmm 7-28-95
[Previous]
[Next]
NAME:
box_sxtth_hxt
PURPOSE:
To fit spectra for sxt and hxt, using any_fsp.pro,
This fits the sxt emission in the box to a thermal component,
and subtracts the expected amount from the hxt emission.
Needless to say, the data cubes must be aligned.
CALLING SEQUENCE:
box_sxtth_hxt, index, data, hindex, hdata, s_fitp, h_fitp, $
s_scpar, h_scpar, s_chdta, h_chdta, $
outfile = outfile, pfile = pfile, filt_no = filt_no, $
same_bx=same_bx, boxq=boxq, h_tyspec=h_tyspec, $
h_sdel=h_sdel, s_tyspec=s_tyspec, $
av_satpix=av_satpix, use_filters=use_filters, $
Sindex=sindex, Sdata=sdata, s_sys_err=s_sys_err, $
h_sys_err = h_sys_err
INPUT:
index= info. structure for SXT data from test_rd
data= compressed SXT data
hindex= info. structure for HXT images
hdata= HXT images
OUTPUT:
; s_fitp and h_fitp, are structures for SXT and HXT respectively:
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
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.
; s_scpar and h_scpar are structures for SXT and HXT respectively
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)
; s_chdta and h_chdta are structures for SXT and HXT respectively
ch_dta, a structure containing data for each channel for each interval
y0= 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:
outfile= the output file
pfile= a file for spectral plot
filt_no=a filter no. to choose the SXT interval
same_bx= if set, use the values of the box coordinates in same_bx,
or boxq, if set
boxq= the output box subscripts,
h_tyspec= type of spectrum for HXT fit, default is 1, a single PL
h_sdel=HXT channels to delete
s_tyspec= type of spectrum for SXT fit, default is 10, Th with lines
av_satpix= if set, use sat_av.pro to average out the sat. pixels, this
is only invoked if SXT_PREP is called
tim_array = a time array, for plotting purposes
use_filters = an array of filter numbers, 2 is al.1, 3 is AlMG,
4 is Be119, 5 is Al12, 6 is Mg3, the default is
to use [2, 4, 5]. Be careful, SXT_INTERP is used,
so that if you tell it a filter that isn't used
near the time interval that you have, you may
get nonsense...
sindex, sdata= prepped index and data, so you need not do this every time
s_, h_sys_err= 'systematic errors', for each instrument, useful for the
mismatch in count rates between SXT, HXT, or pass in if you
don't trust the errors you get from counting stats, or to
arbitrarily push down chi^2 values, The default iz 0.0.
This makes the error in the rate = sqrt(cps/dt)+sys_err*cps.
CALLS: ***
any_fsp, anytim2ints [1], anytim2ints [2], fsp_outplot, fsp_output, hxi_interp
hxi_unnorm, hxt_thcomp, sxtbox_fsp
HISTORY:
Written Mar, '93 by J.McTiernan
Added s_bck, 7-apr-94, JMM
Calls sxtbox_fsp to get the sxt component now, 23-may-95, jmm
Added the sys_err's, jmm, 6-24-95
New output format, jmm, 7-28-95
[Previous]
[Next]
NAME:
boxit
PURPOSE:
To draw a box on the screen at an absolute location.
CALLING SEQUENCE:
boxit,x,y
boxit,x,y,64
boxit,x,y,64,128,bin=4,color=200
INPUT:
x, y - screen coordinates of the lower left corner of box
OPTIONAL INPUT:
sidx - Number of pixels on x side (if not passed, the
default is 64
sidy - Number of pixels on y side (if not passed, the
default is same as x
KEYWORDS
color - Specifies color of box. Default is color = 255
bin = Display rebin factor. Default is bin=1
CALLED BY:
xy_lwa
HISTORY:
Written 18-Oct-92 by L. Acton
[Previous]
[Next]
NAME:
BOXLC_DISPLAY
PURPOSE:
re-plot boxes from which time-series data is extracted via box_lc
CALLING SEQUENCE:
boxlc_display, data, index, ts, boxout
INPUT PARAMETERS:
timeseries and box locations from box_lc
OUTPUT PARAMETERS:
none
WARNING;
this uses a big box - scrunch yourself into the lower left
corner of your screen!
CALLS: ***
LOADCT, STRETCH, fmt_tim [1], fmt_tim [2], sxt_decomp [1], sxt_decomp [2]
HISTORY:
Hugh Hudson, Oct 3, 1992
[Previous]
[Next]
version 2.0
Structure definition for reading parameters from BPC results file.
Used in RD_BPC (see that for explanation).
CALLED BY:
rd_bpc
History: CDP December 91
atp july 92 - added in everything else
atp aug 93 added some text.
[Previous]
[Next]
NAME:
Break
PURPOSE:
Obtains a P.L. with a break in it
CALLING SEQUENCE:
Break,y,s2,x,nch,ax,fx
INPUT:
y=obs data,
s2=unc. squared
x=energies,
nch=no. of channels
OUTPUT:
fx=ax(0)+ax(1)*x Below ebr,
fx=ax(2)+ax(3)*x above,
CALLS: ***
BREAK_PL, lfit
HISTORY:
Spring,' 92 JMcT
Changed to break_pl, 9-nov-2001
[Previous]
[Next]
NAME:
Break2
PURPOSE:
Obtains a P.L. with a 2 breaks in it
CALLING SEQUENCE:
Break2,y,s2,x,nch,ax,fx
INPUT:
y=obs data,
s2=unc. squared
x=energies,
nch=no. of channels
OUTPUT:
fx=ax(0)+ax(1)*x, e<eb1
fx=ax(2)+ax(3)*x, eb1<e<eb2
fx=ax(4)+ax(5)*x, e>eb2
CALLS: ***
BREAK_PL, BREAK_PL2, lfit
HISTORY:
Spring,' 92 JMcT
Changed to break_pl2, 9-nov-2001
[Previous]
[Next]
NAME: break_doc
PURPOSE: extract subset of idl header info for display/verification
this is a check of a two line purpose
third purpose line
CALLING SEQUENCE:
break_doc, infile
break_doc, header
Input Parameters:
input - file to extract - assume idl .pro file
OR documentation header (from doc_head)
Optional Keyword Parameters:
keep_key - if set, keywords from file are retained in the
tag value - default is to eliminate since the
tag name contains relavent info.
debug - if set, some programmer info is printed
Output:
function returns structure containing documentation info
all fields are string type - null fields imply a particular
field is missing from the documentation header
Category: gen, swmaint, unix_only
CALLS: ***
ARR2STR [1], Arr2Str [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], STR2ARR [1]
STR2ARR [2], STR_LASTPOS [1], break_file [4], concat_dir [4], curdir [1]
curdir [2], doc_head [1], doc_head [2], doc_head [3], file_exist [1]
file_exist [3], str_lastpos [2], strposarr [1], strposarr [2]
CALLED BY:
doc1liners, doc_summ [1], doc_summ [2], ssw_swmap_info
Common Blocks: get_doc_private, doc_strt
Modification History: slf, 18-July-1992
(derived from sw_head.pro)
slf, 9-Aug-1992 added print option
slf, 22-Mar-1994 convert to rd_tfile
[Previous]
[Next]
NAME:
brem (function)
PURPOSE:
X-ray thermal continuum as function of wavelength
CALLING SEQUENCE:
flux = brem(te, wave,/nowarn)
OUTPUTS
log_10 of spectral emission in ph/sec/A for emission measure 10^50 cm^-3
Calculation is based on equations no. 29 and 30
in R. Mewe, J. Schrijver, and J. Sylwester (A. & A. Suppl., 40, 327.),
but the G_c formula was updated and is given by Mewe, Gronenchild,
and van den Oord (Paper V, A. & A. Suppl. Ser. 62, 197). Equation (3)
of Paper V reads as:
G_c = 27.83*(Te_6+0.65)^(-1.33) + 0.15 * wave^0.34 * Te_6^0.422
KEYWORDS:
nowarn turns off message on units
INPUT PARAMETERS:
te the electron temperature in million K (T6)
wave the wavelength in A
MODIFICATION HISTORY
written by D. Zarro October, 1992
documentation and editing by H. Hudson, November 1992
CALLS:
[Previous]
[Next]
BROAD
Procedure to convolve a data array with a Gaussian profile of full-width
equal to parameter 'width' in data points.
Input:
y_in input array to be broadened
width sigma of broadening Gaussian in data points
Output:
y_out the broadened data array
Use:
IDL> plot, in
IDL> broad, in, out, wid
IDL> oplot, out
CDP Feb 92
CALLED BY
get_syn_25
[Previous]
[Next]
NAME:
BSC2BSD
PURPOSE:
convert BSC file to a BSD file
CALLING SEQUENCE:
BSC2BSD,BSCFILE,BSDFILE
INPUTS:
BSCFILE - BSC input file to convert
BSDFILE - BSD output file
CALLS: ***
CV_BSC2BSD, DATATYPE [1], DATATYPE [2], DATATYPE [3], WR_BSD, rd_bsc
str_replace [1], str_replace [2]
PROCEDURE:
Calls CV_BSC2BSD
If BSDFILE is not entered, then BSD file name is constructed
from BSC file name by replacing BSC with BSD.
HISTORY:
Written Dec. 1992 by D. Zarro (Applied Research Corp).
[Previous]
[Next]
NAME:
bsc_bin2w
PURPOSE:
convert BCS bin positions wavelength
CALLING SEQUENCE:
wave=bsc_bin2w(bin,chan)
INPUTS:
bins = raw bin number [vector or scalar]
chan = BCS channel [must be scalar]
OUTPUTS:
wave = wavelength corresponding to corrected bin position
OPTIONAL INPUT KEYWORDS:
modeid = necessary to identify grouping plan for each channel [def=1]
raw = if set, informs program that these are raw uncorrected bin positions
and, hence, need to be corrected.
dispc= dispersion correction factor (def=1)
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], GT_BSC_BINCAL [1], GT_BSC_BINCAL [2]
INTERPOL, bsc_bincor, get_atomic [1], get_atomic [2]
PROCEDURE::
Calls gt_bsc_bincal to determine mapping from bin to wavelength,
then interpolates input bins to new wavelengths.
MODIFICATION HISTORY:
20 Aug 1994, written DMZ (ARC)
5 Jan 1995, modified DMZ (ARC) -- corrected for resonance line offset
[Previous]
[Next]
NAME:
bsc_bincor
PURPOSE:
convert raw BCS bin positions
to corrected BSC physical detector positions
CALLING SEQUENCE:
corr=bsc_bincor(raw,chan)
INPUTS:
raw = original raw bin number [vector or scalar]
chan = BCS channel [must be scalar]
OUTPUTS:
corr = corrected bin position corresponding to some
presumably physical detector position.
OPTIONAL INPUT KEYWORDS:
modeid = necessary to identify grouping plan for each channel [def=1]
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], GT_BSC_BINCAL [1], GT_BSC_BINCAL [2]
INTERPOL
CALLED BY:
bsc_bin2w
PROCEDURE::
calls gt_bsc_bincal to determine mapping from raw to corrected units,
then interpolates input bins to corrected values.
MODIFICATION HISTORY:
17 Jul 1994, written DMZ (ARC)
[Previous]
[Next]
NAME:
BSC_CHAN
PURPOSE:
return indicies for given channel in BSC_INDEX
CALLING SEQUENCE:
BSC_CHAN,BSC_INDEX,CHAN
INPUTS:
BSC_INDEX - BSC index structures
CHAN - BCS channel to select
RETURNED OUTPUTS:
SS=indicies of requested/select channel data
CALLS: ***
BSC_CHECK [1], BSC_CHECK [2], GT_BSC_CHAN [1], GT_BSC_CHAN [2], STR2ARR [1]
STR2ARR [2]
CALLED BY:
BSC_TIM2DSET, FE25_BSC_TEMP, LC_BSC, LIST_BSC [1], LIST_BSC [2], fit_bsc, fit_bsc_as
map_bsc
HISTORY:
Written Nov'92 by D. Zarro (ARC)
20 Sept'93, modified, D. Zarro (ARC), to return SS vector
17 Feb'94, DMZ, added check for single channel input
24 Jun'94, DMZ, added check for nonpresent channel
[Previous]
[Next]
NAME:
BSC_CHAN_AS
PURPOSE:
extract index of particular channel from BSC arrays
CALLING SEQUENCE:
INDEX=BSC_CHAN_AS(BSC_INDEX,CHAN,DSET)
INPUTS:
BSC_INDEX - BSC index structures
CHAN - BCS channel
OUTPUTS:
INDEX - subarray of BSC structures containing just
data pertaining to specified channel
OPTIONAL OUTPUTS:
DSET - indicies of extracted data in BSC_INDEX
TIME - times of extracted data (secs since start of day)
KEYWORDS:
TSTART,TEND - string start and end times of data to extract
COUNT - # of data points extracted
CALLED BY:
PLOT_BSC_AS2
PROCEDURE:
Simple use of WHERE
HISTORY:
Written Oct'93. A copy of Dominic's older version of bsc_chan for use
in PLOT_BSC_AS2.PRO.
Written Nov'92 by D. Zarro (ARC)
Modified Apr'93 (DMZ, ARC) - added option to extract times
[Previous]
[Next]
NAME:
BSC_CHECK
PURPOSE:
check that index or data structure is of type BSC
CALLING SEQUENCE:
S=BSC_CHECK(BSC_INDEX,NSC_DATA)
INPUTS:
BSC_INDEX - BSC index structure
BSC_DATA - BSC data structure
OUTPUTS:
S - 1 if BSC structure type
- 0 otherwise
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3]
CALLED BY:
BSC_CHAN, BSC_ERRCAL [1], BSC_ERRCAL [2], BSC_FIELD, BSC_FLUXCAL, BSC_TIM2DSET
BSC_VALID, BSC_WAVECAL, BSC_XCORR, CV_BSC2BSD, FE25_BSC_TEMP, GET_BSC
GT_BSC_BINCAL [1], GT_BSC_BINCAL [2], GT_BSC_CHAN [1], GT_BSC_CHAN [2]
GT_BSC_CRATE, GT_BSC_FLUX, GT_BSC_TIME, GT_BSC_WAVE [1], GT_BSC_WAVE [2], LC_BSC
LIST_BSC [1], LIST_BSC [2], MK_BSC [1], MK_BSC [2], MK_BSC_DATA [1]
MK_BSC_DATA [2], PLOT_BSC [1], PLOT_BSC [2], PLOT_BSC_AS2, SEL_BSC, WBSC [1]
WBSC [2], bsc_vturb, cal_bsc, fit_bsc, fit_bsc_as, fit_bsc_plot, get_bsc_anno, map_bsc
mk_bsa_interv [1], mk_bsa_interv [2], mk_bscfit_eps
PROCEDURE:
Simple use of TAG_NAMES function
if BSC_DATA is entered, then also checks if n_elements match
HISTORY:
written by DMZ (ARC) - Mar'93
April'94 - added check for FLUX tag (DMZ)
[Previous]
[Next]
NAME:
BSC_ERRCAL
PURPOSE:
compute and add error field to BCS_DATA
CALLING SEQUENCE:
BSC_ERRCAL,BSC_INDEX,BSC_DATA
INPUTS:
bsc_index - BSC index structure
bsc_data - BSC data array
OUTPUTS:
bsc_index - BSC index structure
bsc_data - modified BSC data structure with ERROR field
CALLS: ***
BSC_CHECK [1], BSC_CHECK [2], BSC_FIELD, GT_BSC_BINCAL [1], GT_BSC_BINCAL [2]
GT_BSC_CHAN [1], GT_BSC_CHAN [2], chktag
CALLED BY:
CV_BSC2BSD, GT_BSC_FLUX, MK_BSC_DATA [1], MK_BSC_DATA [2], SEL_BSC, back_off
sum_bsc
PROCEDURE:
compute sqrt errors
HISTORY:
Written Feb. 1993 by D. Zarro (Applied Research Corp).
Modified Feb. 1994 (Zarro) -- computed errors so that
relative errors of curvature-corrected counts are same
those of uncorrected counts.
Modified April. 1994 (Zarro) -- added check for count field
May'94, DMZ, added check for 'SYN' spectra
Mar'97, DMZ, fixed bin normalization
[Previous]
[Next]
NAME:
BSC_ERRCAL
PURPOSE:
compute and add error field to BCS_DATA
CALLING SEQUENCE:
BSC_ERRCAL,BSC_INDEX,BSC_DATA
INPUTS:
bsc_index - BSC index structure
bsc_data - BSC data array
OUTPUTS:
bsc_index - BSC index structure
bsc_data - modified BSC data structure with ERROR field
CALLS: ***
BSC_CHECK [1], BSC_CHECK [2], BSC_FIELD, GT_BSC_BINCAL [1], GT_BSC_BINCAL [2]
GT_BSC_CHAN [1], GT_BSC_CHAN [2], chktag
CALLED BY:
CV_BSC2BSD, GT_BSC_FLUX, MK_BSC_DATA [1], MK_BSC_DATA [2], SEL_BSC, back_off
sum_bsc
PROCEDURE:
compute sqrt errors
HISTORY:
Written Feb. 1993 by D. Zarro (Applied Research Corp).
Modified Feb. 1994 (Zarro) -- computed errors so that
relative errors of curvature-corrected counts are same
those of uncorrected counts.
Modified April. 1994 (Zarro) -- added check for count field
May'94, DMZ, added check for 'SYN' spectra
[Previous]
[Next]
NAME:
BSC_FIELD
PURPOSE:
add new fields (i.e. tags) to BSC data structure (if not present)
CALLING SEQUENCE:
bsc_field,bsc_index,bsc_data,fields
INPUTS:
BSC_INDEX - BSC index structure
BSC_DATA - BSC data structure
FIELDS - string array of field names to add
(e.g. ['BIN','WAVE'])
OUTPUTS:
BSC_INDEX - modified BSC index
BSC_DATA - modified BSC data structure
CALLS: ***
BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
MK_BSC_STR [1], MK_BSC_STR [2], bits [1], bits [2], str_copy_tags [1]
str_copy_tags [2], str_copy_tags [3], str_copy_tags [4], str_merge [1]
str_merge [2], where_arr [1], where_arr [2]
CALLED BY:
BSC_ERRCAL [1], BSC_ERRCAL [2], BSC_FLUXCAL, BSC_WAVECAL, BSC_XCORR, fit_bsc
fit_bsc_as
PROCEDURE:
Calls mk_bsc_str to create the strutures
HISTORY:
Written Sep'93 (DMZ, ARC)
2-oct-93, JRL, LPARL, Re-written.
21-oct-93, JRL, added check for .FIT in BSC_INDEX
26-nov-93, DMZ, added .FLUX_FIT2
[Previous]
[Next]
NAME:
BSC_FLUXCAL
PURPOSE:
to apply flux calibration to accumulated BSC spectra in BSC structures
CALLING SEQUENCE:
BSC_FLUXCAL,BSC_INDEX,BSC_DATA
INPUTS:
bsc_index - BSC index structure
bsc_data - BSC data structure
OUTPUTS:
bsc_index - modified BSC index structure
bsc_data - flux calibrated BSC data array
CALLED BY:
GT_BSC_FLUX, MK_BSC_DATA [1], MK_BSC_DATA [2]
PROCEDURE:
INDEX.BSC.PHYSUNIT_ANS is set to 2, to signify that flux calibration has
been applied.
CALLS: ***
BSC_CHECK [1], BSC_CHECK [2], BSC_FIELD, BSC_XCORR, GT_BSC_BINCAL [1]
GT_BSC_BINCAL [2], GT_BSC_CHAN [1], GT_BSC_CHAN [2]
RESTRICTIONS:
BSC count rates must be first curvature corrected by BSC_XCORR
HISTORY:
Written Nov. 1992 by D. Zarro (Applied Research Corp).
[Previous]
[Next]
NAME:
BSC_LRANGE
PURPOSE:
extract wavelength ranges from BSC spectra for fitting
CALLING SEQUENCE:
lrange=bsc_lrange(ww,ff)
INPUTS:
ww = wavelength array
ff = flux array
OUTPUTS:
lrange = [w1,w2,w3,w4...w2n-1,w2n]
= n pairs of selected wavelength ranges
KEYWORDS:
over = use existing plot
CALLS: ***
BCS_SPEC_PLOT, pcurse
CALLED BY:
fit_bsc, fit_bsc_as
HISTORY:
15-Feb-94, D. Zarro (ARC), Written
21-Jun-94, DMZ , improved point selection via PCURSE
[Previous]
[Next]
NAME:
BSC_OLD_STRUCT
PURPOSE:
Define the following BSC specific database structures
* FIT_2041_BSC_Rec
CALLING SEQUENCE:
BSC_OLD_STRUCT
HISTORY:
Created 3-Feb-94 by M.Morrison to store FIT_2041_BSC_Rec
[Previous]
[Next]
NAME: BSC_RASTER.PRO
PURPOSE:
Plots bsc (i.e., processed) spectra in a raster form, a-la sxt's xy_raster.
Default is flux units (photons cm^-2 s^-1 A^-1).
CALLING SEQUENCE:
IDL> bsc_raster,bsc_index,bsc_data,chan=chan,intensity=intensity,nx=nx,ny=ny,$
hc=hc,noprint=noprint,ss=ss,plot_dir=plot_dir
NOTES:
Requires pre-processed bsc data.
INPUTS:
bsc_index Index array from mk_bsc
bsc_data Data array from mk_bsc
OPTIONAL INPUTS:
OPTIONAL INPUT KEYWORDS:
chan Channel of the data to be plotted. Default is CaXIX (Chan=3)
intensity If set, plots spectra in counts/s/bin instead of flux units.
nx Number of plots in x-direction. Default = 3.
ny Number of plots in y-direction. Default = 4.
hc for hardcopy -- auto prints unless /noprint is used too.
noprint if used with /hc, will create idl.ps file, but not print it.
ss array of subset of spectral elements to be plotted.
plot_across if set, plot spectra from left to right instead of top to bottom first
OUTPUTS:
CALLS: ***
GT_BSC_CHAN [1], GT_BSC_CHAN [2], SEL_BSC, clearplot [1], clearplot [2]
fmt_tim [1], fmt_tim [2], pprint [1], pprint [2]
HISTORY:
Written 20-Oct-1995, A. Sterling
[Previous]
[Next]
NAME:
bsc_spec_plot
PURPOSE:
Plot BCS observed or synthetic spectra
CALLING SEQUENCE:
bcs_spec_plot,bsc_index,bsc_data ; Defaults to the first plot
bcs_spec_plot,bsc_index,bsc_data,ss=10 ; Plot spectrum 10
INPUTS:
INDEX = BSC Index structure or wavelength vector
DATA = BSC Data structure or data array
OPTIONAL INPUT KEYWORDS:
AINFO = Optional information structure (from bcs_line)
over = If set, over plot on an existing plot
ss = Scalar value which specifies the index of bsc_index,bsc_data to plot.
xoff = Number between 0 and 1 which specifies where the plot annotation goes
(this is useful in case the user wants to specify a different size window).
nobos = If set, don't plot the data (by default plots data and overplots the fit)
nofit = If set, don't plot the fit (by default plots data and overplots the fit)
notitle= If set, don't do print title
ocolor = color keyword for OPLOT
ebar = overplot error bars [can come in as 0/1 or a vector of errors]
secondary = overplot secondary cmpt (if present)
primary = overplot primary cmpt (if present)
vunit = print Td6 in km/s units
noannotate = do not print annotation
noclear = If set, do not do clearplot on entry or exit
Most plot keywords are accepted (psym, xrange, yrange, linestyle, xstyle, etc.)
PostScript Specific:
hc = If set, make a hardcopy version.
PostScript = If set, send the output to an idl.ps file
(but don't close or send to printer)
eps = If set, generate encapsulated PostScript file (closed, not sent to printer)
(if /Post,/eps is specified, don't close the file)
xsize = Specifies the PostScript X-axis length (inches)
ysize = Specifies the PostScript Y-axis length (inches)
xpage = Specifies the PostScript X page size (inches)
ypage = Specifies the PostScript Y page size (inches)
x0,y0 = Specifies the PostScript X and Y-axis origins (inches)
portrait= if set, do the plot in portrait mode. (Recommend /portrait,/noatomic be used)
file = Specify the output plot file name (default = idl.ps)
noatomic= if set, don't put the atomic code labels on the PS plot (near X-axis labels)
nodate = if set, don't put the date on the PS plot
nouncert= If set, don't put +/- uncertainties on the plot
orig = If set, then plot the fitted spectrum on the original wavelength
scale of the observed spectrum
OPTIONAL OUTPUT KEYWORDS:
CALLS: ***
BCS_SPEC_PLOT, DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2]
DELVARX [3], DELVARX [4], EPLOT, SEL_BSC, clearplot [1], clearplot [2], delvarx [5]
fmt_tim [1], fmt_tim [2], get_bsc_anno, pprint [1], pprint [2]
MODIFICATION HISTORY:
30-sep-93, J. R. Lemen (LPARL), Written
7-oct-93, DMZ and JRL -- Added color and ocolor keywords
18-Oct-93, DMZ and JRL -- added ebar keyword
18-Oct-93, DMZ -- allowed for vector and/or scalar inputs for EBAR
30-Nov-93, DMZ -- added oplot of secondary cmpt (via /SECONDARY switch)
9-Dec-93, DMZ -- added VUNIT keyword
20-Dec-93, DMZ -- fixed small bug in second cmpt plotting and annotation
29-dec-93, JRL -- Added /portrait,/noatomic,/eps,x0off,y0off,xpage,ypage
7-jan-94, JRL -- Added an "empty" to flush PS buffer (needed sometimes for /eps)
23-Jan-94, DMZ -- added /PRIMARY, /NOANNOTATE keywords
+ more error checking and general cleanup
9-Apr-94, DMZ -- fixed bug with /PRIM
21-Jun-94, DMZ -- further propagated VUNIT
30-jun-94, JRL -- Added the /NOUNCERT keyword
3-Jan-95, DMZ -- added /ORIG + keyword inheritance
9-Jan-95, JRL -- Minor modifications. Restored FONT keyword.
13-Jan-95, JRL -- If data comes in as arrays, restore psym=0 default
Moved clearplot to the correct place.
27-apr-95, JRL -- Added a NOCLEAR keyword
12-May-95, DMZ -- Improvements to the /OVER function
24-Jun-95, JRL -- If !d.name='ps' on entry and no /hc or /post, then assume user
has done the proper device calls.
[Previous]
[Next]
NAME:
BSC_STRUCT
PURPOSE:
Define the following BSC specific database structures
* BSC_Index_Rec
* BSC_Roadmap_Rec
* FIT_BSC_Rec
CALLING SEQUENCE:
BSC_STRUCT
CALLED BY:
MK_BSC_STR [1], MK_BSC_STR [2], bcs_line, bcs_spec, rd_roadmap [1]
HISTORY:
written by Mons Morrison, R. Bentley, J. Mariska and D. Zarro, Fall 92
11-sep-93, JRL + DMZ, Added .valid_ans, .nstart and .nend fields (see **)
2-Oct-93 (MDM) - Changed the FIT structure a fair amount
13-Oct-93 (MDM) - Changed the FIT field from Num_inter to Num_iter
8-Nov-93 (MDM) - Changed comments
3-Feb-94 (MDM) - Added .SPACECRAFT to .BSC structure
- Made a new FIT structure with .ION_MULT
- Archived FIT_2041_BSC_Rec to BSC_OLD_STRUCT.INC
3-Feb-94 (MDM) - Added .DENSITY to .FIT
8-Aug-94 (MDM) - Added .DISPC and .U_DISPC to .FIT
[Previous]
[Next]
NAME:
BSC_TIM2DSET
PURPOSE:
extract indicies of BSC time range
CALLING SEQUENCE:
SS=BSC_TIM2DSET(BSC_INDEX,CHAN,TSTART,TEND,COUNT=COUNT)
INPUTS:
BSC_INDEX - BSC index structures
CHAN - channel to select
KEYWORDS:
TSTART,TEND - string start and end times of data to extract
(both must be entered as strings using UTPLOT
conventions, e.g., '09:00').
If only one time is entered, then data nearest that
time is selected.
To select all data after certain time (say, 09:00), use:
TEND='09:00',/TEND
To select all data before 09:00, use:
/TSTART,TEND='09:00'
RETURNED OUTPUTS:
SS - vector of indicies corresponding to requested time
and channel.
OPTIONAL OUTPUTS:
COUNT - # of data points extracted
CALLS: ***
BSC_CHAN, BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
anytim2ints [1], anytim2ints [2], fmt_tim [1], fmt_tim [2], gt_day [1], gt_day [2]
gt_time [1], gt_time [2]
CALLED BY:
SEL_BSC
PROCEDURE:
Simple use of WHERE
HISTORY:
Written Oct'93 by D. Zarro (ARC)
Modified Dec'93, DMZ, changed TSTART and TEND usage
20-Jun-94, DMZ, fixed potential bug in time search
[Previous]
[Next]
NAME:
BSC_VALID
PURPOSE:
Extract Valid BCS Bins from user specified channels.
Returned data will have the valid wavelength bins selected.
CALLING SEQUENCE:
BSC_VALID,BSC_INDEX,BSC_DATA,CHAN=CHAN,SS=SS
BSC_VALID,BSC_INDEX,BSC_DATA,NINDEX,NDATA,CHAN=CHAN
BSC_VALID,BSC_INDEX,BSC_DATA,NINDEX,NDATA,CHAN=CHAN,/NOVALID
INPUTS:
BSC_INDEX - BSC index structure
BSC_DATA - BSC data structure
OUTPUTS:
VALID_INDEX - BSC index structure updated for valid bins
VALID_DATA - BSC data structure updated for valid bins
KEYWORDS:
CHAN (in) - BCS channel (def is all)
SS (out) - indicies matching requested channel
NOVALID (in) - if set, do not try to extract valid data
CALLS: ***
BSC_CHECK [1], BSC_CHECK [2], GT_BSC_BINCAL [1], GT_BSC_BINCAL [2]
GT_BSC_CHAN [1], GT_BSC_CHAN [2], UNIQ [1], UNIQ [2], UNIQ [3]
CALLED BY:
MK_BSC_DATA [1], MK_BSC_DATA [2], SEL_BSC, rd_bsc
PROCEDURE:
Simple use of WHERE
HISTORY:
11-Sep-93, D. Zarro (ARC) and J. Lemen (LPARL), Written.
10-May-94, Zarro, fixed potential bugs in SS and NBIN usage
15-Jul-94, Zarro, checked if curvature correction is applied.
(if not, then extract all bins)
1-Sep-94, Zarro, fixed potential bug with UNIQ
[Previous]
[Next]
NAME:
bsc_vturb
PURPOSE:
Return turbulent broadening velocity or uncertainty from BSC
fits of Te6 and Td6.
CALLING SEQUENCE:
vturb = bsc_vturb(bsc_index) ; Velocities in km/s
u_vturb = bsc_vturb(bsc_index,/uncer) ; Uncertainties
vturb = bsc_vturb(chan,Te6,Td6) ; = bcs_broad(chan,Td6=Td6-Te6,/vel)
u_vturb = bsc_vturb(chan,Te6,Td6,u_Te6,u_Td6,/uncer)
INPUTS:
bsc_index = The bsc_index with the .fit tag from fit_bsc
OPTIONAL INPUTS:
chan = BCS channel number (can be given as bsc_index)
Te6 = Electron temperature in MK
Td6 = Doppler temperature in MK
u_Te6 = Uncertainty in electron temperature
u_Td6 = Uncertainty in Doppler temperature
OPTIONAL INPUT KEYWORDS:
uncert = If set, return uncertainty in turbulent velocity
CALLED BY:
fit_bsc_plot, get_bsc_anno
PROCEDURE:
The uncertainties in the turbulent velocity is computed from
a Taylor series expansion in terms of the fitted parameters
(Te6, Td6, u_Te6, u_Td6)
CALLS: ***
BSC_CHECK [1], BSC_CHECK [2], GT_BSC_CHAN [1], GT_BSC_CHAN [2], bcs_broad [1]
bcs_broad [2]
RESTRICTIONS:
Because bcs_broad only takes scalar input, bcs_vturb can
only except scalar inputs.
MODIFICATION HISTORY:
5-jul-94, J. R. Lemen LPARL, written.
7-jul-94, D. Zarro (ARC), added check for zero uncertainties in Te6, Td6
and corrected sign error in derivative calculation.
[Previous]
[Next]
NAME:
BSC_WAVECAL
PURPOSE:
to apply wavelength calibration to accumulated BSC spectra in BSC structures
CALLING SEQUENCE:
BSC_FLUXCAL,BSC_INDEX,BSC_DATA
INPUTS:
bsc_index - BSC index structure
bsc_data - BSC data array
OUTPUTS:
bsc_index - modified BSC index structure
bsc_data - wavelength calibrated BSC data structure
CALLS: ***
BSC_CHECK [1], BSC_CHECK [2], BSC_FIELD, GT_BSC_BINCAL [1], GT_BSC_BINCAL [2]
GT_BSC_CHAN [1], GT_BSC_CHAN [2]
CALLED BY:
MK_BSC_DATA [1], MK_BSC_DATA [2]
PROCEDURE:
INDEX.BSC.WAVEDISP_ANS is set to 2, to signify that wavelength calibration has
been applied.
HISTORY:
Written Dec. 1992 by D. Zarro (Applied Research Corp).
[Previous]
[Next]
NAME:
BSC_XCORR
PURPOSE:
to apply crystal curvature correction to BCS spectra
CALLING SEQUENCE:
BSC_XCORR,BSC_INDEX,BSC_DATA
INPUTS:
bsc_index - BSC index structure
bsc_data - BSC data structure
OUTPUTS:
bsc_index - modified BSC index structure
bsc_data - modified BSC data structure
CALLS: ***
BSC_CHECK [1], BSC_CHECK [2], BSC_FIELD, GT_BSC_BINCAL [1], GT_BSC_BINCAL [2]
GT_BSC_CHAN [1], GT_BSC_CHAN [2]
CALLED BY:
BSC_FLUXCAL, MK_BSC_DATA [1], MK_BSC_DATA [2]
PROCEDURE:
Uses BCS CALFIL's to obtain sensitivities and sine(theta)
values. BSC_INDEX.BSC.CURVE_ANS and BSC_INDEX.BSC.LINEARITY_ANS fields are
set to 2 to signify that curvature correction has been applied.
HISTORY:
Written Nov. 1992 by D. Zarro (Applied Research Corp).
[Previous]
[Next]
NAME:
bsd_struct V0.9
PURPOSE:
Define structures for reading/writing BSD files
CALLING SEQUENCE:
bsd_struct
CALLS: ***
BSD_STRUCT
HISTORY:
Written by John Mariska (23 Oct 91)
Checked atp 27-mar-92
two new structures added. atp may 92.
added statistical error tag to structure data atp may92
header documentation atp 7/7/92
notes:
** in the descriptor field of an entry will
indicate that this entry is not in the file.
[Previous]
[Next]
atp M.S.S.L. 1991 16 - 5 - 91
revised 29-5-91 to allow for character month,
to avoid english/american default month format confusion
this routine is designed to format the date/time as encoded
in a bsd file into a string of format
hh:mm:ss.msec dd-mmm-yyyy
and return it.
in: timein - long array with seven elements
out: timeout - string containing the date/time 25 chars long
[Previous]
[Next]
NAME:BTRAS_HR
PURPOSE:
Produce Huairou Transverse Field plot.
A directed arrow is drawn at each point showing the direction and
magnitude of the field.
CATEGORY:
Plotting, two-dimensional.
CALLING SEQUENCE:
calling sequence : btras_hr,bx,by,,isarrow,sx,sy,bz
INPUTS:
bx: The X component of the two-dimensional field.
U must be a two-dimensional array.
by: The Y component of the two dimensional field. Y must have
the same dimensions as X. The vector at point (i,j) has a
magnitude of:
(U(i,j)^2 + V(i,j)^2)^0.5
and a direction of:
ATAN2(V(i,j),U(i,j)).
OPTIONAL INPUT PARAMETERS:
X: Optional abcissae values. X must be a vector with a length
equal to the first dimension of U and V.
Y: Optional ordinate values. Y must be a vector with a length
equal to the first dimension of U and V.
KEYWORD INPUT PARAMETERS:
MISSING: Missing data value. Vectors with a LENGTH greater
than MISSING are ignored.
LENGTH: Length factor. The default of 1.0 makes the longest (U,V)
vector the length of a cell.
DOTS: Set this keyword to 1 to place a dot at each missing point.
Set this keyword to 0 or omit it to draw nothing for missing
points. Has effect only if MISSING is specified.
COLOR: The color index used for the plot.
RLEN: The length of arrow head. If rlen=0.0, then no arrow.
Note: All other keywords are passed directly to the PLOT procedure
and may be used to set option such as TITLE, POSITION,
NOERASE, etc.
OUTPUTS:
None.
CALLS: ***
BVECTOR_HR_NN, CONGRID [1], CONGRID [2], CONGRID [3]
COMMON BLOCKS:
None.
SIDE EFFECTS:
Plotting on the selected device is performed. System
variables concerning plotting are changed.
RESTRICTIONS:
None.
PROCEDURE:
Straightforward. Unrecognized keywords are passed to the PLOT
procedure.
MODIFICATION HISTORY:
DMS, RSI, Oct., 1983.
For Sun, DMS, RSI, April, 1989.
Added TITLE, Oct, 1990.
Added POSITION, NOERASE, COLOR, Feb 91, RES.
August, 1993. Vince Patrick, Adv. Visualization Lab, U. of Maryland,
fixed errors in math.
August, 1993. DMS, Added _EXTRA keyword inheritance.
[Previous]
[Next]
NAME:
BUILD_SSX
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
INPUTS:
POSITIONAL PARAMETERS:
KEYWORDS PARAMETERS:
OUTPUTS:
POSITIONAL PARAMETERS:
KEYWORDS PARAMETERS:
CALLS: ***
DR_CARR [1], DR_CARR [2], DR_CARR [3], EMBED_ARR, FILE_EXIST [2], RD_SDA [1]
RD_SDA [2], RD_SDA [3], REVERSE, Rd_Roadmap [2], anytim2ex [1], anytim2ex [2]
anytim2ints [1], anytim2ints [2], clon2ex [1], clon2ex [2], clon2ex [3]
file_exist [1], file_exist [3], get_rb0p [1], get_rb0p [2], gt_res, int2secarr [1]
int2secarr [2], rd_roadmap [1], week_loop [1], week_loop [2], week_loop [3]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
EXAMPLE:
MODIFICATION HISTORY:
Sept, 1992. - Written by GLS, LMSC.
[Previous]
[Next]
NAME:
build_timarr
PURPOSE:
Build a time structure array spanning the input times
with a settable increment step
INPUT:
sttim - The start time
entim - The end time
increment- The step size in seconds
hours - The step size interpreted as hours
days - The step size interpreted as days
OUTPUT:
Returns a time structure
CALLS: ***
anytim2ints [1], anytim2ints [2], int2secarr [1], int2secarr [2]
HISTORY:
Written 27-Aug-93 by M.Morrison
5-Jul-00, made the offset variable double-precision (HSH)
[Previous]
[Next]
NAME:
BURSTER_POSITION
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
burster_position, bp
INPUTS:
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED
OUTPUTS:
bp a structure with day, time, angular separation, N excursion
CALLS: ***
SUN [1], SUN [2], sphere_dist
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
HSH 12-Mar-96
[Previous]
[Next]
NAME: bytcon
PURPOSE: To truncate and convert something to byte without scaling
METHOD: Set all large values to minimum and maximum values then
shift to positive side of zero and convert to byte.
CALLING SEQUENCE:
out=bytcon(data,min=min,max=max,cent=cent)
PARAMETERS:
data input data
out the converted data
KEYWORDS:
min is a minimum value, default is -127.0.
max is a maximum value, default is 127.0.
cent returns the new "zero" value.
CAUTIONS: max and min should sum to not more than 255.
RETURN TYPE: BYTE.
CALLED BY:
rt_mag
HISTORY: drafted 2-dec-92, by A. McAllister
[Previous]
[Next]
NAME:
bytetostr
PURPOSE:
load input byte buffer into input struture variable.
Hist:
written 25-Nov-91
updated 16-june-93, to ret. -1 for rew and update.
CALLED BY
Rd_TapDir