[Previous]
[Next]
NAME:
C_TO_S
PURPOSE:
Returns sperical coordinates (r,theta,phi) of a position vector
or array of position vectors whose cartesian coordinates are
specified by V0.
CALLING SEQUENCE:
V1 = C_TO_S(V0)
INPUTS:
V0 = Cartesian coordinates (X,Y,Z) of a 3-vector or array
of 3-vectors
OUTPUTS:
V1 = Spherical coordinates (r,theta,phi) corresponding to
cartesian coordinates specified by V0
CALLS: ***
ARCTAN
MODIFICATION HISTORY:
Version 1.0 - Jan, 1991, Written, G. L. Slater, LPARL
[Previous]
[Next]
NAME:
cal_bsc
PURPOSE:
compute first guess of spectrum parameters
(continuum flux, line doppler width, line center)
CALLING SEQUENCE:
cal_bsc,bsc_index,bsc_data,td6,wshift
INPUTS:
bsc_index - BSC index structure
bsc_data - BSC data structure
OUTPUTS:
td6 - total observed Doppler width (MK) of resonance line
wshift - wavelength shift of spectrum due to source position
OPTIONAL KEYWORDS:
fcont (out) - continuum flux
td6_s (out) - total observed Doppler width (MK) of secondary cmpt
vshift(out) - blueshift of secondary component relative to primary
rstren (out) - ratio of secondary to primary component strengths
sbin (in) - # of bins to smooth over [def=4]
crange (in) - wavelength range to limit continuum calculation
lrange (in) - wavelength range to limit line calculation
gauss (in) - improve first guess using single component gaussian
blue (in) - guess a second blueshifted gaussian component
ncomp (out) - no of components guessed
CALLS: ***
BSC_CHECK [1], BSC_CHECK [2], CHKARG, GT_BSC_CHAN [1], GT_BSC_CHAN [2]
GUESS_FIT_PAR, SEL_BSC, bcs_broad [1], bcs_broad [2], fmt_tim [1], fmt_tim [2]
get_atomic [1], get_atomic [2]
CALLED BY:
fit_bsc, fit_bsc_as
PROCEDURE:
smooths spectrum to compute pertinent parameters
HISTORY:
Sep'93, Zarro (ARC) - written
Oct'93, Zarro (ARC) - added option for improving guesses by gaussian fits
19 Oct'93, Zarro (ARC) - added more informational messages
21 Oct'93, Zarro (ARC) - added logic for second component
28 Oct'93, Zarro (ARC) - removed bug in weights calculation
20 Nov'93, Zarro (ARC) - improved logic for second component
1 Dec'93, Zarro - fixed bug in center wavelength calc.
2 Dec'93, Zarro - fixed bug in second cmpt guess
13 May'94, Zarro - fixed bugs that possibly overestimated Td6
and Td6_s guesses by factor 2.
17 May'94, Zarro - added NCOMP
22 Jun'94, Zarro - fixed potential bugs in line identification
19 Oct'94, Zarro - worked on improving guess of 2nd cmpt
14 Jul'94, Zarro - worked on improving guess of 1st cmpt
[Previous]
[Next]
Pro Calb,btot,untent,xl,dfobs,var,p,bx,ierr
Calculates bx(64,64), theimproved brightness distribution
Input: btot=total brightness
untent= entropy per unit pixel
xl=0.14*sqrt(btot)*float(lambda)/area
dfobs= fobs-fobsx
var= variance of observational data, sigma^2
p= modulation pattern
Output: bx= the "improved brightness distribution"
ierr= 1 if there's a zero division error, kills program
[Previous]
[Next]
Name: Calchisqr
Author: Andy Phillips
Classification: Utility
Purpose:
calculate the adjusted chisquared as a measure of the goodness of
a fit. This is not equivalent to the statlib procedure chisqr.
reduced chisqr, program 10-1 in bevington.
The chisqr in becvington is a reduced chisqr of a format
red X2 = X2 / v = S2 / sigma2 :-
where v is degreees of freedom. = nels(x)-nparamstofit
S2 is the estimated variance
sigma2 is the weighted average of the individual variances
redchisqr = W*(y-yfit)^2/nfree where w is a weighting factor.
W = 1/y ==> instrumental (poisson estimation) weighting
W = 1. ==> returns an estimate of the variance (not red chisqrd)
W = 1/sigmay ==> returns the reduced chisqred.
if the fit is a good estimation of the parent function then the reduced
chisqred will be approximately equal to 1. as S2 approx = sigma2 page 188
bevington data analysis and error reduction for the physical sciences.
CALLED BY:
fit_pha
History: written atp 1990 idl1
[Previous]
[Next]
NAME:
CALFUN
PURPOSE:
Return Voigt profile given intensites, widths(FWHM), centroids
for spectrometer with FWHML FWHM Lorentzian and ewid FWHM resolution.
CALLING SEQUENCE:
Profile = CALFUN(X,A,lines,FWHML,dw,MODE,wave,ewid)
INPUTS:
X = A vector of X values.
A = Fitting parameters.
A(0) = Intensity line 1
A(1) = Width line 1
A(2) = Centroid line 1
A(3) = Intensity line 2
A(4) = Width line 2
etc. - Also see note on mode.
lines = Number of lines calculated.
If lines is negative, then ONLY the
result for the lines'th line is returned.
FWHML = Lorentzian FWHM in Angs
dw = The dispersion - delta(Wavelength in Angs) = delta(X) * dw
MODE 1 = normal parameter definitions (intensity, width, posn)
2 = Use velocity model. A(3) = Intensity of 2nd line.
A(4) = Velocity of 2nd line (km/s).
wave = Wavelength of resonance line in Angs.
ewid = Electronic FWHM in Angs
OUTPUTS:
Function result = Vector containing calculated spectrum.
CALLED BY:
PLOTBPC
COMMON BLOCKS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
None of the variables can be string or complex type.
A must be a vector.
PROCEDURE:
CALFUN calls the IDL system function VOIGT(U,Y)
MODIFICATION HISTORY:
Apr, 1986, Written, J.R. Lemen, MSSL
Sep, 1988, Corrected, A. Fludra
May, 1991, Trimmed for use with Solar-A BCS, CDP
[Previous]
[Next]
NAME:
cancel_dsn
PURPOSE:
To cancel DSN passes from strawman, preliminary/forecast, or final schedules
CALLING SEQUENCE:
cancel_dsn, week, /strawman ; Default option
cancel_dsn, week, /preliminary
cancel_dsn, week, /final
INPUTS:
week = JPL Week No.
OPTIONAL INPUTS:
strawman = If set, delete from strawman plan
preliminary = If set, delete from preliminary plan
final = If set, delete from the final plan
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None
CALLS: ***
DOC_LIBRARY, cancel_dsn_fax, cancel_dsn_fil, cancel_dsn_pick, rd_rasm, tbeep [1]
tbeep [2], tbeep [3], yesnox [1], yesnox [2]
RESTRICTIONS: Strawman file for the relevant week must exist in
directory $DIR_GEN_ORBIT_RAW
PROCEDURE: The procedure reads the strawman file, picks out
the Yohkoh passes and presents them to the user to
identify those to be deleted. Details of the chosen
ones are then written to a change request form for
faxing to JPL.
MODIFICATION HISTORY:
2-Feb-93 CDP, Written (originally called cancel_prelim)
21-apr-93 JRL, Renamed to cancel_dsn and extended to preliminary/final
1-nov-93 JRL, Changed the information messages slightly.
25-nov-93 JRL, Changed the JPL contact name in the message
22-dec-93 JRL, Fixed an IDL V3.1 related bug
22-Oct-95 JRL, Changed printing to use pprint
9-dec-95 JRL, Changed the mail message
[Previous]
[Next]
NAME:
cancel_dsn_fax
PURPOSE:
Create the FAX form for cancel_dsn (deletion of DSN passes)
CALLING SEQUENCE:
cancel_dsn_fax, pass [,sheet,tot_sheet,file=file]
INPUTS:
pass = Structure containing passes to delete
OPTIONAL INPUTS:
file = if specified the Postscript graphics are dumped to that file;
otherwise default is IDL.PS
sheet = the number of the current page
tot_sheet = the total number of pages
noprint = If set, do not print the fax sheet.
non_real_time = If set, put non_real_time title on Fax form
cancel_type = 'Preliminary' or 'Final' or 'Strawman'
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
CALLS: ***
pprint [1], pprint [2]
CALLED BY:
cancel_dsn
RESTRICTIONS:
None.
PROCEDURE:
MODIFICATION HISTORY:
2-Feb-93 CDP, Written (as pr_can_prelim)
20-apr-93 JRL, Renamed. Pass is now a structure.
Will process strawman or preliminary or final schedules.
24-apr-93 JRL, Do a change mod on the idl.ps file
31-may-94, JRL, Reset plot to portrait after making DSN fax sheets.
17-jun-94, JRL, Comment used to be hard-wired to preliminary. Now it
reflects the cancel_type that is being used.
22-Oct-95, JRL, Added the noprint keyword
[Previous]
[Next]
NAME:
cancel_dsn_fil
PURPOSE:
Create the ascii file for cancel_dsn (deletion of DSN passes)
CALLING SEQUENCE:
cancel_dsn_fil, file_prefix, week, pass, fileout
INPUTS:
file_prefix = File prefix (string)
week = Week number
pass = Structure containing passes to delete
OPTIONAL INPUTS:
None.
OUTPUTS:
fileout
OPTIONAL OUTPUTS:
None.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], anytim2ex [1], anytim2ex [2]
concat_dir [4], fmt_tim [1], fmt_tim [2]
CALLED BY:
cancel_dsn
RESTRICTIONS:
None.
PROCEDURE:
File name is of the type "strawman_del.w18"
If spacecraft is ASCA, make the name "strawman_asca_del.w18"
MODIFICATION HISTORY:
21-apr-93 JRL, Written.
1-may-93, JRL, Change the form of the name for ASCA
[Previous]
[Next]
NAME:
cancel_dsn_pick
PURPOSE:
Use a menu to allow user to select DSN passes to delete
CALLING SEQUENCE:
Deleted_passes = canel_dsn_pick(pass)
INPUTS:
pass = Structure of the contents of the file returned by rd_rasm
OPTIONAL INPUTS:
None.
OUTPUTS:
ndel0 = Number of deleted downlinks
ndel1 = Number of deleted playbacks
Returned array is a subset of the passes selected to be deleted.
OPTIONAL OUTPUTS:
None.
CALLS: ***
wmenu_sel [1], wmenu_sel [2], wmenu_sel_set [1], wmenu_sel_set [2]
CALLED BY:
cancel_dsn
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
2-Feb-93 CDP, Written
19-apr-93 JRL, Renamed to canel_dsn_pick.
Reading of file moved to outside of routine.
23-apr-93 JRL, Fixed a problem for when running on old version IDL
1-nov-93 JRL, Added ndel0 and ndel1 output parameters
22-feb-94, JRL, Fixed a bug which caused routine to crash if no
Playbacks were schedule (only tracking passes)
1-Jul-94, SLF, dont sort single element dt1
[Previous]
[Next]
NAME: CANCEL_PRELIM
PURPOSE: To cancel the preliminary Yohkoh passes that are not
needed
CALLING SEQUENCE: IDL> cancel_prelim, week
INPUTS: week the number of the week involved
OPTIONAL INPUTS: none
OUTPUTS: none
OPTIONAL OUTPUTS: none
CALLS: ***
Bell, PICK_CAN_PRELIM, PR_CAN_PRELIM, get_host [1], get_host [2], input [1]
input [2]
RESTRICTIONS: Strawman file for the relevant week must exist in
directory $DIR_GEN_ORBIT_RAW
PROCEDURE: The procedure reads the strawman file, picks out
the Yohkoh passes and presents them to the user to
identify those to be deleted. Details of the chosen
ones are then written to a change request form for
faxing to JPL.
MODIFICATION HISTORY: Written: 2-Feb-93 CDP
6-Feb-93 JRL Added printer chooser option
[Previous]
[Next]
NAME:
CAROL_JO.PRO
PURPOSE:
Evaluate the formula from Crannell et al. (Ap. J. 223, 620, 1978)
for the hard X-ray spectrum from a thermal source
CATEGORY:
Yohkoh stuff
CALLING SEQUENCE:
flux = carol_jo(energy, temp)
INPUTS:
energy, temp in keV
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
spectral number flux (ph/cm^2 sec keV) for em = 1e44 cm^-3
MODIFICATION HISTORY:
HSH, written 5-oct-93
[Previous]
[Next]
NAME:
carr2btime
PURPOSE
estimate the base time of carrington longitude
INPUT
ncarr: carrington rotation number
OUTPUT
y:year, m:month, d:day, t:time (hour), doy79:day from 1-Jan-1979
CALLING SEQUENCE
carr2btime,1850,y,m,d,t,doy79
HISTORY
Dec 15, 1993, made by H. Hara
CALLS:
CALLED BY
rd_sfd_carr, ret_day
[Previous]
[Next]
NAME:
carr2btime
PURPOSE
estimate the base time of carrington longitude
INPUT
ncarr: carrington rotation number
OUTPUT
y:year, m:month, d:day, t:time (hour), doy79:day from 1-Jan-1979
CALLING SEQUENCE
carr2btime,1850,y,m,d,t,doy79
HISTORY
Dec 15, 1993, made by H. Hara
CALLS:
CALLED BY
rd_sfd_carr, ret_day
[Previous]
[Next]
NAME:
CARR2DATE
PURPOSE:
return the start date of a Carrington rotation (ie, the
CMP passage day of the beginning of that rotation
CATEGORY:
CALLING SEQUENCE:
print, carr2date(rotation_number)
INPUTS:
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
CALLS: ***
CARR2EX, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
7-Dec-01, written by HSH
[Previous]
[Next]
NAME:
cat_form
PURPOSE:
Concatinate files together but insert form feeds.
CALLING SEQUENCE:
cat_form,Input_files,output_file
cat_form,'*.txt',summary.txt
INPUTS:
Input_files = A list of filenames (separated commas)
CALLS: ***
STR2ARR [1], STR2ARR [2]
Examples: Input_files = 'a.txt,b.txt,c.txt,d*.txt'
output_file = Name of the output file.
MODIFICATION HISTORY:
3-jul-93, JRL, Written.
[Previous]
[Next]
NAME:
CBA_STRUCT
PURPOSE:
Define the following CBA specific database structures
* CBA_Data_Rec
* CBA_RoadMap_Rec
CALLING SEQUENCE:
CBA_STRUCT
CALLED BY:
RD_CBA_DATA, rd_roadmap [1]
HISTORY:
written by Mons Morrison, Fall 90.
[Previous]
[Next]
NAME:
CC_FFT
PURPOSE:
Calculate the cross correlation of two arrays using FFT's
CALLING SEQUENCE:
CC = CC_FFT(A,B)
INPUTS:
A,B = Square arrays of any type, to be cross correlated
OUTPUTS:
CC = Cross correlation array of A and B
CALLED BY:
CC_OFF, CC_OFF2
MODIFICATION HISTORY:
Version 1.0 - Apr, 1991, G. L. Slater, LPARL
[Previous]
[Next]
NAME:
CC_OFF
PURPOSE:
Determine the spatial offset between two images from
their cross correlation
CALLING SEQUENCE:
OFFSETS = CC_OFF(A,B,FITDEG=FITDEG,CLEN=CLEN)
INPUTS:
A, B = Images whose relative offset is to be determined
OPTIONAL KEYWORDS:
FITDEG = Degree of surface fit to input arrays. These fits
are subtracted to remove background prior to cc.
CLEN = If supplied, the arrays are embedded in larger
arrays of dimension XDIM + 2*CLEN, where XDIM is
the dimension of the input arrays.
OUTPUTS:
OFFSETS = Offsets in pixels between fov's of the two images
CALLS: ***
CC_FFT, SURFACE_FIT
CALLED BY:
GET_OFF, GET_OFF2
MODIFICATION HISTORY:
Version 1.0 - Mar, 1991, G. L. Slater, LPARL
[Previous]
[Next]
NAME:
CC_OFF2
PURPOSE:
Determine the spatial offset between two images from
their cross correlation
CALLING SEQUENCE:
OFFSETS = CC_OFF(A,B,FITDEG=FITDEG,CLEN=CLEN)
INPUTS:
A, B = Images whose relative offset is to be determined
OPTIONAL KEYWORDS:
FITDEG = Degree of surface fit to input arrays. These fits
are subtracted to remove background prior to cc.
CLEN = If supplied, the arrays are embedded in larger
arrays of dimension XDIM + 2*CLEN, where XDIM is
the dimension of the input arrays.
OUTPUTS:
OFFSETS = Offsets in pixels between fov's of the two images
CALLS: ***
CC_FFT, SURFACE_FIT
CALLED BY:
CC_OFFSETS
MODIFICATION HISTORY:
Version 1.0 - Mar, 1991, G. L. Slater, LPARL
[Previous]
[Next]
NAME :
CC_OFFSETS
PURPOSE :
Calculate offsets of the image data cube to the first image
using CC_OFF2.
CALLING SEQUENCE :
xy_off = cc_offsets(data, fitdeg=fitdeg, clen=clen ,istart=ist, $
iend=ien, xydel_tot=xydel_tot)
INPUTS:
data = image data cube
ist = start of index (default = 0)
ied = end of index (default = last of image index)
OUTPUTS:
xyshift = array of displacements relative to the 1st image.
SIDE EFFECTS :
None
CALLS: ***
CC_OFF2
COMMON BLOCKS :
MODIFICATION HISTORY:
Written by Bachtiar Anwar, Hugh Hudson - April 6, 1992
Updated 27-04-92 by Bachtiar Anwar
Updated 01-05-92 by Bachtiar Anwar
Updated 25-05-92 by Hugh Hudson, Bachtiar Anwar
[Previous]
[Next]
NAME:
CCCA
PURPOSE:
Obtain cross correlation coefficient and offset value of "data"
to the reference data "ref_data" using CCCA (cross correlation
coefficient algorithm).
INPUTS:
data - data to be aligned to the reference data.
ref_data - the reference data
OPTIONAL INPUTS:
subarea - subarea size (default: 384)
medium - medium speed calculation option. Obtain the coefficient
of only 64x64 area in the center. If not supplied, it may take
more than 4 hr to calculate the 2D correlation.
fast - fast calculation option. Obtain the coefficient of only
16x16 area in the center.
OUTPUTS:
r - R(a, b) map See below.
x_shift - offset value in X direction
y_shift - offset value in Y direction
CALLS: ***
STDEV, anytim2ints [1], anytim2ints [2], gt_day [1], gt_day [2], gt_time [1]
gt_time [2]
PROCEDURE:
CCCA:
Obtain the position at the maximum of
N-1 N-1
C(a, b)= \sigma \sigma
m=0 n=0
x(Ia,b(m,n)-Iave)(T(m,n)-Tave)/sqrt(Isigma*Tsigma)
where Ia,b(m,n) = data, T(m, n)= ref_data,
Iave= \sigma \sigma Ia,b(m,n)/N^2,
Tave= \sigma \sigma Ta,b(m,n)/n^2,
Isigma = \sigma \sigma (Ia,b(m,n)-Iave)^2
Tsigma = \sigma \sigma (T(m,n) - Tave)^2
See Data Analysis Handbook(ed,Takagi,Univ.of Tokyo) pp709
in detail.
HISTORY:
19 April, 1994 written by T.Shimizu (Univ. of Tokyo)
27 April, 1994 debug the calculation time
27 April, 1994 fast - 16x16 area in the center
medium - 64x64 area in the center
[Previous]
[Next]
Name: ccd_sunc
Purpose: maintain ccd sun center coordinate data file
Optional Keyword Parameters:
update - 2 element array containing new CCD SUNC coord ([EW,NS])
norange - bypasses range checks on update parameters
comment - input or output depending on calling sequence below
history - output array ALL coordinate entries (structure)
Calling Sequences:
Two major functions are provided
1 - Obtain most recent coordinates:
coord=ccd_sunc([history=history])
function returns 2 element vector: [EW,NS] CCD coord SunC.
Optional output is vector of all entries - include
comments , entry dates, etc.
2 - Update Sun Center coordinates:
coord=ccd_sunc(update=newcoord [,comment=comment])
Will update the Coordinate file with new coordinates
Optional comment can include reason for update (offpoint)
(Name of updater and update time are included automatically in
entry so dont include in comment)
Method: uses generic file
History: slf, 15-April-1992
5-Jun-93 (MDM) - Modified to only save the last updated value
18-Aug-93 (MDM) - Added "software" to authorized list
CALLS: ***
FILE_EXIST [2], MAKE_STR [1], MAKE_STR [2], file_exist [1], file_exist [3]
fmt_tim [1], fmt_tim [2], restgen [1], restgen [2], savegen [1], savegen [2]
syst2ex [1], syst2ex [2], syst2ex [3]
Restrictions: range check not implemented yet so be careful
[Previous]
[Next]
NAME:
Cdcda
PURPOSE:
Calculates the derivatives of the count rate with
respect to the fit parametrs
CALLING SEQUENCE:
dcda = Cdcda(tyspec,ma,a)
INPUT:
tyspec= Type of spectrum
ma= no. of fit parameters
a= fit parameters
OUTPUT:
dcda= derivative of c, the count rate wrt a...
CALLS: ***
dfx_phflux
CALLED BY:
Fsp_mrqcof
COMMON BLOCKS:
Common rsp,nch,nsc,esc,rsc
nch= no. of channels used it fit
nsc= no. of energies used,
esc= energies used
rsc= rde0, response*de for the channels used in the fit
HISTORY:
Spring,' 92 JMcT
changed to a function 24-oct-95, jmm
[Previous]
[Next]
Name: cdrom_files
Purpose: return CDROM file names
Input Parameters:
NONE
Output Parameters:
function returns pathnames (files or directories)
Keyword Parameters:
day - desired DAY (ex: 1-mar-93)
week - desired WEEK (ex: 93_02)
jb_name - optional Juke Box nfs "name" (def='solserv')
jb_command - juke box directory command (def='showmount -e ' + jb_name)
day - if set, $
Calling Sequence
files=cdrom_files(day='dd-MMM-yyyy',/XXX) ; xxx={/hda,/bda,/spr,/sfr}
files=cdrom_files(week='YY_WW', /XXX, /mag_disk)
files=cdrom_files(day='dd-MMM-YYYY', jb_name='sun',/sfr)
[sfr files for specified day, juke box name = sun]
Calling Example:
sfrs=cdrom_files(day='15-mar-1993',/sfr)
Circa 1-Jan-1998 - S.L.Freeland -
5-Mar-2000 - S.L.Freeland - add JB_NAME and JB_COMMAND keywords
7-Mar-2000 - S.L.Freeland - allow environmental $JB_NAME
[transportability]
CALLED BY
hxt_impulsivness, mk_ssc [1], mk_ssc [2], multi_hda2hxi
[Previous]
[Next]
Name: cdrom_files
Purpose: return CDROM file names
Input Parameters:
NONE
Output Parameters:
function returns pathnames (files or directories)
Keyword Parameters:
day - desired DAY (ex: 1-mar-93)
week - desired WEEK (ex: 93_02)
jb_name - optional Juke Box nfs "name" (def='solserv')
jb_command - juke box directory command (def='showmount -e ' + jb_name)
day - if set, $
Calling Sequence
files=cdrom_files(day='dd-MMM-yyyy',/XXX) ; xxx={/hda,/bda,/spr,/sfr}
files=cdrom_files(week='YY_WW', /XXX, /mag_disk)
files=cdrom_files(day='dd-MMM-YYYY', jb_name='sun',/sfr)
[sfr files for specified day, juke box name = sun]
Calling Example:
sfrs=cdrom_files(day='15-mar-1993',/sfr)
Circa 1-Jan-1998 - S.L.Freeland -
5-Mar-2000 - S.L.Freeland - add JB_NAME and JB_COMMAND keywords
7-Mar-2000 - S.L.Freeland - allow environmental $JB_NAME
[transportability]
CALLS:
CALLED BY
hxt_impulsivness, mk_ssc [1], mk_ssc [2], multi_hda2hxi
[Previous]
[Next]
NAME:
cfill
PURPOSE:
Color fill the background of a PS file using the given color.
CALLING SEQUENCE:
cfill, color, [fred=fred, fgreen=fgreen, fblue=fblue,
PageBoundingBox=PageBoundingBox,
landscape=landscape]
Input:
color valid color name.
fred,f* rgb values for a user specified color
PageBoundingBox Array of 4 values specifing the lower left
and upper right. [x1,y1, x2,y2]
landscape switch to output fill in landscape mode
Output:
This procedure writes the necessary POSTSCRIPT (PS)
commands for creating a color background directly to the
OPENNED PS file.
CALLS: ***
color2rgb
CALLED BY:
photoland landscape vers of phototextpro
photoport portrait vers of phototext
NOTE: THIS PROCEDURE MUST BE CALLED AFTER THE FOLLOWING COMMANDs:
1) set_plot,'ps'
2) device, file= 'my_PS_file.ps'
AND BEFORE any other device, tv, xyouts commands.
HISTORY:
written 26-Jan-94, gal
3-Feb-94, gal, added landscape mode
[Previous]
[Next]
NAME:
CH_BOUNDARY
PURPOSE:
interactively trace boundaries of (coronal holes). The
user points and clicks at points along the feature
boundary. A position at the lower left corner of the
image terminates
CATEGORY:
Yohkoh
CALLING SEQUENCE:
ch_boundary, data, xx, yy
INPUTS:
image
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
xx, yy the vertices of a polygon created with the mouse
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
this is quite primitive!
MODIFICATION HISTORY:
11-July 1996, written (HSH)
[Previous]
[Next]
NAME:
CH_BOUNDARY
PURPOSE:
interactively trace boundaries of (coronal holes). The
user points and clicks at points along the feature
boundary. A position at the lower left corner of the
image terminates
HOW TO USE
Read the documentation for DEFROI. Basically you use the left
mouse button click-by-click, or dragging with the left button
continuously pressed. The right button ends the program.
The (xx,yy) returned are the vertices of the region selected
which can then be overplotted with plots,xx,yy,/dev. rr is
the list of pixels interior to the selected region.
CATEGORY:
Yohkoh
CALLING SEQUENCE:
ch_boundary, data, xx, yy, rr
INPUTS:
image
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
xx, yy the vertices of a polygon created with the mouse
CALLS: ***
DEFROI [1], DEFROI [2], WDEF [1], WDEF [2]
SIDE EFFECTS:
defines window 10 whether you had one or not.
ROUTINES CALLED
defroi, wdef
RESTRICTIONS:
this is quite primitive!
MODIFICATION HISTORY:
11-July 1996, written (HSH)
16-July 1996, converted to DEFROI (it's easier!)
[Previous]
[Next]
pro chan_resp, resp_in=resp_in, e_matrix=e_matrix, new_e=new_e, $
resp_out=resp_out
Integrate the response matrix, RESP_IN, (units are per unit energy
in the output dimension to be integrated over), to the new
channel energy boundaries defined by NEW_E from the old
boundaries, E_MATRIX. The energies in E_MATRIX should be more
densely defined than in NEW_E. Designed to take a response
function calculation defined on a dense vector of pulse-height
energies and convert to the specific channel energies used for a
detector data bins. The response is determined by integrating
over the output energies between the bin energies given in
NEW_E, and dividing by the bin width giving the result in cnts
per unit energy.
Inputs:
RESP_IN(n,m) - Response matrix where RESP_IN(i,j) is the cnts/energy
at pulse-height energy(i) for an input photon energy(j). All of
the other units of the matrix are preserved. Matrix element is
computed for the geometric mean of the channel.
E_MATRIX(2,n) - Channel boundaries for pulse-height energy(i)
used to compute RESP_IN.
NEW_E(2,k) - Pulse-Height channel boundaries for new response matrix
Outputs:
RESP_OUT(k,m) - Response matrix where RESP_OUT(i,j) is the cnts/energy
at pulse-height energy(i) for an input photon energy(j). All of
the units of the matrix are identical with those of RESP_IN.
ras, 93/03/25
CALLS:
[Previous]
[Next]
NAME:
change_res
PURPOSE:
To change the resolution of a FFI image.
CALLING SEQUENCE:
img_out = change_res(data, index, index_out) ;change to 2x2
img_out = change_res(data(*,*,i), res_out=2) ;change to 4x4
img_out = change_res(data, index, /decomp)
INPUT:
img_in - Input image (should be 2-D). Needs to be full
256x256, 512x512 (full res not handled right now)
index_in- The index associated with that image
OPTIONAL INPUT:
res_out - Resolution of the output image.
0 = 1x1, 1=2x2, and 2=4x4
If not present, the output resolution is 2x2 (half)
decompress- If present, the data is left decompressed if it came
in as byte type.
OUTPUT:
data_out- The rebinned data cube
index_out- The index that goes with the rebinned data cube (reflects
the changed resolution). It is only defined if INDEX_IN
is passed in.
METHOD:
CALLS: ***
get_res_offset, gt_corner, gt_res, gt_shape_cmd, his_index, sxt_comp, sxt_decomp [1]
sxt_decomp [2]
NOTE: If the data is byte type, it is decompressed for the work,
and then re-compressed. It can be left decompressed by using the
decompress option. It assumes BLS is off.
If it is on, the data will not be registered properly
TODO: Should pass back a modified index with a modification history
TODO: The index resolution information is not updated to reflect the
change
HISTORY:
Written 12-Nov-91 by M.Morrison
4-Jun-93 (MDM) - Added NOOFFSET keyword option
20-Jun-93 (MDM) - Modified to use MAKE_ARRAY instead of execute statement
23-Jun-93 (MDM) - Added history records
4-Aug-93 (MDM) - Added INDEX_OUT parameter
[Previous]
[Next]
NAME:
Check the ATT database vs. the SXC limb fit database to look for bad
ATT files
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
check_att
INPUTS:
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
CALLS: ***
CHECK_ATT, RD_XDA [1], RD_XDA [2], SPLITSTR, get_att, gt_expmode, gt_filta, gt_res
sxt_cen [1], sxt_cen [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
Checks the entire mission database.
PROCEDURE:
Compares the SXC limb fit database to the ATT database accessed through
sxt_cen.pro.
Selection criteria for "good" ATT and SXC data:
- half resolution X-ray data
- reasonable limb-fit output
(radius gt 300 FR pixels and radius error lt 0.05)
- time difference betw. ATT and image le 2 seconds
and ATT suncenter in x within FOV of SXT
MODIFICATION HISTORY:
T. Metcalf 1998-04-21
JPW 29-apr-98 replaced data.suncenter with data.sxt_center
added stats for subset of "good" ATT and SXC data
[Previous]
[Next]
NAME:
check4append
PURPOSE:
If a dataset had to be appended during the WRT1ORBIT procedure, it
needs to be checked to see if the data is in time order.
Should only be needed for SFR and BDA files.
INPUT:
infil - The input file name to be checked
HISTORY:
Written 13-Mar-92 by M.Morrison
[Previous]
[Next]
NAME:
CHECK_FOR_30S
PURPOSE:
check recent two weeks' worth of data for Nakakubo-type exposures
CATEGORY:
CALLING SEQUENCE:
check_for_30s
check_for_30s, /list
INPUTS:
none
OPTIONAL (KEYWORD) INPUT PARAMETERS:
list, lists the images
ROUTINES CALLED
RD_OBS, ANYTIM
OUTPUTS:
CALLS: ***
FMT_TIMER [1], FMT_TIMER [2], anytim [1], anytim [2], anytim [3], anytim [4]
anytim [5], get_info [1], get_info [2], get_info [3], get_info [4], gt_dpe
gt_expmode, gt_filtb, gt_percentd, rd_obs
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
may not provide a complete listing because the most recent data
may not have been reformatted
MODIFICATION HISTORY:
2-Jul-00, written (HSH)
[Previous]
[Next]
Name: check_oldprocess
Purpose: check old processes
Calling Sequence:
check_oldprocess
CALLS: ***
ARR2STR [1], Arr2Str [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
CHECK_OLDPROC, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], anytim2ints [1]
anytim2ints [2], break_file [4], concat_dir [4], fid2ex [1], fid2ex [2]
file_append [1], file_append [2], file_list [1], file_list [2], file_purge [1]
file_purge [2], get_host [1], get_host [2], get_user [1], get_user [2], mail [1]
mail [2], prstr [1], prstr [2], rd_tfile [1], rd_tfile [2], strjustify, tim2dset [1]
tim2dset [2], timegrid, where_arr [1], where_arr [2]
History:
15-Feb-1995 (SLF)
Method - look at queue of old chk_process logs and flag/remove old
hung jobs (generally called from check_process.pro)
[Previous]
[Next]
Name: check_oldprocess
Purpose: check old processes
Calling Sequence:
check_oldprocess
CALLS: ***
ARR2STR [1], Arr2Str [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], anytim2ints [1], anytim2ints [2]
break_file [4], concat_dir [4], fid2ex [1], fid2ex [2], file_append [1]
file_append [2], file_list [1], file_list [2], get_user [1], get_user [2]
mail [1], mail [2], prstr [1], prstr [2], rd_tfile [1], rd_tfile [2], strjustify
tim2dset [1], tim2dset [2], timegrid, where_arr [1], where_arr [2]
History:
15-Feb-1995 (SLF)
Method - look at queue of old chk_process logs and flag/remove old
hung jobs (generally called from check_process.pro)
[Previous]
[Next]
NAME:
check_process
PURPOSE:
To monitor jobs that have hung up and are eating up CPU
CALLS: ***
CHECK_OLDPROC, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
STR2ARR [1], STR2ARR [2], concat_dir [4], ex2fid [1], ex2fid [2], file_append [1]
file_append [2], file_exist [1], file_exist [3], get_host [1], get_host [2]
get_user [1], get_user [2], is_member [1], is_member [2], mail [1], mail [2]
prstr [1], prstr [2], rd_tfile [1], rd_tfile [2], syst2ex [1], syst2ex [2]
syst2ex [3]
HISTORY:
22-Apr-94 (SLF) - Rewrite MDM kill_ftp - parameter/generic PID checks
25-Apr-94 (SLF) - read from file if it exists
29-Apr-94 (SLF) - actually spawn command! (was claiming it spawned)
11-Jul-94 (SLF) - remove ps warning lines from output ('ps:...')
15-Feb-95 (SLF) - Add call to check_oldprocess - added 2 parameters
to the pid_limits data file, create archive logs
27-Feb-95 (slf) - allow BSD syntax (OSF, etc)
[Previous]
[Next]
NAME:
CHECK_SFC_PNT
PURPOSE:
look at pnt data at the time of 9 SFC's
CATEGORY:
CALLING SEQUENCE:
check_sfc_pnt, t_ref
INPUTS:
reference time
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
CALLS: ***
OUTPLOT [1], OUTPLOT [2], OUTPLOT [3], Rd_Roadmap [2], STDEV, UTPLOT [1], UTPLOT [2]
UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], anytim [1], anytim [2], anytim [3]
anytim [4], anytim [5], fmt_tim [1], fmt_tim [2], gt_time [1], gt_time [2]
int2secarr [1], int2secarr [2], rd_att, rd_roadmap [1], tim2dset [1], tim2dset [2]
COMMON BLOCKS:
SIDE EFFECTS:
prints to screen and plots a plot
RESTRICTIONS:
MODIFICATION HISTORY:
HSH, written 16-Jul-97
[Previous]
[Next]
NAME: check_sfd_leak
CALLING SEQUENCE:
separation=1 & xy_leak=1 & leak_data=1
check_sfd_leak, sfd_index, leak_index, separation=separation, $
xy_leak=xy_leak, leak_data=leak_data
INPUT
sfd_index: Index of SFD images
OUTPUTS
leak_index: index(es) of the leak images used for the SFD image(s)
separation: separation of the SFD and leak images in SXT pixels
leak_xy: (x, y) of the leak images
CALLS:
[Previous]
[Next]
Name: checksum
Purpose: calculate checksum on data using SXTE-U alogorithm
CALLS:
[Previous]
[Next]
Procedure to try and correct dp_sync.xxx_cnts for bad telemetry data and for
overflow in the 16 bit counters. NB this routine sets bad data points and
their acc_interval to zero and corrects the rest for the acc_interval. Hence
any counts returned are nominally /sec. If a data set begins in medium bit
rate, this section will not be corrected. It is far from guaranteed that this
routine will have the desired effect on all data sets!
INPUT parameters:
ichn - the channel number of counts to be corrected (0:3!)
flag - which set of counts to correct 1=all_cnts, 2=lim_cnts, 3=acc_cnts
dp_sync - structure array as read by TEST_RD
deb - if six parameters are present some debugging o/p is given
OUTPUT parameters:
arr0 - long integer counts/second, first count of dp_sync pair
arr1 - ............................second ....................
dp_sync is still changed in that the acc_interval is set to zero for
data the routine considers bad. The dp_sync counts are not
now affected.
Use:
IDL> chekov,ichn,flag,dp_sync,arr0,arr1,deb
CDP Nov 91
Version 1 November 91
Version 2 10/12/91 temporary skip of correcting high rate
regions. It was getting fooled by occasional, not very
clean data drop outs. ie count would fall to zero but
over the course of 1 or 2 data points thus simulating an
overflow. This then triggered correction for subsequent
data.
Version 3 January 92
Bug fix to cope with transitions directly from low rate
to high. Transitions to low rate are ignored at present.
3.1 Bug fix to cope with only one transition to High from med
March 92 CDP
CALLS:
CALLED BY
bcs_dtfac [1], bcs_dtfac [2], dt_factor
[Previous]
[Next]
NAME:
CHI_NORM
PURPOSE:
compute chi^2 between observed and computed data
CALLING SEQUENCE:
chi2=chi_norm(cflux,oflux,eflux,norm=norm)
chi2=chi_norm(cflux,oflux,eflux,back,subs=subs,norm=norm,bnorm=bnorm)
INPUTS:
cflux = computed data
oflux = observed data
eflux = sigma error on oflux
OPTIONAL INPUTS:
back = Background data (assumed to be a vector the same length as oflux, clfux)
OUTPUTS:
chi2 = chi^2 = total [ (oflux-norm*cflux)^2/eflux^2 ]
chi2 = chi^2 = total [ (oflux-norm*cflux-bnorm*back)^2/eflux^2 ]
OPTIONAL OUTPUT KEYWORDS:
norm = normalization to make cflux = oflux
bnorm = normalization for the background
subs = indicies to include in chi^2 calculation
CALLED BY:
bcs_chi_norm
HISTORY:
18-sep-93, J. R. Lemen (LPARL) and D. M. Zarro (ARL), Written.
[Previous]
[Next]
Name: chk_flares
Purpose: verify ok to delete reformatted data sets (post tape making)
checks for goes events (flares) during time range
Method: gets time ranges of reformatted data sets on disk calls
rd_gev to determine goes events >= above parmeter
WARNING - assumes all instruments grouped by fileids
Input Parameters:
path - directory to check (default = current)
Output Parameters:
flare_files - string array of files containg flare data
Optional Keyword Paramters:
copy - if set, will copy files to $DIR_DATA_FLARE
above - if set, string NOAA flare class for minimum cutoff (def=M5)
quiet - if set, informational messages are suppressed
cba - if set, save cba files also, default is PI Inst + ada
delete - if set, deletes old files on target directory
test - if set, display copy and delete cmds but do not spawn them
biggest- if set, gets biggest flare if none exceeds above parameter
Calling Sequence:
chk_flares, path [, flare_files, ,/copy , above='Class' ,/cba , /quiet]
[, /delete ,/test ,/biggest]
Category:
swmaint, system, disk
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHECK_TIME, Int2Ex [1], Int2Ex [2]
RD_GEV, UNIQ [1], UNIQ [2], UNIQ [3], anytim2ex [1], anytim2ex [2], break_file [4]
curdir [1], curdir [2], fidrange [1], fidrange [2], file_list [1], file_list [2]
filetimes [1], filetimes [2], get_closest, int2secarr [1], int2secarr [2]
launch [1], launch [2], pr_gev, prstr [1], prstr [2], str_replace [1]
str_replace [2], tim2file [1], tim2file [2]
History: slf, 3-August-1992
slf, 22-Aug-1992 added delete and test keywords
slf, 14-Sep-1992 added cba file delete commands
slf, 9-Oct-1992 added biggest keyword parameter
mdm, 5-Oct-1993 Corrected error which occurs when the last
fid does not have an ada file.
slf, 6-Jul-1994 protect sort from scaler, subscript error
if gev only has le 2 events! (solar minimum)
mdm, 11-Jul-1995 Added protection for case where there is no
GEV data
[Previous]
[Next]
Name: chk_pointing
Purpose: check SXT OR pointings and generate statistics
Input Parameters:
sprfiles: The following options are allowed for sprfiles:
1. not supplied - user selects from menu (recent spr files)
2. string/string arrary - supplied spr file names
3. Numeric - most recent N spr files are checked
Calling Sequence:
chk_pointing [sprfiles, min_sep=min_sep, /sfd , /hc]
Calling Examples:
chk_pointing [,/sfd] ; select 1 or more spr from menu
chk_pointing,newfiles(/spr,last=3) ; statistics for last 3 spr files
chk_pointing,3 ; same as above
chk_pointing,3, /sfd ; statistics PLUS graphical
Optional Keyword Parameters:
hc - (in) sitch, if set, hardcopy of statistics page
min_sep - (in/out) minimum seperation for uniq fov (pass to sxt_uniqfov)
nimages - (out) - total number of images per file
mispoint- (out) - number of bad pointings / file (guess!!)
Calls: ***
CHK_ORFOV, CONV_A2H [1], CONV_A2H [2], FILE_EXIST [2], RD_SDA [1], RD_SDA [2]
RD_SDA [3], Rd_Roadmap [2], SXT_UNIQFOV, WDEF [1], WDEF [2], file_exist [1]
file_exist [3], fmt_tim [1], fmt_tim [2], get_info [1], get_info [2], get_info [3]
get_info [4], gt_shape_cmd, lastsfd [1], lastsfd [2], newfiles [1], newfiles [2]
newfiles [3], plot_fov [1], plot_fov [2], prstr [1], prstr [2], rd_roadmap [1]
saa_in [1], saa_in [2], stepper_title [1], stepper_title [2], str_replace [1]
str_replace [2], tim2orbit [1], tim2orbit [2]
Restrictions: if spr filenames not supplied, must have spr data in
$DIR_SITE_NEWDATA - sfd option assumes corresponding sfd
data in same directory
History:
11-Sep-1993 (SLF) Written
14-sep-1993 (SLF) Handle multiple xshapes in single FOV
NOTE: as with lastsfd, crash may occur if reformatting is in progress
you can always read the most recent COMPLETE spr/sfd files with:
chk_pointing,newfiles(/spr,old=1,/last),/sfd
[Previous]
[Next]
NAME: CHKTERM.PRO
PURPOSE: Make a quick, idiot-type check for terminator observations.
CATEGORY: Utility for SXT Chief Observers
CALLING SEQUENCE: chkterm
INPUTS: none
OPTIONAL INPUT PARAMETERS: none
KEYWORD PARAMETERS: none
OUTPUTS: list of terminator images observed since 1-Nov-1994
plus summary table, showing the number of images found in
each filter and at each commanded offpoint. Includes all
candidates, regardless of DPE and time-to-night.
OPTIONAL OUTPUT PARAMETERS: none
CALLS: ***
gt_day [1], gt_day [2], pr_sxt_term
COMMON BLOCKS: none
SIDE EFFECTS: I/O is performed. Subroutines may be compiled.
RESTRICTIONS: Start date of search is "hardwired" to 1 Nov.
PROCEDURE: Calls pr_sxt_term.pro with predetermined parameters.
MODIFICATION HISTORY: Written 14-Nov-1994 M. Bruner
20-Nov-1994 Added documentation header, changed to use gt_day
instead of M.B. function chkdate MB
[Previous]
[Next]
NAME:
choose_interval
PURPOSE:
plots data, prompts for start and end times, and returns the
subscripts for the accumulation period.
CALLING SEQUENCE:
choose_interval, index, ss_start, ss_end, data = data, channel = channel, $
st_times = st_times, int_times = int_times, time_range = time_range, $
dt_resolution = dt_resolution, alt_tsel = alt_tsel, $
accum_cnts=accum_cnts, plot_title=plot_title, b_level = b_level, $
all=all,plot_prompt=plot_prompt, xxx=xxx, ok_intv=ok_intv, $
auto_peak=auto_peak
INPUT:
index= an index or time array, in any yohkoh format
KEYWORDS:
data= counts, an array of (n_times), (n_channels, n_times).
channel= the channel you want to use to choose the interval, either
for the accum_cnts or plotting options.
st_times= an array of accumulation start times, in any yohkoh format
int_times= interval times corresponding to st_times, may be a scalar,
if this is not set, and st_times is set, the routine will
use the differences between st_times. This must be an integer
number of the appropriate resolution in seconds, if the
value of int_times is less than a frame value.
time_range = a time range for accumulation, can be an array of (2, n_times)
Note that this will result in use of all of the intervals
that start in this range.
dt_resolution = the number of frames per accumulation interval, then default
is to prompt the user. If set to -1, then the whole chosen
interval is used. NOTE THAT THIS KEYWORD IS IGNORED
IF MULTIPLE INTERVALS HAVE BEEN SELECTED EITHER
IN PLOT_LCUR, OR IF THEY HAVE BEEN PASSED IN.
alt_tsel = uses ALT_TIM_SEL to obtain interval, rather than PLOT_LCUR
Useful if you don't have x-windows.
accum_cnts = if set, the value of average counts in a given interval
that you want, the routine will accumulate counts until
the number of counts in the given channel are greater
than or equal to this value. NOTE THAT THIS KEYWORD IS IGNORED
IF MULTIPLE INTERVALS HAVE BEEN SELECTED EITHER
IN PLOT_LCUR, OR IF THEY HAVE BEEN PASSED IN.
plot_title = a title for the plot, if used.
b_level = a background level, if set, choose the interval where data is greater
than this level.
All= if set, use all of the points...
plot_prompt= a string message, passed in to be printed out if plot_lcur is used
xxx= if set, go to user choice for data intervals if something goes wrong, if possible
ok_intv= subscripts of the ok intervals, relative to intervals passed in,
pass out when using st_times, int_times, or time_range, otherwise ok_intv=-1
auto_peak= if set, use the peak interval for the data, the data
must be passed in
OUTPUT:
ss_start = the starting subscripts of the intervals chosen
ss_end = the ending subscripts of the chosen intervals
DESCRIPTION:
Uses PLOT_LCUR to select the interval, or ALT_TIM_SEL.
CALLS: ***
ADDTIME [1], ADDTIME [2], Alt_tim_sel, anytim2ints [1], anytim2ints [2]
fmt_tim [1], fmt_tim [2], int2secarr [1], int2secarr [2], plot_lcur [1]
plot_lcur [2], sel_timrange [1], sel_timrange [2], yesnox [1], yesnox [2]
CALLED BY:
Sxt_goes_teem, bck_interval, goes_teem, goesem_eqn [1], goest_eqn [1], grs32_fsp
grsl_fsp, hxs_fsp, hxsgrs_fsp, hxt_fsp, hxt_fsp1, hxt_mcaccum, hxt_utplot
hxtimg_accum, sxt_fsp, sxt_thfsp, sxthxt_fsp, sxtth_hxt
MODIFICATION HISTORY:
Written 30-Mar-95, jmm, from HXTIMG_ACCUM, HXT_FSP.
This oughta take the place of every routine i've ever written...
Added /auto_peak keyword, 1-may-1997, jmm
[Previous]
[Next]
NAME:
choose_pairs
PURPOSE
To identify pairs of images less than dt apart in time.
Usually used to find (Al.1, AlMg) pairs for temperature analysis.
CALLING EXAMPLES
choose_pairs,input1,input2,dt,ii1,ii2
cchoose_pairs,index(al(alok)),index(dg(dgok)),600,al0,dg0
INPUT
input1, index structure of first kind of image
input2, index structure of second kind of image
dt, permissible time difference (sec)
OUTPUT
ii1, indices of input1 images meeting dt criteria
ii2, corresponding indices for input2
CALLS: ***
tim2dset [1], tim2dset [2]
CALLED BY:
sxl2radiance
NOTE: If no pairs of images match criteria ii1=ii2=-1.
HISTORY
15-Jan-2002 (LWA) Added header to old program.
[Previous]
[Next]
NAME:
choose_sfc
PURPOSE
Toggle the environmental variable sxt_syn_sfc to cause use
of Terminator or Synthetic leak (SFC) images for correction
of SXT images. Default is to use the following choices.
-------- Set up Syn/Term SFC boundaries ----------
ent(0) - 24 Jul 93 use TermSFC
24 Jul 93 - 16 Sep 94 use SynSFC
16 Sep 94 - ent(3) use TermSFC
ent(3) - ent(5) use SynSFC
ent(5) - ent(7) use TermSFC
ent(7) - ent(9) use SynSFC
CALLS: ***
get_yo_dates [1], get_yo_dates [2], get_yo_dates [3], int2secarr [1]
int2secarr [2], set_logenv [1], set_logenv [2]
CALLED BY:
mk_ssc [1], mk_ssc [2]
NOTE: Syn/Term choice is based upon time of first index
record and that selection is used for that SSC or SST.
CALLING SEQUENCE
choose_sfc,index,term=term,syn=syn
INPUT
index, only needed if used to choose default Syn/Term
selection.
KEYWORD INPUT
no keyword input, use Syn/Term rules for SFC selection.
/term, use Terminator SFCs.
/syn, use Synthetic SFCs.
HISTORY
10-Nov-2004 LWA Added header.
20-Dec-2004 LWA & AkT
[Previous]
[Next]
NAME : circle (procedure)
PURPOSE :
draw circle
CATEGORY :
idl/lib/nkr
CALLING SEQUENCE :
circle,ox,oy,r,nn=nn,angle=angle,linestyle=linestyle
INPUTS :
ox, oy -- center position
r -- radius
OPTIONAL INPUT PARAMETERS :
none
KEYWORD PARAMETERS :
nn -- No. of points
angle -- angle array for arc (degree)
linestyle
OUTPUTS :
none
CALLS: ***
CIRCLE
COMMON BLOCKS : none
SIDE EFFECTS :
if /ver is set, fitting curve is displayed
RESTRICTIONS : none
PROCEDURE :
MODIFICATION HISTORY :
K.I. 1993/01/22
[Previous]
[Next]
NAME:
CIRCLE_CURSOR
PURPOSE:
Emulate the operation of a variable-sized circle cursor (also known as
a "marquee" selector).
CATEGORY:
Interactive graphics.
CALLING SEQUENCE:
CIRCLE_CURSOR, x0, y0, r [, INIT = init] [, FIXED_SIZE = fixed_size]
INPUTS:
No required input parameters.
OPTIONAL INPUT PARAMETERS:
x0, y0, r give the initial location (x0, y0) and
size r of the circle if the keyword INIT is set. Otherwise, the
circle is initially drawn in the center of the screen.
KEYWORD PARAMETERS:
INIT: If this keyword is set, x0, y0, r contain the initial
parameters for the circle.
FIXED_SIZE: If this keyword is set, r contains the initial
size of the circle. This size may not be changed by the user.
MESSAGE: If this keyword is set, print a short message describing
operation of the cursor.
OUTPUTS:
x0: X value of center of circle.
y0: Y value of center of circle.
r: radius of circle in pixels.
CALLED BY:
EARTH_CURSOR, GRID_CURSOR
RESTRICTIONS:
Works only with window system drivers.
PROCEDURE:
The graphics function is set to 6 for eXclusive OR. This
allows the circle to be drawn and erased without disturbing the
contents of the window.
Operation is as follows:
Left mouse button: Move the circle by dragging.
Middle mouse button: Resize the circle by dragging. The corner
nearest the initial mouse position is moved.
Right mouse button: Exit this procedure, returning the
current circle parameters.
MODIFICATION HISTORY:
DMS, April, 1990.
DMS, April, 1992. Made dragging more intutitive.
June, 1993 - Bill Thompson
prevented the circle from having a negative size.
[Previous]
[Next]
NAME:
circle_fit
PURPOSE:
fits a circle to a set of x,y points
CALLING SEQUENCE:
circle_fit, x, y, x0i, y0i, r0i, x0o, y0o, ro [, check]
INPUTS:
x = vector of x coordinates
y = vector of y coordinates
x0i = initial guess for x0
y0i = initial guess for y0
r0i = inititl guess for r
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
verbose = Print diagnostics on the conversion and the fit
quiet = work silently
norfit = if set, do not fit to the radius (use the initial guess only)
noiterate = do not iterate the initial solution if set
OUTPUTS:
x0o = best fit value for x0
y0o = best fit value for y0
ro = best fit value for r
check = 0 if the iteration failed to converge, 1 if it converged OK
CALLS: ***
POLY_FIT
CALLED BY:
DSK_LOCG, ellipse_fit, fit_limb
SIDE EFFECTS:
RESTRICTIONS:
Actually fits an ellipse and takes the best circle from that. This
does not give the best fit to a circle, but is more robust for
flattened images. If the circle is not flattened use fit_circle.pro.
PROCEDURE:
Iteratively fits to cos(theta), sin(theta) using poly_fit.
MODIFICATION HISTORY:
T. Metcalf 4/92
[Previous]
[Next]
NAME:
circle_fit
PURPOSE:
fits a circle to a set of x,y points.
CALLING SEQUENCE:
circle_fit, x, y, x0, y0, r0, [, check]
INPUTS:
x = vector of x coordinates
y = vector of y coordinates
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
verbose = Print diagnostics on the conversion and the fit
quiet = work silently
noiterate = do not iterate the initial solution if set
guess = [x,y,r] = initial guess (optional).
OUTPUTS:
x0 = best fit value for x0
y0 = best fit value for y0
r0 = best fit value for r
check = 0 if the iteration failed to converge, 1 if it converged OK
CALLS: ***
CIRCLE_FIT2, POLY_FIT
CALLED BY:
DSK_LOCG, ellipse_fit, fit_limb
SIDE EFFECTS:
RESTRICTIONS:
Actually fits an ellipse and takes the best circle from that. This
does not give the best fit to a circle, but is more robust for
flattened images. If the circle is not flattened use fit_circle.pro.
PROCEDURE:
Iteratively fits to cos(theta),sin(theta) using poly_fit.
MODIFICATION HISTORY:
T. Metcalf 4/92
T. Metcalf 1994-10-21 Used improved initial guess to circle.
[Previous]
[Next]
NAME: circle_fn
PURPOSE: Circle function, to generate a set of points at
angles matching the input points, which lie on an
circle with given parameters.
METHOD: Given the centroid and radius, calculate
x = r cos( theta )
y = r sin( theta )
CALLING SEQUENCE: nfits = circle_fn(a,x,y)
PARAMETERS: a fit parameters: centroid and radius
x,y data points
nfits fit points [xfit,yfit]
CALLS: ***
rect2pol
CALLED BY:
DSK_LOCG, gradls
HISTORY: Drafted AMcA, August 1994.
[Previous]
[Next]
NAME: circle_trgt
PURPOSE: To estimate target parameters for a set of points on the
circumfrance of a circle.
METHOD: Use averages for x,y and convert to radial to average for r.
CALLING SEQUENCE: trgt=circle_trgt(limb)
PARAMETERS: limb points to fit, in [x,y] form
trgt return fit parameters
centroid: [x,y]
radius.
CALLS: ***
rect2pol
CALLED BY:
DSK_LOCG, ellipse_fit
HISTORY: Drafted AMcA, November 1994.
Replaced total average with min/max average, AMcA, March 1995.
[Previous]
[Next]
NAME: cirdrw
PURPOSE: draw a circle
CALLING SEQUENCE: cirdrw,xc,yc,r,arsz
xc,yc are the center coordinates
r is the radius
arsz is the width of the image in pixels
CALLS: ***
crcle
HISTORY: drafted apr. 1992, A. McAllister
[Previous]
[Next]
NAME:
ck
PURPOSE:
check input filename list against contents of the tape.
Return a list of found indices.
CALLS: ***
PREFIXCK
CALLED BY:
RdTap [1], RdTap [2], RdTap [3], gen_file_id [1], gen_file_id [2], prep_week [1]
prep_week [2], yo_arch_size
HISTORY:
written 8-Nov-91, gal
2-Mar-92, update for new prefix list.
[Previous]
[Next]
NAME:
Ck_Item
PURPOSE:
Compare the "item" from the search key to a list of
valid "search fields" which are derived from the
fieldnames of the actual data-structures for the
specified instrument (via keyword) and return the
status of the comparison (1 =found,0 = not found).
CALLING SEQUENCE:
itemStat = Ck_Item(item, [BCS=bcs, HXT=hxt, SXT=sxt,
WBS=wbs] )
INPUT/Keyword:
item the item (or field name) decoded from the
search key.
bcs if present, the type of data-vector to check
against.
hxt if present, defines the data-vector
sxt if present, defines the data-vector
wbs if present, defines the data-vector
RETURNED:
itemStat 0 not found or invalid item
for input data-vector
1 found or valid item for
input data-vector
CALLED BY:
KeySea [1], KeySea [2], KeySearch
HISTORY:
Written 13-AUg-91, by GAL
17-Oct-91, cleanup of changes made in Japan.
and added ImgParam.
To DO:this routine should check input item vs tags of
the structure to be search.
18-Oct-91 (MDM) Added one line - see below
4-Feb-92 (GAL) additions for DPE search
10-Feb-92, added Dp_mode
[Previous]
[Next]
NAME: ck_what
PURPOSE: Return a list of tags to difference between structures.
INPUT:
tdhdr flag to return list for Tape-Dir-Header
tddrec flag to return list for Tape-Dir-Data-Records
RETURNED:
string array with list of tags to difference.
CALLED BY:
cktapdir
HISTORY:
written 24-Feb-92, GAL
[Previous]
[Next]
NAME: ckcopy
PURPOSE: Finds bad refromatted files by comparing internal file
size parameter with the actual file size from Fstat.
The bad files are listed a in file called "filestat.lis".
CALLING SEQUENCE:
ckcopy, pathlst, [fn='spr92*.*' , /del]
ckcopy, data_paths(), [fn='spr92*.*', /del]
where:
pathlst are the paths to the reformatted files= '/yd3/reformat'
fn file names to check. if omited will check all
spr and sfr files in the path.
del delete the bad files.
CALLS: ***
POPD, PUSHD, Rd_Pointer [1], Rd_Pointer [2], curdir [1], curdir [2]
HISTORY:
written Jan 92. gal
updated 13_apr-92, at isas
[Previous]
[Next]
NAME: ckdderr
Purpose: check log for dd copy errors and return error status.
Calling:
ckdderr, dderrstat
dderrstat 1 when error is detected, otherwise 0.
CALLS: ***
mail [1], mail [2]
CALLED BY:
arctap2tap
History: written, 21-Sep-94, GAL
[Previous]
[Next]
Name:
CkFurFiles
Purpose:
Review list of input file names and check the default
directory for the existence of the file. If the file
does not exist on the default directory a path to the
file may be given by the user.
CALLING SEQUENCE:
err = CkFurFiles( fnMap)
Input:
fnMap file name map with a list of input file names.
Output:
fnMap file name map with updated fileStat truth
table for the existence of these files.
And an update to the filenames which may
include the path to the files as necessary.
Returned:
CkFurFiles error status:
0 error occured and search not completed.
1 indicates all files were check without error.
CALLS: ***
ARR2STR [1], Arr2Str [2], GetFnPath, STR2ARR [1], STR2ARR [2], search_file [1]
search_file [2]
CALLED BY:
CreDvec Create Data Vectors
History:
written by GAL 13-Mar-1991
updated to work on file name map 27-June-91
26-July-91 isolated the user prompt and input to an
external routine.
16-Oct-91 MDM Fixed typo (files versus file)
[Previous]
[Next]
NAME: cktapdir
Purpose:
Check current Tape-Directory against latest Tape-Dir file.
INPUT:
hd current dir header
drecs current data
tDirfid fileID of tape dir
RETURNED:
tape rel number for the input fileID
value of "1" is returned if no files are found
CALLS: ***
Rd_TapDir, STR_DIFF, ck_what, weekid [1], weekid [2], weekid [3]
CALLED BY:
TapDir
HISTORY:
written 24-Feb-92, GAL
added data-rec ck 26-Feb-92, patch for str_diff
[Previous]
[Next]
Name:
CkTimeNkey
Purpose:
Check for the presence of either time or key to
define the start and end times for data extraction
and to set time and key flags (utime and ukey).
CALLING SEQUENCE:
CkTimeNkey, fileNa, utime, ukey, [userTime=userTim,
key=key, ntimes=ntimes]
Input/Keyword:
fileNa observing log file name
userTim 2-element structured var. with
start and stop times.
key string var. with a list of search
items, operators, and values.
Output:
userTim updated start n stop for "key" only
request.
utime flag =1 if usertim is present, 0 if not
ukey flag =1 if key is present, 0 if not.
ntimes number of times specified by user.
CALLS: ***
MAKE_STR [1], MAKE_STR [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
CALLED BY:
GetObsDat
History:
written 20-May-91 by GAL
modified 26-July-91, to use Make_Str(ucture) to create
time-date logical data-type.
Oct 91???, if time and key are not defined read whole file
17-Mar-92, corrected a bug with last_day load into
the returned userTim.
[Previous]
[Next]
Name:clean_data
Purpose: sort and uniqify index and data
Input/Output Parameters
index - index
data - data array
[Previous]
[Next]
function clicklimb,image,x,y,r,guess,error=error,radius_fix=radius_fix
NAME:
CLICKLIMB
PURPOSE:
Fit a circle to points clicked on with mouse
CATEGORY:
CALLING SEQUENCE:
result = clicklimb(image,x,y,r,guess,error=error)
INPUTS:
image = image to be displayed
OPTIONAL INPUT PARAMETERS:
guess = [x,y,r] initial guess
KEYWORD PARAMETERS
/radius_fix = The radius exact radius. If this is set, the radius
will not be fit.
OUTPUTS:
x,y,r = x position of center, y position of center, radius of cicle in
device units. Optional.
result = [x,y,r] in device units. result = -1 in case of error.
error = error in x,y,r (device) units
CALLS: ***
fit_circle [1], fit_circle [2]
CALLED BY:
gbo_obs_coord, sun_grid
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
Click the left mouse button on at least three points on the circle
displayed (image). Click the right mousr button when finished.
MODIFICATION HISTORY:
T. Metcalf & K. Shibasaki, 1994-10-18
2001-June-26 TRM Added radius_fix keyword
[Previous]
[Next]
Name:
clon2ex
Purpose:
Calculate times corresponding to input 'Carrington'
longitudes.
Input:
CLON_ARR - A 2xN array with rotation number in the first index
and longitude in degrees in the second index,
OR
An N vector containing decimal rotation numbers.
Output:
TIME_ARR
CALLS: ***
dd792ex
CALLED BY:
BUILD_SSX, TV_SSX, mk_imgsum_html
History:
Written 16-Aug-92 by G. Slater
[Previous]
[Next]
NAME :
CLOS_TIM
PURPOSE:
Find an image index of the Compressed (low 8) FFI/PFI which has
close in time with the low 8 bit (Compressed) FFI/PFI.
CALLING SEQUENCE:
idx = clos_tim(inday, intim, day, time)
INPUTS:
inday = integer of day from 1979 (low 8 bit)
intim = long integer of time (low 8 bit)
day = integer array of day from 1979 (Compressed)
time = long array integer of time (Compressed)
OUTPUTS:
Image index.
SIDE EFFECT:
CALLED BY:
RES_FFI
COMMON BLOCKS:
MODIFICATION HISTORY:
Written April 21, 1992 by Bachtiar Anwar
[Previous]
[Next]
NAME: clrkey
PURPOSE: clear output buffers and text display values of menu
keys.
CALLS: ***
CLRKEYS
HISTORY: written 14-jan-92, gal
[Previous]
[Next]
NAME:
CNV_HDRSTR
PURPOSE:
Extract header strings from header structure 'hdr' (ver 2.1)
CALLING SEQUENCE:
hdrstr = CNV_HDRSTR(hdr)
INPUT:
hdr - Header structure contained in `hxt_img.dat' files.
This structure variable can be read out as follows:
RD_HXTIMG, img, hdr, inf, 'hxt_img.dat'.
OUTPUT:
hdrstr - STRARR(3).
CALLED BY:
DISP_HXTIMG
SIDE EFFECTS:
none.
CATEGORY:
Yohkoh HXT data analysis.
HISTORY:
version 1.0 93.05.07 (Fri) T.Sakao written.
1.1 date unknown
1.2 98.05.03 (Sun)
Written at NSRO. 'Syserr' output omitted. Output
format for [x0,y0] changed from F5.2 to F6.3.
[Previous]
[Next]
NAME:
CNV_INFSTR
PURPOSE:
Extract information strings from info-structure 'inf' (ver 2.1).
CALLING SEQUENCE:
infstr = CNV_INFSTR(hdr,info)
INPUT:
hdr - Header structure contained in `hxt_img.dat' files.
info - `Info' structure contained in `hxt_img.dat' files.
These structure variable can be read out as follows:
RD_HXTIMG, img, hdr, info, 'hxt_img.dat'.
OUTPUT:
infstr - STRARR(2,*).
CALLED BY:
DISP_HXTIMG
SIDE EFFECTS:
none
CATEGORY:
Yohkoh HXT data analysis.
HISTORY:
verison 1.0 93.05.07 (Fri) T.Sakao written.
1.1 98.05.03 (Sun)
Several modifications were made for the HXT NMP
release.
[Previous]
[Next]
NAME:
cnvt
POURPOSE:
convert all the WBS data contained in the Reformated data
into simple two dimensional array format which has been used
in many softwares developed so far.
CATEGORY:
Yohkoh/WBS analysis
CALLING SEQUENCE:
cnvt ( after the run of yodat and extracting 'data' and
'index')
INPUT:
data - all wbs data
index - wbs index structure from reformatted data
(these data are automatically input into the
cnvt program after execution of yodat)
OPTIONAL INPUT:
none
OUTPUT:
sets of wbs database array ; one data set consists of two
head lines and an array of 16 x 39 which corresponds to one
sub frame in the original serius database.
SIDE EFFECTS:
None
PROCEDURE:
(1) run the 'cnvt' after the yodat execution.
(2) input the time window, the start time and end time of
the event, when prompted by the program.
(3) wbs datasets during the events are written in a temporay
file which can be used by the wbs softwares afterwards.
This temporary file is deleted automatically when you
exit from 'idl'.
(4) Any desired software for wbs analysis can be run just
after the execution of 'cnvt'.
RESTRICTIONS:
None
MODIFICATION HISTORY:
May 19, 1993 created by Kenichiro Ohki
(NAOJ)
May 26, 1993 modified by K.Ohki
Jun 08, 1993 modified by K.Ohki
Jun 11, 1993 modified by K.Ohki
[Previous]
[Next]
NAME:
cnvt
POURPOSE:
convert all the WBS data contained in the Reformated data
into simple two dimensional array format which has been used
in many softwares developed so far.
CATEGORY:
Yohkoh/WBS analysis
CALLING SEQUENCE:
cnvt ( after the run of yodat and extracting 'data' and
'index')
INPUT:
data - all wbs data
index - wbs index structure from reformatted data
(these data are automatically input into the
cnvt program after execution of yodat)
OPTIONAL INPUT:
none
OUTPUT:
sets of wbs database array ; one data set consists of two
head lines and an array of 16 x 39 which corresponds to one
sub frame in the original serius database.
CALLS: ***
CNVTV2, HXT_DECOMP, anytim2ints [1], anytim2ints [2], fmt_tim [1], fmt_tim [2]
gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2], gt_time [1], gt_time [2]
int2secarr [1], int2secarr [2]
SIDE EFFECTS:
None
PROCEDURE:
(1) run the 'cnvt' after the yodat execution.
(2) input the time window, the start time and end time of
the event, when prompted by the program.
(3) wbs datasets during the events are written in a temporay
file which can be used by the wbs softwares afterwards.
This temporary file is deleted automatically when you
exit from 'idl'.
(4) Any desired software for wbs analysis can be run just
after the execution of 'cnvt'.
RESTRICTIONS:
None
MODIFICATION HISTORY:
May 19, 1993 created by Kenichiro Ohki
(NAOJ)
May 26, 1993 modified by K.Ohki
Jun 08, 1993 modified by K.Ohki
Jun 11, 1993 modified by K.Ohki
[Previous]
[Next]
Name: cnvtimstr
Purpose: attempt to convert non standard time string into Yohkoh standard
Input Parameters:
intime - date string in non-standard format (9/9/92)
Output Parameters:
function returns time in a standard Yohkoh format (external or string)
Optional Keyword Paramters:
string - if set, output is standard Yohkoh string (default is external)
ddmm - if set, input is assumed dd-mm (default = mm-dd)
CALLED BY:
goes2str
History:
slf, 10-sep-92 (for goes plot to Yohkoh conversion)
Method:
checks for many delimiter types and tries to convert user value into
one of the Yohkoh standard formats (string or external)
Category:
time, conversion, dbase
CALLS: ***
ARR2STR [1], Arr2Str [2], REVERSE, deriv_arr [1], deriv_arr [2], syst2ex [1]
syst2ex [2], syst2ex [3]
Restrictions:
times containing milliseconds are not always handled properly
generally more reliable if year is present in some form
[Previous]
[Next]
NAME:
coal_image
PURPOSE:
To perform the scaling and insertion steps for the co-alignment of
two images.
SAMPLE CALLING SEQUENCE:
data_out = coal_image(data, index_or_corn, out_corn, out_siz)
data_out = coal_image(data, index, out_corn, out_siz, index_out=index_out)
data_out = coal_image(img, corn2sc, out_corn, out_siz)
INPUT:
data - The data array or cube
index_or_corn - The SXT index structure, or the pixel address of the
lower left corner relative to sun center. The pixel address
is in units of the input image pixel size.
out_corn- 2 element array with the lower corner value (relative to
sun center) for the output array in output pixel units.
out_siz - The size of the output image
KEYWORD INPUT:
mag - If set, change the pixel size of the input image by
that factor.
angle - If set, rotate the input image by this angle
qdebug - If set, print some diagnostic messages
qstop - If set, stop before exiting
KEYWORD OUTPUT:
index_out- The new updated SXT index structure.
METHOD:
Call COAL_ROT if "angle" is passed
Change the resolution of the input image if "mag" is set
Imbed the input image into the output array
CALLS: ***
CONGRID [1], CONGRID [2], CONGRID [3], coal_rot, gt_corner, gt_res, his_index
sxt_cen [1], sxt_cen [2]
CALLED BY:
NORH_NORH2SXT [1], NORH_NORH2SXT [2], NORH_NORH2SXT [3], NORH_NORH2SXT [4]
eitoversxt, get_gbo_pfi, sxt2eit
HISTORY:
Written by M.Morrison 10-Aug-93
22-Dec-93 (MDM) - Various changes
31-Aug-94 (MDM) - Put in check that there is overlap in the image
[Previous]
[Next]
NAME:
coal_rot
PURPOSE:
To perform the rotation step for the co-alignment of two images.
SAMPLE CALLING SEQUENCE:
data_out = coal_rot(data, angle, index_in=index, index_out=index_out)
data_out = coal_rot(data, angle, corn2sc=corn2sc)
INPUT:
data - The data array or cube
angle - the angle to rotate clockwise. It can be an array if
"data" is an data cube.
KEYWORD INPUT:
index_in- The SXT index structure. If the index is not passed, then
"corn2sc" needs to be passed.
corn2sc - The lower left corner of the image in pixels relative to
sun center.
missing - The data value to insert into the output array for pixels
where there is no data
qdebug - If set, print some diagnostic messages
qstop - If set, stop before exiting
KEYWORD OUTPUT:
index_out- The new updated SXT index structure.
new_corn- The lower left corner of the image in pixels relative to
sun center
cen - The coordinates of the sun center.
METHOD:
The routine uses ROT, but before it does so, it imbeds the input
image into a larger array so that the corners are not lost
CALLS: ***
ROT, gt_corner, gt_res, his_index, sxt_cen [1], sxt_cen [2]
CALLED BY:
coal_image
HISTORY:
Written by M.Morrison 10-Aug-93
[Previous]
[Next]
NAME:
collexc
PURPOSE:
Compute effective excitation rate coefficients for a given Temperature
in units of cm^3 s-1
CALLING SEQUENCE:
collexc,ato_data,Te6,wave,stage,exrate
The line intensity is I (ph cm-3 s-1) = Ne * Nz * exrate where
Ne (cm-3) and Nz (cm-3) are the electron density and the number density
of the responsible stage.
INPUTS:
ato_data = Structure containing atomic data (returned from rd_atodat)
Te6 = Vector of electron temperatures (MK)
OPTIONAL INPUT KEYWORD:
Dens = Log10(Ne) where Ne = electron density in cm-3
This keyword only has an effect on S XV calculations
OPTIONAL OUTPUT KEYWORD:
qdens = log10(Ne) of returned data
OUTPUTS:
wave = Wavelength (in Ang) of lines
stage = Vector describing ion stage as number of electrons (1=H like)
exrate = Effective excitation rate (cm+3 s-1)
CALLS: ***
DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], DSPLINE, GAMINC [1], GAMINC [2]
GAMINC [3], delvarx [5], interp2d [1], interp2d [2], interp2d [3], tbeep [1]
tbeep [2], tbeep [3]
CALLED BY:
bcs_line
RESTRICTIONS:
The density-dependent ratios x/w, y/w, z/w must be in the ato_data
structure if the dens= keyword can have any effect.
HISTORY:
10-sep-93, J. R. Lemen (LPARL), Written
27-oct-93, JRL, Te6 no longer needs to be monotonic
11-mar-94, JRL, Added dens and qdens keywords
[Previous]
[Next]
NAME:
color2rgb
PURPOSE:
Convert a color name to the associated PS rgb values.
CALLING SEQUENCE:
rgb = color2rgb(color,[red=red,green=green,blue=blue,
colorName=colorName])
OR
color_name = color2rgb(/colorName)
INPUT:
color name of a postscript color
OPTIONAL INPUT:
red, green, blue unscale (0-255) values.
colorName switch to change return parameter
to the selected color name.
OUTPUT:
rgb array of scaled rgb values [red,green,blue] or
colorName Color Name, if "colorName" switch is set.
USAGE:
Typical usage in writing postscript files:
1) color_name = color2rgb(/colorName)
2) set_plot,'ps'
3) DEVICE, file= 'my_postscript_file'
4) cfill, color_name
5) other device commands, tv, xyouts...etc. close the file.
CALLS: ***
wmenu_sel [1], wmenu_sel [2]
CALLED BY:
cfill, photoland landscape vers of phototextpro
photoport portrait vers of phototext
HISTORY:
written by gal, 25-Jan-94
[Previous]
[Next]
PRO color_copy, image, colortab=colortab, landscape=landscape, mag=mag, window=window
Name: color_copy
Purpose: Print images on Mitsubishi color printer
Optional input parameter:
image = byte image to print. If no image is passed then one will
be loaded from /window or active window
Optional keyword parameters:
colortab = colortable to use. There are 3 options:
Default, load color table from /window or active window.
An integer from 0 to 15, corresponding to the
standard IDL colortables.
A byte array, either 256 x 1 (monochrome) or
256 x 3 (color).
landscape - Default prints portrait. This forces landscape.
mag = magnification. Default magnifies the image to fill
the print (minimum of magnifications in the
2 directions). This keyword can force a
specified magnification, for making camera-ready
prints or matching other data.
window = window with image to print. Used if image
parameter is missing; also used if /colortab
is missing. Default is to take the active window.
CALLS: ***
FILE_EXIST [2], LOADCT, ROT_INT, WRITE_SRF, file_exist [1], file_exist [3]
get_host [1], get_host [2], get_user [1], get_user [2]
Restrictions:
Site dependent, only works at ISAS.
Handles 8-bit images, not 24-bit 3-color.
User must have an account on the flareN machines
(you can use the <guest> account if you don't have one)
Assumes the Mitsubishi is in the default state: 1 x 1 printing,
image centered.
Magnification interpolates the image values. If the color
table is discontinous, then places of large gradient
will be shown incorrectly (e.g., plotted lines).
To avoid this, either make the color table continuous,
or set mag=1. to force the hardcopy to have the
same number of pixels as the image (equivalent
to calling R_COLOR).
History: Barry LaBonte May 21 1993
May 27, 1993 Fixed odd pixel problem BJL
June 9, 1993 Skip rsh if user on Flare6 BJL
March 9, 1994 Handle !ORDER, fix roundoff error BJL
April 11, 1994 Get !ORDER correct, fix range error BJL.
March 1, 1995 used get_host(/short), and /1p instead
of /3p references LS
[Previous]
[Next]
out_img = comb_img(lo_img, hi_img [, lo_top=lo_top, hi_top=hi_top, $
nlevels=nlevels, rev=rev]
lo_img is the img to be stored in the low bits
hi_img is the img to be stored in the hi bits
OPTINAL:
lo_top, hi_top divide the available levels
nlevels sets the number of levels used (def is !d.n_colors)
[Previous]
[Next]
NAME:
combine_bsc_flux.pro
PURPOSE:
Sum flux from two difference BSC spectra.
CALLING SEQUENCE:
sum_bsc,bsc_data1,bsc_index1,bsc_data2,bsc_index2,combine_data,combine_data
INPUTS:
bsc_data1 bsc_data from first spectrum to be summed
bsc_data1 bsc_index for same
bsc_data2 bsc_data from second spectrum to be summed
bsc_data2 bsc_index for same
KEYWORDS:
NOTES:
OUTPUTS:
combine_data new bsc_data with one element
combine_index new bsc_index with one element
CALLS: ***
chktag
HISTORY:
13-Oct-97. Written. A.C. Sterling
[Previous]
[Next]
Name:
command_laser
Purpose:
Command the laser disk player/recorder -- using C routine to get response.
Calling Sequence:
command_laser, buff [,device=device, rawresp=rawresp, value=value]
command_laser, buff [,device, resp=resp, rawresp=rawresp, nowait=nowait]
command_laser, buff [,device]
CALLED BY:
command_tty2, go_lasdisk golaserdisk, go_lasdisk2 golaserdisk, mk_movie [2]
sonyloop [1], sonyloop [2]
Note:
'play' replaces a lot of the commands that might clutter up a command
list. it does slow step, and fast play. on the panasonics it
can go up to 10x speed. on the sony, it only defaults to 3x speed.
for slower than 1x rates, there are 255 speeds.
this command also determines which direction to go; it's not
automatic on the panasonic.
calling sequence for play:
command_laser,'play',device=1,value=[128./255,end_frame]
the type of machine is determine by the response on the terminal
line. the terminal line is expected to be 9600 baud for the PANASONIC,
and 1200 baud for the SONY; the SONY has problems losing characters
if they are sent too fast (might only be a problem with the
model 3000 series SONY).
this routine depends on the C routine 'call.c' written in 1/95
Input:
buff = String containing command, .eg. 'eject', 'rec', 'record'
Optional Input Keyword:
device = 0 or 1 for recorder or player (def=0)
(device can also just be a input parameter)
value = value that might be required for that particular type of
command, such as 'jump' (need frame number)
'play' needs an array of 2 numbers
value(0)=.004-10
value(1)=end frame-number
nowait = flag to tell C program NOT to wait for complete response from
the laser disk player.
Optional output keyword:
resp = response from laser disk
rawresp = response from the laser disk (byte form) sometimes, ascii
just won't do.
CALLS: ***
data_type [1], data_type [2], get_laser_type, laser_init, laser_write
Common Blocks:
LASER
Procedure:
given the string passed by 'buff', this routine looks through its
list of known commands to see if it knows how to control the
SONY, or PANASONIC machines. the equivalent instruction is looked
up, depending on what machine is being commanded.
Modification History:
feb-1995 - written by L. Shing
commented out fast-forward, and forwar-play commands
these are superseded by the play command
oct-1995, LS , added a wait statement to make it work with the
SONYs in japan.
[Previous]
[Next]
Name:
command_tty2
Purpose:
Send a command to either /dev/tty00 or /dav/tty01
using Lawrence Shing's call_tty.c
Calling Sequence:
command_tty2, buff [,device=device, resp=resp]
Input:
buff = String containing command
Optional Input Keyword:
device = 0 or 1 for tty00 or tty01 (def is tty00)
Optional output keyword:
resp = response from device
CALLS: ***
command_laser
CALLED BY:
VIDEO_ON, sonyloop [1], sonyloop [2], sonyloop2, vblink
Modification History:
Written, ??-???-92 - gls
2-mar-95 - LS changed device_str to access ports on the
terminal server on isass1
30-May-96 - GAL move this updated vers. from Greg's dir.
to online.
[Previous]
[Next]
PURPOSE: Calls sav_sda w/index and data from rd_xda
PGS: Added type_comp 10-Dec-97
PGS: Added test for wrong size of comp_flags 09-Jan-98
PGS: Added test for and forced overwrite of '_c' files to '_c' files.
(This is used by comp_sfr_arch.pro when making multiple
compression passes of the same sfr file.)
CALLS:
CALLED BY
comp_sfr_arch
[Previous]
[Next]
NAME: comp_sfr_arch
Purpose: compress an sfr archive.
Formal Parameters:
files list of sfr files
files_siz list of sfr original sizes
orig_size total size of the original archive
cdmax maximum number of Mb that will fit on
CDR
success 1 for success and 0 for failure.
type_comp type of compression: none or 1 for Unix Compress
2 for gzip
CALLS: ***
Rd_Roadmap [2], comp_sda, file_size [1], file_size [2], get_boolean_flags
gt_expmode, gt_percentd, rd_roadmap [1]
CALLED BY:
go_comp_sfr_arch, prep_week [1], prep_week [2]
History:
written 10-Oct-95, by GAL
type_comp, 12-Dec-97, by PGS
- initalized pcomp_flags to zero at top of while loop,
resized mb, moved while loop 09-Jan-98, by PGS
changed logic: comp_flags are cumulative through loop.
changed isavings, savings 16-Jan-98, by PGS
[Previous]
[Next]
NAME: compare_resp
purpose:
Compare old and new database files via plots of various
filter ratios.
CALLS:
[Previous]
[Next]
NAME:
COMPOSE
PURPOSE:
Compose the two SXT image data to delete the satualted
pixel.
CATEGORY:
SOLAR-A/SXT data analysis
CALLING SEQUENCE:
image= COMPOSE(image1, image2, index1, index2)
INPUTS:
image1 = image data 1
image2 = image data 2
index1 = index of image data 1
index2 = index of image data 2
OUTPUTS:
image = composed image
CALLS: ***
exp_norm2, gt_expdur [1], gt_expdur [2]
COMMON BLOCKS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
None.
PROGRAMER:
Toshifumi Shimizu
Department of Astronomy, University of Tokyo, Japan
HISTORY:
5-FEB-1992 Made
[Previous]
[Next]
pro composite,cimg,data,index,dc_data,sx=sx,sd=sd
NAME:
COMPOSITE
PURPOSE:
Prepare a composite image from 2 or 3 SXT Half Res. images
CALLING SEQUENCE:
composite,cimg,data,index,sx=[16,17]
composite,cimg,data,index,dc_data,sx=[1,2,3],sd=[0,2,1]
INPUTS:
data = 3 dimensional image array
index = corresponding index array
sx = vector of image indices data in order:
shortest exposure, longer exposure, longest exposure
cimg = name of output fltarr output image
OPTIONAL INPUT PARAMETERS:
dc_data = 3 dimensional dark frame array
sd = vector of dark frames indices
CALLS: ***
get_dc_image [1], get_dc_image [2], get_dc_image [3], gt_expdur [1]
gt_expdur [2], sxt_decomp [1], sxt_decomp [2]
NOTE: If dc_data and sd are not included then the program
obtains the dark frames from GET_DC_IMAGE
SPECIAL FEATURES:
Prepare 1024x1024 window to view progress.
cimg is put to window in log scaling but output in linear
VERSION:
V1.1 8-May-92
HISTORY:
lwa 11/08/91 ; preparation of wide dynamic range image from 3
lwa 1/31/91, modified to use data and index and search strings.
sx = selected x-ray images in short-med-long order
sd = selected dark frames in short-med-long order
lwa 3/21/92, completely rewritten
installed the MDM bleed removal system
lwa 5/06/92, modified to fix sxmax error
added possibility of separate dark current array
lwa 5/08/92, released
lwa 5/19/92, corrected oversight of missing dc_data mode.
[Previous]
[Next]
NAME:
compst
PURPOSE: To combine two images ontop of each other by interleaving.
To be effective this requires having an approriate color
table, as each image is scaled to be in one half of the
color table.
The first image is scaled to be from 0 to 113.
The second image is scaled to be from 114 to 227.
CALLING SEQUENCE:
imageout= compst(image1,image2)
imageout is a byte array of the same size as the inputs.
image1, image2 are expected to be the same size, and should
have an even second dimension.
It is recommended that images are massaged to emphasize the intensity
ranges of particular interest. This can be combined with creative color
tables for best results.
History:
drafted by A. McAllister, Apr. 1992.
[Previous]
[Next]
NAME:
CONFLX
PURPOSE:
Calculate continuum flux in (ph s-1 A-1) or (erg s-1 A-1).
The resultant flux assumes an emission measure of 1.e50 cm^3.
CALLING SEQUENCE:
Continuum_flux = CONFLX(TE_6,WAVE) ; photons s-1 A-1
Continuum_flux = CONFLX(TE_6,WAVE,/erg) ; erg s-1 A-1
INPUTS:
TE_6 = Electron temperature in MK. (1-d vector or scalar)
WAVE = Wavelength in Angstroms. (1-d vector or scalar)
OPTIONAL INPUTS:
OPT = Options: (must be scalar integer)
Bit Value Effect
0 1 This bit sets the units of the flux calculations.
If this bit is not set: photons s-1
If this is set: erg s-1.
1 2 This bits controls the calculation which is used
to compute the continuum flux.
If this bit is NOT set: approx of Mewe, Groenschild,
and van den Oord (1985, Paper V).
If this bit IS set: Mewe, Lemen, and van den Oord (1986,
Paper VI).
**** Prior to 29-Sep-94 default was OPT = 0 *****
**** After 29-Sep-94 default is OPT = 2 *****
ERG = 1 Will force Bit 0 of OPT to be set: calculation in erg s-1.
APPROX = 1 Will unset Bit 1 of OPT (to use Mewe Paper V approximations)
**** ERG and/or APPROX keywords will be ignored if OPT is defined. *****
OUTPUTS:
Function result = Vector (or array) continuum fluxes.
If one input is a scalar and other is a vector, the result will be
a vector which is the length of the input variable.
If both inputs are vectors, the output will be a two-dimensional
array of the type: FLTARR(N_ELEMENTS(TE_6),N(ELEMENTS(WAVE)).
CALLS: ***
ACGAUNT [1], ACGAUNT [2]
CALLED BY:
bcs_spec, mewe_spec mewe_spec_lwa, mewe_spec [1], mewe_spec [2]
COMMON BLOCKS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
TE_6 must not be of complex type.
WAVE must not be of complex type.
TE_6 and WAVE must be scalers or 1-d vectors. Multi-dimensional
arrays are not permitted and may cause the routine to halt with
an error.
PROCEDURE:
OPT = 0 (OPT and 2) eq 0 [bit 0 is not set]
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
The approximation works well in the range of the BCS (e.g., 1.8 - 3.2 A).
OPT => (OPT and 2) eq 2 [bit 1 is set]
Calculation is performed using the ACGAUNT routine given by Mewe,
Lemen, and van den Oord (Paper VI, 1986, A. & A. Suppl., 65, 511.).
If OPT is not set, will default to OPT=2
MODIFICATION HISTORY:
Mar, 1986, Written, J.R. Lemen, MSSL
Dec, 1987, J.R. Lemen, LPARL
Removed the restriction that either TE_6 or WAVE could be a
vector, but not both. See discussion above under "OUTPUTS:".
The option to use the improved approximation given by Mewe,
Lemen, and van den Oord (1986) was added.
Feb, 1988, J.R. Lemen, LPARL
Added the option of erg s-1 A-1 or ph s-1 A-1
Feb, 1991, N.Nitta
Changed to IDL Version 2.0 format (getting rid of linkimage)
31-jul-93, JRL, Added check on exponent to prevent Floating underflow message
22-sep-94, JMM, removed check on the exponent, do calculation in logs
to avoid the underflows.
29-sep-94, JRL, Added ERG and APPROX switches. Changed default to opt=2
1-oct-94, JRL, Removed a diagnostic stop
22-Feb-96, JRL, Minor change to document header
[Previous]
[Next]
NAME:
conflx_binner
PURPOSE
To prepare wavelength and bin arrays for accurate use of CONFLX
in MEWE_SPEC.
If necessary, expand array of wavelength bins so no bin is larger
than 1 angstrom. This is needed for accuracy with use of CONFLX
in MEWE_SPEC because the continuum is only computed at the center
of each bin and multiplied by the bin width.
CALLING SEQUENCE
conflx_binner,wave,wave_edges,bin_edges,dwave,bin_centers,$
windex,wave4plot,[/edges]
INPUT
wave = 1-d array of wavelengths, either centers or edges.
OUTPUT
wave_edges = wavelengths of the boundaries of the spectral
bins used for output of flux values. If wave is input as
edges then wave_edges=wave.
bin_edges = the array of bin edges for computation of the continuum.
If the input wave is edges and no bins are >1 then bin_edges=wave.
dwave = the array of continuum bin widths for CONFLX calculation.
bin_centers = the array of wavelengths at which CONFLX computes
the x-ray continuum. If input wave is for bin centers and the
spacing is not uniform then bin_centers will differ from wave.
windex, indices of elements of bin_edges which match elements of
wave_edges. This is needed for use in summing output of conflx
into dwave bins.
wave4plot, centers of bins defined by wave_edges, for use in plotting.
OPTIONAL KEYWORD INPUT
/edges, specifies that the wave array are bin edges.
*** THIS IS RECOMMENDED FORMAT FOR WAVELENGTH BINS OF UNEQUAL WIDTH.
ABSORPTION EDGES
wav_lim = [1.4,4.6,6.1,9.1,14.2,16.8,18.6,22.5,25.3,31.6, $
51.9,57.0,89.8,227.9,911.9] (Angstroms)
HISTORY
12-Jun-96, LWA, written.
5-Jul-99, LWA, modified to incorporate absorption edges.
CALLS:
CALLED BY
mewe_spec mewe_spec_lwa
[Previous]
[Next]
NAME:
conj_grad2
PURPOSE:
Find the local minimum of a scalar function of several variables using
the Conjugate Gradient method (Fletcher-Reeves-Polak-Ribiere algorithm).
Function may be anything with computable partial derivatives.
Each call to conj_grad2 performs one iteration of algorithm,
and returns an N-dim point closer to the local minimum of function.
CALLING EXAMPLE:
p_min = replicate( 1, N_dim )
conj_grad2, p_min, f_min, conv_factor, FUNC_NAME="name",/INITIALIZE
while (conv_factor GT 0) do begin
conj_grad2, p_min, f_min, conv_factor, FUNC_NAME="name"
endwhile
INPUTS:
p_min = vector of independent variables, location of minimum point
obtained from previous call to conj_grad, (or first guess).
KEYWORDS:
FUNC_NAME = function name (string)
Calling mechanism should be: F = func_name( px, gradient )
where:
F = scalar value of function at px.
px = vector of independent variables, input.
gradient = vector of partial derivatives of the function
with respect to independent variables, evaluated at px.
This is an optional output parameter:
gradient should not be calculated if parameter is not
supplied in call (Unless you want to waste some time).
/INIT must be specified on first call (whenever p_min is a guess),
to initialize the iteration scheme of algorithm.
/USE_DERIV causes the directional derivative of function to be used
in the 1-D minimization part of algorithm
(default is not to use directional derivative).
TOLERANCE = desired accuracy of minimum location, default=sqrt(1.e-7).
/QUADRATIC runs simpler version which works only for quadratic function.
OUTPUTS:
p_min = vector giving improved solution for location of minimum point.
f_min = value of function at p_min.
conv_factor = gives the current rate of convergence (change in value),
iteration should be stopped when rate gets near zero.
EXTERNAL CALLS:
pro minF_bracket, to find 3 points which bracket the minimum in 1-D.
pro minF_parabolic, to find minimum point in 1-D.
pro minF_parabol_D, to find minimum point in 1-D, using derivatives.
CALLS: ***
MINF_BRACKET, MINF_PARABOLIC, MINF_PARABOL_D [2], minF_parabol_D [1]
CALLED BY:
HXTFPB, PSFPIXON
COMMON BLOCKS:
common conj_grad2, grad_conj, grad_save, gs_norm
(to keep conjugate gradient, gradient and norm from previous iteration)
PROCEDURE:
Algorithm adapted from Numerical Recipes, sec.10.6 (p.305).
Conjugate gradient is computed from gradient, which then gives
the best direction (in N-dim space) in which to proceed to find
the minimum point. The function is then minimized along
this direction of conjugate gradient (a 1-D minimization).
The algorithm is repeated starting at the new point by calling again.
MODIFICATION HISTORY:
Written, Frank Varosi NASA/GSFC 1992.
TRM Added search_step keyword 1994.06.25
[Previous]
[Next]
NAME: connectio.pro (MAIN)
Purpose: establish a serial port for checking CDR mastering
History: written Mar-96, gal
Note: calls a C routine 'connect_tty00' to read the serial port.
It may be necessary to set port speed and other port values in
the future so a C interface is needed.
[Previous]
[Next]
NAME:
conroi
PURPOSE:
Define a contoured region-of-interest of an image
using the image display system and the cursor/mouse.
CATEGORY:
Image processing.
CALLING SEQUENCE:
Result = conroi( data(*,*,n), [Xverts, Yverts, zoom=4, wid=wid])
INPUTS:
Data: 2-dimensional image matrix.
KEYWORD PARAMETERS:
ZOOM: Zoom factor. If omitted, 1 is assumed.
NOREGION: Inhibits the return of the pixel subscripts.
wid: window id/number used for display.
(default is to use window,/free)
OUTPUTS:
This function returns a vector containing the subscripts of pixels
inside the CONTOURED region. Note that these are "linear" subscripts,
not "X, Y" pairs. See the EXAMPLE below.
Side effect: The lowest bit in which the write mask is enabled
is changed.
OPTIONAL OUTPUTS:
Xverts, Yverts: Optional output parameters that contain
the contoured path enclosing the region. Setting the keyword
NOREGION inhibits the return of the pixel subscripts.
CALLS: ***
rd_conroi, tv_coors
CALLED BY:
sxt_defroi
SIDE EFFECTS:
For this implementation, XOR graphics is used.
PROCEDURE:
A message is printed that describes the effect of the three mouse
buttons. The operator marks the contour the region using the
mouse.
When the operator is finished, the region is outlined and,
the polyfillv function is used to compute the returned subscripts
within the region.
EXAMPLE:
This example shows how you can "cut out" a region of an image using
conroi and then display that region. First, create an image cube
via test_rd, align the data cube with rd_ar, select an image of
interest via stepper ...
Now use CONROI to contour any region of the image that you want.
Enter for the ith image:
CUTOUT = conroi( data(*,*,i), zoom=4)
Move the mouse cursor over the image. Mark a contour with the left
button. To adjust the contour level "up" or "down" click on the
"up"/"down" boxes. To change the increment, click on the "inc" box
and adjust the value by clicking in the "up"/"down" boxes. To return
to contour adjust mode click the "levels" box. To EXIT the press the
right button.
Make a new, empty array the same size as the previous image. Enter:
NEW = BYTARR(64, 64)
CUTOUT contains a list of the selected pixels. Put only the selected
pixels from the original image D into the image NEW. Enter:
NEW(CUTOUT) = D(CUTOUT)
Display the new image:
TV, NEW
MODIFICATION HISTORY:
written July, 92 by GAL
minor mod. 15-dec-92 to make displayed features of
decompressed data easy to locate and select.
16-Jan-93, Mod for devices w/o write masks using
XOR graphics mode, GAL.
30-jan-93, other mods.
[Previous]
[Next]
Name: cont2time
Purpose: return times from from contacts and/or mk_visible output files
Input Parameters:
input - file name or array containing information
Calling Sequence:
cont2time, filename, startt, stopt
CALLS: ***
FILE_EXIST [2], anytim2ints [1], anytim2ints [2], file_exist [1], file_exist [3]
fmt_tim [1], fmt_tim [2], gt_day [1], gt_day [2], rd_tfile [1], rd_tfile [2]
str2cols [1], str2cols [2], strsplit, tbeep [1], tbeep [2], tbeep [3]
CALLED BY:
get_visible, pr_visible
History:
8-apr-1995 (SLF) - written
13-jan-1996 (SLF) - updated to 'modern' str2cols call
[Previous]
[Next]
Name: cont2time
Purpose: return times from from contacts and/or mk_visible output files
Input Parameters:
input - file name or array containing information
Calling Sequence:
cont2time, filename, startt, stopt
CALLS: ***
FILE_EXIST [2], anytim2ints [1], anytim2ints [2], file_exist [1], file_exist [3]
fmt_tim [1], fmt_tim [2], gt_day [1], gt_day [2], rd_tfile [1], rd_tfile [2]
str2cols [1], str2cols [2], strsplit, tbeep [1], tbeep [2], tbeep [3]
CALLED BY:
get_visible, pr_visible
History:
8-apr-1995 (SLF) - written
[Previous]
[Next]
NAME:
cont_movie
PURPOSE:
Overlays a movie with a magnetogram
CATEGORY:
CALLING SEQUENCE:
cont_movie,inout,bl,bt,ba
INPUTS:
inout = byte(*,*,*). Input movie. Will be replaced with output.
bl = longitudinal magnetic field. 2-D (image) or 3-D (movie).
bt = transverse magnetic field. Optional.
ba = azimuth angle of transverse field. Optional.
KEYWORDS (INPUT):
pp = float(2,2,*). Point array for geometric transformation of the
magnetogram. Refer to the procedure "setpts" for details.
key = transformation type. Used in conjunction with pp.
See "transtype" keyword in CALTRANS for details.
Default is a general linear transform.
zoom = integer. Zoom factor of the transformed output magnetogram.
offset = integer. Pixeloffset of output image.
Use the same values for zoom and offset as when making the
input movie with poly_movie.
levels = vector of contour levels
index = vector of frame numbers to be used if magnetogram is 3-D.
xy = float(2,*). x/y offsets for each frame of (3-D) magnetogram in
units of input pixels. Indexed by "index", just as magnetogram.
time = time vector. If present, time will be plotted into image.
/bzxy = input vector field supplied as z/x/y components.
Calling sequence: cont_movie,inout,bz,bx,by,/bzxy .
See oplot_b for details.
/nodash = if set, negative contours will be solid instead of dashed.
/c_spline = cubic spline interpolation of contours.
c_line = line style of contours. Overrides /nodash. Separate styles
for pos. and neg. contours can be given as a 2-elements vector.
c_color = color of contours. Separate colors for pos. and neg.
contours can be given as a 2-elements vector.
OUTPUTS:
inout = output movie. Replaces input movie.
CALLS: ***
OPLOT_B
CALLED BY:
mk_coal_movie
COMMON BLOCKS:
None.
SIDE EFFECTS:
RESTRICTIONS:
Only works on the console of a workstation since it uses a window to
create the movie.
PROCEDURE:
Uses oplot_b to plot the B-field and then reads the image back from
the window.
MODIFICATION HISTORY:
JPW, Feb. 1992
JPW, 22-nov-94 added "key" keyword,
use z-buffer
[Previous]
[Next]
NAME:
contact_num
PURPOSE:
To figure out which KSC contact the data arrived in
CALLING SEQUENCE:
c_num = contact_num(times)
c_num = contact_num(index)
c_num = contact_num('23-jun-93 23:45')
INPUT:
times
OUTPUT:
returns the contact number 1,2,3,4,5, or 6. NOTE: Quite often
the first contact is not used, so this number is not the number
of the contact used, just the possible KSC contacts. It will
ignore contacts less than 7 minutes and will return a contact
number of 0 for the case where it is being ignored.
CALLS: ***
anytim2ints [1], anytim2ints [2], deriv_arr [1], deriv_arr [2], int2secarr [1]
int2secarr [2], rd_fem, sel_timrange [1], sel_timrange [2]
HISTORY:
Written 11-Oct-93 by M.Morrison
[Previous]
[Next]
Name:
contact_sum
Purpose:
Summarize station contacts.
Calling Sequence:
Summary_array = contact_sum( event, og_table )
Inputs:
event = Structure of events obtained with rd_orbit_event
og_table = The lookup ascii table
Outputs:
The function's output is a structure containing information about the
contact time. Such things as station, antenna, day/night are included.
CALLS: ***
ADDTIME [1], ADDTIME [2], BSORT [1], BSORT [2], BSORT [3], BSORT [4], Ex2Int [1]
Ex2Int [2]
CALLED BY:
get_dn_rate [1], get_dn_rate [2], make_32 [1], make_32 [2], op_edit [1]
op_edit [2], op_time_sort, valid_pass4 [1], valid_pass4 [2]
Modification History:
10-dec-91, J. R. Lemen, Written
27-jan-92, J. R. Lemen - Make 24 (change to Ant A) and 25
(change to Ant B) look like 21 and 20, respectively.
28-jan-92, J. R. Lemen - Save antenna elevation at A/B switch
5-aug-92, J. R. Lemen - Save time of Ant at 10 degrees.
15-sep-92, JRL - Save Day OG time and KSC AOS.
28-mar-95, JRL - Major rewrite to handle overlapping contacts (Wallops)
[Previous]
[Next]
NAME:
contacts
PURPOSE:
To list the times of the KSC contacts for a given day
CALLING SEQUENCE:
contacts ;contacts for today
contacts, +1 ;contacts for tomorrow
contacts, +2 ;contacts for day after tomorrow
contacts, '1-jan
contacts, '30-oct-91', /hc
contacts, '30-oct-91', 7;contacts for a 7-day period
contacts, '30-oct-91', '2-nov-91', /hc
INPUT:
st_date - The JST date to search for. If no date is entered,
the current date is used. The year is not
required, but if entered should be of the
form 1-Oct-91 style. The date should be
entered in string style with date first.
- st_date can also be entered as a number which
will specify a number of days from the current day.
Example, contacts,-1 will print yesterday's contacts.
OPTIONAL INPUT:
en_date - The ending date to list data for. If no date is passed,
will default to a 24 hour period of time.
- en_date can also be entered as a number. In this
case it will specify the days+st_date to list.
CALLS: ***
ADDTIME [1], ADDTIME [2], CHECK_TIME, DPRINT, GET_NBYTES, Int2Ex [1], Int2Ex [2]
anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2], fmt_tim [1]
fmt_tim [2], gt_day [1], gt_day [2], gt_time [1], gt_time [2], int2secarr [1]
int2secarr [2], rd_fem
CALLED BY:
get_utevent [1], get_utevent [2], op_times
OPTIONAL KEYWORD INPUT:
outfile - If a filename is passed, the results will also
be written to that file
hc - If set, write the results to a temporary file, print
it and delete it.
paths - If set, include the path ID in the printed information
goldstone- If set, return the station contact times for Goldstone
madrid - If set, return the station contact times for Madrid
canberra - If set, return the station contact times for Canberra
wallops - If set, return the station contact times for Wallops
santiago- If set, return the station contact times for Santiago
NOTE: Can only call one station at a time.
asca - If set, then print out the contact information for the
ASCA spacecraft
outstr - The string array of the information that was displayed
to the screen (without the header)
OUTPUT:
The times of the KSC contacts are listed. The first column of
times is the start of the contact in JST. The second column
(in parenthesis) is the start time in UT. The third column
is the time of the end of the contact in JST. The D: and N:
numbers at the end are the number of minutes of day and night
for the S/C during the KSC contact.
OPTIONAL OUTPUT KEYWORD:
outarr - string array containing contact information
METHOD:
RD_FEM is called with the UT times and selects all ORBIT START TIMES
which are between the specified start and end times.
HISTORY:
Written Oct-91 by M.Morrison
Updated Oct-91 by J.Lemen; Changed file times to yymmdd* format
so elimnate problems at year boundary.
12-Mar-92 (MDM) - Adjusted to use the FEM files instead of
the SUMM files.
13-Mar-92 (MDM) - Added the options "outfile", "hc" and "paths"
as well as "goldstone", "madrid" and "canberra"
14-Apr-92 (SLF) - Added outarr output parameters
20-Apr-92 (MDM) - Added "en_date" option
23-Apr-92 (MDM) - print space out between clustering of station
contacts when writing to output file.
24-Apr-92 (MDM) - Removed the 17 hour correction (new IDL fixed
the problem?)
5-Jun-92 (MDM) - When time is passed with the input date, use it
24-Jun-92 (MDM) - Added "qdebug" keyword
24-Aug-92 (MDM) - Fixed a bug when listing the number of minutes of
daytime and night time for station contacts.
(case where contact end on the NEXT orbit)
7-Apr-93 (MDM) - Added /ASCA option
2-Jun-93 (MDM) - Added OUTSTR option
21-Oct-93 (MDM) - Added check that FEM read worked ok
16-jun-94 (JRL) - Added capability of entering start time as a delta-day
from the current time.
- Added capability of entering stop time as a number of day
offset from the start time.
- Modified so that only passes between the st_date and en_date
are printed out. Changed to pass in st_date-100 min to rd_fem
to make sure to get the previous orbit.
- Fixed the bug which caused contacts to crash if no valid
contacts were in the selected interval.
22-sep-94 (SLF) - added QUIET keyword (just want the outarr)
28-apr-95 (JRL) - Added the /Wallops option
16-May-95 (JRL) - Added the /Santiago option
[Previous]
[Next]
NAME:
conv_a2ap
PURPOSE:
To convert angular offsets from sun center to either 2-D polar
coordinates or sun-centered spherical polar coordinates, in the
latter case using the assumption that all points are constrained
to lie on the surface of a sphere of radius equal to the solar
photospheric radius.
SAMPLE CALLING SEQUENCE:
out = conv_a2ap(ang, time_in)
out = conv_a2ap(ang, time_in, /rsun_unit)
INPUT:
ang_in - The angular offsets in arcseconds as viewed from the earth.
(0,*) = E/W direction with W positive
(1,*) = N/S direction with N positive
OPTIONAL INPUT:
time - The time for the conversion in question. This is needed
for SXT so that the pixel location of the center of the sun
can be determined.
OUTPUT:
pix - The pixel coordinates of the point(s) in question. Larger pixel
address towards the N and W.
(0,*) = E/W direction
(1,*) = N/S direction
CALLS: ***
anytim2ints [1], anytim2ints [2], get_rb0p [1], get_rb0p [2]
CALLED BY:
conv_p2ap, foreshort
OPTIONAL KEYWORD INPUT:
arcmin_in
- If set, the input radius is assumed to be in units of
arc minutes.
arcmin_out
- If set, the output radius is in units of arc minutes.
rsun_unit -
If set, return radius in units solar radii.
spherical -
If set, then in place of the radius coordinate return
the angle between the specified point and the axis
defined by the center of the solar sphere and the center
of the solar disk.
roll - This is the S/C roll value in degrees
HISTORY:
Written 21-Mar-95 by G. Slater starting from MDM's CONV_A2P
[Previous]
[Next]
NAME:
conv_a2c
PURPOSE:
Converts anglular-offsets-from-suncenter coordinates to
Carrington coordinates
SAMPLE CALLING SEQUENCE:
clon = conv_a2c(ang, time)
clon = conv_a2c([x,y], time, /dc, off_limb=off_limb)
clon = conv_a2c(ang, suncenter=[400,400])
INPUT:
ang - Vector of angles from sun center in default units of
arcseconds. It should be 2xN.
(0,*) = angle in E/W direction with W positive
(1,*) = angle in N/S direction with N positive
OPTIONAL INPUT:
time - The time for the conversion in question. This is needed
for SXT so that the pixel location of the center of the sun
can be determined. It may be an index structure.
OUTPUT:
clon - The Carrington longitude or decimal Carrington rotation
number (eg 1857.23) and heliographic latitude
in degrees.
(0,*) = longitude (degrees) or decimal Carrington
rotation number (if DC is set)
(1,*) = latitude (degrees) N positive
CALLS: ***
CONV_A2H [1], CONV_A2H [2], conv_h2c
OPTIONAL KEYWORD INPUT:
arcmin - when set the input is assumed to be in arcminutes.
dc - If set output longitude is in decimal Carrington rotation
number
roll - Roll in degrees
hxa - If set, use HXA_SUNCENTER to determine the location of the
sun center in pixels, which means that only HXA data is
used. Default is to use GET_SUNCENTER instead, which uses
both HXA and IRU data to determine the pointing.
cmd - If set, use SXT_CMD_PNT to determine the location of the
sun center in pixels. Default is to use GET_SUNCENTER.
suncenter - Pass the derived location of the sun center in pixels (x,y)
pix_size - The size of the pixels in arcseconds. If not passed, it
uses GT_PIX_SIZE (2.45 arcsec). This option allows the
routine to be used for ground based images.
radius - The radius in pixels. GET_RB0P is called to get the radius
and it is used to get the pixel size. This option allows the
routine to be used for ground based images.
OPTIONAL KEYWORD OUTPUT:
off_limb - A flag which is set to 1 when there are points off the limb
HISTORY:
Written 4-Aug-94 by G.L. Slater using Morrison's CONV_A2H as a
template
TODO:
Add string output option
Handle 'off_limb' and 'behind_limb' cases better
[Previous]
[Next]
NAME:
CONV_A2HXT
PURPOSE:
To convert from an angle from sun center to an HXT pixel location.
CALLING SEQUENCE:
hxt = conv_a2hxt(ang,date)
INPUT:
ang - The angle in arcseconds as viewed from the earth.
(0,*) = E/W direction with W positive
(1,*) = N/S direction with N positive
date - The date for the conversion in question. This is needed
for SXT so that the pixel location of the center of the sun
can be determined.
OUTPUT:
hxt - The pixel coordinates of the point(s) in question in
126 arcsec units. Rectified HXA coordinates, in
HXT pitch units, as used in the Matsushita study
(0,*) = E/W direction with W negative!
NOTE: This is opposite of SXT and HELIO
(1,*) = N/S direction
CALLS: ***
CONV_P2HXT [1], CONV_P2HXT [2], conv_a2p [1], conv_a2p [2]
OPTIONAL KEYWORD INPUT:
arcmin - If set, output is in arcminutes, rather than
arcseconds.
HISTORY:
version 1.0 Written 2-Mar-95 by T.Sakao
[Previous]
[Next]
NAME:
conv_c2a
PURPOSE:
Converts Carrington coordinates to
anglular-offsets-from-suncenter coordinates
SAMPLE CALLING SEQUENCE:
ang = conv_c2p(clon, time)
ang = conv_c2p(clon, time, /dc)
ang = conv_c2p(clon, suncenter=[400,400])
INPUT:
clon - The Carrington longitude and heliographic latitude
in degrees.
(0,*) = longitude (degrees)
(1,*) = latitude (degrees) N positive
time - The time for the conversion in question. This is needed
for SXT so that the pixel location of the center of the sun
can be determined. It may be an index structure.
OUTPUT:
ang - Vector of angles from sun center in default units of
arcseconds. It should be 2xN.
(0,*) = angle in E/W direction with W positive
(1,*) = angle in N/S direction with N positive
CALLS: ***
CONV_H2A [1], CONV_H2A [2], conv_c2h
CALLED BY:
in_fov
OPTIONAL KEYWORD INPUT:
dc - If set input longitude is assumed to be decimal
Carrington rotation number (eg 1857.23)
number
roll - This is the S/C roll value in degrees
hxa - If set, use HXA_SUNCENTER to determine the location of the
sun center in pixels, which means that only HXA data is
used. Default is to use GET_SUNCENTER instead, which uses
both HXA and IRU data to determine the pointing.
cmd - If set, use SXT_CMD_PNT to determine the location of the
sun center in pixels. Default is to use GET_SUNCENTER.
suncenter - Pass the derived location of the sun center in pixels (x,y)
pix_size - The size of the pixels in arcseconds. If not passed, it
uses GT_PIX_SIZE (2.45 arcsec). This option allows the
routine to be used for ground based images.
radius - The radius in pixels. GET_RB0P is called to get the radius
and it is used to get the pixel size. This option allows
the routine to be used for ground based images.
arcmin - If set, output is in arcminutes, rather than
arcseconds.
OPTIONAL KEYWORD OUTPUT:
behind - Returns a binary vector set to 1 when points are behind
the visible limb.
HISTORY:
Written 4-Aug-94 by G.L. Slater using CONV_H2P as a template
TODO:
[Previous]
[Next]
NAME:
conv_c2h
PURPOSE:
To convert from Carrington coordinates to heliocentric coordinates
Carrington longitude or decimal Carrington rotation number is
input (along with helio_graphic latitude, optionally).
SAMPLE CALLING SEQUENCE:
helio = conv_c2h(273.16, time)
helio = conv_c2h([273.16, -25], time)
helio = conv_c2h([1857.23, 17], time, /dc)
helio = conv_c2h(carrington_longitude, time,)
helio = conv_c2h([carrington_longitude, helio_latitude], time,)
helio = conv_c2h(helio, suncenter=[400,400])
INPUT:
carr_coords - The Carrington longitude or decimal Carrington
rotation number (and heliographic latitude, if it was
input - heliographic latitude will be carried through
unchanged for convenience).
(0,*) = longitude (degrees) or decimal Carrington
rotation number
(1,*) = latitude (degrees) N positive
OPTIONAL INPUT:
time - The time for the conversion requested. This is needed
to determine the location of a given carrington longitude
in heliographic coordinates.
OUTPUT:
helio - The heliographic longitude and latitude in degrees.
(0,*) = longitude (degrees)
(1,*) = latitude (degrees) N positive
CALLS: ***
TIM2CARR
CALLED BY:
PLOT_CLON, TIM2UPOS, conv_c2a, conv_c2p
OPTIONAL KEYWORD INPUT:
dc - If set the input longitude is assumed to be decimal
Carrington rotation number (eg 1857.23)
number
OPTIONAL KEYWORD OUTPUT:
behind - A flag which is set to 1 when there are points behind limb
HISTORY:
Written 14-Feb-94 by G.L. Slater using Morrison's CONV_P2H as a
template
TODO:
[Previous]
[Next]
NAME:
conv_c2p
PURPOSE:
To convert from Carrington coordinates to SXT pixel location
SAMPLE CALLING SEQUENCE:
pix = conv_c2p(clon, time)
pix = conv_c2p(clon, time, /dc)
pix = conv_c2p(clon, suncenter=[400,400])
INPUT:
clon - The Carrington longitude and heliographic latitude
in degrees.
(0,*) = longitude (degrees)
(1,*) = latitude (degrees) N positive
OPTIONAL INPUT:
time - The time for the conversion in question. This is needed
for SXT so that the pixel location of the center of the sun
can be determined. It may be an index structure.
OUTPUT:
pix - The pixel coordinates of the point(s) in question.
Larger pixel address towards the N and W.
(0,*) = E/W direction
(1,*) = N/S direction
CALLS: ***
CONV_H2A [1], CONV_H2A [2], conv_a2p [1], conv_a2p [2], conv_c2h
OPTIONAL KEYWORD INPUT:
dc - If set input longitude is assumed to be decimal
Carrington rotation number (eg 1857.23)
number
roll - This is the S/C roll value in degrees
hxa - If set, use HXA_SUNCENTER to determine the location of the
sun center in pixels, which means that only HXA data is
used. Default is to use GET_SUNCENTER instead, which uses
both HXA and IRU data to determine the pointing.
cmd - If set, use SXT_CMD_PNT to determine the location of the
sun center in pixels. Default is to use GET_SUNCENTER.
suncenter - Pass the derived location of the sun center in pixels (x,y)
pix_size - The size of the pixels in arcseconds. If not passed, it
uses GT_PIX_SIZE (2.45 arcsec). This option allows the
routine to be used for ground based images.
radius - The radius in pixels. GET_RB0P is called to get the radius
and it is used to get the pixel size. This option allows
the routine to be used for ground based images.
OPTIONAL KEYWORD OUTPUT:
HISTORY:
Written 14-Feb-94 by G.L. Slater using Morrison's CONV_H2P as a
template
TODO:
[Previous]
[Next]
NAME:
conv_h2c
PURPOSE:
To convert from heliocentric coordinates to Carrington coordinates
SAMPLE CALLING SEQUENCE:
carr_coords = conv_h2c(-75, time)
carr_coords = conv_h2c([-75,25], time)
carr_coords = conv_h2c([-75,25], time, /dc)
carr_coords = conv_h2c(helio, time)
carr_coords = conv_h2c([ew,ns], time, /dc)
INPUT:
helio - The heliocentric angle in degrees
(0,*) = longitude (degrees) W positive
(1,*) = latitude (degrees) N positive
OPTIONAL INPUT:
time - The time for the conversion in question. This is needed
for SXT so that the pixel location of the center of the sun
can be determined. It may be an index structure.
OUTPUT:
carr_coords - The Carrington longitude or decimal Carrington
rotation number (and heliographic latitude, if it was
input - heliographic latitude will be carried through
unchanged for convenience).
(0,*) = longitude (degrees) or decimal Carrington
rotation number
(1,*) = latitude (degrees) N positive
CALLS: ***
TIM2CARR
CALLED BY:
conv_a2c, conv_p2c
OPTIONAL KEYWORD INPUT:
dc - If set output longitude is in decimal Carrington rotation
number
OPTIONAL KEYWORD OUTPUT:
behind - A flag which is set to 1 when there are points behind limb
HISTORY:
Written 14-Feb-94 by G.L. Slater using Morrison's CONV_P2H as a
template
TODO:
[Previous]
[Next]
NAME:
CONV_H2HS
PURPOSE:
Convert from the decimal degress to the string representation of
heliocentric coordinates ('N12W23')
CALLING SEQUENCE:
print, conv_hs2h(helio)
helio_str = conv_hs2h(helio)
INPUTS:
helio - is a vector of heliocentric coordinates. It should be 2xN.
(0,*) = angle in E/W direction with W positive
(1,*) = angle in N/S direction with N positive
OUTPUTS:
helio_str - is a string array of N elements of the form 'N12W23'
CALLED BY:
CONV_A2H [1], CONV_A2H [2], mk_gsn_obs_s1
HISTORY:
Written 16-Jun-93 by M.Morrison
21-Jul-93 (MDM) - Modified the header
[Previous]
[Next]
NAME:
CONV_H2HXT
PURPOSE:
To convert from heliocentric coordinates to an HXT pixel location
CALLING SEQUENCE:
hxt = conv_h2hxt(helio, date)
hxt = conv_h2hxt('S13W19', '15-nov-91')
INPUTS:
helio - The heliocentric angle in degrees
(0,*) = longitude (degrees) W positive
(1,*) = latitude (degrees) N positive
OUTPUTS:
hxt - The pixel coordinates of the point(s) in question in
126 arcsec units (??) Rectified HXA coordinates, in
HXT pitch units, as used in the Matsushita study
(0,*) = E/W direction with W negative!
CALLS: ***
CONV_P2HXT [1], CONV_P2HXT [2], conv_h2p [1], conv_h2p [2]
CALLED BY:
hxt_pattern_maker
NOTE: This is opposite of SXT and HELIO
(1,*) = N/S direction
HISTORY:
written by HSH, July 29, 1992
TRM June 1993 Modified to call conv_h2p.pro and changed the inputs
22-Jun-93 (MDM) - Modified the header some
16-Oct-93 (MDM) - Removed the tilt keyword input
[Previous]
[Next]
NAME:
CONV_HS2H
PURPOSE:
Convert from the string representation of heliocentric ('N12W23') to
integer values in degrees (N and W positive)
CALLING SEQUENCE:
helio = conv_hs2h(hel_str)
print, conv_hs2h('n12w23')
INPUTS:
hel_str - The string representation of heliocentric coordinates (both
N/S and E/W, with N/S first). There should be no spaces and
all strings should be 6 characters long.
OUTPUT:
helio - The heliocentric angle in degrees
(0,*) = longitude (degrees) W positive
(1,*) = latitude (degrees) N positive
CALLED BY:
CONV_H2A [1], CONV_H2A [2], LONLAT2XY, ea_view_angle [2], hxt_pattern_maker
track_h2a [1], track_h2a [2], track_h2a [3]
HISTORY:
Written 16-Jun-93 by M.Morrison
22-Jun-93 (MDM) - Fixed error
21-Jul-93 (MDM) - Modified header
[Previous]
[Next]
NAME:
CONV_HXT2A
PURPOSE:
To convert from HXT pixel location to an angle from sun center.
CALLING SEQUENCE:
arcvec = conv_hxt2a(hxt,date)
INPUT:
hxt - The pixel coordinates of the point(s) in question in
126 arcsec units (??) Rectified HXA coordinates, in
HXT pitch units, as used in the Matsushita study
(0,*) = E/W direction with W negative!
CALLED BY:
MK_HXI_MAP, PLOT_HXT, sswstruct_fill [1]
NOTE: This is opposite of SXT and HELIO
(1,*) = N/S direction
date - The date for the conversion in question. This is needed
for SXT so that the pixel location of the center of the sun
can be determined.
OUTPUT:
ang - The angle in arcseconds as viewed from the earth.
(0,*) = E/W direction with W positive
(1,*) = N/S direction with N positive
CALLS: ***
CONV_HXT2P [1], CONV_HXT2P [2], conv_p2a [1], conv_p2a [2]
OPTIONAL KEYWORD INPUT:
arcmin - If set, output is in arcminutes, rather than
arcseconds.
HISTORY:
version 1.0 Written 7-Jan-95 by T.Sakao
1.1 Option arcmin added.
[Previous]
[Next]
NAME:
CONV_HXT2H
PURPOSE:
To convert from HXT pixel location to heliocentric coordinates.
CALLING SEQUENCE:
helio = conv_p2h(hxt,date)
INPUT:
hxt - The pixel coordinates of the point(s) in question in
126 arcsec units (??) Rectified HXA coordinates, in
HXT pitch units, as used in the Matsushita study
(0,*) = E/W direction with W negative!
CALLS: ***
CONV_HXT2P [1], CONV_HXT2P [2], conv_p2h [1], conv_p2h [2]
CALLED BY:
PLOT_HXT
NOTE: This is opposite of SXT and HELIO
(1,*) = N/S direction
date - The date for the conversion in question. This is needed
for SXT so that the pixel location of the center of the sun
can be determined.
OUTPUT:
helio - The heliocentric angle in degrees
(0,*) = longitude (degrees) W positive
(1,*) = latitude (degrees) N positive
HISTORY:
version 1.0 Written 22-Mar-95 by T.Sakao
[Previous]
[Next]
NAME:
CONV_HXT2P
PURPOSE:
To convert from HXT pixel location to an SXT pixel location
CALLING SEQUENCE:
sxt = conv_hxt2p(hxt)
INPUTS:
hxt - The pixel coordinates of the point(s) in question in
126 arcsec units (??) Rectified HXA coordinates, in
HXT pitch units, as used in the Matsushita study
(0,*) = E/W direction with W negative!
CALLED BY:
CONV_HXT2A, CONV_HXT2H, SHIFT_HXT2P
NOTE: This is opposite of SXT and HELIO
(1,*) = N/S direction
OUTPUTS:
sxt - The SXT pixel IDL Full Resolution coordinate
(0,*) = E/W value (0,0 in lower left South-East)
(1,*) = N/S value
HISTORY:
Written 20-Dec-93 by M.Morrison
20-Dec-93 (MDM) - See CONV_P2HXT for a history
[Previous]
[Next]
NAME:
CONV_HXT_FLRLST
PURPOSE:
To convert raw HXT flare list (prepared by Sawa san) to the one
which can be read by the RD_HXT_DBOOK PROGRAM (ver. 1.4).
CALLING SEQUENCE:
CONV_HXT_FLRLST, infile
INPUT:
infile - Name of the raw HXT flare list file.
OUTPUT:
none
SIDE EFFECT:
A file named ###infile is created as the output of the program.
This file is to be read by RD_HXT_DBOOK.
CATEGORY:
Yohkoh HXT data analysis.
HISTORY:
version 1.0 98.08.10 (Mon) T.Sakao written.
[Previous]
[Next]
NAME:
CONV_LP2INDEX
PURPOSE:
Convert the image information from "F0.pro" into LaPalma_Index
structure.
CALLING SEQUENCE:
index= CONV_LP2INDEX(ho)
INPUTS:
ho - the image information from "F0.pro"
OUTPUTS:
index - the image information in LaPalma_Index structure.
CALLS: ***
LP_STRUCT, anytim2ints [1], anytim2ints [2]
CALLED BY:
RD_LP
HISTORY:
11 Mar, 1994 written by TShimizu (Univ. of Tokyo)
15 Mar, 1994 add "magnetogram info"
22 Mar, 1994 revise some parameters
[Previous]
[Next]
NAME:
conv_p2a
PURPOSE:
To convert from a pixel location to an angle from sun center.
SAMPLE CALLING SEQUENCE:
ang = conv_p2a(pix, date)
ang = conv_p2a(pix, suncenter=[400,400])
INPUT:
pix - The pixel coordinates of the point(s) in question. Larger pixel
address towards the N and W.
(0,*) = E/W direction
(1,*) = N/S direction
OPTIONAL INPUT:
date - The date for the conversion in question. This is needed
for SXT so that the pixel location of the center of the sun
can be determined.
OUTPUT:
ang - The angle in arcseconds as viewed from the earth.
(0,*) = E/W direction with W positive
(1,*) = N/S direction with N positive
CALLS: ***
anytim2ints [1], anytim2ints [2], get_rb0p [1], get_rb0p [2], gt_pix_size
sxt_cen [1], sxt_cen [2]
CALLED BY:
CONV_HXT2A, SXT2POS, conv_p2ap, conv_p2c, conv_p2h [1], conv_p2h [2], gt_center
xsxt_prep_event
OPTIONAL KEYWORD INPUT:
roll - This is the S/C roll value in degrees
hxa - If set, use HXA_SUNCENTER to determine the location of the
sun center in pixels. Default is to use GET_SUNCENTER.
cmd - If set, use SXT_CMD_PNT to determine the location of the
sun center in pixels. Default is to use GET_SUNCENTER.
suncenter- Pass the derived location of the sun center in pixels (x,y)
pix_size- The size of the pixels in arcseconds. If not passed, it
uses GT_PIX_SIZE (2.45 arcsec). This option allows the
routine to be used for ground based images.
radius - The radius in pixels. GET_RB0P is called to get the radius
and it is used to get the pixel size. This option allows the
routine to be used for ground based images.
HISTORY:
Written 16-Jun-93 by M.Morrison
29-Jun-93 (AHM) Corrected calling sequence.
3-Aug-93 (MDM) Corrected the date option
16-Oct-93 (MDM) - Removed the tilt keyword input
[Previous]
[Next]
NAME:
conv_p2ap
PURPOSE:
To convert CCD pixel coordinates to polar coordinates (radius, position angle).
SAMPLE CALLING SEQUENCE:
out = conv_p2ap(pix, time_in)
out = conv_p2ap(pix, suncenter=[400,400])
INPUT:
pix - The pixel coordinates of the point(s) in question. Larger pixel
address towards the N and W.
(0,*) = E/W direction
(1,*) = N/S direction
OPTIONAL INPUT:
time_in - The time for the conversion in question. This is needed
for SXT so that the pixel location of the center of the sun
can be determined.
OUTPUT:
out - The radius and position angle corresponding to the pixel
coordinates. The radius is given in arcsec by default.
If ARCMIN_OUT is set the radius is given in arcmin.
If RSUN_UNIT is set the radius is given in units of solar
radii.
(0,*) = Radius in arcsec or arcmin or solar radii.
(1,*) = Position angle of feature measured eastward from solar
north pole.
CALLS: ***
conv_a2ap, conv_p2a [1], conv_p2a [2]
OPTIONAL KEYWORD INPUT:
arcmin_out
- If set, return radius in units of arc minutes.
rsun_unit -
If set, return radius in units solar radii.
spherical -
If set, then in place of the radius coordinate return
the angle between the specified point and the axis
defined by the center of the solar sphere and the center
of the solar disk.
roll - This is the spacecraft roll value in degrees.
hxa - If set, use HXA_SUNCENTER to determine the location of the
sun center in pixels. Default is to use GET_SUNCENTER.
cmd - If set, use SXT_CMD_PNT to determine the location of the
sun center in pixels. Default is to use GET_SUNCENTER.
suncenter -
Pass the derived location of the sun center in pixels (x,y)
pix_size -
The size of the pixels in arcseconds. If not passed, it
uses GT_PIX_SIZE (2.45 arcsec). This option allows the
routine to be used for ground based images.
pix_rad - The radius in pixels. GET_RB0P is called to get the radius
and it is used to get the pixel size. This option allows the
routine to be used for ground based images.
HISTORY:
Written 20-Mar-95 by G. Slater starting from MDM's CONV_P2A
[Previous]
[Next]
NAME:
conv_p2c
PURPOSE:
To convert from an SXT pixel location to Carrington coordinates
SAMPLE CALLING SEQUENCE:
clon = conv_p2c(pix, time)
clon = conv_p2c([x,y], time, /dc)
clon = conv_p2c(pix, time, suncenter=[400,400])
INPUT:
pix - The pixel coordinates of the point(s) in question.
Larger pixel address towards the N and W.
(0,*) = E/W direction
(1,*) = N/S direction
OPTIONAL INPUT:
time - The time for the conversion in question. This is needed
for SXT so that the pixel location of the center of the sun
can be determined. It may be an index structure.
OUTPUT:
clon - The Carrington longitude or decimal Carrington rotation
number (eg 1857,23) and heliographic latitude
in degrees.
(0,*) = longitude (degrees) or decimal Carrington
rotation number (if DC is set)
(1,*) = latitude (degrees) N positive
CALLS: ***
CONV_A2H [1], CONV_A2H [2], conv_h2c, conv_p2a [1], conv_p2a [2]
OPTIONAL KEYWORD INPUT:
dc - If set output longitude is in decimal Carrington rotation
number
roll - This is the S/C roll value in degrees
hxa - If set, use HXA_SUNCENTER to determine the location of the
sun center in pixels, which means that only HXA data is
used. Default is to use GET_SUNCENTER instead, which uses
both HXA and IRU data to determine the pointing.
cmd - If set, use SXT_CMD_PNT to determine the location of the
sun center in pixels. Default is to use GET_SUNCENTER.
suncenter - Pass the derived location of the sun center in pixels (x,y)
pix_size - The size of the pixels in arcseconds. If not passed, it
uses GT_PIX_SIZE (2.45 arcsec). This option allows the
routine to be used for ground based images.
radius - The radius in pixels. GET_RB0P is called to get the radius
and it is used to get the pixel size. This option allows the
routine to be used for ground based images.
OPTIONAL KEYWORD OUTPUT:
off_limb - A flag which is set to 1 when there are points off the limb
HISTORY:
Written 14-Feb-94 by G.L. Slater using Morrison's CONV_P2H as a
template
TODO:
Add string output option
[Previous]
[Next]
NAME:
conv_p2h
PURPOSE:
To convert from an SXT pixel location to heliocentric coordinates
SAMPLE CALLING SEQUENCE:
helio = conv_p2h(pix, date)
helio = conv_p2h([x,y], date)
helio = conv_p2h(pix, suncenter=[400,400])
INPUT:
pix - The pixel coordinates of the point(s) in question. Larger pixel
address towards the N and W.
(0,*) = E/W direction
(1,*) = N/S direction
OPTIONAL INPUT:
date - The date for the conversion in question. This is needed
for SXT so that the pixel location of the center of the sun
can be determined.
OUTPUT:
helio - The heliocentric angle in degrees
(0,*) = longitude (degrees) W positive
(1,*) = latitude (degrees) N positive
CALLS: ***
CONV_A2H [1], CONV_A2H [2], conv_p2a [1], conv_p2a [2]
CALLED BY:
CONV_HXT2H, IMG_HELADD, NORH_P2H [1], NORH_P2H [2], PFI_CENTER, PIX2HEL, SXT2POS
get_gbo_pfi, gt_center, rd_lonlat, sleazy_rot, sol_rot [1], sol_rot [2]
sxt_obs_coord [1], sxt_obs_coord [2], xsxt_prep_event
OPTIONAL KEYWORD INPUT:
roll - This is the S/C roll value in degrees
hxa - If set, use HXA_SUNCENTER to determine the location of the
sun center in pixels. Default is to use GET_SUNCENTER.
cmd - If set, use SXT_CMD_PNT to determine the location of the
sun center in pixels. Default is to use GET_SUNCENTER.
suncenter- Pass the derived location of the sun center in pixels (x,y)
pix_size- The size of the pixels in arcseconds. If not passed, it
uses GT_PIX_SIZE (2.45 arcsec). This option allows the
routine to be used for ground based images.
radius - The radius in pixels. GET_RB0P is called to get the radius
and it is used to get the pixel size. This option allows the
routine to be used for ground based images.
OPTIONAL KEYWORD OUTPUT:
off_limb- A flag which is set to 1 when there are points off the limb
HISTORY:
Written 16-Jun-93 by M.Morrison
Corrected keyword useage 28-jun-93 A.McA.
16-Oct-93 (MDM) - Removed the tilt keyword input
[Previous]
[Next]
NAME:
CONV_P2HXT
PURPOSE:
To convert from SXT pixel location to an HXT pixel location
CALLING SEQUENCE:
hxt = conv_p2hxt(pix)
INPUTS:
pix - The SXT IDL Full Resolution coordinate
(0,*) = E/W value (0,0 in lower left South-East)
(1,*) = N/S value
OUTPUTS:
hxt - The pixel coordinates of the point(s) in question in
126 arcsec units (??) Rectified HXA coordinates, in
HXT pitch units, as used in the Matsushita study
(0,*) = E/W direction with W negative!
CALLED BY:
CONV_A2HXT, CONV_H2HXT [1], CONV_H2HXT [2], get_hxt_pos, gt_center
NOTE: This is opposite of SXT and HELIO
(1,*) = N/S direction
HISTORY:
written by HSH, July 29, 1992
TRM June 1993 Modified to call conv_h2p.pro and changed the inputs
22-Jun-93 (MDM) - Modified the header some
20-Dec-93 (MDM) - Changed the algorithm and coefficients to use
Masuda san's HXT_IMG_CNTR algorithm. It took
the /home/flare/hxt/masuda/hxt_param/hxt_param1
data file coefficients of Dec-93.
print, hxt_img_cntr(date, [0,0]) gave
515.3, 703.5 +/- 0.2 pixels
determining one sample very 7 days over 2 year
time span.
21-Apr-94 (MDM) - Corrected error which gave incorrect results when
more than one pair of coordinates were passed in.
Old version returned the first location for all
values.
[Previous]
[Next]
Name: convert Yohkoh/SXT history record -> more legible form...
Input:
index - sxt index records, assumed to contain .HIS substructure
Method:
decode via pr_his_index, add via update_history.pro
CALLS:
[Previous]
[Next]
pro copy_visible, dday=dday, visdat=visdat, wid=wid, verbose=verbose, $
outfil=outfil
NAME: copy_visible
PURPOSE: edit Seko-san's KSC schedule file to the visible format,
exempting sxt_co from the boring and error-prone mk_visible.
OPTIONAL INPUT: dday (default=5), used for getting the week ID
wid (string): something like 01_35, i.e., yy_ww (year and week)
to specify the week.
outfil (string and scaler): to specify where the visible file
should be written (for debugging purposes).
CALLS: ***
ADDTIME [1], ADDTIME [2], ARR2STR [1], Arr2Str [2], anytim2ints [1]
anytim2ints [2], fmt_tim [1], fmt_tim [2], rd_tfile [1], rd_tfile [2], tim2weekid
SIDE EFFECTS: visible file like visible_01_35.dat is written to
$DIR_GEN_STATUS. If outfil is specified, the visible file
is written to outfil.
HISTORY: 24-May-2001, written by NVN
29-Oct-2001, corrected a bug by NVN
16-Nov-2001, Appended '.1' to week ID to be consistent with
the new convention in the file names on flare1, following AT
17-Nov-2001, Resolved misunderstanding of AT's message. Now
take the latest file for the week of interest (NVN).
29-Nov-2001, Finding a position showing 'HALCA','34m','AKEBONO','X' by JS
WARNING: The part that lists all the files in the order of creation time
depends on ssh1 to flare1 (with -l sxt). If flare workstation
managers disable ssh1 on flare1, this routine stops working.
Then we should as them to export the flare1:/home directory to
isass0/1.
[Previous]
[Next]
Name:
CORR4FLUX.PRO
Purpose:
Analyze SXT Calibration Data
Input:
Interactively prompts the user for information
Optional Input:
BUF This parameter is a string with the name of the logical
filename to be extracted and analyzed
SAVE If this parameter is non-zero, the data is saved
Written :
RAF Aug 12, 1992
31-jan-94, J. R. Lemen, Added the path=path keyword
[Previous]
[Next]
PURPOSE:
To compute nonparametric tests of whether two data sets
are correlated. The coding of the "D-statistic" test is based
on Numerical Recipes, Section 13.8. The "t-statistic" test is
described in Lee et al. (1993, ApJ, 412, 401) and Efron and
Petrosian (1992, ApJ, 399, 345).
CALLS: ***
CRANK, SORT2
CALLED BY:
nonparam_fit
Note: By convention, a negative value of the t-statistic
usually implies an anti-correlation; however, in this program,
it implies a positive (direct) correlation.
INPUT:
data1, data2 = 1-D arrays of data
OPTIONAL INPUT:
w1 = 1-D array of weighting factors for data1
pnt = keyword: if set, probability values are printed to screen
OUTPUT:
tw = weighted "t-statistic"
probtw = probability of obtaining tw if the data are uncorrelated
d = "D-statistic" (unweighted)
probd = probability of obtaining d if the data are uncorrelated
OPTIONAL OUTPUT:
ztw = number of standard deviations by which tw deviates from
its expected value for uncorrelated data
zd = number of standard deviations by which d deviates from
its expected value for uncorrelated data
USAGE:
correlation, data1, data2, tw, probtw, d, probd
correlation, data1, data2, tw, probtw, d, probd, w1, /pnt
correlation, data1, data2, tw, probtw, ztw=ztw
HISTORY:
25 apr 94, written, J. A. Klimchuk
17 may 95, changed ordering of keywords in call (to avoid new error), JAK
[Previous]
[Next]
NAME:
Countrate
PURPOSE:
Calculates the count rate
CALLING SEQUENCE:
c=Countrate(tyspec,ma,a)
INPUT:
tyspec= Type of spectrum
ma= no. of fit parameters
a= fit parameters
OUTPUT:
c= count rate
CALLS: ***
fx_phflux
CALLED BY:
Ainit, Fsp_mrqcof, fitspec, fsp_11, fsp_mc, hxt_anycomp, hxt_plcomp, hxt_thcomp
sxt_anycomp
COMMON BLOCKS:
Common rsp,nch,nsc,esc,rsc
nch= no. of channels used it fit
nsc= no. of energies used,
esc= energies used
rsc= rde0, response*de for the channels used in the fit
HISTORY:
Spring,' 92 JMcT
changed to a function, 24-oct-95, jmm
[Previous]
[Next]
NAME: COVER_PAGE
PURPOSE: Print the first (cover) page of the KSC real-time
pass sheets. (op_first_guess)
CATEGORY:
CALLING SEQUENCE:
cover_page, contacts [,/qtest, outfile=outfile]
cover_page, contacts [, comment=comment, version=version]
INPUTS:
contacts = the structure produced by op_first_guess.
OPTIONAL INPUT PARAMETERS
qtest = If set, send output to the current device
version = op_first_guess version (gets printed at bottom of form)
comment = op_first_guess comment (contains the start date)
OPTIONAL INPUT/OUTPUT PARAMETERS
outfile name of Postscript file written.
OUTPUTS:
None.
OPTIONAL OUTPUT:
None.
CALLS: ***
ADDTIME [1], ADDTIME [2], Bell, REVERSE, gt_time [1], gt_time [2], tbeep [1]
tbeep [2], tbeep [3]
CALLED BY:
pass_sheets
SIDE EFFECTS:
Generates a PostScript file.
RESTRICTIONS: If there are only n (<5) KSC contacts on a particular
day, they are assumed to be the last 'n' contacts of
that day if /weekend is set. In that case the NOP should
be replaced with the OP start time.
The DP Mode and BDR status are left for the tohbans to
fill in.
The top date is left for the tohbans because it was never
clear to me whether this was the UT or JST date.
PROCEDURE: The standard cover page template is drawn and the data
from the contacts structure printed into it.
MODIFICATION HISTORY:
24-Apr-93 CDP, Written
27-arp-93 JRL, Restore original plot device; Make the default output
ps file = 'cover.ps'. Added REP to the sheets.
29-apr-93 JRL, Corrected the sign of the JST time calculation
(JST = UT + 9 hours)
12-oct-93 JRL, Fixed the alignment of the D/N string
30-jul-94, JRL, Added ksc_pass_num and weekend keywords.
[Previous]
[Next]
NAME: COVER_PAGE
PURPOSE: Print the first (cover) page of the KSC real-time
pass sheets. (op_first_guess)
CATEGORY:
CALLING SEQUENCE:
op_cover_page, contacts [,/qtest, outfile=outfile]
op_cover_page, contacts [, comment=comment, version=version]
INPUTS:
contacts = the structure produced by op_first_guess.
OPTIONAL INPUT PARAMETERS
qtest = If set, send output to the current device
version = op_first_guess version (gets printed at bottom of form)
comment = op_first_guess comment (contains the start date)
OPTIONAL INPUT/OUTPUT PARAMETERS
outfile name of Postscript file written.
OUTPUTS:
None.
OPTIONAL OUTPUT:
None.
CALLS: ***
ADDTIME [1], ADDTIME [2], Bell, OP_COVER_PAGE, REVERSE, clearplot [1], clearplot [2]
gt_time [1], gt_time [2], tbeep [1], tbeep [2], tbeep [3]
CALLED BY:
pass_sheets
SIDE EFFECTS:
Generates a PostScript file.
RESTRICTIONS: If there are only n (<5) KSC contacts on a particular
day, they are assumed to be the last 'n' contacts of
that day if /weekend is set. In that case the NOP should
be replaced with the OP start time.
The DP Mode and BDR status are left for the tohbans to
fill in.
The top date is left for the tohbans because it was never
clear to me whether this was the UT or JST date.
PROCEDURE: The standard cover page template is drawn and the data
from the contacts structure printed into it.
MODIFICATION HISTORY:
24-Apr-93 CDP, Written
27-arp-93 JRL, Restore original plot device; Make the default output
ps file = 'cover.ps'. Added REP to the sheets.
29-apr-93 JRL, Corrected the sign of the JST time calculation
(JST = UT + 9 hours)
12-oct-93 JRL, Fixed the alignment of the D/N string
30-jul-94, JRL, Added ksc_pass_num and weekend keywords.
22-oct-95, JRL, renamed to op_cover_sheet and added a clearplot.
[Previous]
[Next]
NAME: cp_fns
PURPOSE: copy files given in the input list from "fdir" to
"tdir" after setting default to the "to directory".
Calling Sequence:
cp_fns, file_list, fdir, tdir,
[mv=mv, mach=mach, acc_sw=acc_sw ]
Input:
list file_list: list of file(s) to copy
passing *930513.1200 is ok.
fdir from_dir: One of the "week_on" directories
(eg. '93_12' or '93_14a' are ok)
tdir to_dir: target directory for copy.
(eg. '/yd13/mo_a' or '/yd13/mo_b')
Optional Input:
mv To copy via MV command instead of cp.
mach To copy from another mach via "rsh"
acc_sw account to use on other mach.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4], file_list [1]
file_list [2], mail [1], mail [2], prstr [1], prstr [2], rsh, wk_online
ys_file_check [1], ys_file_check [2]
CALLED BY:
disk2_mo [1]
History: written 6-May-93.
added options for "rsh" copy
2-Jun-93 (MDM) - Added command to remove the CBA files after
a copy is done (for cases where copy is done
from the REFA catchup week directory)
2-Feb-94 (SLF) - different rsh for ultrix and others
file_delete replace spawn rm
4-Feb-94 (SLF) - use rsh.pro
25-Jun-94 (SLF) - call yo_file_check to verify copies
--------------------------------------------------------
[Previous]
[Next]
NAME: cp_fns
PURPOSE: copy files given in the input list from "fdir" to
"tdir" after setting default to the "to directory".
Calling Sequence:
cp_fns, file_list, fdir, tdir,
[mv=mv, mach=mach, acc_sw=acc_sw ]
Input:
list file_list: list of file(s) to copy
passing *930513.1200 is ok.
fdir from_dir: One of the "week_on" directories
(eg. '93_12' or '93_14a' are ok)
tdir to_dir: target directory for copy.
(eg. '/yd13/mo_a' or '/yd13/mo_b')
Optional Input:
mv To copy via MV command instead of cp.
mach To copy from another mach via "rsh"
acc_sw account to use on other mach.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], CP_FNS_NEW, concat_dir [4]
file_list [1], file_list [2], mail [1], mail [2], prstr [1], prstr [2], rsh, wk_online
ys_file_check [1], ys_file_check [2]
CALLED BY:
disk2_mo [1]
History: written 6-May-93.
added options for "rsh" copy
2-Jun-93 (MDM) - Added command to remove the CBA files after
a copy is done (for cases where copy is done
from the REFA catchup week directory)
2-Feb-94 (SLF) - different rsh for ultrix and others
file_delete replace spawn rm
4-Feb-94 (SLF) - use rsh.pro
25-Jun-94 (SLF) - call yo_file_check to verify copies
--------------------------------------------------------
[Previous]
[Next]
NAME:
CPU_DIAG
PURPOSE:
Plots some telemetry points from te BCS CPU against time
CALLING SEQUENCE:
.run CPU_DIAG
INPUTS:
Data is extracted from the DP_SYNC field
The DP_SYNC field is first matched with the file header.
The time range is derived from the variable X_XHR_RANGE
OUTPUTS:
OPTIONAL OUTPUTS:
RESTRICTIONS:
Variable X_HR_RANGE must have been set. This is either done by
running PP_CRATEX or by running SET_XHR using the PLOTR output
from the TEST_RD routine.
PROCEDURE:
MODIFICATION HISTORY:
RDB Oct-91
RDB 03-Jul-92 Asks questions about time limits
Only does filecheck for songle dataset
RDB 09-Jul-92 Uses common block files_24hr for source of data
RDB 11-May-94 Also plot when Yohkoh is night/saa
RDB 16-May-94 Check that clock is ticking
RDB 17-May-94 Revised chack value for clock error
RDB 3-Sep-94 Print start and end times of dp_sync data
[Previous]
[Next]
NAME: crcle
PURPOSE: calculate a circle of pixels
CALLING SEQUENCE: crcle,xc,yc,r,arsz,[,XCOORDS=x,YCOORDS=y,VCOORDS=ss]
xc are the center x coordinates
yc are the center y coordinates
r is the radius
arsz is the size of the array being worked on, (assumed square)
OPTIONAL PARAMETERS:
XCOORDS,YCOORDS Theta ordered coordinates
VCOORDS A unified coordinate vector
CALLED BY:
background, cirdrw
NOTE: Be careful that these coordinates start from an unknown phase,
it is however consistant.
HISTORY: drafted apr. 1992, A. McAllister
vectorized, dec. 1992. A.McA.
[Previous]
[Next]
Name:
CreDvec (Create Data Vectors)
Purpose:
From the user request record (fnMap) and the lists of
times for data extraction returns the lists of data-
pointers (roadmap indices).
CALLING SEQUENCE:
CreDvec, [fidMap=fidmap, tsxtf=tsxtf, tsxtp=tsxtp,
toth3=toth3, fnMap=fnMap, dsxtf=dsxtf,
dsxtp=dsxtp, doth3=doth3]
Input/Keyword:
fidMap user request record with fileIDs
tsxtf list of requested full frame images for SXT
tsxtp list of requested partial frames for SXT
toth3 list of requested times for the other
Output/Keyword:
fnMap user request record with fileNames
dsxtf list of requested roadmap indices
dsxtp list of requested roadmap indices
doth3 list of requested ...
CALLS: ***
CREDVEC, CkFurFiles, DsetVec, MKFNMAP
History:
written 3-July-91 by GAL
[Previous]
[Next]
NAME:
CreFn
Purpose:
Create a list of filenames.
CALLING SEQUENCE:
fnlist = CreFn( wArr, nprefix, filprefix, nfid, fid)
Input:
wArr 2-d list of selected file prefixes
nprefix max number of file prefixes
filprefix list of valid prefixes
nfid number of file ids
fid list of file ids
Returned:
List of FileNames.
CALLED BY:
MkFnMapMake Filename Map
History:
written 26-June-91 by GAL
[Previous]
[Next]
NAME:
CreHXTWBS
PURPOSE:
Create one of two possible structures: Obs_HXT_Rec or
Obs_WBS_Rec.
CALLING SEQUENCE:
Obs_***_Rec = CreHXTWBS([/hxt,/wbs])
INPUT:
/hxt request for creating the HXT logical record.
/wbs request for creating the wbs logical record.
RETURNED:
Obs_***_Rec either logical record for hxt or wbs
CALLED BY:
RdObsDat
HISTORY:
written 19-Aug-91, by GAL
[Previous]
[Next]
NAME: CRP (ChangeResPix)
PURPOSE: Stupid little function to convert pixel coordinates
from one resolution to another. Somebody must've already
written this, but I couldn't find it.
CALLS:
[Previous]
[Next]
ctblink, ct_lo, ct_hi [, ncolors=ncolors, lo_range=lo_range
hi_range=hi_range]
If ct_lo is a scalar it is taken to be the number of a standard
color table. If a three element vector, it is taken to be
the r,g,b vectors. Likewise for ct_hi.
OPTIONAL:
ncolors specifies number of colors to use (def is number
available on device)
lo_range and hi_range specify how to divide up the
available colors (NOTE: IF THESE ARE USED,
THE SAME VALUES SHOULD BE USED IN THE CALL TO
COMB_IMG)
wait_sec is number of secs to wait between blinks
default is 0
CALLS:
[Previous]
[Next]
NAME:
ctraj2orbit
PURPOSE:
Read a traj file and convert it to a orbit file
CALLING SEQUENCE:
ctraj2orbit, infil, buff
ctraj2orbit, infil, outfil=outfil
ctraj2orbit, infil, /outfil ; outfil = orbit_xxx
INPUTS:
infil = Traj file name
outfil = Output file name. If outfil = 1, then
outfil will be orbit_xxx where _xxx is then
element number.
if infil = 'traj_0174' then outfil will be 'orbit_0174'
buff = String array of the contents of the output file
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DOC_LIBRARY, FILE_EXIST [2]
REVERSE, STR2ARR [1], STR2ARR [2], concat_dir [4], file_exist [1], file_exist [3]
prstr [1], prstr [2], rd_tfile [1], rd_tfile [2], str_replace [1], str_replace [2]
wc_where [1], wc_where [2]
CALLED BY:
mk_orbit [1], mk_orbit [2]
MODIFICATION HISTORY:
27-jul-94, J. R. Lemen LPARL, Written.
[Previous]
[Next]
NAME:
CUBE_ALIGN
PURPOSE:
Register a series of images using cross correlations.
CALLING SEQUENCE:
DATA_OUT = CUBE_ALIGN(DATA, OFFSETS=OFFSETS [,/interact])
CALLS: ***
GET_OFF, TRANSLATE2
OPTIONAL KEYWORD INPUT:
INTERACT - IF SET, USER CAN SELECT SUBREGION FROM SUBARRAY
OUTPUTS:
DATA_OUT = Aligned data cube
MODIFICATION HISTORY:
Version 1.0 - Mar, 1991, G. L. Slater, LPARL
1.1 - Mar, 1992, Interface Work
[Previous]
[Next]
NAME:
CUBE_ALIGN2
PURPOSE:
Register a series of images using cross correlations.
CALLING SEQUENCE:
DATA_OUT = CUBE_ALIGN2(DATA, OFFSETS=OFFSETS)
OUTPUTS:
DATA_OUT = Aligned data cube
CALLS: ***
GET_OFF2, TRANSLATE2
MODIFICATION HISTORY:
Version 1.0 - Mar, 1991, G. L. Slater, LPARL
[Previous]
[Next]
NAME: cube_depth
PURPOSE: To screen image data to make sure its either 2D or 3D and
return the result
METHOD: Check the result os SIZE
CALLING SEQUENCE: depth=cube_depth(size(data))
PARAMETERS: size the result of SIZE run on the data in question
depth this will be the number of images in the cube,
or -1 if the data is not 2D or 3D
HISTORY: Drafted AMcA, Nov. 1994.
[Previous]
[Next]
NAME:
CUBE_FILL
PURPOSE:
Completes 8-to-12 bit restoration of data cube, following a
corrected first frame.
CATEGORY:
Yohkoh analysis
CALLING SEQUENCE:
cube_fill, data
OUTPUTS:
CALLS: ***
LINE_RESET
MODIFICATION HISTORY:
HSH, Nov 1991
[Previous]
[Next]
NAME:
cur_teem (cursor Te and EM)
PURPOSE:
Interactively click on a portion of an SXT image. Define a
closed region and determine Te and EM for that region.
CALLING SEQUENCE:
cur_teem,nind1,ndat1,nind2,ndat2,te,em
INPUTS:
nind1,nind2 = SXT index structure for two filters.
ndat1,ndat2 = SXT data array (each must be 2-d)
Data must be decompressed and background subtracted.
OUTPUTS:
te = log10(Electron temperature)
em = log10(emission measure)
OPTIONAL INPUT PARAMETERS:
zoom_fac = zoom the array up by this factor.
(If array is less than 256 x 256 or less, will default to 2)
CALLS: ***
CUR_TEEM, DEFROI [1], DEFROI [2], SXT_TEEM [1], SXT_TEEM [2], get_info [1]
get_info [2], get_info [3], get_info [4], sxt_comp
MODIFICATION HISTORY:
J. R. Lemen, 25 May 1993
[Previous]
[Next]
NAME : current
PURPOSE :
calculate the electric current distribution based on
vector magnetograms of the Solar Flare Telescope
CATEGORY :
lib/flare
CALLING SEQUENCE :
jz = current(bx,by,bin=bin)
INPUTS :
bx,by -- transversal mag. field in Gauss*10
OPTIONAL INPUT PARAMETERS :
none
KEYWORD PARAMETERS :
bin -- binning factor
OUTPUTS :
COMMON BLOCKS : none
SIDE EFFECTS :
RESTRICTIONS :
PROCEDURE :
MODIFICATION HISTORY :
K.Ichimoto '93/07/18
[Previous]
[Next]
NAME:
CURSOR_4X6HR
PURPOSE:
Uses cursor to determine time in seconds from start of the day
from a 24hr (4 panels of 6 hrs) light-curve plot.
CALLING SEQUENCE:
CURSOR_4X6HR,time [,x,y] [,/hours] [,/string]
INPUTS:
hours (optional) if present, the time is returned in hours
default is seconds from start of (calender) day
string (optional) if present, the time is returned as a
string with the format "hh:mm:ss"
OUTPUTS:
time time in seconds from start of calender day
OPTIONAL OUTPUTS:
x,y cursor position on screen
CALLED BY:
BCS_BROWSE24, SELECT_24HR
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
RDB 16-Jun-92
RDB 19-Jun-92 Modified Cursor to work on all workstations.
Added STRING switch
RDB 02-Jul-92 Switched sense of bell (now when OK)
Print selected timeout
[Previous]
[Next]
NAME:
CUT_DUPLICATE
PURPOSE:
To cut out consecutive duplicate entries in
any vector.
CALLING SEQUENCE:
IDL> x = cut_duplicates(x)
INPUTS:
x - the vector from which duplicates will be
eliminated. String or numerical vectors allowed..
OUTPUTS:
Function value is the cleaned vector.
CALLS: ***
CUT_DUPLICATES
MODIFICATION HISTORY:
CDP - written Apr 93
[Previous]
[Next]
NAME: cut_lev
PURPOSE: To find an appropriate cutoff level to use for testing for
the limb.
METHOD: Averages over one corner and then use the size of the fluctuations
to select a value above any background noise.
CALLING SEQUENCE: cut=cut_lev(imgin,imgsz)
PARAMETERS: imgin input image
imgsz output of SIZE(imgin)
CALLED BY:
dsk_locb, limbpnts, rm_darklimb, rt_hdha, set_back
NOTE: This tests on the lower left 10% of the image, so if there is bad junk
there it may well mess things up. In particular if there are negative
values things can get funny, as the calculation changes.
This seems to have trouble with the ML disk images, try setting
everything below about 100 to zero. This will clean up a lot of
low level junk.
HISTORY: Cut out as seperate routine, Feb. 4, 1993, by A. McAllister
AAP- 19-Sep-01 - corrected to handle large images
(in old version variable "a" will overflow (will be negative)
for a large size image)
[Previous]
[Next]
NAME:
CV_BSC2BSD
PURPOSE:
convert new format BSC index and data to BSD format
CALLING SEQUENCE:
CV_BSC2BSD,BSC_INDEX,BSC_DATA,DATA=BSD_DATA,INDEX=BSD_INDEX,$
ROADMAP=BSD_ROADMAP,HEADER=BSD_HEADER
INPUTS:
BSC_INDEX - BSC index structure
BSC_DATA - BSC data array
KEYWORDS:
INDEX - BSD index structure
DATA - BSD data array
ROADMAP - BSD roadmap
HEADER - BSD header
CALLS: ***
BSC_CHECK [1], BSC_CHECK [2], BSC_ERRCAL [1], BSC_ERRCAL [2], BSD_STRUCT
GT_BSC_BINCAL [1], GT_BSC_BINCAL [2], GT_BSC_CRATE, SEL_BSC, anytim2ex [1]
anytim2ex [2], anytim2ints [1], anytim2ints [2]
CALLED BY:
BSC2BSD
PROCEDURE:
Calls BSD_STRUCT
HISTORY:
Written Nov. 1992 by D. Zarro (Applied Research Corp).
[Previous]
[Next]
NAME:
cyl_2d
CALLING SEQUENCE:
f=cyl_2d(n,r0)
PURPOSE:
generates an nXn pixel array, with a source that's
a 2d cylinder with a width of r0 pixels, normalized
to a total of 1.0
INPUT:
n = array dimensions
r0 = width of cylinder in pixels
OUTPUT:
f = the source
CALLED BY:
one_ftpt, two_ftpt
HISTORY:
Written Apr 93, by JM
[Previous]
[Next]
NAME:
cyl_moff
PURPOSE:
To generate a cylindrically symmetric Moffat function
f = const*(1+r^2/r0^2)^(-power)
hopefully normalized to 1.0
CALLING SEQUENCE:
f = cyl_moff(n, r0, power=power, rmax=rmax)
INPUT:
n = array dimensions
r0 = width in pixels
OUTPUT:
f = the cylindrically symmetric Moffat fn.
KEYWORDS:
rmax = beyond rmax, set the function to 0.0
power = the exponent of the fn, default is 2
corner = if set, the maximum is at (0,0), the
default is to have the max at (n-1)/2
CALLED BY:
one_ftpt, two_ftpt
HISTORY:
3-20-95, jmm
Added corner keyword, 8-9-95, jmm