[Previous]
[Next]
NAME:
S2C
PURPOSE:
Returns Cartesian coordinates (X,Y,Z) of a position vector
or array of position vectors whose spherical coordinates are
specified by V0.
CALLING SEQUENCE:
V1 = C2S(V0,YOFF=YOFF,ZOFF=ZOFF,ROLL=ROLL,B0=B0)
INPUTS:
V0 = Cartesian coordinates (x,y,z) of a 3-vector or
array of 3-vectors.
OPTIONAL INPUTS:
YOFF, ZOFF = Y AND Z TRANSLATIONS
ROLL
B0
OUTPUTS:
V1 = 3-vector containing spherical coordinates (r,theta,phi)
corresponding to Cartesian coordinates specified in V0. It is
a 3xn array if v0 is.
CALLS: ***
C2S, MAKARR, MAKVEC
CALLED BY:
DRAW_GRID [1], DRAW_GRID [2], DRAW_GRID [3], GET_TRACUBE, MK_GRID_COORDS2
PLOT_CLON, mk_strip_file, mplot_nar, plot_ar_pfi, plot_nar [1], plot_nar [2]
rot_pix2
MODIFICATION HISTORY:
Written, Jan, 1991, G. L. Slater, LPARL
GLS - Modified to allow translation, roll, and b0 corrections
[Previous]
[Next]
NAME:
S_TO_C
PURPOSE:
Returns Cartesian coordinates (X,Y,Z) of a position vector
or array of position vectors whose spherical coordinates are
specified by V0.
CALLING SEQUENCE:
V1 = S_TO_C(V0)
INPUTS:
V0 = Spherical coordinates (r,theta,phi) of a 3-vector or
array of 3-vectors
OUTPUTS:
V1 = Cartesian coordinates (x,y,z) corresponding to sperical
coordinates specified by V0
MODIFICATION HISTORY:
Version 1.0 - Feb, 1991, G. L. Slater, LPARL
[Previous]
[Next]
Name: saa_in
Purpose: boolean - is input time in SAA? Use Yohkoh ephemeris OR/AND RBM
Input Paramters:
index - Yohkoh index record (roadmap ok, but cant check RBM)
Keyword Parameters:
rbm_only - just check rbm veto flag
fem_only - just check FEM file (via tim2orbit,saa=saa)
rbm_and_fem - if set, do logical AND of FEM and RBM (default is OR)
Restrictions - need to handle flares in rbm_status
CALLS: ***
MASK, str_is [1], str_is [2], tim2orbit [1], tim2orbit [2]
CALLED BY:
QUICKDARK [2], chk_pointing, may_eclipse, mk_sdc [2], mk_sdc [3], mk_sdc [4]
mk_sff_pair [1], mk_sff_pair [2]
History:
8-Sep-1993 (SLF) - Written
8-Jul-1994 (SLF) - Return ephem saa if roadmap, just print warning
[Previous]
[Next]
NAME:
sacpeak_image
PURPOSE:
quick version of SXT_MERGE to make a composite image
of 3 offpoint images in order (1,3,2)
CATEGORY:
Yohkoh
CALLING SEQUENCE:
sacpeak_image, index, data, img_out
INPUTS:
index, data pre-selected
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
img_out suitable for writing onto /0p/ftp/pub/sacpeak as an
IDL save set
CALLS: ***
FMT_TIMER [1], FMT_TIMER [2], WDEF [1], WDEF [2], grid, gt_expdur [1], gt_expdur [2]
gt_filtb, gt_time [1], gt_time [2], leak_sub [1], leak_sub [2], leak_sub [3]
sxt_off_axis, sxt_prep [1], sxt_prep [2], sxt_prep [3]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
JRL, HSH 11-Oct-94, written
[Previous]
[Next]
NAME:
sat_av_arr
PURPOSE:
This will return an average of the saturated pixels in each
column, with the pixels above and below included, for two
images.
CALLING SEQUENCE:
sat_av_arr,dn,satpix
INPUT:
dn = Uncompressed data number for SXT images
satpix= an array the same size as dn, with a value gt 0 if the
pixel is saturated, note that this flags the pixels
above and below already, if it's output from sxt_prep.
OUTPUT:
dn with the appropriate pixels averaged..
COMMENT:
This won't work yet for non-continuous saturated pixels in
a given column.
CALLS: ***
twod_subs
CALLED BY:
box_sxthxt_fsp, sxt_fl_analxpro, sxtbox_fsp, sxtbox_teem
HISTORY:
Written by J. McT Dec. '92
Changed to work on SXT_PREP output, 15-jul-94, jmm
[Previous]
[Next]
NAME:
sav_bda
PURPOSE:
To save BDA index and data to a file
CALLING SEQUENCE:
sav_bda, outfil, index, data, qs, dp_sync
sav_bda, 'bda_15nov_flare', index, data, qs, dp_sync, /append
INPUT:
outfil - The name of the file to create or append the
the data. NOTE: IDL "findfile" has a problem
with filename that use the ~ to specify the
directory. This means that the /append option
will not work with file name using ~.
index - An array of index structures
data - A data array. NX x N where the number of
elements in index must be "N". "N" can be 1.
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], GEN_STRUCT [1], GEN_STRUCT [2]
GET_NBYTES, OPEN_DA_FILE, REF_STRUCT, Rd_Pointer [1], Rd_Pointer [2]
Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], WRT1P_FH, WRTBCSMAP
break_file [4], rdwrt [1], rdwrt [2], rdwrt [3]
OPTIONAL KEYWORD INPUT:
dir - The output directory (option not to have to
specify it in the filename)
append - If set, append the dataset to an existing file
If the file does not exist, it will create a new
file.
skipmap - If set, do not generate the roadmap for the file.
This would be used when writing out a large number
of datasets and using the /APPEND
option. The final call writing out the datasets
will have to not have this switch set in order to
have the roadmap created and the file be readable.
progname - The name of the program that is calling SAV_SDA
progverno - The version number of the program that is calling SAV_SDA
fhead_input - The file header of the input files to the program
that is calling SAV_BDA so that the REFORMAT version
number is saved in the output file header
HISTORY:
Written 23-Oct-92 91 by M.Morrison
[Previous]
[Next]
NAME:
sav_bsc
PURPOSE:
To save an BCS processed spectra (BSC) index and data
CALLING SEQUENCE:
sav_bsc, outfil, index, data
sav_bsc, 'hxi_15nov_flare', index, data, /append
INPUT:
outfil - The name of the file to create or append the
the data. NOTE: IDL "findfile" has a problem
with filename that use the ~ to specify the
directory. This means that the /append option
will not work with file name using ~.
index - An array of index structures
data - A BSC data structure. It is possible to save only
the index by not passing data, or by passing
"byte(0)". If data is passed, it should be an
array the same length as index.
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], GEN_STRUCT [1], GEN_STRUCT [2]
GET_NBYTES, OPEN_DA_FILE, REF_STRUCT, Rd_Pointer [1], Rd_Pointer [2]
Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], WRT1P_FH, WRTBSCMAP, bits [1]
bits [2], break_file [4], rdwrt [1], rdwrt [2], rdwrt [3], tag_index [1]
tag_index [2]
CALLED BY:
MK_BSC [1], MK_BSC [2]
OPTIONAL KEYWORD INPUT:
dir - The output directory (option not to have to
specify it in the filename)
append - If set, append the dataset to an existing file
If the file does not exist, it will create a new
file.
skipmap - If set, do not generate the roadmap for the file.
This would be used when writing out a large number
of datasets and using the /APPEND
option. The final call writing out the datasets
will have to not have this switch set in order to
have the roadmap created and the file be readable.
progname - The name of the program that is calling SAV_SDA
progverno - The version number of the program that is calling SAV_SDA
fhead_input - The file header of the input files to the program
that is calling SAV_SDA so that the REFORMAT version
number is saved in the output file header
HISTORY:
Written 13-Nov-92 91 by M.Morrison
16-Dec-92 (MDM) - Changed to break up BSC index into two parts
GEN and BSC
Ver 1.10 3-Feb-93 (MDM) - Added DATA.FLUX option
Ver 1.11 8-Nov-93 (MDM) - Added .FLUX_FIT2
Ver 1.12 26-Jan-94 (MDM) - Added /BLOCK switch to openu command
[Previous]
[Next]
NAME:
sav_hxi
PURPOSE:
To save an HXT synthesized image index and data array to a file
CALLING SEQUENCE:
sav_hxi, outfil, index, data
sav_hxi, 'hxi_15nov_flare', index, data, /append
INPUT:
outfil - The name of the file to create or append the
the data. NOTE: IDL "findfile" has a problem
with filename that use the ~ to specify the
directory. This means that the /append option
will not work with file name using ~.
index - An array of index structures
data - A data array. NX x NY x N where the number of
elements in index must be "N". "N" can be 1.
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], GEN_STRUCT [1], GEN_STRUCT [2]
GET_NBYTES, OPEN_DA_FILE, REF_STRUCT, Rd_Pointer [1], Rd_Pointer [2]
Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], WRT1P_FH, WRTHXIMAP
break_file [4], rdwrt [1], rdwrt [2], rdwrt [3]
CALLED BY:
HXTPIXON, HXT_QLOOK, hxt_multimg, hxt_sources
OPTIONAL KEYWORD INPUT:
dir - The output directory (option not to have to
specify it in the filename)
append - If set, append the dataset to an existing file
If the file does not exist, it will create a new
file.
skipmap - If set, do not generate the roadmap for the file.
This would be used when writing out a large number
of datasets and using the /APPEND
option. The final call writing out the datasets
will have to not have this switch set in order to
have the roadmap created and the file be readable.
progname - The name of the program that is calling SAV_SDA
progverno - The version number of the program that is calling SAV_SDA
fhead_input - The file header of the input files to the program
that is calling SAV_SDA so that the REFORMAT version
number is saved in the output file header
HISTORY:
Written 23-Jul-92 91 by M.Morrison
V 1.0 24-Aug-92 MDM - Added "progverno", "progname" and "fhead_input"
keyword inputs
V 1.1 20-Jun-95 MDM - Modified to allow non-multiple of 16 word image
sizes
[Previous]
[Next]
NAME:
sav_sda
PURPOSE:
To save an SXT index and data array to a file
CALLING SEQUENCE:
sav_sda, outfil, index, data
sav_sda, 'sfm_15nov_flare', index, data, /append
INPUT:
outfil - The name of the file to create or append the
the data. NOTE: IDL "findfile" has a problem
with filename that use the ~ to specify the
directory. This means that the /append option
will not work with file name using ~.
index - An array of index structures
data - A data array. NX x NY x N where the number of
elements in index must be "N". "N" can be 1.
OPTIONAL INPUT:
qs - The quasi-static structure
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], BTEST0, GEN_STRUCT [1]
GEN_STRUCT [2], GET_NBYTES, MASK, OPEN_DA_FILE, REF_STRUCT, Rd_Pointer [1]
Rd_Pointer [2], Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
WRT1P_FH, break_file [4], data_compress [1], data_compress [2]
data_compress [3], rd_roadmap [1], rdwrt [1], rdwrt [2], rdwrt [3], wrtsxtmap
CALLED BY:
GET_SUBARR2, GET_TRACUBE, MK_SSX, comp_sda, diskbench, ffi_prep, his_suncen, mk_desat
mk_desat_wl, mk_sdc [2], mk_sdc [3], mk_sdc [4], mk_sdm, mk_sdp, mk_sfc [1]
mk_sfc [2], mk_sfd [1], mk_sfd [2], mk_sfd [3], mk_sfd [4], mk_sfs, mk_sft [1]
mk_sft [2], mk_sfw, mk_spd, mk_ssc [1], mk_ssc [2], mk_strip_file, mk_sxh, sft2sfc
ssc_scan2, sxt_prep [1], sxt_prep [2], sxt_prep [3], sxt_ssc2sss, wl_process, wr_sda
OPTIONAL KEYWORD INPUT:
dir - The output directory (option not to have to
specify it in the filename)
append - If set, append the dataset to an existing file
If the file does not exist, it will create a new
file.
skipmap - If set, do not generate the roadmap for the file.
This would be used when writing out a large number
of datasets (typically PFI) and using the /APPEND
option. The final call writing out the datasets
will have to not have this switch set in order to
have the roadmap created and the file be readable.
use_index_size - If set, look at the size of the image as
specified in the index and write out only that portion.
This is generally needed when saving FFI images and
there are 4x4 images embedded in a 512x512xN data
array. The default is to save it how it is passed in
since it might have been processed and it's size
changed on purpose.
progname - The name of the program that is calling SAV_SDA
progverno - The version number of the program that is calling SAV_SDA
fhead_input - The file header of the input files to the program
that is calling SAV_SDA so that the REFORMAT version
number is saved in the output file header
compress - If set, then compress the data portion of the data.
If it is a scalar, then it is used for all images.
If it is an array, then it applies to each of the images.
type_comp - Determines compression type used. 1 = Unix Compress,
2 = gzip, Default = 1.
HISTORY:
Written Sep-91 by M.Morrison
11-Nov-91 MDM - Changed to allow to save only index if wanted.
Need to pass data as undefined or a one element
scalar.
Also added the option to skip generating the map
so that the writes are faster. The last time it is
called, the map should be written. - BECAREFUL
12-Nov-91 MDM - Added "use_index_size" option so that if a matrix
is passed and it had images that were padded because
of a large image, the size of the image saved is the
"original" image size. The default is to save it as
passed since it might have had it's size changed
in another routine (change 4x4 to 2x2)
5-May-92 MDM - Added document header
V 1.00 24-Aug-92 MDM - Added "progverno", "progname" and "fhead_input"
keyword inputs
V 1.01 24-Aug-92 MDM - Added /shape_sav to WRTSXTMAP call --
copy the shape_sav values to the roadmap
"shape_cmd" field (instead of the shape_cmd values)
This is needed because the roadmap field "shape_cmd"
is used to figure out the output array size.
V 1.02 12-Oct-92 MDM - Modification to allow non-standard image shapes
to be saved. Previous restriction was that nx*ny
be a multiple of 16 (the file record size)
V 1.03 6-Dec-93 MDM - Modification to WRTSXTMAP to use the old roadmap instead
of re-generating the whole thing.
V 1.04 7-Dec-93 MDM - Modified not to read the roadmap when /append and
/skipmap is set.
26-Jan-94 AKT - Modified to add /block keyword to openu call. mk_sfd
crashed because couldn't position within last 512 bytes.
9-Mar-94 MDM - Modified the header information
V 1.10 7-Mar-95 MDM - Added /COMPRESS option
- Added /QDEBUG
12-Dec 97 PGS - Added type_comp keyword, wrote compression type to
bits 6 & 7 of index0.gen.data_word_type.
bit6=1 => Unix compress = default, bit7=1 => gzip compress.
25-Jan-98 SLF - define COMPRESS if not already done
[Previous]
[Next]
NAME:
sav_sda
PURPOSE:
To save an SXT index and data array to a file
CALLING SEQUENCE:
sav_sda, outfil, index, data
sav_sda, 'sfm_15nov_flare', index, data, /append
INPUT:
outfil - The name of the file to create or append the
the data. NOTE: IDL "findfile" has a problem
with filename that use the ~ to specify the
directory. This means that the /append option
will not work with file name using ~.
index - An array of index structures
data - A data array. NX x NY x N where the number of
elements in index must be "N". "N" can be 1.
OPTIONAL INPUT:
qs - The quasi-static structure
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], BTEST0, GEN_STRUCT [1]
GEN_STRUCT [2], GET_NBYTES, MASK, OPEN_DA_FILE, REF_STRUCT, Rd_Pointer [1]
Rd_Pointer [2], Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
WRT1P_FH, break_file [4], data_compress [1], data_compress [2]
data_compress [3], rd_roadmap [1], rdwrt [1], rdwrt [2], rdwrt [3], wrtsxtmap
CALLED BY:
GET_SUBARR2, GET_TRACUBE, MK_SSX, comp_sda, diskbench, ffi_prep, his_suncen, mk_desat
mk_desat_wl, mk_sdc [2], mk_sdc [3], mk_sdc [4], mk_sdm, mk_sdp, mk_sfc [1]
mk_sfc [2], mk_sfd [1], mk_sfd [2], mk_sfd [3], mk_sfd [4], mk_sfs, mk_sft [1]
mk_sft [2], mk_sfw, mk_spd, mk_ssc [1], mk_ssc [2], mk_strip_file, mk_sxh, sft2sfc
ssc_scan2, sxt_prep [1], sxt_prep [2], sxt_prep [3], sxt_ssc2sss, wl_process, wr_sda
OPTIONAL KEYWORD INPUT:
dir - The output directory (option not to have to
specify it in the filename)
append - If set, append the dataset to an existing file
If the file does not exist, it will create a new
file.
skipmap - If set, do not generate the roadmap for the file.
This would be used when writing out a large number
of datasets (typically PFI) and using the /APPEND
option. The final call writing out the datasets
will have to not have this switch set in order to
have the roadmap created and the file be readable.
use_index_size - If set, look at the size of the image as
specified in the index and write out only that portion.
This is generally needed when saving FFI images and
there are 4x4 images embedded in a 512x512xN data
array. The default is to save it how it is passed in
since it might have been processed and it's size
changed on purpose.
progname - The name of the program that is calling SAV_SDA
progverno - The version number of the program that is calling SAV_SDA
fhead_input - The file header of the input files to the program
that is calling SAV_SDA so that the REFORMAT version
number is saved in the output file header
compress - If set, then compress the data portion of the data.
If it is a scalar, then it is used for all images.
If it is an array, then it applies to each of the images.
HISTORY:
Written Sep-91 by M.Morrison
11-Nov-91 MDM - Changed to allow to save only index if wanted.
Need to pass data as undefined or a one element
scalar.
Also added the option to skip generating the map
so that the writes are faster. The last time it is
called, the map should be written. - BECAREFUL
12-Nov-91 MDM - Added "use_index_size" option so that if a matrix
is passed and it had images that were padded because
of a large image, the size of the image saved is the
"original" image size. The default is to save it as
passed since it might have had it's size changed
in another routine (change 4x4 to 2x2)
5-May-92 MDM - Added document header
V 1.00 24-Aug-92 MDM - Added "progverno", "progname" and "fhead_input"
keyword inputs
V 1.01 24-Aug-92 MDM - Added /shape_sav to WRTSXTMAP call --
copy the shape_sav values to the roadmap
"shape_cmd" field (instead of the shape_cmd values)
This is needed because the roadmap field "shape_cmd"
is used to figure out the output array size.
V 1.02 12-Oct-92 MDM - Modification to allow non-standard image shapes
to be saved. Previous restriction was that nx*ny
be a multiple of 16 (the file record size)
V 1.03 6-Dec-93 MDM - Modification to WRTSXTMAP to use the old roadmap instead
of re-generating the whole thing.
V 1.04 7-Dec-93 MDM - Modified not to read the roadmap when /append and
/skipmap is set.
26-Jan-94 AKT - Modified to add /block keyword to openu call. mk_sfd
crashed because couldn't position within last 512 bytes.
9-Mar-94 MDM - Modified the header information
V 1.10 7-Mar-95 MDM - Added /COMPRESS option
- Added /QDEBUG
[Previous]
[Next]
NAME:
sav_sda
PURPOSE:
To save an SXT index and data array to a file
CALLING SEQUENCE:
sav_sda, outfil, index, data
sav_sda, 'sfm_15nov_flare', index, data, /append
INPUT:
outfil - The name of the file to create or append the
the data. NOTE: IDL "findfile" has a problem
with filename that use the ~ to specify the
directory. This means that the /append option
will not work with file name using ~.
index - An array of index structures
data - A data array. NX x NY x N where the number of
elements in index must be "N". "N" can be 1.
OPTIONAL INPUT:
qs - The quasi-static structure
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], BTEST0, GEN_STRUCT [1]
GEN_STRUCT [2], GET_NBYTES, MASK, OPEN_DA_FILE, REF_STRUCT, Rd_Pointer [1]
Rd_Pointer [2], Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
WRT1P_FH, break_file [4], data_compress [1], data_compress [2]
data_compress [3], rd_roadmap [1], rdwrt [1], rdwrt [2], rdwrt [3], wrtsxtmap
CALLED BY:
GET_SUBARR2, GET_TRACUBE, MK_SSX, comp_sda, diskbench, ffi_prep, his_suncen, mk_desat
mk_desat_wl, mk_sdc [2], mk_sdc [3], mk_sdc [4], mk_sdm, mk_sdp, mk_sfc [1]
mk_sfc [2], mk_sfd [1], mk_sfd [2], mk_sfd [3], mk_sfd [4], mk_sfs, mk_sft [1]
mk_sft [2], mk_sfw, mk_spd, mk_ssc [1], mk_ssc [2], mk_strip_file, mk_sxh, sft2sfc
ssc_scan2, sxt_prep [1], sxt_prep [2], sxt_prep [3], sxt_ssc2sss, wl_process, wr_sda
OPTIONAL KEYWORD INPUT:
dir - The output directory (option not to have to
specify it in the filename)
append - If set, append the dataset to an existing file
If the file does not exist, it will create a new
file.
skipmap - If set, do not generate the roadmap for the file.
This would be used when writing out a large number
of datasets (typically PFI) and using the /APPEND
option. The final call writing out the datasets
will have to not have this switch set in order to
have the roadmap created and the file be readable.
use_index_size - If set, look at the size of the image as
specified in the index and write out only that portion.
This is generally needed when saving FFI images and
there are 4x4 images embedded in a 512x512xN data
array. The default is to save it how it is passed in
since it might have been processed and it's size
changed on purpose.
progname - The name of the program that is calling SAV_SDA
progverno - The version number of the program that is calling SAV_SDA
fhead_input - The file header of the input files to the program
that is calling SAV_SDA so that the REFORMAT version
number is saved in the output file header
compress - If set, then compress the data portion of the data.
If it is a scalar, then it is used for all images.
If it is an array, then it applies to each of the images.
type_comp - Determines compression type used. 1 = Unix Compress,
2 = gzip, Default = 1.
HISTORY:
Written Sep-91 by M.Morrison
11-Nov-91 MDM - Changed to allow to save only index if wanted.
Need to pass data as undefined or a one element
scalar.
Also added the option to skip generating the map
so that the writes are faster. The last time it is
called, the map should be written. - BECAREFUL
12-Nov-91 MDM - Added "use_index_size" option so that if a matrix
is passed and it had images that were padded because
of a large image, the size of the image saved is the
"original" image size. The default is to save it as
passed since it might have had it's size changed
in another routine (change 4x4 to 2x2)
5-May-92 MDM - Added document header
V 1.00 24-Aug-92 MDM - Added "progverno", "progname" and "fhead_input"
keyword inputs
V 1.01 24-Aug-92 MDM - Added /shape_sav to WRTSXTMAP call --
copy the shape_sav values to the roadmap
"shape_cmd" field (instead of the shape_cmd values)
This is needed because the roadmap field "shape_cmd"
is used to figure out the output array size.
V 1.02 12-Oct-92 MDM - Modification to allow non-standard image shapes
to be saved. Previous restriction was that nx*ny
be a multiple of 16 (the file record size)
V 1.03 6-Dec-93 MDM - Modification to WRTSXTMAP to use the old roadmap instead
of re-generating the whole thing.
V 1.04 7-Dec-93 MDM - Modified not to read the roadmap when /append and
/skipmap is set.
26-Jan-94 AKT - Modified to add /block keyword to openu call. mk_sfd
crashed because couldn't position within last 512 bytes.
9-Mar-94 MDM - Modified the header information
V 1.10 7-Mar-95 MDM - Added /COMPRESS option
- Added /QDEBUG
12-Dec 97 PGS - Added type_comp keyword, wrote compression type to
bits 6 & 7 of index0.gen.data_word_type.
bit6=1 => Unix compress = default, bit7=1 => gzip compress.
25-Jan-98 SLF - define COMPRESS if not already done
5-May-99 SLF - add /NOLOWER to open_da_file call
(permit upper case file/path names)
[Previous]
[Next]
Name: sav_string
Purpose: save string to xdr file for Yohkoh !path, documentation, filemaps
Input Parameters:
infile - filename of file to write
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4]
NOTE: by default, the extention .strx is forced
string - string variable to save
Optional Keyword Parameters:
Method:
special files contain a single string (but the string may be long)
in XDR format for transporability
Calling Sequence:
sav_string, string, infile [,type=type] [,/path] [,/doc] [,/refdata]
Categories:
swmaint, file i/o, gen, util
Notes:
The pair of routines [sav_string/get_string] were developed to allow
saving and restoring of several yohkoh parameters (ex: !path) to help
manage the Yohkoh idl environment but they are generic in nature and
other uses may be considered. They can be used in conjunction with
arr2str and str2arr to allow storing of string 'arrays'
History: slf, 30-July-92
slf, 22-Jul-93 (use SITE instead of GEN)
[Previous]
[Next]
NAME:
save_event
PURPOSE:
Called by op_get_event to save orbital event information in output structure.
CALLS: ***
ADDTIME [1], ADDTIME [2], int2secarr [1], int2secarr [2], op_get_event [1]
op_get_event [2]
CALLED BY:
OP_ADD_SPECIAL, get_dn_rate [1], get_dn_rate [2], make_32 [1], make_32 [2]
op_bdr_opt, op_edit [1], op_edit [2], op_get_event [1], op_get_event [2]
op_saa_med [1], op_saa_med [2], op_terminator [1], op_terminator [2]
op_time_sort, valid_pass4 [1], valid_pass4 [2]
Modification History:
Written, oct-91, J. R. Lemen
Modified, 13-jan-92, J. R. Lemen, Fixed comments for og's > 127
Updated, 23-jan-92, J. R. Lemen, Added aligment feature
Updated, 6-jul-92, JRL, Added op_cmd=260 (null)
4-may-93, JRL, Added DN flag to the event structure.
[Previous]
[Next]
NAME:
save_event
PURPOSE:
Called by op_get_event to save orbital event information in output structure.
CALLS: ***
ADDTIME [1], ADDTIME [2], int2secarr [1], int2secarr [2], op_get_event [1]
op_get_event [2]
CALLED BY:
OP_ADD_SPECIAL, get_dn_rate [1], get_dn_rate [2], make_32 [1], make_32 [2]
op_bdr_opt, op_edit [1], op_edit [2], op_get_event [1], op_get_event [2]
op_saa_med [1], op_saa_med [2], op_terminator [1], op_terminator [2]
op_time_sort, valid_pass4 [1], valid_pass4 [2]
Modification History:
Written, oct-91, J. R. Lemen
Modified, 13-jan-92, J. R. Lemen, Fixed comments for og's > 127
Updated, 23-jan-92, J. R. Lemen, Added aligment feature
Updated, 6-jul-92, JRL, Added op_cmd=260 (null)
4-may-93, JRL, Added DN flag to the event structure.
[Previous]
[Next]
NAME:
SBT_HXT_DATA
PURPOSE:
Subtract a certain BGD level derived from a structure (or an array)
variable 'bgd'.
CALLING SEQUENCE:
data = SBT_HXT_DATA(index, raw_data, bgd)
INPUT:
index - HXT index
raw_data - HXT data before BGD subtraction.
bgd - BGD data (either a structure or an array variable)
If an array is selected, then the format should be:
[L,M1,M2,H]-bands BGD counts/sec/SC.
OUTPUT:
data - BGD-subtracted data.
CALLED BY:
AVE_CTS
NOTE:
Note that 'data' is not a structure, which is a remarkable difference
of sbt_hxt_data from mk_hxt_sbt. Also a simple count profile is
returned.
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], GT_HS_SUM, HXT_HALFSEC, HXT_HALFSEC2
SIDE EFFECTS:
none
CATEGORY:
HXT data analysis.
MODIFICATION HISTORY:
version 1.0 92.11.30 (Mon)
version 1.1 92.12.03 (Thu)
Return value of this function was changed from sbt(4,*) to
sbt(4,64,4,*) so as to ensure compatibility with
hxt_hs_hardness.pro and hxt_halfsec.pro.
In fact, ver 1.0 does not match with any of .pro in hxt_proc/.
version 1.2 93.02.16 (Tue)
Unit of accum_time is changed to 'sec' instead of 'msec'.
Usage :
IDL > sbt = sbt_hxt_data(index,data,bgd)
where data = bytarr(4,64,4,*) ... raw 'data' from
RF database.
bgd = HXT BGD structure.
MAKE SURE VER 1.1 DOES NOT GIVE CORRECT ANSWER AT ALL (LOTS OF BUGS
IN IT).
version 1.3 93.02.17 (Wed)
Option var added.
Usage :
IDL > sbt = sbt_hxt_data(index,data,bgd,var=var)
where var = fltarr(4,64,4,*), gives variance for
each 'sbt'.
version 1.4 97.06.25 (Wed)
Array-type for the bgd variable was added.
[Previous]
[Next]
NAME:
scale_gbo
PURPOSE:
To resize, and repostion a gbo image to match the last
sfd image produced by first_light.
METHOD: The sfd image is passed through sxt_cen to find the centroid
and the axial diameters, the gbo image is passed through gen_loc
for the same purpose and is then resized and reposisitioned to
match the first (TARGET). The rescaled gbo image is then displayed.
This is based on A. McA.'s gbo_scale2 procedure.
CALLING SEQUENCE:
outimg=scale_gbo(trgimg,gboimg,indx1)
outimg=scale_gbo(gboimg,diam=npix)
indx1 is the index entry for the sxtimg.
PARAMETERS:
gboimg the input GBO image.
trgimg the target image to which it is to be matched.
outimg the rescaled output image.
KEYWORDS:
OUTPUT TYPE:
CALLS: ***
CONGRID [1], CONGRID [2], CONGRID [3], GEN_LOC, get_rb0p [1], get_rb0p [2]
sxt_cen [1], sxt_cen [2]
CALLED BY:
fl_suntoday [1], fl_suntoday [2], fl_suntoday [3], mk_sun_mosaic, sun_today [1]
sun_today [2], sun_today [3]
HISTORY:
Procedure developed to shrink BBSO Halpha image and
place it correctly in a 512x512 SXT image
Written by L. Acton 7-nov-91
Modified for generality 10-apr-92
Added automatic sun finder, A. McA. 16-apr-92
Corrected for different vertical/horizontal scaling A.McA 18-apr-92
Version 2. Rewrote for general sized matrices, using dsk_loc.
changed calling sequence to include target image, A.McA 24-apr-92
Replaced location routine. Can now handle SXT images, A.McA. 6-may-92
Added fractional pixel repositioning, A.McA. 7-may-92
Changed congrid call to use bilinear extrapolation, A.McA. 26-may-92
Output variable type now same as input type, A.McA. 2-dec-92
Modified by DA for specific use with first_light.
15-Sep-1994 (SLF) add SIZE_ONLY keyword (resize but dont reposition)
9-sep-1994 (SLF) allow diam to be passed in (pixels)
[Previous]
[Next]
NAME:
scale_teem
PURPOSE:
Scale the results from sxt_teem to that they can be displayed
CALLING SEQUENCE:
out_te = scale_teem(Te,dTe)
out_te = scale_teem(Te,dTe,level=level)
INPUTS:
Te = Log10(Te) of Temperatures
dTe = d(Log10(Te)) of Temperatures
OPTIONAL INPUT PARAMETER:
level = Cutoff value of dTe for plotting Te
MODIFICATION HISTORY:
14-oct-94, J. R. Lemen, LPARL (adapted from J. McTiernan's t664_screen)
[Previous]
[Next]
NAME
scat_avg
PURPOSE
To derive an expression for average x-ray scattering by the SXT
mirror. Starburst difference imagas are used.
CALLING SEQUENCE
scat_avg,img,index,x0,y0,fit_param=fit_param, $
[rr,source,xy=xy,new=new,xxx,out]
INPUT
img - SXT starburst difference image
x0,y0 - coordinates of the flare
OPTIONAL INPUT
rr, to save time if this has already been computed once
OUTPUT
rr - array of radii of all distances from x,y
fit_param - Intensity and slope parameters derived with poly_fit
xxx - linear array of R values for plotting
out - array of signal values, averaged over annuli, function of R
KEYWORD INPUT
OPTIONAL KEYWORD INPUT
xy - array defining target area
default is to read from image with WDEFROI
/new - if this is a new value of x0,y0 and/or rr does not exist
from a previous calculation (To save time.)
HISTORY
LWA 21-June-1994
Changed to a procedure and added averaging around a radius,
fitting, and display and printed output. LWA 22-June-1994
CALLS:
[Previous]
[Next]
Name: scratcf
Purpose: manage scratch files (names, auto-delete, units,...)
(compatible with VMS/Unix)
Input Parameters:
u0, u1, ... u9 ;if defined on input, log units to close and delete
Output Parameters:
u0, u1, ... u9 ;if undefined, logical units assigned during open
Keyword Parameters:
nodelete - (input) dont delete on close (default is to delete)
cleanup - (input) deletes all scratchf generated files (even old stuff)
open - (input) force open mode (default if u0 present and undefined)
close - (input) force close mode (default if u0 present and defined)
names - (output) scratch file names acted upon (open/close/delete)
Calling Sequence:
scratchf,u1,u2,u3 ; if parameters undefined, open 3 scratch files
; if parameters defined, close/delete files
Calling Examples:
scratchf, u1, u2, u3, /open ; open 3 files, return luns in u1, u2, u3
scratchf, u1, u2, /close ; close and delete files open w/luns u1/u2
scratchf, u2, /print ; same, but print before deleting
scratchf, u1, /nodelete ; close, dont delete
scratchf, u1, u2 ; if u1 is undfined: open 2 files
(same as scratchf, u1, u2 ,/open)
if u1 is defined, close/delete 2 files
(same as scratchf, u1, u2, /close)
scratchf, u1, name=name ; return file name
scratchf ; close/delete all open scratchfiles
scratchf,/cleanup ; same plus any old scratchf files from
scratchf,/clean,/nodel,name=name ; new and old scratchf file names
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DPRINT, LPRINT, SCRATCHF
concat_dir [4]
Restrictions:
uses execute statement, so no recursion allowed
History: slf, 3-March-1993
[Previous]
[Next]
NAME:
sda2fits
PURPOSE:
Take a SXT index and data and write a FITS file
CALLING SEQUENCE:
sxt2fits, index, data
sxt2fits, index, data, outfil='sda_sample.fits'
sxt2fits, infil=infil
sxt2fits, infil=infil, ss=ss
sxt2fits, infil='$DIR_SXT_SFM/sfm930300.0000', outdir='/yd3/morrison/sgd'
INPUT:
index - The index structure to be saved
data - The data array to be saved
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GET_NBYTES, RD_XDA [1], RD_XDA [2]
Rd_Roadmap [2], SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], SXT2FITS, anytim2ex [1]
anytim2ex [2], anytim2ints [1], anytim2ints [2], concat_dir [4], ex2fid [1]
ex2fid [2], fmt_tim [1], fmt_tim [2], get_rb0p [1], get_rb0p [2], get_roll
gt_corner, gt_day [1], gt_day [2], gt_dp_mode [1], gt_dp_mode [2], gt_dp_rate [1]
gt_dp_rate [2], gt_dpe, gt_expdur [1], gt_expdur [2], gt_expmode, gt_filta, gt_filtb
gt_pfi_ffi, gt_pix_size, gt_res, gt_time [1], gt_time [2], rd_roadmap [1]
sxt_cen [1], sxt_cen [2], wrt_fits [1], wrt_fits [2]
OPTIONAL KEYWORD INPUT:
outfil - The output file name(s). There should be one filename
per image saved. If "outfil" is not specified, then
the output file name is:
SF_FITSyymmdd.hhmmss (for FFI)
SP_FITSyymmdd.hhmmss (for FFI)
If "outfil" is passed as a scalar and there are
multiple images passed in, then a .0001, .0002, .0003
and so forth is appended to the end.
infil - Instead of passing in the "index" and "data", it
is possible to pass in the SDA file name. If
"ss" is not passed, then all data sets are saved
ss - A list of the indicies to be saved (either within
the "index" variable, or datasets within the
"infil"
outdir - The output directory where to put the FITS file created
OUTPUT:
Creates FITS files
HISTORY:
Written 19-Oct-92 by M.Morrison
5-May-93 (MDM) - Modification to the header
6-Mar-95 (MDM) - Added center pixel information (as per Hudson's Request)
8-Mar-95 (GAL) - Fixed typo-bug from 6-Mar-95
10-may-95 (SLF) - add CRROTA and call to get_roll
23-Jun-95 (MDM) - Removed the blank lines in the header (put COMMENT)
26-Jun-95 (MDM) - Replaced all of the format statements to build the
FITS header with calls to SXADPAR
7-aug-95 (SLF) - change DATE-OBS to conform to NOST FITS stds.
add DATEOBS (Yohkoh String Format Time & Date)
22-sep-95 (SLF) - add QUIET keyword and function
[Previous]
[Next]
[Previous]
[Next]
function sdc_verify,index,data,verbose=verbose,progress=progress, $
correct_col_blem=correct_col_blem,version=version
NAME:
SDC_VERIFY
PURPOSE:
Check the SDC database for bad dark frames
CATEGORY:
CALLING SEQUENCE:
quality = sdc_verify(index,data)
INPUTS:
index = SDC index
data = SDC data
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
/correct_col_blem = attempt to fix column blemish problems by
interpolating over the bad areas. WARNING: if this
keyword is set, the data will be modified if any areas
of the images appear to have bleed or blemishes. NOte
that the quality structure will have the values for the
*uncorrected* data so that data which did not need to
be corrected will be used in favor of data which did
need to be corrected.
/progress = print out progress reports as the checks are underway.
Like /verbose, but with fewer diagnostics and no
images.
/verbose = spit out lots of diagnostics and display the good and bad
images.
version = Outputs with the version number
OUTPUTS:
quality = index type structure for images
quality.badness = measure of how bad the image is. Allows ranking.
0 means "perfect", higher numbers are worse.
0-20 is probably OK;
20-100 is marginal;
>=100 is probably bad;
>= 1000. do not use the image.
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_INFO2, MASK, MEAN, RM_FEATURE, STDEV
fmt_tim [1], fmt_tim [2], get_info [1], get_info [2], get_info [3], get_info [4]
gt_comp, gt_dpe, gt_expdur [1], gt_expdur [2], gt_expmode, gt_res, sxt_decomp [1]
sxt_decomp [2], sxt_satpix [1], sxt_satpix [2], sxt_uvf_info [1]
sxt_uvf_info [2], sxt_uvf_info [3], xstepper [1], xstepper [2]
CALLED BY:
mk_sdc [2], mk_sdc [3], mk_sdc [4]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
T. Metcalf 1998-Sep-21
1998-Sep-29 TRM Added check for exposure mode and BLS mode
1998-Dec-16 TRM Major modification to the tests
1999-May-24 TRM Added minimum 8ms exposure to gt_dpe call
1999-Jun-15 TRM Added column blemish correction
2002-Dec-02 TRM Small change to "ignore vertical lines" so that
streaks are picked up more readily.
2002-Dec-03 TRM Version 1.0. Added version number.
2002-Dec-03 TRM Version 1.1. Added TFMS check and percent
check. Increased pixcut from 0 to 30.
2002-Dec-12 TRM Version 1.2. Added check for nx=1024 images
[Previous]
[Next]
NAME:
sea
PURPOSE:
Search all files in a set of Unix sub-directories for an input string
CALLING SEQUENCE:
sea
sea, indir, instr, outfil, fil_spec=fil_spec
sea, '/ys', 'makvec'
sea, '/ys', 'hel2pix', 'dum.dum', fil_spec='*.pro'
INPUT:
indir - The top directory to search. All directories under it will
be searched
instr - The string to search all files in the subdirectories for
OPTIONAL INPUT:
outfil - The name of the file to write the results to. Default is
"SEA.TXT"
CALLS: ***
UNIQ [1], UNIQ [2], UNIQ [3], file_list [1], file_list [2], rd_tfile [1]
rd_tfile [2]
OPTIONAL KEYWORD INPUT:
fil_spec- The file specification to search for ('*' for example)
Default is "*.pro"
OPTIONAL KEYWORD INPUT/OUTPUT:
sub_dirs- The list of subdirectories to search. Can be used so
that the subdirectories do not have determined again if
calling SEA twice in a row
OPTIONAL KEYWORD OUTPUT:
matches - The names of the files which match
HISTORY:
Written Nov-91 by M.Morrison
20-Oct-92 (MDM) - Added document header
- Added FIL_SPEC
15-Mar-93 (MDM) - Adjusted the GREP command to use " "
7-Jun-93 (MDM) - Added SUB_DIRS
- Allowed INSTR to be an array
18-Jul-93 (MDM) - Added matches output keyword
23-Mar-95 (MDM) - Adjusted the GREP command to use ' '
21-Jun-95 (MDM) - Modified to work when there are lots of files
in the directory (avoid "arg list too long" error)
[Previous]
[Next]
Name: search
Purpose: emulate VMS search utility
Input Parameters:
file - file to search (can be string array also)
string - string to search for
Keyword Parameters:
window - number of lines above/below matches to display
case_ignore - force search to be case insensitive
Calling Sequence:
search, file, string [, window=[above,below], /case_ignore]
search, file, string, window=delta
search, array, string
CALLS: ***
FILE_EXIST [2], data_chk [1], data_chk [2], file_exist [1], file_exist [3]
prstr [1], prstr [2], rd_tfile [1], rd_tfile [2], uniqo [1], uniqo [2], wc_where [1]
wc_where [2]
CALLED BY:
check_log [1], check_log [2], sfc_check
History:
15-Apr-1994 (SLF) Written (uses rd_tfile and wc_where)
18-Apr-1994 (SLF) Minor change to delimit logic
22-Apr-1994 (SLF) Allow string array, add FIRST and LAST keywords
[Previous]
[Next]
Name: search_file
Purpose: Search data path list for input file
Input: filename
Output: function returns file name with path or '' if not found
Method: quick and dirty (calls data_paths)
CALLS: ***
DATA_PATHS, browse_files
CALLED BY:
CkFurFiles
History: slf, 10/91
[Previous]
[Next]
Name: search_files
Purpose:return path name of yohkoh reformatted data files
Input Parameters:
infiles - list of fileids to locate
Optional Keyword Parameters:
map - if set, forces common block update
paths - string array of paths to include (def=data_paths output
plus current directory)
Method: uses private common block to store online filepaths
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], SPLIT_FILES, UNIQ [1], UNIQ [2]
UNIQ [3], concat_dir [4], curdir [1], curdir [2], data_paths2 [1], data_paths2 [2]
Common Blocks: search_files_blk (private)
Restrictions:
Slow on first call (map) - could use generic file read option
directory updates are not so dynamic
History: slf, April 22, 1992
[Previous]
[Next]
Name: search_obs
Purpose: search observing log for matching records
Input Parameters:
time0 - start time for search (default=launch)
time1 - stop time for search (default=now)
Keyword Parameters:
ffi or sxtf - if set, sxt FFI search (default)
pfi or sxtp - if set, sxt PFI search
conf_file - name of SS configuration file
listfile - if set, outputfile for text summary of matching index records
outfile - file containing matching index structures
index (output) - maching records
CALLED BY:
xso_search
History:
22-mar-1995 (SLF) - extension of mk_spd logic
12-apr-1995 (SLF) - extend time buffer to assure stop time covered
add tag names and some text info to save file
22-may-1995 (SLF) - default config file in HOME directory
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], MORE [1], MORE [2]
anytim2ints [1], anytim2ints [2], concat_dir [4], data_chk [1], data_chk [2]
file_append [1], file_append [2], file_exist [1], file_exist [3], get_info [1]
get_info [2], get_info [3], get_info [4], get_logenv [1], get_logenv [2]
get_user [1], get_user [2], get_utevent [1], get_utevent [2], get_yo_dates [1]
get_yo_dates [2], get_yo_dates [3], int2secarr [1], int2secarr [2], mail [1]
mail [2], prstr [1], prstr [2], rd_tfile [1], rd_tfile [2], savegen [1], savegen [2]
sel_timrange [1], sel_timrange [2], str_concat [1], str_concat [2], sxt_where
timegrid, ut_time [1], ut_time [2]
Restrictions:
only sxt for now
[Previous]
[Next]
NAME:
SECTIME
PURPOSE:
Convert TIME in the unit of HHMMSS into TIME in the unit of sec.
CATEGORY:
Programming
CALLING SEQUENCE:
outtime = SECTIME(intime)
INPUTS:
intime = time in the unit of HHMMSS. HHMMSS means HH:MM:SS.
String type data having 6 data length.
OUTPUTS:
outtime = time in the unit of sec.
Long Integer type data.
NOTE:
notice that the type of inserted TIME(string*6) is also convertied
into another type (long integer) in the outputted TIME.
COMMON BLOCKS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
None.
PROCEDURE:
The time in the unit of HHMMSS(HH:MM:SS) is converted into the
time in the unit of sec.
PROGRAMER:
Toshifumi Shimizu
Department of Astronomy, University of Tokyo, JAPAN
HISTORY:
Ver 1.0 7-JAN-1991 made
Ver 2.0 16-MAY-1991 change FUNCTION
[Previous]
[Next]
NAME:
SECTIME
PURPOSE:
Convert TIME in the unit of HHMMSS into TIME in the unit of sec.
CATEGORY:
Programming
CALLING SEQUENCE:
outtime = SECTIME(intime)
INPUTS:
intime = time in the unit of HHMMSS. HHMMSS means HH:MM:SS.
String type data having 6 data length.
OUTPUTS:
outtime = time in the unit of sec.
Long Integer type data.
NOTE:
notice that the type of inserted TIME(string*6) is also convertied
into another type (long integer) in the outputted TIME.
COMMON BLOCKS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
None.
PROCEDURE:
The time in the unit of HHMMSS(HH:MM:SS) is converted into the
time in the unit of sec.
PROGRAMER:
Toshifumi Shimizu
Department of Astronomy, University of Tokyo, JAPAN
HISTORY:
Ver 1.0 7-JAN-1991 made
Ver 2.0 16-MAY-1991 change FUNCTION
[Previous]
[Next]
NAME:
SECTIME
PURPOSE:
Convert TIME in the unit of HHMMSS into TIME in the unit of sec.
CATEGORY:
Programming
CALLING SEQUENCE:
outtime = SECTIME(intime)
INPUTS:
intime = time in the unit of HHMMSS. HHMMSS means HH:MM:SS.
String type data having 6 data length.
OUTPUTS:
outtime = time in the unit of sec.
Long Integer type data.
NOTE:
notice that the type of inserted TIME(string*6) is also convertied
into another type (long integer) in the outputted TIME.
COMMON BLOCKS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
None.
PROCEDURE:
The time in the unit of HHMMSS(HH:MM:SS) is converted into the
time in the unit of sec.
PROGRAMER:
Toshifumi Shimizu
Department of Astronomy, University of Tokyo, JAPAN
HISTORY:
Ver 1.0 7-JAN-1991 made
Ver 2.0 16-MAY-1991 change FUNCTION
[Previous]
[Next]
NAME:
SECTIME
PURPOSE:
Convert TIME in the unit of HHMMSS into TIME in the unit of sec.
CATEGORY:
Programming
CALLING SEQUENCE:
outtime = SECTIME(intime)
INPUTS:
intime = time in the unit of HHMMSS. HHMMSS means HH:MM:SS.
String type data having 6 data length.
OUTPUTS:
outtime = time in the unit of sec.
Long Integer type data.
NOTE:
notice that the type of inserted TIME(string*6) is also convertied
into another type (long integer) in the outputted TIME.
COMMON BLOCKS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
None.
PROCEDURE:
The time in the unit of HHMMSS(HH:MM:SS) is converted into the
time in the unit of sec.
PROGRAMER:
Toshifumi Shimizu
Department of Astronomy, University of Tokyo, JAPAN
HISTORY:
Ver 1.0 7-JAN-1991 made
Ver 2.0 16-MAY-1991 change FUNCTION
[Previous]
[Next]
NAME:
sector_avg
PURPOSE
To compute the azimuthally-averaged radial intensity distribution from
some origin -- either the center of the sun or an input location.
Radial totals, not averaged over azimuth, can be returned also for
use in SXT_TEEM which requires actual total DN if error bars are
be put on the temperatures.
Signal averages or totals over specified sectors also an option.
CALLING SEQUENCE
sector_avg,image,index=index,origin=origin,xxx,sig,rr,fullsig,$
xy=xy,new=new,fit_param=fit_param,yfit=yfit,$
noplot=noplot,multiple=multiple,unc_data=unc_data,$
unc_sig=unc_sig,unc_fullsig=unc_fullsig,skip=skip,$
sector=sector,noqx=noqx,sectparam=sectparam,azipix=azipix
sector_avg,image,index=index,xxx,sig
sector_avg,image,origin=[361,400],xxx,sig, $
fit_param=fit_param,yfit=yfit,multiple=2
sector_avg,image,index=index,xxx,sig,rr,/new,/origin,/noplot
INPUT
image - Fully corrected image.
Either: index, origin or both.
OUTPUT TO SCREEN
If the keyword sectparam is not set then output of the following
form is written to the screen:
The slope of the fit is -2.03562
Fitted expression: Signal = 6.6e+06*R^(-2.04) per pixel.
OPTIONAL OUTPUT
xxx - linear array of R values for plotting
sig - array of signal values, averaged over azimuth, function of R
units are DN/pixel for pixel size in image
Used for plotting signal vs. R
rr - array of radii of all distances from origin
units are pixels (pixel size of image)
xy - array of pixels included in the analysis
unc_sig - compression uncertainties on azimuthly averaged values
fullsig - azimuthal totals, not averaged over azimuth, function of R
for use with SXT_TEEM
unc_fullsig - compression errors on azimuth totals
OPTIONAL INPUT
rr, return from first run and input for subsequent runs
to save time.
OPTIONAL KEYWORD INPUT
index - to permit getting suncenter from the data base
and labelling of output figures
origin - origin of coordinates for azimuth averaging, if this is
specified it takes priority over suncenter from index
but one or the other must be provided.
CALLS: ***
POLY_FIT, WDEF [1], WDEF [2], fmt_tim [1], fmt_tim [2], gt_corner, gt_filtb, gt_res
ocontour [1], ocontour [2], ocontour [3], ocontour [4], ocontour [5], plusmark
sector_bound, sfd_comp, tbeep [1], tbeep [2], tbeep [3], wdefroi [1], wdefroi [2]
wdefroi [3], wdefroi [4], yesnox [1], yesnox [2]
Note: origin = [x0,y0] chooses x0,y0 as origin of coordinates.
/origin allows choosing origin by click on image.
xy - array defining target area,
default is to read from image with WDEFROI
/new - set if rr array exists but you wish to recompute it
forces recomputation of xy also.
fit_param - set this to execute and plot a log10-log10 fit
to xxx vs. sig and, if you wish, return the parameters
Set fit_param=1 to return the parameters.
yfit - values of the fitted log10-log10 curve at xxx
/noplot - causes program to skip plotting of raw data, saves time.
multiple - Use for 2 or more disconnected regions (e.g., multiple=3)
unc_data - array of uncertainties of values in image from SXT_PREP
skip - array of indices to be excluded from analysis. This is
a good way to eliminate unwanted features that can be
identified with a "where" analysis before using sector_avg.
sector = [begin_angle,end_angle,angle_step]
measured clockwise in degrees from CCD vertical
/noqx - causes the program to complete without pauses and questions.
and shows no data plots.
OPTIONAL KEYWORD OUTPUT
azipix = number of pixels at each R position.
Needed for renormalizing emission measure after SXT_TEEM is run.
sectparam = structure with angles, fitting parameters, and number
of valid pixels in each sector for sector analysis. The parameter
sectparam.angle refers to the middle of the sector.
** Structure <45f20088>, 4 tags, length=16, refs=2:
ANGLE FLOAT 228.000
CONST FLOAT 6.78359
SLOPE FLOAT -1.99499
NUMPIX INT 146
PROGRAMS CALLED
sfd_comp, cursor, plots, plusmark, gt_corner, wdefroi, where,
findgen, rebin, reform, sqrt, wdef, xyouts, plot, fix, max,
total, float, n_elements, indgen, gt_res, alog10, poly_fit, print
sector_bound
HISTORY
LWA 26-June-94, wrote original program.
LWA 2-Dec-94, added capability for non-suncenter origin.
LWA 26-Jan-95, cleaned up header and fixed /new omission.
Changed order of variables in call.
LWA 29-Jan-95, added keyword for disconnected regions.
LWA 16-Mar-95, replaced sxt_cen with -gt_corner(index,/from_sc)
and made index a keyword.
LWA 23-Mar-95, Corrected to include negative values in averages.
and added keyword /noplot.
LWA 6-Apr-95, Added computation of uncertainties. Eliminated "img".
LWA 8-Apr-95, Added fullsig and unc_fullsig and changed "out" to "sig".
LWA 1-Jun-95, Added skip keyword.
LWA 14-Jun-95, Changed name to AZIMUTH_AVG.PRO
Added sector averaging (What a mess!)
LWA 5-Jul-95, Corrected header.
LWA 28-nov-95, Added noqx keyword.
LWA 29-Nov-95, Fixed array dimensions and fit_param for sectoring.
LWA 30-Nov-95, Fixed rmax-rmin dimensioning problem.
LWA 25-Oct=96, Fixed problem of missing nxy if no skip.
LWA 6-Apr-01, Added sector parameter, sectparam, output.
LWA 8-Apr-01, Added numpix to sectparam.
Added test for sectors with no data.
Incorporated keyword azipix, making AZIMUTH_AVG obsolete.
LWA 23-May-01, Split if test on fitparam and nii to avoid error when
not fitting data. Added needed fitparam test.
LWA 25-May-01, Moved sectparam.numpix out of fitparam check.
LWA 28-May-01, Updated header.
[Previous]
[Next]
NAME:
sector_bound
PURPOSE
To return the vector of indices for a sector of angular
width theta1-theta0, centered at x,y within a rectangular
array of dimensions nx,ny.
If the sector includes one or more corners in the array
the vector includes the area out to the corners.
CALLING SEQUENCE
xy=sector_bound(theta0,theta1,x,y,nx,ny)
INPUT
Measuring CW from up (north on CCD)
theta0 - angle (degrees) defining small-angle boundary of sector
theta1 - angle (degrees) defining large-angle boundary of sector
x, y, - coordinates of origin
nx, ny - dimensions of rectangular array
OUTPUT
xy - vector of indices of pixels within sector
RESTRICTIONS
Do not use a theta range greater than 180 degrees.
HISTORY
LWA, 14-Jun-95, written for use in azimuth_avg.pro
LWA, 28-Nov-95, corrected error in (case 3:) equation.
corrected error in (case 2:) equation.
LWA, 12-Apr-01, corrected and clarified header.
CALLED BY
sector_avg, sxt_scatwings, xy_lwa
[Previous]
[Next]
NAME:
SEEIGN_CHECKER
PURPOSE:
Estimate seeing of ground-based data to pick up good seeing
data.
CALLING SEQUENCE:
SEEING_CHECKER
INPUTS:
file - LaPalma file name, such as
"/data2/soup/le132f18w6563lcn####.rigd"
nst - the first image number, which will be inserted in ####.
nend - the last image number.
OPTIONAL INPUTS:
subarea - the area size for the seeing measure. The area is
centered in images. The defualt - 384.
OUTPUTS:
meanint - mean intensity
seeing - Seeing measure
CALLS: ***
FNS, RD_LP, SEEING_CHECKER
NOTE:
results are saved in the image number position. For instanse,
an image ####=0010 is stored in seeing(10), meanint(10), even if
nst is not set to 1.
PROCEDURES:
Calculate mean intensity and absolute mean differential intensity
defined as follows:
meanint= total(subdata)/n_elements(subdata)
diff= subdata(1:*,*)-subdata(0:subarea-2, *)
mean = total(abs(diff))/n_elements(diff)
seeing= mean / meanint
HISTORY:
18-June-94 T.Shimizu written with referrence of Dr.Shine's
ANA software.
[Previous]
[Next]
NAME:
SEEIGN_CHECKER2
PURPOSE:
Estimate seeing of ground-based data to pick up good seeing
data.
CALLING SEQUENCE:
SEEING_CHECKER2, data, meanint, seeing
INPUTS:
data - LaPalma image cube
OPTIONAL INPUTS:
subarea - the area size for the seeing measure. The area is
centered in images. The defualt - Full field.
OUTPUTS:
meanint - mean intensity
seeing - Seeing measure
PROCEDURES:
Calculate mean intensity and absolute mean differential intensity
defined as follows:
meanint= total(subdata)/n_elements(subdata)
diff= subdata(1:*,*)-subdata(0:subarea-2, *)
mean = total(abs(diff))/n_elements(diff)
seeing= mean / meanint
CALLS: ***
SEEING_CHECKER2
HISTORY:
15-July-94 T.Shimizu written with referrence of Dr.Shine's
ANA software.
[Previous]
[Next]
NAME:
SEL_AR
PURPOSE:
Finds spr data for an active region, by "tracking" a position on the sun
as it rotates and finding data close to the active region. It will
also work for sfr data, but FFI's are always selected so it isn't
very useful for FFI's.
CATEGORY:
CALLING SEQUENCE:
sel_ar, infil, roadmap, ss, lon=lon, lat=lat, date=date
INPUTS:
lon = reference longitude of the active region, degrees, west positive
lat = reference longitude of the active region, degrees, north positive
date = reference date for the lon,lat coordinates,
e.g. '6-DEC-91 11:41:52'
OPTIONAL INPUT PARAMETERS:
roadmap = If present, roadmap passed is used instead of reading it in.
If it is not defined on input, the roadmap will be passed back
in this variable. If roadmap is set on input, infil must
also be set.
infil = If set to a string array on input, the file names in "files"
will be searched. Otherwise all the data in the current path
will be checked(!). On output, the files variable will be
replaced by the actual list of files searched.
ss = If defined on input, ss is used for initial data selection.
KEYWORD PARAMETERS
reset = Ignore files,roadmap if they are already defined (force data
to be read in)
arcmin = specifies how close the field-of-view center should
be to the active region (in arc minutes), default is 0. The
size of the image is added to the arcmin value, so the default
of zero implies that the point being tracked must be just
inside the FOV. Negative values will force the AR well
insided the FOV.
cdir_only = if set, look only at the files in the current directory
OUTPUTS:
ss = array of the image indices which are close to the AR
CALLS: ***
DATA_PATHS, DIFF_ROT [1], DIFF_ROT [2], Ex2Int [1], Ex2Int [2], HEL2ARCMIN [1]
HEL2ARCMIN [2], Rd_Roadmap [2], anytim2ex [1], anytim2ex [2], file_list [1]
file_list [2], gt_day [1], gt_day [2], gt_fov_center, gt_pix_size, gt_res
gt_shape_cmd, gt_time [1], gt_time [2], rd_roadmap [1], where_arr [1]
where_arr [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
FFI images are *always* selected. Only PFI images are checked for a
position which matches the location of the active region.
PROCEDURE:
The data are selected based upon their position (including differential
rotation).
No selection is done for different filters etc. I assume this
will come at some later step in the analysis process.
EXAMPLES:
IDL> sel_ar,infil,roadmap,ss,lon=-2.,lat=19.,date='9-DEC-91 00:00:00'
MODIFICATION HISTORY:
T. Metcalf May 04, 1992
TRM Feb 27, 1993 Since gt_fov_center.pro was updated, this
routine also needed to be updated. It now
works with the new gt_fov_center.
[Previous]
[Next]
NAME:
SEL_BSC
PURPOSE:
Select wavelength and flux arrays for given channels.
CALLING SEQUENCE:
SEL_BSC,BSC_INDEX,BSC_DATA,NINDEX,NDATA,WAVE,FLUX,EFLUX ; All Channels
SEL_BSC,BSC_INDEX,BSC_DATA,NINDEX,NDATA,WAVE,FLUX,EFLUX,CHAN=CHAN,SS=SS
SEL_BSC,BSC_INDEX,BSC_DATA,NINDEX,NDATA,WAVE,FLUX,EFLUX,CHAN=CHAN,FIT=FIT
INPUTS:
BSC_INDEX - BSC index structure
BSC_DATA - BSC data structure
OUTPUTS:
NINDEX - BSC index structure for selected channels
NDATA - BSC data structure for selected channels
WAVE - Array of wavelengths
FLUX - Array of fluxes (ph cm-1 s-1 Ang-1)
EFLUX - Uncertainty on FLUX
OPTIONAL KEYWORDS:
CHAN (in) - BCS channel (def is all)
FIT (out) - fitted synthetic spectrum (total spectrum)
SFIT (out) - secondary spectrum = (total - primary)
FWAVE (out) - computed wavelengths for fitted spectrum
SS (out) - indicies matching selected data
TSTART (in) - start time to extract (UTPLOT format)
TEND (in) - end time to extract
COUNTS (out) - total accumulated observed spectra (counts/bin)
BIN (out) - original detector bins
CALLS: ***
BSC_CHECK [1], BSC_CHECK [2], BSC_ERRCAL [1], BSC_ERRCAL [2], BSC_TIM2DSET
BSC_VALID, CHKARG, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
GT_BSC_CHAN [1], GT_BSC_CHAN [2], GT_BSC_FLUX, GT_BSC_WAVE [1], GT_BSC_WAVE [2]
chktag, delvarx [5]
CALLED BY:
BSC_RASTER, CV_BSC2BSD, GET_BSC, LC_BSC, PLOT_BSC [1], PLOT_BSC [2], WBSC [1]
WBSC [2], WBSC_LTC_EV [1], WBSC_LTC_EV [2], bsc_spec_plot [1], bsc_spec_plot [2]
cal_bsc, fit_bsc, fit_bsc_as, map_bsc
HISTORY:
11-sep-93, D. Zarro (ARC) and J. Lemen (LPARL), Written.
Oct'93, Zarro (ARC), added TSTART and TEND keywords.
8-Nov-93, Zarro (ARC), added SFIT keyword
13-Dec-93, Zarro, changed TSTART, TEND arguments to keywords in
BSC_TIM2DSET.
20-Dec-93, Zarro, added check for ncomp_fit=2 before extracting SFIT
9 -Apr-94, Zarro, added check for COUNTS field
12 -May-94, Zarro, added BIN keyword to return original BIN arrays,
also fixed potential bugs in SS and NBIN usage.
7,9-Jan-95, Zarro, found and fixed another potential bug in SS.
[Previous]
[Next]
NAME:
sel_dc_image
PURPOSE:
Given an index or roadmap structure, match the closest dark
current image for that exposure
CALLING SEQUENCE:
sel_dc_image, index(3), dset, imap
sel_dc_image, roadmap, dset, imap
sel_dc_image, xxx, dset, times=times, res=res, dpe=dpe
sel_dc_image, xxx, dset, times='1-sep-92 1:00', res=0, dpe=15
INPUT:
struct_in - An index or roadmap structure. If the input
is an array, then data will be a matrix and it
is necessary to use the output variable "imap"
to match up which dark frame goes with which input
image. This is done so that unnessary duplication
of the same image is not done.
If the image was taken when the CCD was warm, then
the index should be passed in so that the routine
can match the temperature also.
CALLS: ***
GET_INFO2, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], UNIQ [1], UNIQ [2], UNIQ [3]
anytim2ints [1], anytim2ints [2], file_list [1], file_list [2], gt_corner, gt_dpe
gt_pfi_ffi, gt_res, gt_shape, gt_temp_ccd, int2secarr [1], int2secarr [2]
mk_dset_str [1], mk_dset_str [2], rd_roadmap [1], sel_timrange [1]
sel_timrange [2], ssw_time_compare, tbeep [1], tbeep [2], tbeep [3]
CALLED BY:
get_dc_image [2], get_dc_image [3], reget_dc_image
OPTIONAL KEYWORD INPUT:
times - MANUAL METHOD: A list of input times (any of 3 standard
formats)
res - MANUAL METHOD: The resolution required (0=full res,
1=half res, 2=quarter res)
dpe - MANUAL METHOD: The DPE level (exposure level)
temp - MANUAL METHOD: The CCD temperature in degrees. If not
passed, it will use -21.0 C
long - If set, then match any DPEs OVER the minimum DPE value
for the input resolution (FR,HR,QR = 21, 23, 19)
(not the DPE value closest to it)
TODO - this definition has changed
short - If set, then match any DPEs UNDER the maximum DPE value
for the input resolution (FR,HR,QR = 13, 13, 13)
(not the DPE value closest to it)
TODO - this definition has changed
mmdpe - An array with min or maximum DPE value to search for.
Used in conjuction with the /LONG option
OUTPUT:
file_use- The names of the SDC/SDW files that are to be used for
the selected dark frames (subset of "dc_infil")
dset - The MK_DSET_STR output listing the dataset and file
number of the unique dark images.
Use "imap" to figure which dark image to use for which
input image.
imap - A list of indicies telling which image in "data" to
use for each "struct_in" image. The output is an
array the same length as "struct_in" with values that
go from 0 to the number of dark images minus one.
KEYWORD OUTPUT:
match_qual - The quality of the match. It is a structure with
the following fields.
.dpe = # of seconds in exposure away from the actual
0 is perfect match, positive means DC
is longer exposure than requested.
.time = the number of days from the requested day.
positive is for DC images taken past
the time of the input image
.temp = the number of degress that the match is off
.dpeval = the DPE value matched
METHOD:
The program will try to make an exact match to the exposure
level passed. If it cannot match, it will take the next exposure
larger which is available.
GET_DC_IMAGE can be called manually by passing "times", "res"
and "dpe" using the keywords. All three need to be passed, however
it is possible to pass an array of times, but have res or dpe
be a scalar.
HISTORY:
Written 24-Aug-93 by M.Morrison (using GET_DC_IMAGE as starting point)
Differences from GET_DC_IMAGE:
* Combined GET_DC_WARM and GET_DC_IMAGE
* Match on exposure duration in seconds, not DPE value
25-Aug-93 (MDM) - Added "dc_filidx" to speed things up
1-Sep-93 (MDM) - Corrected a typo "dc_filidx2"
16-Dec-93 (MDM) - Modified to break images into two categories
Those taken before 13-Nov-92 and those taken
after. Do not cross the line.
26-Jan-94 (MDM) - Corrected error when trying to get SDW files and
they do not exist.
- Modified the logic so that manual passing of the
temperature works properly
31-Jan-94 (MDM) - Corrected 26-Jan-94 patch - there are cases when
the roadmap is passed in, which does not have the
temperature
11-May-94 (SLF) - subscript protection for good(ss)
15-Aug-94 (MDM) - Try to add some protection in the case when
the execution is interupted in the middle of
reading the SDC roadmaps
29-Nov-94 (MDM) - Modified the logic so that the closest image
above and below the desired exposure duration
are used. Previously, it used a short exposure
and a medium or long exposure no matter what the
input exposure duration was.
30-Nov-94 (MDM) - Fairly large change to the technique used to find
a match. It MUST be within +/- 30 days now, and
it still minimizes the DPE error and temperature
error and finds the image closest in time with
those minimum error.
27-Feb-95 (MDM) - Modified to allow a large temperature error when
no SDW data is available.
1-Mar-95 (MDM) - Patched error which occured during warm CCD and
when /INTERPOLATE is used.
15-May-95 (MDM) - Modified to be able to use PFI images as the
input (slight modification to the 288 line number
starting corner of FR images code).
05-Feb-98 (TRM) - Modified definition of /short so that and equal
DPE does not match for the short case
8-Feb-98 (SLF) - added a '/cd' to file_list call
(avoid no file found message when #files gets big
5-Jan-99 (SLF) - fixed ancient y2k problem
02-Dec-02 (TRM) - Change +/- 7 day search to +/- 10 day search
30-Mar-04 (LWA) - Increased SDC max_temperr to 6 degrees for time prior
to CCD cooling ('2-Oct-91 09:00').
Corrected error in 14-Nov-92 test logic.
Changed 2 intarr to lonarr to cope with SDC_06.
[Previous]
[Next]
NAME:
sel_dc_image
PURPOSE:
Given an index or roadmap structure, match the closest dark
current image for that exposure
CALLING SEQUENCE:
sel_dc_image, index(3), dset, imap
sel_dc_image, roadmap, dset, imap
sel_dc_image, xxx, dset, times=times, res=res, dpe=dpe
sel_dc_image, xxx, dset, times='1-sep-92 1:00', res=0, dpe=15
INPUT:
struct_in - An index or roadmap structure. If the input
is an array, then data will be a matrix and it
is necessary to use the output variable "imap"
to match up which dark frame goes with which input
image. This is done so that unnessary duplication
of the same image is not done.
If the image was taken when the CCD was warm, then
the index should be passed in so that the routine
can match the temperature also.
CALLS: ***
GET_INFO2, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], UNIQ [1], UNIQ [2], UNIQ [3]
anytim2ints [1], anytim2ints [2], file_list [1], file_list [2], gt_corner, gt_dpe
gt_pfi_ffi, gt_res, gt_shape, gt_temp_ccd, int2secarr [1], int2secarr [2]
mk_dset_str [1], mk_dset_str [2], rd_roadmap [1], sel_timrange [1]
sel_timrange [2], ssw_time_compare, tbeep [1], tbeep [2], tbeep [3]
CALLED BY:
get_dc_image [2], get_dc_image [3], reget_dc_image
OPTIONAL KEYWORD INPUT:
times - MANUAL METHOD: A list of input times (any of 3 standard
formats)
res - MANUAL METHOD: The resolution required (0=full res,
1=half res, 2=quarter res)
dpe - MANUAL METHOD: The DPE level (exposure level)
temp - MANUAL METHOD: The CCD temperature in degrees. If not
passed, it will use -21.0 C
long - If set, then match any DPEs OVER the minimum DPE value
for the input resolution (FR,HR,QR = 21, 23, 19)
(not the DPE value closest to it)
TODO - this definition has changed
short - If set, then match any DPEs UNDER the maximum DPE value
for the input resolution (FR,HR,QR = 13, 13, 13)
(not the DPE value closest to it)
TODO - this definition has changed
mmdpe - An array with min or maximum DPE value to search for.
Used in conjuction with the /LONG option
OUTPUT:
file_use- The names of the SDC/SDW files that are to be used for
the selected dark frames (subset of "dc_infil")
dset - The MK_DSET_STR output listing the dataset and file
number of the unique dark images.
Use "imap" to figure which dark image to use for which
input image.
imap - A list of indicies telling which image in "data" to
use for each "struct_in" image. The output is an
array the same length as "struct_in" with values that
go from 0 to the number of dark images minus one.
KEYWORD OUTPUT:
match_qual - The quality of the match. It is a structure with
the following fields.
.dpe = # of seconds in exposure away from the actual
0 is perfect match, positive means DC
is longer exposure than requested.
.time = the number of days from the requested day.
positive is for DC images taken past
the time of the input image
.temp = the number of degress that the match is off
.dpeval = the DPE value matched
METHOD:
The program will try to make an exact match to the exposure
level passed. If it cannot match, it will take the next exposure
larger which is available.
GET_DC_IMAGE can be called manually by passing "times", "res"
and "dpe" using the keywords. All three need to be passed, however
it is possible to pass an array of times, but have res or dpe
be a scalar.
HISTORY:
Written 24-Aug-93 by M.Morrison (using GET_DC_IMAGE as starting point)
Differences from GET_DC_IMAGE:
* Combined GET_DC_WARM and GET_DC_IMAGE
* Match on exposure duration in seconds, not DPE value
25-Aug-93 (MDM) - Added "dc_filidx" to speed things up
1-Sep-93 (MDM) - Corrected a typo "dc_filidx2"
16-Dec-93 (MDM) - Modified to break images into two categories
Those taken before 13-Nov-92 and those taken
after. Do not cross the line.
26-Jan-94 (MDM) - Corrected error when trying to get SDW files and
they do not exist.
- Modified the logic so that manual passing of the
temperature works properly
31-Jan-94 (MDM) - Corrected 26-Jan-94 patch - there are cases when
the roadmap is passed in, which does not have the
temperature
11-May-94 (SLF) - subscript protection for good(ss)
15-Aug-94 (MDM) - Try to add some protection in the case when
the execution is interupted in the middle of
reading the SDC roadmaps
29-Nov-94 (MDM) - Modified the logic so that the closest image
above and below the desired exposure duration
are used. Previously, it used a short exposure
and a medium or long exposure no matter what the
input exposure duration was.
30-Nov-94 (MDM) - Fairly large change to the technique used to find
a match. It MUST be within +/- 30 days now, and
it still minimizes the DPE error and temperature
error and finds the image closest in time with
those minimum error.
27-Feb-95 (MDM) - Modified to allow a large temperature error when
no SDW data is available.
1-Mar-95 (MDM) - Patched error which occured during warm CCD and
when /INTERPOLATE is used.
15-May-95 (MDM) - Modified to be able to use PFI images as the
input (slight modification to the 288 line number
starting corner of FR images code).
05-Feb-98 (TRM) - Modified definition of /short so that and equal
DPE does not match for the short case
8-Feb-98 (SLF) - added a '/cd' to file_list call
(avoid no file found message when #files gets big
5-Jan-99 (SLF) - fixed ancient y2k problem
02-Dec-02 (TRM) - Change +/- 7 day search to +/- 10 day search
[Previous]
[Next]
NAME:
sel_dc_image
PURPOSE:
Given an index or roadmap structure, match the closest dark
current image for that exposure
CALLING SEQUENCE:
sel_dc_image, index(3), dset, imap
sel_dc_image, roadmap, dset, imap
sel_dc_image, xxx, dset, times=times, res=res, dpe=dpe
sel_dc_image, xxx, dset, times='1-sep-92 1:00', res=0, dpe=15
INPUT:
struct_in - An index or roadmap structure. If the input
is an array, then data will be a matrix and it
is necessary to use the output variable "imap"
to match up which dark frame goes with which input
image. This is done so that unnessary duplication
of the same image is not done.
If the image was taken when the CCD was warm, then
the index should be passed in so that the routine
can match the temperature also.
CALLS: ***
GET_INFO2, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], UNIQ [1], UNIQ [2], UNIQ [3]
anytim2ints [1], anytim2ints [2], file_list [1], file_list [2], gt_corner, gt_dpe
gt_pfi_ffi, gt_res, gt_shape, gt_temp_ccd, int2secarr [1], int2secarr [2]
mk_dset_str [1], mk_dset_str [2], rd_roadmap [1], sel_timrange [1]
sel_timrange [2], ssw_time_compare, tbeep [1], tbeep [2], tbeep [3]
CALLED BY:
get_dc_image [2], get_dc_image [3], reget_dc_image
OPTIONAL KEYWORD INPUT:
times - MANUAL METHOD: A list of input times (any of 3 standard
formats)
res - MANUAL METHOD: The resolution required (0=full res,
1=half res, 2=quarter res)
dpe - MANUAL METHOD: The DPE level (exposure level)
temp - MANUAL METHOD: The CCD temperature in degrees. If not
passed, it will use -21.0 C
long - If set, then match any DPEs OVER the minimum DPE value
for the input resolution (FR,HR,QR = 21, 23, 19)
(not the DPE value closest to it)
TODO - this definition has changed
short - If set, then match any DPEs UNDER the maximum DPE value
for the input resolution (FR,HR,QR = 13, 13, 13)
(not the DPE value closest to it)
TODO - this definition has changed
mmdpe - An array with min or maximum DPE value to search for.
Used in conjuction with the /LONG option
OUTPUT:
file_use- The names of the SDC/SDW files that are to be used for
the selected dark frames (subset of "dc_infil")
dset - The MK_DSET_STR output listing the dataset and file
number of the unique dark images.
Use "imap" to figure which dark image to use for which
input image.
imap - A list of indicies telling which image in "data" to
use for each "struct_in" image. The output is an
array the same length as "struct_in" with values that
go from 0 to the number of dark images minus one.
KEYWORD OUTPUT:
match_qual - The quality of the match. It is a structure with
the following fields.
.dpe = # of seconds in exposure away from the actual
0 is perfect match, positive means DC
is longer exposure than requested.
.time = the number of days from the requested day.
positive is for DC images taken past
the time of the input image
.temp = the number of degress that the match is off
.dpeval = the DPE value matched
METHOD:
The program will try to make an exact match to the exposure
level passed. If it cannot match, it will take the next exposure
larger which is available.
GET_DC_IMAGE can be called manually by passing "times", "res"
and "dpe" using the keywords. All three need to be passed, however
it is possible to pass an array of times, but have res or dpe
be a scalar.
HISTORY:
Written 24-Aug-93 by M.Morrison (using GET_DC_IMAGE as starting point)
Differences from GET_DC_IMAGE:
* Combined GET_DC_WARM and GET_DC_IMAGE
* Match on exposure duration in seconds, not DPE value
25-Aug-93 (MDM) - Added "dc_filidx" to speed things up
1-Sep-93 (MDM) - Corrected a typo "dc_filidx2"
16-Dec-93 (MDM) - Modified to break images into two categories
Those taken before 13-Nov-92 and those taken
after. Do not cross the line.
26-Jan-94 (MDM) - Corrected error when trying to get SDW files and
they do not exist.
- Modified the logic so that manual passing of the
temperature works properly
31-Jan-94 (MDM) - Corrected 26-Jan-94 patch - there are cases when
the roadmap is passed in, which does not have the
temperature
11-May-94 (SLF) - subscript protection for good(ss)
15-Aug-94 (MDM) - Try to add some protection in the case when
the execution is interupted in the middle of
reading the SDC roadmaps
29-Nov-94 (MDM) - Modified the logic so that the closest image
above and below the desired exposure duration
are used. Previously, it used a short exposure
and a medium or long exposure no matter what the
input exposure duration was.
30-Nov-94 (MDM) - Fairly large change to the technique used to find
a match. It MUST be within +/- 30 days now, and
it still minimizes the DPE error and temperature
error and finds the image closest in time with
those minimum error.
27-Feb-95 (MDM) - Modified to allow a large temperature error when
no SDW data is available.
1-Mar-95 (MDM) - Patched error which occured during warm CCD and
when /INTERPOLATE is used.
15-May-95 (MDM) - Modified to be able to use PFI images as the
input (slight modification to the 288 line number
starting corner of FR images code).
[Previous]
[Next]
Name: sel_fileinfo
Purpose: break selsis file names into components / information
Input Parameters:
filenames - selsis filenames (yymmddhhmmSWRO.[fts.Z])
S=source, W=wavelength, R=resolution, O=orientation
Output Parameters:
imgtimes - image times in Yohkoh standard string
source - Source character (or descriptive string if /convert set)
wavelength - Wavelength character (or descriptive string if /conver set)
Keyword Parameters:
convert - if set, convert characters to descriptive strings
ynames (out) - converted Yohkoh filenames
CALLS: ***
fid2ex [1], fid2ex [2], fmt_tim [1], fmt_tim [2]
CALLED BY:
get_selsis
History:
2-Mar-95 (SLF)
3-Mar-95 (SLF) - add ynames
13-jan-99 (PGS) - modified to accept new four year file discriptors (y2k)
[Previous]
[Next]
PROGRAM:
sel_img
PURPOSE
Select some images from DATA and display them in lines
and rows.
A sunspot contour is overplotted.
For 1x1 OR data, each image is rebinned into 256x256 and
displayed in 1024x768 window.
For data of which FOV is larger than that, 96x96 part
is cut from each image and rebinned into 384x384. Then
they are displayed in 1152x768 window.
Space Craft jittering is corrected.
CALLING SEQUENCE
sel_img,data,index
INPUTS
data, index = that of taken by YODAT.
DATA must be include sunspot data.
HISTORY
2 Feb., 1993 Goro Kawai
CALLS:
[Previous]
[Next]
NAME:
sel_leak_image
PURPOSE:
Select the proper leak image required for correction
INPUT:
item - Index or roadmap
OUTPUT:
leak_files- The names of the leak files
dsets - It is the same length as "item". The value is -1 if
no leak image is available.
CALLED BY:
get_leak_image [1], get_leak_image [2], get_leak_image [3], leak_sub [1]
leak_sub [2], leak_sub [3], sxt_prep [1], sxt_prep [2], sxt_prep [3]
HISTORY:
Written 27-Aug-93 by M.Morrison
13-Sep-93 (MDM) - Replaced Al.1 Oct-92 image file sfc921127.0947; with sfc921125.1708 (actually the same image,
the previous file had the wrong index/label).
15-Sep-93 (MDM) - Modified the logic so that a ND leak image
is not used to correct an OPEN x-ray image.
- Added 5 leak images which used ND filter
19-Nov-93 (MDM) - Modification to not even bother checking for
SFC files if data is pre-Nov-92.
10-Dec-94 (SLF) - major rewrite - add hook for pointing
(use match_index.pro for image selection)
(no explicit file names - check all matching SFC)
3-Jan-94 (SLF) - pre-define output for pre-Nov-1992 data
22-aug-95 (SLF) - check "leak era" and select appropriate image
19-Apr-96 (GLS) - Corrected a bug in the assignment of indices to
DSETS from the values returned by MATCH_INDEX.
- Corrected 'No leak image' warning code
11-oct-96 (SLF) - add /ccdtemp switch to match_index call
20-Jul-98 (SLF) - add /cd to file_list (avoid 'arg list too long')
1-Feb-99 (SLF) - auto backup to previous era (WARN)
26-feb-99 (SLF) - remove hard coded leak era start (use get_yo_dates)
inhibit auto-era-backup logic
1-Mar-99 (SLF) - eliminate bogus 'no leak image' for files
spanning era 0 (none required) and era1
4-feb-04 (SLF) - remote CCD Temp tolerance requirement in call
to match_index
CALLS: ***
BOX_MESSAGE, RD_SDA [1], RD_SDA [2], RD_SDA [3], Rd_Roadmap [2], file_list [1]
file_list [2], fmt_tim [1], fmt_tim [2], get_info [1], get_info [2], get_info [3]
get_info [4], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3]
match_index [1], match_index [2], rd_roadmap [1], sel_timrange [1]
sel_timrange [2], ssw_deltat, ut_time [1], ut_time [2]
Common Blocks:
sel_leak_image (files & roadmaps)
sel_leak_image1 (index records)
[Previous]
[Next]
NAME:
sel_leak_image
PURPOSE:
Select the proper leak image required for correction
INPUT:
item - Index or roadmap
OUTPUT:
leak_files- The names of the leak files
dsets - It is the same length as "item". The value is -1 if
no leak image is available.
CALLED BY:
get_leak_image [1], get_leak_image [2], get_leak_image [3], leak_sub [1]
leak_sub [2], leak_sub [3], sxt_prep [1], sxt_prep [2], sxt_prep [3]
HISTORY:
Written 27-Aug-93 by M.Morrison
13-Sep-93 (MDM) - Replaced Al.1 Oct-92 image file sfc921127.0947; with sfc921125.1708 (actually the same image,
the previous file had the wrong index/label).
15-Sep-93 (MDM) - Modified the logic so that a ND leak image
is not used to correct an OPEN x-ray image.
- Added 5 leak images which used ND filter
19-Nov-93 (MDM) - Modification to not even bother checking for
SFC files if data is pre-Nov-92.
10-Dec-94 (SLF) - major rewrite - add hook for pointing
(use match_index.pro for image selection)
(no explicit file names - check all matching SFC)
3-Jan-94 (SLF) - pre-define output for pre-Nov-1992 data
22-aug-95 (SLF) - check "leak era" and select appropriate image
19-Apr-96 (GLS) - Corrected a bug in the assignment of indices to
DSETS from the values returned by MATCH_INDEX.
- Corrected 'No leak image' warning code
11-oct-96 (SLF) - add /ccdtemp switch to match_index call
20-Jul-98 (SLF) - add /cd to file_list (avoid 'arg list too long')
1-Feb-99 (SLF) - auto backup to previous era (WARN)
26-feb-99 (SLF) - remove hard coded leak era start (use get_yo_dates)
inhibit auto-era-backup logic
1-Mar-99 (SLF) - eliminate bogus 'no leak image' for files
spanning era 0 (none required) and era1
Common Blocks:
sel_leak_image (files & roadmaps)
sel_leak_image1 (index records)
[Previous]
[Next]
NAME:
sel_leak_image
PURPOSE:
Select the proper leak image required for correction
INPUT:
item - Index or roadmap
OUTPUT:
leak_files- The names of the leak files
dsets - It is the same length as "item". The value is -1 if
no leak image is available.
CALLED BY:
get_leak_image [1], get_leak_image [2], get_leak_image [3], leak_sub [1]
leak_sub [2], leak_sub [3], sxt_prep [1], sxt_prep [2], sxt_prep [3]
HISTORY:
Written 27-Aug-93 by M.Morrison
13-Sep-93 (MDM) - Replaced Al.1 Oct-92 image file sfc921127.0947; with sfc921125.1708 (actually the same image,
the previous file had the wrong index/label).
15-Sep-93 (MDM) - Modified the logic so that a ND leak image
is not used to correct an OPEN x-ray image.
- Added 5 leak images which used ND filter
19-Nov-93 (MDM) - Modification to not even bother checking for
SFC files if data is pre-Nov-92.
10-Dec-94 (SLF) - major rewrite - add hook for pointing
(use match_index.pro for image selection)
(no explicit file names - check all matching SFC)
3-Jan-94 (SLF) - pre-define output for pre-Nov-1992 data
22-aug-95 (SLF) - check "leak era" and select appropriate image
19-Apr-96 (GLS) - Corrected a bug in the assignment of indices to
DSETS from the values returned by MATCH_INDEX.
- Corrected 'No leak image' warning code
11-oct-96 (SLF) - add /ccdtemp switch to match_index call
20-Jul-98 (SLF) - add /cd to file_list (avoid 'arg list too long')
1-Feb-99 (SLF) - auto backup to previous era (WARN)
26-feb-99 (SLF) - remove hard coded leak era start (use get_yo_dates)
inhibit auto-era-backup logic
1-Mar-99 (SLF) - eliminate bogus 'no leak image' for files
spanning era 0 (none required) and era1
CALLS: ***
BOX_MESSAGE, RD_SDA [1], RD_SDA [2], RD_SDA [3], Rd_Roadmap [2], file_list [1]
file_list [2], fmt_tim [1], fmt_tim [2], get_info [1], get_info [2], get_info [3]
get_info [4], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3]
match_index [1], match_index [2], rd_roadmap [1], sel_timrange [1]
sel_timrange [2], ssw_deltat, ut_time [1], ut_time [2]
Common Blocks:
sel_leak_image (files & roadmaps)
sel_leak_image1 (index records)
[Previous]
[Next]
NAME:
sel_leak_image
PURPOSE:
Select the proper leak image required for correction
INPUT:
item - Index or roadmap
OUTPUT:
leak_files- The names of the leak files
dsets - It is the same length as "item". The value is -1 if
no leak image is available.
CALLED BY:
get_leak_image [1], get_leak_image [2], get_leak_image [3], leak_sub [1]
leak_sub [2], leak_sub [3], sxt_prep [1], sxt_prep [2], sxt_prep [3]
HISTORY:
Written 27-Aug-93 by M.Morrison
13-Sep-93 (MDM) - Replaced Al.1 Oct-92 image file sfc921127.0947; with sfc921125.1708 (actually the same image,
the previous file had the wrong index/label).
15-Sep-93 (MDM) - Modified the logic so that a ND leak image
is not used to correct an OPEN x-ray image.
- Added 5 leak images which used ND filter
19-Nov-93 (MDM) - Modification to not even bother checking for
SFC files if data is pre-Nov-92.
10-Dec-94 (SLF) - major rewrite - add hook for pointing
(use match_index.pro for image selection)
(no explicit file names - check all matching SFC)
3-Jan-94 (SLF) - pre-define output for pre-Nov-1992 data
22-aug-95 (SLF) - check "leak era" and select appropriate image
19-Apr-96 (GLS) - Corrected a bug in the assignment of indices to
DSETS from the values returned by MATCH_INDEX.
- Corrected 'No leak image' warning code
11-oct-96 (SLF) - add /ccdtemp switch to match_index call
CALLS: ***
BOX_MESSAGE, RD_SDA [1], RD_SDA [2], RD_SDA [3], Rd_Roadmap [2], file_list [1]
file_list [2], fmt_tim [1], fmt_tim [2], get_info [1], get_info [2], get_info [3]
get_info [4], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3]
match_index [1], match_index [2], rd_roadmap [1], sel_timrange [1]
sel_timrange [2], ssw_deltat, ut_time [1], ut_time [2]
Common Blocks:
sel_leak_image (files & roadmaps)
sel_leak_image1 (index records)
[Previous]
[Next]
Name:
Sel_QS
Purpose:
Given a time, return the indicie for the QS that was valid
for that time.
Input:
struct - The QS structure to find the valid time for
intim - A structure that has .TIME and .DAY fields
Output:
Subscript of the QS record that should be used. If there
is no record with a valid time range, a -1 is returned.
CALLED BY:
ANAL_BCS_PHA, ANAL_STIMS
Example:
ss = sel_qs(qs.instr, index(10).gen)
ss = sel_qs(qs.instr, roadmap(1000))
ss = sel_qs(qs.general1, roadmap)
History:
Written Fall '91 by M.Morrison
[Previous]
[Next]
NAME: sel_region
PURPOSE: To allow interactive selection of a rectangular region.
METHOD: In input display the image (if not already displayed),
display it, rebined by a integer factor if desired, and
then call GET_BOXCORN. The units are in inout image pixels.
If the image is passed in then a new window is opened and
later closed.
CALLING SEQUENCE: xyvec=sel_region([image][,factor][,/close][,/table])
PARAMETERS: image image you want to select region from.
factor a multiplication factor for display, INT.
KEYWORDS: close close the display window when finished. This only
works you passed in the image.
table query for color table change
CALLS: ***
GET_BOXCORN, XLOADCT [1], XLOADCT [2], XLOADCT [3], draw_boxcorn [1]
draw_boxcorn [2], new_win, yesnox [1], yesnox [2]
HISTORY: Drafted by A.Mcallister, mar-18-93.
[Previous]
[Next]
NAME:
SELECT_24HR
PURPOSE:
Uses cursors to select an interval on the 24hr/4 panel plot
CALLING SEQUENCE:
SELECT_24HR,range
INPUTS:
OUTPUTS:
range 7*2 element time array contains start and stop times
this is compatible with RUN_MKBSD
OPTIONAL OUTPUTS:
CALLS: ***
CURSOR_4X6HR, Int2Ex [1], Int2Ex [2], fid2ex [1], fid2ex [2], fmt_tim [1]
fmt_tim [2], wfile
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
RDB 06-Aug-93
[Previous]
[Next]
NAME:
SELECT_24HR_PLOT
PURPOSE:
Uses cursors to select an interval on the 24hr/4 panel plot
CALLING SEQUENCE:
.run SELECT_24HR_PLOT
INPUTS:
OUTPUTS:
itime 7*2 element time array contains start and stop times
this is compatible with RUN_MKBSD
OPTIONAL OUTPUTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
RDB 16-Jun-92
[Previous]
[Next]
NAME:
SELECT_BDA
PURPOSE:
Plots light curve of Ca XIX and allows user to select data set
using the cursors. SS vector is created for use with TEST_RD
CALLING SEQUENCE:
IDL> .run select_bda
INPUT:
OUTPUT:
OPTIONAL OUTPUT:
HISTORY
RDB Oct 1991 Written, with enhancements
RDB 16-Feb-1992 Updated for multiple files
rdb 26-Feb-1992 Some tidying; added YOHKOH_EVENTS stuff
Reads selected data if required
rdb 20-Mar-92 Null out PLOTR array (to stop confusion
if set in TEST_RD)
rdb 17-Jul-92 Changed DSET_ARR to DSET_STR
[Previous]
[Next]
NAME: selpnt
PURPOSE: To select a point from a displayed image, and mark the
location if requested
METHOD: This will mark a series of points and return their coordinates.
Using the left button simply marks the points, using the middle
button marks and saves the point, and the right button exits.
CALLING SEQUENCE: selpnt,x,y,/quiet,/mark
PARAMETERS: xy return the point locations (can be
a vector)
KEYWORDS: quiet when set don't print mouse intructions
mark when set mark the location
CALLED BY:
dejitter
HISTORY: Drafted AMcA, Nov. 1994.
Use DUM variable to buffer against XY being already
defined, AMcA, 11-17-94.
Corrected the background testing for image boundaries, AMcA, Mar. 1995.
[Previous]
[Next]
Name: selsis_copy
Purpose: copy (via ftp) daily selsis activity, event files
for specified date (most recent by default)
Input Parameters:
idate - date (UT) to copy
Keyword Parameters:
recopy - if set, force recopy of existing files
(default is no recopy)
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], anytim2ex [1]
anytim2ex [2], anytim2ints [1], anytim2ints [2], concat_dir [4], ex2fid [1]
ex2fid [2], file_exist [1], file_exist [3], ftp_copy [1], ftp_copy [2]
get_logenv [1], get_logenv [2], gt_day [1], gt_day [2], str_replace [1]
str_replace [2], timegrid, ut_time [1], ut_time [2]
CALLED BY:
selsis_week
History: mdm, 1992
18-sep-92 (SLF) - added xray plot and environmental path references
14-May-93 (MDM) - Changed to use $ydb_raw and $ys
26-May-93 (MDM) - Changed to use /ys/site/script instead of /ys/gen/script
19-Aug-93 (MDM) - Removed /SELF switch from mail command
30-Aug-93 (MDM) - Had Regions file copy when /XRONLY switch is set (need
to get it earlier)
22-Aug-93 (SLF) - use [max91] for regions also (problem with SESC)
3-Jan-94 (MDM) - Modified mailing list
10-apr-95 (SLF) - use SELSIS_FTP_NODE environmental - cleanup/file_append
12-apr-95 (SLF) - major rewrite to use ftp_copy (for selsis reorganization)
28-apr-95 (SLF) - add RECOPY keyword and function
5-oct-95 (SLF) - removed X-Ray plot references (now averging 3 sec data)
2-dec-96 (SLF) - SEL event file format/name change updates
13-Jan-2000 (SLF) - Y2K filename fix (use time2file)
5-May-2002 (SLF) - use YYYY_events instead of events
(appears to be updated first at SEC)
13-nov-2002 (SLF) - major rewrite to use Mirror;
(and transportable)
[Previous]
[Next]
Name: selsis_copy
Purpose: copy (via ftp) daily selsis activity, event files
for specified date (most recent by default)
Input Parameters:
idate - date (UT) to copy
Keyword Parameters:
recopy - if set, force recopy of existing files
(default is no recopy)
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], anytim2ex [1]
anytim2ex [2], anytim2ints [1], anytim2ints [2], concat_dir [4], ex2fid [1]
ex2fid [2], file_exist [1], file_exist [3], ftp_copy [1], ftp_copy [2]
get_logenv [1], get_logenv [2], gt_day [1], gt_day [2], str_replace [1]
str_replace [2], timegrid, ut_time [1], ut_time [2]
CALLED BY:
selsis_week
History: mdm, 1992
18-sep-92 (SLF) - added xray plot and environmental path references
14-May-93 (MDM) - Changed to use $ydb_raw and $ys
26-May-93 (MDM) - Changed to use /ys/site/script instead of /ys/gen/script
19-Aug-93 (MDM) - Removed /SELF switch from mail command
30-Aug-93 (MDM) - Had Regions file copy when /XRONLY switch is set (need
to get it earlier)
22-Aug-93 (SLF) - use [max91] for regions also (problem with SESC)
3-Jan-94 (MDM) - Modified mailing list
10-apr-95 (SLF) - use SELSIS_FTP_NODE environmental - cleanup/file_append
12-apr-95 (SLF) - major rewrite to use ftp_copy (for selsis reorganization)
28-apr-95 (SLF) - add RECOPY keyword and function
5-oct-95 (SLF) - removed X-Ray plot references (now averging 3 sec data)
2-dec-96 (SLF) - SEL event file format/name change updates
[Previous]
[Next]
Name: selsis_week
Purpose: copy up to a week of selsis data and generate/regenerate ydb files
Input Parameters
week - week (string in format YY_WW) (default is this week)
CALLS: ***
anytim2weekid [1], anytim2weekid [2], int2secarr [1], int2secarr [2]
pr_week2tim [1], pr_week2tim [2], selsis_copy [1], selsis_copy [2]
str_replace [1], str_replace [2], timegrid, ut_time [1], ut_time [2]
History:
27-apr-95 (SLF) - simplify catchup
31-may-95 (SLF) - strip 'a' from weekid name (was getting duplicated)
[Previous]
[Next]
NAME:
selsisi2fits
PURPOSE:
Take a SELSIS file and write a FITS file output
INPUT:
infil - a list of files in SELSIS format
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], FIND_GBO_DIR
concat_dir [4], file_exist [1], file_exist [3], rd_selsisi, wrt_fits [1]
wrt_fits [2]
OPTIONAL KEYWORD INPUT:
delete - if set, delete the SELSIS format file after
the FITS file is created
auto_dir- if set, call FIND_GBO_DIR to figure out which
output directory to use
HISTORY:
Written 16-Jul-92 by M.Morrison
13-Oct-92 (MDM) - Modified to check if the call to "rd_selsisi"
was successful.
27-Jan-93 (MDM) - Added /AUTO_DIR option, and using FIND_GBO_DIR
- Also change protection to 666
19-Aug-93 (MDM) - Removed /self switch from Mail call
3-Jan-93 (MDM) - Removed mail message on "non-copies"
[Previous]
[Next]
Name: selsisi_copy
Purpose: copy selsis image files
14-May-93 (MDM) - Changed to use $ydb_raw and $ys
26-May-93 (MDM0 - Changed to use /ys/site/script instead of /ys/gen/script
19-Aug-93 (MDM) - Removed /self switch from Mail call
3-Jan-94 (MDM) - Modified the mailing list
29-Apr-94 (SLF) - Major Rewrite
change logic (allow PARTIAL success to continue)
look for compressed versions if failures
streamline using new routines
3-May-94 (SLF) - retry on failure for '_Z' extension, use updated
ftp_copy.pro for all transfers, allow imgfil passed
16-May-94 (SLF) - directory error bug fix (message called with array)
19-May-94 (SLF) - mail message update
23-May-94 (SLF) - fix incorrect variable name
30-Aug-94 (SLF) - add fl_suntoday call (collage image)
CALLS:
[Previous]
[Next]
NAME:
seq_2fl
PURPOSE:
To get two sets of matched subscripts for temperature measurments
Do Not try to used this on data that has already been SXT_PREPPED.
CALLING SEQUENCE:
seq_2fl,index,fb1,fb2,subs1,subs2
INPUT:
index= info. structure for SXT data from test_rd
fb1,fb2= filter numbers for the two filters,
fb=1 for open, 2 for al1400, 3 for DAG, 4 for Be100, 5 for Al12,
and 6 for mg3mu.
OUTPUT:
subs1,subs2= subscripts of the two sets of images, which
have the proper filters, and are in the same sequence loops.
CALLS: ***
gt_dp_mode [1], gt_dp_mode [2], gt_expdur [1], gt_expdur [2], gt_filtb
CALLED BY:
sxt_fl_analxpro, sxt_tfl, sxt_tflx, sxtbox_teem
HISTORY:
Written Sept. '92 by J.McTiernan
Some error checking, jmm, 2/15/95
[Previous]
[Next]
Name: ser_dset
Purpose: return data set array for given sxt sequence serial number
Input Parameters:
rmap = sxt roadmap or sxt index record
which = desired data set - the interpretation is:
relative data set if absolute not set
absoulute data set if absolute keyword is set
absolute = if set, then returned data set corresponds to the
absolute serial number - otherwise, returned data set
vector corresponds to relative serial number
Output:
function return value is requested data set vector
a return value of -1 indicates requested data set is
out of range
range (optional key word) 2 element vector containing first and
last serial numbers - absolute or relative depending upon the
state of the absolute keyword
CALLS:
CALLED BY
save_data [2], sda_look [1]
[Previous]
[Next]
NAME: set_back
PURPOSE: To reset the background in optical images, or get a background
bitmask. Also return a mask of prominance features.
METHOD: Uses DSK_LOCB to find the radii, tests the corner for the
current background value (returned from DSK_LOCB) and adjusts
all pixels that above the limb. Keywords allow you to return a
mask for above limb features, and exclude "features" well over
the limb.
CALLING SEQUENCE:
out=set_back(image[,trgt=target][,back=background][,bakmsk=mask]
[,prom=prom][,margin=margin])
PARAMETERS: image the input GBO image, also the output.
out the same image with a reset backgorund.
KEYWORDS: back option to pass in the background value
the default is the minimum value in image.
trgt option to pass in the centroid & radius if
it is already known, in pixels.
bakmsk option to return a mask of (0 & 1) indicating
the background pixels.
prom bits for all bright pixels over the limb.
margin option to zero prom for more than a set number
of pixels above the limb.
RETURN TYPE: Same as the input.
CALLS: ***
TARGET [1], cut_lev, r_coord, target [2]
CALLED BY:
rm_darklimb, rt_hdha, rt_mag, sxt_mk3 mk3 index data [1]
sxt_mk3 mk3 index data [2], wl_process
HISTORY: Drafted dec-92 by A. McAllister.
Added margin keyword, feb-93 AMcA.
Added prom keyword, redefined bakmsk keyword, mar-93 AMcA.
Trapped all the WHERE index statments, jan-94 AMcA.
[Previous]
[Next]
NAME: set_datatype
PURPOSE: convert input data "dat" to specified data-type.
CALL SEQUENCE:
new_data = set_datatype( data_type, data)
where:
data_type is the requested returned data-type
data is the input data
INPUT:
data_type requested returned data-type
data input data
Returned:
new_data input data type casted to the requested
data-type
returns a 0 if unable to cast input data.
NOTE: when casting from byte to string, small byte values will
be converted to ASCII control chars. If this is not
the desired result, first convert byte to int then to
string.
History: written 11-April-94, gal.
[Previous]
[Next]
NAME:
SET_IMGVAL
PURPOSE:
The same function as the SCALE option of RFITS. I did nothing other
than copying the necessary part from RFITS !
CALLING SEQUENCE:
imgval = SET_IMGVAL(data, head)
INPUT:
data - Image array read by RFITS WITHOUT the SCALE option.
head - FITS header read by RFITS.
OUTPUT:
imgval - Image array with scaled values.
SIDE EFFECT:
none
CATEGORY:
Yohkoh HXT data analysis.
HISTORY:
version 1.0 98.07.01 (Wed) T.Sakao written.
[Previous]
[Next]
NAME:
SET_MWLT
PURPOSE:
Interactively define reference points in an image and a (full-sun)
reference image. These points can be used to calculate a linear
transform which maps image a onto the (full-sun) reference image imb.
This special version of SETPTS is used to co-align active region
data with a full-sun image. First, both images are desplayed at full
size, and the user is asked to click the region of interest in the
full sun image. Then a partial image is used to enter the reference
points.
After the points have been entered, image ima is transformed and
displayed with contours on top of image imb.
CATEGORY:
Image processing.
CALLING SEQUENCE:
set_mwlt,p,ima,imr
INPUTS:
ima = image to be transformed.
imr = (full-sun) reference image.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
subsize = integer. Pixelsize of subimage to be used as reference.
Default = 100, corresponds to about 4 arcmin in new MWLT.
plotonly = flag. If this keyword parameter is present, no new points
are added to p, but the result of the linear transform is
displayed.
noscale = flag. If present, the image is displayed unscaled.
append = flag. If present, new points are appended to p if p exists
and contains points. The default is to discard old points.
key = transformation type. See "transtype" keyword in CALTRANS for
details. Default is a general linear transform.
OUTPUTS:
p = array(2,2,*). p(0,0,*) and p(1,0,*) are the x and y coordinates
of the points in the reference image imb. p(0,1,*) and p(1,1,*)
are the x and y cordinates of the same points in the image ima.
OPTIONAL (KEYWORD) OUTPUT PARAMETERS:
trima = transformed version of ima
CALLS: ***
SETPTS [1], SETPTS [2]
COMMON BLOCKS:
None.
SIDE EFFECTS:
The program creates a new graphics window.
After entering the procedure, follow the instructions printed
on the terminal.
RESTRICTIONS:
The image has to be 2-dimensional.
The program uses device coordinates.
MODIFICATION HISTORY:
JPW, 25-mar-94 from setpts and setzoom
JPW, 22-nov-94 put "key" back in, minor modif.
[Previous]
[Next]
NAME:
set_new_db
PURPOSE:
To redirect to a new dark or leak image data base
SAMPLE CALLING SEQUENCE:
set_nev_db, newdir
set_new_db, '/0p/acton/new_db', /dark
set_new_db, '/0p/acton/new_db', /leak
set_new_db, /reset, /dark
set_new_db, /reset, /leak
INPUT:
newdir - The directory where the new database file will
reside
CALLS: ***
DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], delvarx [5]
CALLED BY:
sxt_prep [1], sxt_prep [2], sxt_prep [3]
OPTIONAL KEYWORD INPUT:
reset - Go back to using the old standard directory
METHOD:
1. Create a file with the dark and leak images you wish
to use. The prefix for the file MUST BE:
sdc - for dark images
sfc - for leak images
* There can be multiple files. **ALL** files with that prefix
in that new directory are checked for the best match
* NONE of the standard dark or leak images are checked if
you use this new option (ie: you must have ALL of the dark
images you want in your off-line dark/leak image file).
Extract images from the standard SDC set and put them into
your off-line set if you need them
2. Redirect the environment variables to point to your offline
area by calling SET_NEW_DB. The routine deletes the common
block saved info so that it is re-built on the next DARK
or LEAK call. This takes many seconds for the DARK calls
so swapping back and forth between official and off-line
databases will be very slow.
3. Run SXT_PREP and/or LEAK_SUB and/or DARK_SUB
4. To return to using the original official database, use the
/RESET option on the SET_NEW_DB command. This assumes that
you had not done a SETENV outside of this routine.
EXAMPLE:
The following is an example of how to use PFIs for the source
dark frames. CAUTION: If the ROI location on the CCD changes,
the DARK_SUB routine will probably not choose the optimal
pointing dark frame (it chooses the closest in TIME)
infil = /yd5/flares/spr930625.0131
rd_roadmap, infil, rmap
ss = where(gt_expmode(rmap) eq 1)
rd_xda, infil, ss, ii, dd
--- Note: You can average the dark images before saving if desired
sav_sda, '/yd3/morrison/newdb/sdc_test2', ii, dd
set_new_db, '/yd3/morrison/newdb'
ss = where((gt_dp_mode(rmap) eq 13) and (gt_filtb(rmap) eq 2))
rd_xda, infil, ss, index, data
sxt_prep, index, data, index2, data2
HISTORY:
Written 15-May-95 by M.Morrison
[Previous]
[Next]
NAME:
SET_PAPER
PURPOSE:
To setup PostScript output format.
CALLING SEQUENCE:
SET_PAPER
SET_PAPER, /landscape, /encapsulated
SET_PAPER, /square
SET_PAPER, /helvetica
INPUT:
none
CALLED BY:
GOES_TODAY
OPTIONAL KEYWORD INPUT:
landscape - If set, then the output is in landscape format.
default - If set, then the output plot has the default size.
encapsulated - If set, then an encapsulated output is created.
filename - Specifies output filename. Default = 'idl.ps'.
color - If set, then the output is a color PostScript file.
square - If set, then the output graph has an equal length
for the X/Y axes. Note that this option is yet
valid only for a portrait output.
courier - Same as the one for DEVICE procedure.
helvetica - "
times - "
symbol - "
italic - "
OUTPUT:
none
NOTE:
yoffset |
|--------------------|
|
|-----------------| | |
| Landscape | | | Y
| | | |
-- |-----------------| | <---> X
| xoffset |
-------------------------|
SIDE EFFECT:
A PostScript output file is created.
HISTORY:
version 1.0 92.08.12 (Wed) T.Sakao written.
version 1.1 93.08.23 (Mon)
Option /portrait is specified if /landscape option is absent.
version 1.2 94.06.24 (Thu)
Option /default is added.
version 1.3 96.02.13 (Tue)
Option encapsulated added.
Added documentation.
version 1.4 96.02.27 (Tue)
Option color added.
version 1.5 96.06.14 (Fri)
Option filename added.
version 1.6 96.10.29 (Tue)
Option square added.
version 1.8 97.02.05 (Wed)
Options courier, helvetica, times, symbol, and italic added.
Note that these options may not yet work. They are just
temporary.
version 1.9 97.11.01 (Sat)
Print size in calling a Lanscape output was changed.
'NOTE' description added.
version 2.0 98.02.17 (Tue)
Y-offset value for making a square output was added. This is
for printing the output at the right position even on a U.S.-
sized paper. (Modified at GSFC.)
[Previous]
[Next]
NAME:
SET_PS
pro set_ps,noPSfont=noPSfont,cm=cm $
,land=land,wland=wland,sland=sland $
,tall=tall,wtall=wtall,stall=stall $
,close=close,filename=filename,color=color,lcolor=lcolor,check=check $
,noname=noname,noprint=noprint,title=title,t_size=t_size
PURPOSE:
Set up PostScript device
CATEGORY:
CALLING SEQUENCE:
To open a PS file,
SET_PS [, /land, filename='idl2.ps', cm=cm]
and then to close the PS file
SET_PS, /close [, filename='idl2.ps']
INPUTS:
None.
KEYWORD PARAMETERS:
land : landscape (24.13 x 17.78cm)
wland: wider landscape (28 x 19 cm)
sland: square landscape(17.5 x 17.5 cm)
tall : tall portrait (17 x 20 cm)
wtall: taller portrait (19 x 28 cm)
stall: square portrait (17.5 x 17.5 cm)
default paper size is (17.78 x 12.7 cm).
filename: output filename (default='~/idl.ps')
close: close PostScript device and return to X-window
color: set up Color PostScript device
lcolor: the default color of lines (default=0 in PS-device)
noPSfont: use the IDL fonts (default= using PS fonts)
check: display the device parameters !d at the begining
and display the PostScript file by "gs" at the end
noname: if not, user name and system time are printed
at the lower-left corner on the last page.
title: print title at the upper-right and lower-right.
It must be a scalar or a 2-element vector.
t_size: set up the size of title characters
OUTPUT KEYWORD:
cm : pixels/cm (1000 in PS, 40 in X)
CALLS: ***
get_user [1], get_user [2]
MODIFICATION HISTORY:
21-Mar-95 R.Kano entried into local software library
11-May-96 R.Kano add the users signiture and date
21-Feb-97 R.Kano add an optional output 'cm'
10-Mar-97 R.Kano not to use 'lprint'
18-Apr-97 R.Kano add the square window 'sland' & 'stall'
28-May-97 R.Kano add an optional input 'title' & 't_size'
REFERENCE: none
[Previous]
[Next]
PRO xform, xi,yi,zi, xo,yo,zo, TRANSFORM=t, HELP=help
Apply transformation set up by function set_xform.
Keyword TRANSFORM supplies the transformation matrix, e.g.
TRANSFORM=xf.helio2image.
See set_xform for full documentation on the coordinate systems.
Helio2image = heliographic to image-plane.
Image2helio = image-plane to heliographic.
These can be applied to coordinates, magnetic fields, velocities, ...
Zimage2helio = image-plane xi,yi to heliographic xh,yh, with the point
referred to by xi,yi understood to lie on the photosphere i.e. zh=0.
The suppressed zi is nonzero. This transformation matrix is 2x2, whereas
the others are 3x3.
The following forms are accepted if TRANSFORM is helio2image or image2helio:
xform,xyz ; replace the vector xyz=FLTARR(...,3)
; by the transformed vector.
xform,xyzi,xyzo ; transform the vector xyz=FLTARR(...,3) and return
; the result in xyzo=FLTARR(...,3).
xform,x,y,z ; replace the components x,y,z, which can be of arb.
; dimensions, by the transformed components.
xform,xi,yi,zi,xo,yo,zo ; transform the components xi,yi,zi, which can be
; of arb. dimensions, and return the resulting
; components in xo,yo,zo.
The following forms are accepted if TRANSFORM is a zimage2helio matrix:
xform,xy
xform,xyi,xyo
xform,x,y
xform.xi,yi,xo,yo
These are analogous to above, but the vectors are FLTARR(...,2).
CALLS:
CALLED BY
get_helio_dist
[Previous]
[Next]
FUNCTION set_xform, b0,p,bc,lc, HELP=help
Calculate and store transformation between image-plane and heliographic
coordinates and various other useful info. Tranformations are linear,
assuming a tangent plane on the photosphere at the reference point.
Thus the reference point should be the center of the FOV.
INPUT:
b0 solar sub-Earth latitude (radians)
p solar p-angle (radians)
bc latitude of reference point on photosphere (radians)
lc cmd of reference point on photosphere (radians)
OUTPUT:
xf a structure containing the information --
transformations --
xf.helio2image ; Heliographic xh,yh,zh -> image-plane xi,yi,zi.
; FLTARR(3,3).
xf.image2helio ; Image-plane xi,yi,zi -> heliographic xh,yh,zh.
; FLTARR(3,3).
xf.zimage2helio ; Image-plane xi,yi -> heliographic xh,yh.
; ASSUMING (the unobserved) zi is such that zh=0 i.e.
; the observed image lies in the photospheric plane.
; FLTARR(2,2).
*NOTE*NOTE**NOTE* These arrays are stored transposed so that "normal"
*NOTE*NOTE**NOTE* matrix arithmetic works as expected, e.g.
*NOTE*NOTE**NOTE* B_i = xf.helio2image # B_h
*NOTE*NOTE**NOTE* "PRINT,xf.helio2image" will print it transposed too.
; useful things to know --
xf.b0 ; Solar latitude of sub-Earth point (radians).
xf.p ; Solar p-angle (radians).
xf.bc ; Latitude of center of FOV (radians).
xf.lc ; Cmd of center of FOV (radians).
xf.DirCos ; Direction cosines of LOS relative to helio xh,yh,zh
; coordinate system in radians (FLTARR(3)).
xf.mu ; Cos(angle from disk centre) in radians.
xf.SolRad ; Solar radius in Mm (megametres).
xf.Mm2arcsec ; Mm on photosphere -> arcsec at Sun.
xf.Mm2radian ; Mm on photosphere -> radians of CMD or latitude.
xf.arcsec2Mm ; Arcsec at Sun -> Mm on photosphere.
xf.radian2Mm ; Radians of CMD or latitude -> Mm on photosphere.
DEFINITION OF COORDINATE SYSTEMS:
xh,yh,zh Heliographic coordinates. zh is normal to the photosphere
(actually the tangent plane). xh in Westerly (+ve CMD)
direction, yh in Northerly (+ve latitude) direction.
xi,yi,zi Position in image plane. xi is terrestrial West, yi is
terrestrial North. zi is distance towards observer from
the image plane, where the origin (xi=0,yi=0,zi=0) of
the image plane touches the photosphere.
Could be generalized for images not oriented to terrestrial
North/West.
It is not really necessary to store the 3 transformations in xf.
helio2image and image2helio are inverses of each other; since the
transformations are unitary? orthogonal? or something one is just
the transpose of the other. Also, zimage2helio can be bypassed by
computing the zi needed to make zh=0, given xi, yi, and image2helio,
then using these xi,yi,zi to compute xh,yh,zh given image2helio.
However, they are stored for generality.
Clearly there is duplication among the constants too, specifically
radian2Mm == SolRad == 1/Mm2radian. and arcsec2Mm = 1/Mm2arcsec.
USAGE EXAMPLES:
; Get heliographic coordinates of observation points (pixels) on photosphere
; in Mm given pixel positions in arcsec.
xyzh=FLTARR(Nx,Ny,3) & FOR i=0,Nx-1 DO FOR j=0,Ny-1 DO $
xyzh(i,j,0:1) = xf.arcsec2Mm * xf.zimage2helio # [xi(i,j),yi(i,j)]
; Compute noise on Bx assuming 15G error in LOS field and 150G error
; in transverse field.
dBx = SQRT( xf.dircos(0)^2*15.0^2 + (1-xf.dircos(0)^2)*150.0^2 )
; Get area of pixel projected on photosphere in Mm^2, given pixel
; dimension pxl in arcsec.
area = (pxl*xf.arcsec2Mm)^2/xf.mu
CALLS:
CALLED BY
get_helio_dist
[Previous]
[Next]
NAME:
SET_XHR
PURPOSE:
Returns time limits of plots using PLOTR array derived from
PLOT_LCUR call in TEST_RD.
CALLING SEQUENCE:
set_xhr,roadmap,plotr [,x_hr_range=x_hr_range][,tarr=tarr]
INPUTS:
roadmap structure containing roadmap of data in file
plotr subscripts in roadmap of last plot in PLOT_LCUR
OUTPUTS:
OPTIONAL OUTPUTS:
x_hr_range If keyword present, array returned
Limits are rounded to nearest 0.1 hrs.
tarr If preset, the times are returned as a 7*2
integer time array in external format
CALLS: ***
Int2Ex [1], Int2Ex [2]
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
RDB 21-Mar-92
RDB 25-Mar-92 Added TARR keyword
[Previous]
[Next]
NAME:
SETPTS
PURPOSE:
Interactively define reference points in two images.
These points can be used to calculate a linear transform which maps
image ima onto the comparison image imb.
After the points have been entered, image ima is transformed and
displayed with contours on top of image imb.
CATEGORY:
Image processing.
CALLING SEQUENCE:
setpts, p, ima, imr
INPUTS:
ima = image to be transformed.
imr = reference image.
Usually, the lower resolution image is selected to be image ima.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
plotonly = flag. If this keyword parameter is present, no new points
are added to p, but the result of the linear transform is
displayed.
noscale = flag. If present, the images are displayed unscaled.
append = flag. If present, new points are appended to p if p exists
and contains points. The default is to discard old points.
trima = transformed image ima.
key = transformation type. See "transtype" keyword in CALTRANS for
details. Default is a general linear transform.
OUTPUTS:
p = array(2,2,*). p(0,0,*) and p(1,0,*) are the x and y coordinates
of the points in the reference image imb. p(0,1,*) and p(1,1,*)
are the x and y cordinates of the same points in the image ima.
OPTIONAL (KEYWORD) OUTPUT PARAMETERS:
trima = transformed version of ima
CALLS: ***
CALTRANS, CONGRID [1], CONGRID [2], CONGRID [3]
CALLED BY:
SET_MWLT, setpts_roi
COMMON BLOCKS:
None.
SIDE EFFECTS:
The program creates a new graphics window.
After entering the procedure, follow the instructions printed
on the terminal.
RESTRICTIONS:
The images have to be 2-dimensional. If one of the images is bigger
than 512x512 pixels, only a part of the image can be displayed, and
used to set points.
MODIFICATION HISTORY:
JPW, Nov, 1989.
JPW, Aug, 1992 most changes from version 1.1 (GLS) adopted
JPW, Sep, 1992 added the noscale and append flags.
JPW, Jun, 1994 points plotted also with /plotonly option
added key option
JPW, Nov, 1994 fixed some minor glitches
[Previous]
[Next]
Name: sfc_check
Purpose: check SFC directory for new entries - send mail if any found
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], FILE_EXIST [2], SFC_REPORT, break_file [4], concat_dir [4]
file_append [1], file_append [2], file_exist [1], file_exist [3], file_list [1]
file_list [2], get_logenv [1], get_logenv [2], mail [1], mail [2], rd_tfile [1]
rd_tfile [2], rem_elem [1], rem_elem [2], search [1], search [2], strsplit
Restrictions:
UNIX only
[Previous]
[Next]
NAME:
sfc_de_spiker
PURPOSE:
Default mode return images with spikes and dark holes removed via
median filter.
CALLING SEQUENCE:
clean_img = sfc_de_spiker(image, threshold, [indices=indices, width=width,
average=average, pos=pos, neg=neg])
INPUTS:
image - image array to clean (may be 2-d or 3-d)
threshold - sets the threshold level for which all
spikes are removed. Suggest using a value
of 10. Really bright or dark spikes can be
removed with a higher value such as 20+.
CALLS: ***
IMAGE_FILTERER, spikes [1], spikes [2]
CALLED BY:
sfc_prep [1], sfc_prep [2]
OPTIONAL KEYWORD INPUT:
width - set the width of the median filter (3 is default)
average - use average filter instead of median.
pos - remove spikes only.
neg - remove holes only. Note: threhold must be less than 0.
RETURNED:
cleaned image with the same size and data-type as input image
OPTIONAL KEYWORD OUTPUT:
indices - list of indices to the located spikes and dark holes.
PROCEDURE:
This routine calls the idl function SPIKES.
The spikes and dark holes are identified via the following method:
spike_indices = where(abs(image-median(image,width)) gt threshold)
If neg is used than:
spike_indices = where((image-median(image,width)) lt threshold)
MODIFICATION HISTORY:
12-Jan-94, GAL, Written (replaced LWA's spikes_off routine)
16-17 Mar-94, GAL, added code to handle decompressed images.
added keywords to use upgraded version of spikes.
11-April-94, gal, modified to preserve input data-type
14-Apr-94, gal, modified to only sfd compress/decomp filter
spike/hole data for non-byte input. The comp/decomp
introduces about a 1% error to the filtered spike/hole
data.
20-Apr-94, gal, modified to only use sfd compression for finding
spikes/holes in non-byte type data via spikes rountine.
The filter values used for replacement are not compressed
and are always generated via filter function.
11-Dec-94, LWA, made from de-spiker by removing image compression.
11-nov-96, SLF, changed call to <filter> to <image_filterer>
[Previous]
[Next]
NAME:
sfc_prep
PURPOSE
To prepare a smoothed SFC image for straylight correction.
CALLING SEQUENCE
sfc_image = sfc_prep(sft_index,sft_data,image)
INPUT
sft_index -index structure for selected SFT image
sft_data -selected SFT image
OUTPUT
Smoothed SFC image (floating point).
OPTIONAL OUTPUT
image - dark corrected input image
index_out - index of the dark corrected image
Keyword Parameters:
nogrill - switch, if set, do not apply Al.1 grill correction
PROCEDURE
1. Dark_sub with /dc_intepolate
2. Smooth with SFC_DE_SPIKER (median filter)
3. Choose width for boxcar-average smoothing
4. Boxcar-average smooth with BIG_SMOOTH
RESTRICTIONS
Can only process one image at a time
Slow -- takes about 1 minutes to process one image on MIPS machine.
Calls LWA/ucon programs SFC_DE_SPIKER and BIG_SMOOTH.
HISTORY
LWA, 11-Dec-94 Written
LWA, 18-Dec-94 Took out one despike and added variable
smoothing width -- based on tests with Al.1
and added image keyword
LWA, 20-Dec-94, Added test for ND filter for smoothing.
SLF, 18-nov-95, SLF, Add Al.1 grill correction per LWA
NN, 7-Aug-97, Added index_out from dark_sub
SLF, 18-Feb-98, Merged ORBIT_CORRECT SDC with NN changes
SLF, 3-Dec-98, Use time dependent (entrance filter era)
dependent GRILL correction, add /TESTING
SLF, 5-Jan-2000 - add NOGRILL keyword and function
CALLS:
CALLED BY
mk_sfc [1], mk_sfc [2], sft2sfc
[Previous]
[Next]
NAME:
sfc_prep
PURPOSE
To prepare a smoothed SFC image for straylight correction.
CALLING SEQUENCE
sfc_image = sfc_prep(sft_index,sft_data,image)
INPUT
sft_index -index structure for selected SFT image
sft_data -selected SFT image
OUTPUT
Smoothed SFC image (floating point).
OPTIONAL OUTPUT
image - dark corrected input image
index_out - index of the dark corrected image
PROCEDURE
1. Dark_sub with /dc_intepolate
2. Smooth with SFC_DE_SPIKER (median filter)
3. Choose width for boxcar-average smoothing
4. Boxcar-average smooth with BIG_SMOOTH
RESTRICTIONS
Can only process one image at a time
Slow -- takes about 1 minutes to process one image on MIPS machine.
Calls LWA/ucon programs SFC_DE_SPIKER and BIG_SMOOTH.
HISTORY
LWA, 11-Dec-94 Written
LWA, 18-Dec-94 Took out one despike and added variable
smoothing width -- based on tests with Al.1
and added image keyword
LWA, 20-Dec-94, Added test for ND filter for smoothing.
SLF, 18-nov-95, SLF, Add Al.1 grill correction per LWA
NN, 7-Aug-97, Added index_out from dark_sub
SLF, 18-Feb-98, Merged ORBIT_CORRECT SDC with NN changes
SLF, 3-Dec-98, Use time dependent (entrance filter era)
dependent GRILL correction, add /TESTING
CALLS:
CALLED BY
mk_sfc [1], mk_sfc [2], sft2sfc
[Previous]
[Next]
NAME:
SFD_CDS
PURPOSE:
overlay CDS or TRACE field of view on the most recent SFD
CATEGORY:
CALLING SEQUENCE:
sfd_cds, cds_cen, cds_fov
sfd_cds, [0,0], [240,240] would be a standard CDS FOV at disk center
sfd_cds, [-600,600], [314,314] puts an SXT 2x2 OR near the NE limb
sfd_cds, cds_cen, cds_fov, /notv
sfd_cds, trace_cen, /trace ;puts 8.5x8.5 arcmin box at position
given by trace_cen
INPUTS:
CDS parameters (see
http://sohodb.nascom.nasa.gov/synoptic/.targets/soho_today.html )
CDS_CEN is x- and y-displacement of center of box from disk
center, in arcseconds.
CDS_FOV is [width,height] of box, in arcseconds.
Defaults to Sun center and an SXT 2x2 FOV.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
NOTV, when set, lets you put another box on the same image
OUTPUTS:
CALLS: ***
conv_a2p [1], conv_a2p [2], draw_boxcorn [1], draw_boxcorn [2], gt_pix_size
gt_res, lastsfd [1], lastsfd [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
24-Apr-97, HSH, written
01-jun-98, DMcK, corrected FOV by factor of 2
06-oct-98, DMcK, added /trace switch for default TRACE FOV.
Fixed too-small size of default SXT FOV.
Enhanced previously obscure documentation.
[Previous]
[Next]
NAME: sfd_comp
PURPOSE: Compress data using the "SFD" compression algorithm
CALLING SEQUENCE:
cdata = sfd_comp(data)
cdata = sfd_comp(data, index=index)
INPUT:
data data to be compressed.
OPTIONAL INPUT KEYWORD:
index The SXT index structure.
If present, convert to DN/sec/HR pixel
RETURNED/OUTPUT:
compressed data
CALLS: ***
data_chk [1], data_chk [2], gt_expdur [1], gt_expdur [2], gt_res
CALLED BY:
RD_AR, azi_calc, azimuth_avg, de_spiker [1], de_spiker [2], mk_spd, mk_strip_file
radial_avg, scat_avg, sector_avg, spikes_off, sxt_comp_sharp, sxt_composite [1]
sxt_composite [2], sxt_composite [3], sxt_dstreek
HISTORY:
written 9-Dec-93 by M.Morrison
24-jun-94, SLF+JRL, Added index=index keyword
[Previous]
[Next]
22-Oct-92
NAME: sfd_decomp
PURPOSE: Decompress sfd data.
CALLING SEQUENCE:
un_data = sfd_decomp(data)
INPUT:
data sfd data to be decompressed.
RETURNED/OUTPUT:
decompressed sfd data
CALLED BY:
FIRST_LIGHT [1], FIRST_LIGHT [2], LASTSFD_DIFF, RD_AR, RECONCILE_SFD_INFIL
SFD_PHOT, agl2cut, mk_sl [1], mk_sl [2], mk_strip_file, rd_sxtgoes, sxl_analysis
sxt_dstreek, sxt_prep [1], sxt_prep [2], sxt_prep [3], unsharp_mask
HISTORY:
written 22-Oct-92, gal
[Previous]
[Next]
NAME:
SFD_DIFF
PURPOSE:
difference two SFR images
CATEGORY:
Yohkoh
CALLING SEQUENCE:
sfd_diff,index,data,i1,i2,img
INPUTS:
index and data from yodat
selected pair of indices
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
prepped and differenced images, [64,64,3]
CALLS: ***
POLY_FIT, sxt_prep [1], sxt_prep [2], sxt_prep [3]
RESTRICTIONS:
MODIFICATION HISTORY:
HSH written 19-jun-94
[Previous]
[Next]
NAME:
SFD_PHOT
PURPOSE:
restore SFD data cubes to 64x64xn for looking at global things
registers images
CALLING SEQUENCE
sfd_phot, infil, rm, data_out, t1 = t1, t2 = t2, dag=dag, al=al
INPUTS
infil for SFD files
OUTPUT:
rm is a roadmap structure
data is a 64x64 data cube in DN/sec
KEYWORDS:
dag selects dagwood data only
al selects al data only
t1 the start time (defaults to beginning of infil)
t2 the end time (defaults to end of infil)
CATEGORY:
Yohkoh stuff
ROUTINES USED:
SFD_DECOMP, SXT_CEN, FMT_TIM, RD_XDA, GT_FILTB
CALLS: ***
FMT_TIMER [1], FMT_TIMER [2], RD_XDA [1], RD_XDA [2], fmt_tim [1], fmt_tim [2]
gt_filtb, sfd_decomp, sxt_cen [1], sxt_cen [2], tim2dset [1], tim2dset [2]
HISTORY:
HSH, 8 May 1994 (written)
HSH, 15 May 1994, added time ranges, filter keywords, and
registration using GET_SUNCENTER
HSH, 18 May 1994, revise GET_SUNCENTER call
HSH, 19 June 1994, fixed alignment bug and installed SXT_CEN
[Previous]
[Next]
NAME:
SFD_TEK
PURPOSE:
contour plot of last SFD image for Tek viewing
CATEGORY:
CALLING SEQUENCE:
sfd_tek, index, data
sfd_tek, index, data, levels=levels, /step
INPUTS:
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED
lastsfd, get_info
OUTPUTS:
CALLS: ***
DAG_INDEX, PAUSE [1], fmt_tim [1], fmt_tim [2], get_info [1], get_info [2]
get_info [3], get_info [4], gt_filtb, lastsfd [1], lastsfd [2], pause [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
15-Apr-96, HSH, written
21-Apr-96, HSH added a couple of things
25-Aug-96, HSH fixed a couple of things
12-Apr-97, HSH added /dag
[Previous]
[Next]
NAME:
SFR_TOTALIZER
PURPOSE:
Extract SFR totals and compare with GOES data
CATEGORY:
Yohkoh
CALLING SEQUENCE:
main program. Get infil first with YODAT or equivalent, but
just read the roadmap, not the data (-888 in YODAT)
INPUTS:
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
creatse SFR_FLUXES, SFR_TIMES
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
HSH, written 5-feb-93
[Previous]
[Next]
Name: sft2sfc
Purpose: convert one or more SFT files to SFC files (via sfc_prep)
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], RD_SDA [1], RD_SDA [2], RD_SDA [3]
Rd_Roadmap [2], anytim2ex [1], anytim2ex [2], concat_dir [4], ex2fid [1]
ex2fid [2], file_list [1], file_list [2], fmt_tim [1], fmt_tim [2], get_logenv [1]
get_logenv [2], gt_filta, gt_filtb, prstr [1], prstr [2], rd_roadmap [1]
sav_sda [1], sav_sda [2], sav_sda [3], sfc_prep [1], sfc_prep [2], tbeep [1]
tbeep [2], tbeep [3], tim2dset [1], tim2dset [2]
History:
15-mar-1995 (SLF)
7-Aug-97 : NN, change the index to be saved - should reflect
the new version of sfc_prep, which keeps the index from dark_sub
[Previous]
[Next]
NAME:
sft_files
PURPOSE:
Return a list of sft (SXT terminator) file names
CALLING SEQUENCE:
fn = sft_files() ; Lastest file
fn = sft_files('1-jan') ; File for 1-jan of this year
fn = sft_files('30-oct-91', '2-nov-91')
INPUT:
st_date - The UT 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.
OPTIONAL INPUT:
en_date - The ending date to list data for. If no date is passed,
it only searches for "st_date"
CALLS: ***
ADDTIME [1], ADDTIME [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
concat_dir [4], tim2weekid
CALLED BY:
pr_sxt_term
OPTIONAL KEYWORD INPUT:
None.
OUTPUT:
Vector string of file names
PROCEDURE:
sft_files searches the sft files on $DIR_GEN_SFT directory.
The latest version of the file is returned.
HISTORY:
12-Oct-94, J. R. Lemen, Written.
[Previous]
[Next]
NAME:
SHIFT_HXT2P
PURPOSE:
To obtain an HXT image which can readily be overlain to the
corresponding SXT PFI image.
CALLING SEQUENCE:
new_hxt = SHIFT_HXT2P(hxt_image, xy0, sxt_index)
INPUT:
hxt_image - HXT image ('pixel size' = 2.47")
xy0 - Center position of HXT image synthesis FOV in units
of HXT pitch (=126"). East and north positive.
xy0(0) = E/W value
xy0(1) = N/S value
This can either be a HXT header structure variable
or a 2-D array.
sxt_index - SXT index. Alternatively, this can be a 2-D array.
OUTPUT:
new_hxt - Shifted HXT image which can be overlain to the
corresponding SXT PFI.
OPTIONAL KEYWORD OUTPUT:
value - Amount of shift in SXT pixel units necessary for
overlaying the HXT image to the SXR image. West and
North positive.
CALLS: ***
CONV_HXT2P [1], CONV_HXT2P [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], FSHIFT
gt_center
HISTORY:
written by T.Sakao, 26 December, 1993.
version 1.1 97.11.19 (Wed) Program renamed from SHIFT_HXT to
SHIFT_HXT2P.
[Previous]
[Next]
NAME:
SHIFT_O2P
PURPOSE:
To shift an SXT optical (NarrowBand) image so that it could be
directly overlain to the corresponding soft X-ray image.
Difference in boresights between soft X-ray and visible light optics
is corrected.
CALLING SEQUENCE:
new_opt = SHIFT_O2P(opt_image)
INPUT:
opt_image - SXT optical telescope (NarrowBand) image in full
resolution SXT pixels.
OUTPUT:
new_opt - Shifted optical telescope image that can be overlain
onto the corresponding soft X-ray image.
OPTIONAL KEYWORD OUTPUT:
value - Amount of shift in full resolution SXT pixel units
necessary for overlaying the OPT image to the SXR
image. West and North positive.
SIDE EFFECT:
none
CATEGORY:
Yohkoh HXT data analysis.
CALLS: ***
FSHIFT, GT_SXT_AXIS
HISTORY:
version 1.0 95.06.15 (Thu) T.Sakao written.
1.1 97.11.19 (Wed) Program simplified by use of FSHIFT
function.
1.2 97.12.11 (Thu) Program modified so that it can handle
image size other than 64x64.
[Previous]
[Next]
NAME: shift_res
PURPOSE:
To switch coordinates between resolutions.
CALLING SEQUENCE:
nu_coord=shift_res(old_coord,/xy,/fh)
INPUT:
old_coord, array of coordinates you wish to change
OUTPUT:
array of coordinates in the desired resolution
KEYWORD INPUT:
/xx Only x coordinates.
/yy Only y coordinates.
/xy [x,y] array, change both coordinates
/fh FR --> HR
/fq FR --> QR
/hq HR --> QR
/hf HR --> FR
/qf QR --> FR
/qh QR --> HR
CALLED BY:
sxt_xsaa
HISTORY:
LWA 2/13/95 Ref: Last page of YAG.
LWA 1/04/04 Updated with all conversions.
[Previous]
[Next]
NAME: shift_res
PURPOSE:
To switch coordinates between resolutions.
CALLING SEQUENCE:
nu_coord=shift_res(old_coord,/xy,/fh)
INPUT:
old_coord, array of coordinates you wish to change
OUTPUT:
array of coordinates in the desired resolution
KEYWORD INPUT:
/xx Only x coordinates.
/yy Only y coordinates.
/xy [x,y] array, change both coordinates
/fh FR --> HR
/fq FR --> QR
/hq HR --> QR
/hf HR --> FR
/qf QR --> FR
/qh QR --> HR
CALLED BY:
sxt_xsaa
HISTORY:
LWA 2/13/95 Ref: Last page of YAG.
[Previous]
[Next]
NAME:
SHIFTER_DM
PURPOSE:
shift images by a fractional amount, using interpolation
CATEGORY:
CALLING SEQUENCE:
img_out = shifter_dm(img_in, dd)
INPUTS:
img_in a data cube of arbitrary dimensions
dd an array of displacements (2xn), where n images
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
img_out the new data cube (float) shifted according to dd
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
D. Mickey, written < 1-nov-93
HSH, documented 1-nov-93
[Previous]
[Next]
NAME:
sho
PURPOSE:
To print the average DN level of a box to be marked by the
user. It can also display the total and/or raw values.
CALLING SEQUENCE:
sho,data [,side,nomark=nomark,raw=raw,total=total,bin=bin,color=color]
sho, data
sho, data, 10
sho, data, 20, /nomark, /raw, bin=4, /total
INPUT:
data - 2-D data image array
Mouse clicks:
- Left button gives a square box centered on click.
- Middle button used to mark opposite corners of rectangle.
- Right button exits the program.
OPTIONAL INPUT:
side - Number of pixels on a side (if not passed, the
default is 9
nomark - If present, the location on the image which
is selected is NOT marked (default is to mark it)
raw - If present, print out the raw data values also
total - If present, print out the total in the box also
bin - The rebin factor used to display the image
color - Color to be used to mark box (default = 255)
CALLS: ***
draw_boxcorn [1], draw_boxcorn [2]
HISTORY:
Written 20-Nov-91 by M.Morrison
Modified by LWA, most recently 15-Oct-92
Total keyword added 23-Oct-92
Changed x0, y0 to give the size box specified by "side",
fixed "Region marked is:" output,
updated header, and added color keyword. LWA 21-Jul-94
Corrected error so would work on not-square images. LWA 15-Sep-95
[Previous]
[Next]
NAME:
sho_max
PURPOSE:
To print the maximum DN level of a box to be marked by the
user. It can also display the total and/or raw values.
CALLING SEQUENCE:
sho_max,data [,side,nomark=nomark,raw=raw,total=total,bin=bin,color=color]
sho_max, data
sho_max, data, 10
sho_max, data, 20, /nomark, /raw, bin=4, /total
INPUT:
data - 2-D data image array
Mouse clicks:
- Left button gives a square box centered on click.
- Middle button used to mark opposite corners of rectangle.
- Right button exits the program.
OPTIONAL INPUT:
side - Number of pixels on a side (if not passed, the
default is 9
nomark - If present, the location on the image which
is selected is NOT marked (default is to mark it)
raw - If present, print out the raw data values also
total - If present, print out the total in the box also
bin - The rebin factor used to display the image
color - Color to be used to mark box (default = 255)
CALLS: ***
draw_boxcorn [1], draw_boxcorn [2], sxt_decomp [1], sxt_decomp [2]
CALLED BY:
DPE_GUESS
HISTORY:
Written 20-Nov-91 by M.Morrison as program SHO
Modified by LWA, most recently 15-Oct-92
Total keyword added 23-Oct-92
Changed x0, y0 to give the size box specified by "side",
fixed "Region marked is:" output,
updated header, and added color keyword. LWA 21-Jul-94
Corrected error so would work on not-square images. LWA 15-Sep-95
Adapted to show maximum in sxt_decomp of region,
renamed SHO_MAX. DMcK 11-may-98
[Previous]
[Next]
NAME : show (main program)
PURPOSE :
display NAOJ catalog data in /solar directory
CATEGORY :
idl/lib/nkr
CALLING SEQUENCE :
.run show
INPUTS :
OPTIONAL INPUT PARAMETERS :
none
KEYWORD PARAMETERS :
OUTPUTS :
none
COMMON BLOCKS : none
SIDE EFFECTS : none
RESTRICTIONS : none
PROCEDURE :
MODIFICATION HISTORY :
K.I. '92/05/11
K.I. '92/05/11 minor change
K.I. '92/06/30 include okayama
K.I. '93/01/22 pix1=pix_size('ft1')
K.I. '93/04/10 lsmenu( nnmax=310)
K.I. '93/05/22 lsmenu( nnmax=310)
K.I. '93/11/20 lsmenu( nnmax=nnmax) for monochro
T.S. '93/12/21 OAO magnetogram by magplot
[Previous]
[Next]
Name: show_contacts
Purpose: show timing relationships between KSC contacts and Yohkoh ephemeris
(also illustrate get_utevent, evt_grid, timegrid)
Input Parameters:
startt - starttime (or only time)
Optional Keyword Parameters:
visible - only display visible passes (default is all / visible highlighted)
nofem - if set, omit Yohkoh ephemeris
summary - if set, show the whole week (implies=>/visible,/nofem,/jst)
sxttable - if set, show table loads in selected time frame
select - menu selection of a particular pass or pass range for display
Calling Sequence:
show_contacts , starttime [,stoptime]
show_contacts, /visible - only show visible
show_contacts, /select - menu select pass(es)
show_contacts,/sxttable,/nofem - sxt table loads / no ephemeris
Calling Examples:
show_contacts ; show todays contacts
show_contacts,/local ; same w local labels (default=UT)
show_contacts, '1-oct' ; show 1 day relationships
show_contacts, '1-oct','4-oct' ; breaks into 4x24 hour
show_contacts,/summary ; show the whole week
show_contacts,/summary,'future date' ; show next week, if availble
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], WDEF [1], WDEF [2]
anytim2ints [1], anytim2ints [2], anytim2weekid [1], anytim2weekid [2]
concat_dir [4], evt_grid, fem_grid [1], fem_grid [2], get_logenv [1]
get_logenv [2], get_utevent [1], get_utevent [2], get_visible, gt_day [1]
gt_day [2], gt_time [1], gt_time [2], int2secarr [1], int2secarr [2]
linecolors [1], linecolors [2], next_window [1], next_window [2], prstr [1]
prstr [2], sel_timrange [1], sel_timrange [2], stag_lab [1], stag_lab [2]
str2cols [1], str2cols [2], strjustify, sxt_plan, tbeep [1], tbeep [2], tbeep [3]
tim2dow, tim2dset [1], tim2dset [2], tim2pass, timegrid, ut_time [1], ut_time [2]
wmenu_sel [1], wmenu_sel [2], zbuff2file [1], zbuff2file [2]
History:
7-Oct-94 (SLF)
3-apr-1995 (SLF) - add visible info if available and local time
7-apr-1995 (SLF) - update get_visible call / add PassNumbers
9-apr-1995 (SLF) - add VISIBLE and NOFEM keywords
10-apr-1995 (SLF) - add SUMMARY keyword and dow annotations
12-apr-1995 (SLF) - problem with local time, allow /summary mode
to work with dates from 'next' week
28-sep-1995 (SLF) - allow Zbuffer
[Previous]
[Next]
NAME:
show_hxafid
PURPOSE:
Overplots the areas of SXT suncenter locations where one of
the limbs would be hidden by an HXA fiducial mark.
Uses date to account for slowly varying hxa - sxt alignment
parameters, solar radius variations, and hxa degradation.
Does not correct for orbital variations.
CATEGORY:
CALLING SEQUENCE:
plot,[0,0],xr=[0,1024],yr=[0,1024],xsty=1,ysty=1,/nodata
show_hxafid
INPUTS:
date = in any format. Optional. Default: current date.
KEYWORDS (INPUT):
/overplot = reuse the same graphics window (for "contour")
/fill = fill out the fiducial mark zones (for "contour")
color = color of contour or fill.
xrange = range of sxt x-coord. to be shown (not compat. with /overp)
yrange = range of sxt y-coord. to be shown (not compat. with /overp)
OUTPUTS:
KEYWORDS (OUTPUT):
map = intarr(1024,1024). Map of hidden limbs (vis = 0, hidden = 1)
CALLS: ***
ATT_STRUCT [1], ATT_STRUCT [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
FIX_OLD_ATT [1], FIX_OLD_ATT [2], FIX_OLD_ATT [3], FORZONES [1], FORZONES [2]
HXA_PARMS [1], HXA_PARMS [2], HXA_PARMS [3], INTERPOL, SXT2HXAXY, anytim2ints [1]
anytim2ints [2], concat_dir [4], get_rb0p [1], get_rb0p [2], int2secarr [1]
int2secarr [2], restgen [1], restgen [2]
CALLED BY:
TERM_FIDS
COMMON BLOCKS:
None.
SIDE EFFECTS:
Overplots the current graph with polyfill.
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
JPW, 24-sep-98
[Previous]
[Next]
Name: show_obs
Purpose: show image start times by sequence#
Input Parameters:
structure - roadmap or sxt.index with tag=seq_num
CALLED BY:
sda_look [1]
History: slf, 6/91
[Previous]
[Next]
NAME:
show_obs2
PURPOSE:
To plot when images are taken for each of the particular
observing regions. Also mark where the sequence table or
entry table changed. An option exists to select images with
the cursor (select time range).
CALLING SEQUENCE:
show_obs2, roadmap
show_obs2, roadmap, sel
show_obs2, sxtp, sel, ss ;observing log vector
INPUT:
Structure- Roadmap or observing log entry. Index structures
cannot be passed at this time.
OPTIONAL OUTPUT:
selimg - If present, the user is prompted to mark a
starting and ending time of interest. The value
returned is an array of the same length as
the input array with the selected datasets
having a "1". The way to use this value is
something like the following:
ss = where(selimg)
ss = where(selimg and (roadmap.percentd eq 255))
ss - Return the list of indicies that were selected.
This should be used only if you do not want to
do other searches using the "where" function.
CALLS: ***
GET_BOXCORN, UNIQ [1], UNIQ [2], UNIQ [3], UTPLOT [1], UTPLOT [2], UTPLOT [3]
UTPLOT [4], UTPLOT [5], UTPLOT [6], draw_boxcorn [1], draw_boxcorn [2]
fmt_tim [1], fmt_tim [2], gt_dp_mode [1], gt_dp_mode [2], gt_dp_rate [1]
gt_dp_rate [2], gt_seq_num, gt_seq_tab, int2secarr [1], int2secarr [2]
HISTORY:
Written 7-Nov-91 by M.Morrison (using S.Freeland routine as a start)
12-Nov-91 (MDM) - Added "ss" parameter option
16-Nov-91 (MDM) - Changed to use UTPLOT instead of plot
20-Nov-91 (MDM) - Changed DP_MODE and DP_PLOT symbol from histogram
(psym=10) to usersym (simple horizontal line) because
histogram mode fools the user into thinking that data
exists where it does not
[Previous]
[Next]
NAME:
show_obs3
PURPOSE:
To plot when images are taken for each of the particular
observing regions. Also mark where the sequence table or
entry table changed. An option exists to select images with
the cursor (select time range).
CALLING SEQUENCE:
show_obs3, roadmap
show_obs3, roadmap, sel
show_obs3, sxtp, sel, ss ;observing log vector
INPUT:
Structure- Roadmap or observing log entry. Index structures
cannot be passed at this time.
OPTIONAL OUTPUT:
selimg - If present, the user is prompted to mark a
starting and ending time of interest. The value
returned is an array of the same length as
the input array with the selected datasets
having a "1". The way to use this value is
something like the following:
ss = where(selimg)
ss = where(selimg and (roadmap.percentd eq 255))
ss - Return the list of indicies that were selected.
This should be used only if you do not want to
do other searches using the "where" function.
CALLS: ***
GET_BOXCORN, UNIQ [1], UNIQ [2], UNIQ [3], UTPLOT [1], UTPLOT [2], UTPLOT [3]
UTPLOT [4], UTPLOT [5], UTPLOT [6], anytim2weeks [1], anytim2weeks [2]
draw_boxcorn [1], draw_boxcorn [2], fmt_tim [1], fmt_tim [2], gt_dp_mode [1]
gt_dp_mode [2], gt_dp_rate [1], gt_dp_rate [2], gt_seq_num, gt_seq_tab
int2secarr [1], int2secarr [2], rd_fem
HISTORY:
Written 7-Nov-91 by M.Morrison (using S.Freeland routine as a start)
12-Nov-91 (MDM) - Added "ss" parameter option
16-Nov-91 (MDM) - Changed to use UTPLOT instead of plot
20-Nov-91 (MDM) - Changed DP_MODE and DP_PLOT symbol from histogram
(psym=10) to usersym (simple horizontal line) because
histogram mode fools the user into thinking that data
exists where it does not
11-Dec-91 (MDM) - Took "show_obs2" and made "show_obs3" which also
plotted the s/c day times and SAA times.
18-Feb-92 (MDM) - Changed RD_TRN to use RD_FEM - allowed show_obs3 to
be used with 1992 data.
3-Mar-92 (MDM) - Added the times of KSC station contacts to be plotted
17-Aug-01 (LWA) - Changed loop variables to longword type.
[Previous]
[Next]
NAME:
show_obs4
PURPOSE:
To plot when images are taken for each of the particular
observing regions. Also mark where the sequence table or
entry table changed. An option exists to select images with
the cursor (select time range).
CALLING SEQUENCE:
show_obs4, roadmap
show_obs4, roadmap, sel
show_obs4, sxtp, sel, ss ;observing log vector
INPUT:
Structure- Roadmap, index, or observing log entry.
OPTIONAL OUTPUT:
selimg - If present, the user is prompted to mark a
starting and ending time of interest. The value
returned is an array of the same length as
the input array with the selected datasets
having a "1". The way to use this value is
something like the following:
ss = where(selimg)
ss = where(selimg and (roadmap.percentd eq 255))
ss - Return the list of indicies that were selected.
This should be used only if you do not want to
do other searches using the "where" function.
CALLS: ***
LPRINT, UNIQ [1], UNIQ [2], UNIQ [3], UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4]
UTPLOT [5], UTPLOT [6], anytim2weeks [1], anytim2weeks [2], draw_boxcorn [1]
draw_boxcorn [2], fmt_tim [1], fmt_tim [2], gt_dp_mode [1], gt_dp_mode [2]
gt_dp_rate [1], gt_dp_rate [2], gt_seq_num, gt_seq_tab, int2secarr [1]
int2secarr [2], plot_lcur [1], plot_lcur [2], rd_fem
HISTORY:
Written 7-Nov-91 by M.Morrison (using S.Freeland routine as a start)
12-Nov-91 (MDM) - Added "ss" parameter option
16-Nov-91 (MDM) - Changed to use UTPLOT instead of plot
20-Nov-91 (MDM) - Changed DP_MODE and DP_PLOT symbol from histogram
(psym=10) to usersym (simple horizontal line) because
histogram mode fools the user into thinking that data
exists where it does not
11-Dec-91 (MDM) - Took "show_obs2" and made "show_obs3" which also
plotted the s/c day times and SAA times.
18-Feb-92 (MDM) - Changed RD_TRN to use RD_FEM - allowed show_obs3 to
be used with 1992 data.
3-Mar-92 (MDM) - Added the times of KSC station contacts to be plotted
************ Expanded to SHOW_OBS4 *****************
2-May-92 (MDM) - Added ability to zoom in on a time span
5-May-92 (MDM) - Adjusted code to be able to use "BOX_CURSOR" within
PLOT_LCUR more easily.
[Previous]
[Next]
Name: show_pix_event
Purpose: event driver for xshow_pix
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], EVENT_NAME, GET_WUVALUE
GET_WVALUE, WDEF [1], WDEF [2], XLOADCT [1], XLOADCT [2], XLOADCT [3], XMOVIE [1]
XMOVIE [2], break_file [4], data_chk [1], data_chk [2], get_info [1], get_info [2]
get_info [3], get_info [4], get_logenv [1], get_logenv [2], mapx [1], mapx [2]
restgen [1], restgen [2], ut_time [1], ut_time [2], wc_where [1], wc_where [2]
CALLED BY:
show_pix [1], show_pix [2]
History:
20-Dec-1993 (SLF) (guts of show_pix.pro, 10-Nov)
22-Dec-1993 (SLF) window creation logic (IDL feature workaround)
1-Feb-1994 (SLF) allow empty directories
18-Jul-1994 (SLF) if new data disply, show current UT Time
22-Jul-1994 (SLF) add common block (externalize after exit)
7-Sep-1994 (SLF) Prepend (not append) UT TIME for new_data subdirectory
16-feb-1994 (SLF) enable hardcopy option
2-apr-1995 (slf) movie option
10-apr-1995 (SLF) problem with pre-existing window display
[Previous]
[Next]
Name: show_pixf
Purpose: read/return showpix file info (without running show_pix)
Input Parameters:
NONE
Output Parameters:
image - sp image
text - sp text
Keyword Parameters:
select - if set, show menu
_extra - show_pix subdirectory or ALL (default = new_data)
CALLS:
[Previous]
[Next]
NAME:
sigma_klip
PURPOSE:
Computes the mean and standard deviation of pixels in a box centered at
each pixel of the image, but excluding the center pixel. If the center
pixel value exceeds some # of standard deviations from the mean, it is
replaced by the mean in box. Note option to process pixels on the edges.
CALLING SEQUENCE:
out = sigma_klip(image,width,N_sigma=(#),/monitor)
INPUTS:
image = 2-D image (matrix)
CALLS: ***
big_smooth [1], big_smooth [2]
CALLED BY:
sxt_clean [1], sxt_clean [2]
OPTIONAL KEYWORD INPUT:
width = width of square filter box, in # pixels (default = 3)
N_sigma = # standard deviations to define outliers, floating point,
default = 3. For gaussian statistics:
N_sigma = 1 smooths 35% of pixels, 2 = 5%, 3 = 1%.
/MONITOR prints information about % pixels replaced.
OPTIONAL KEYWORD OUTPUTS:
N_CHANGE = # of pixels changed (replaced with neighborhood mean).
VARIANCE = image of pixel neighborhood variances * (N_sigma)^2,
DEVIATION = image of pixel deviations from neighborhood means, squared.
PROGRAMS CALLED:
big_smooth
PROCEDURE:
Compute mean over moving box-cars using smooth, subtract center values,
compute variance using smooth on deviations from mean,
check where pixel deviation from mean is within variance of box,
replace those pixels in smoothed image (mean) with orignal values,
return the resulting partial mean image.
MODIFICATION HISTORY:
10/20/96 [LWA] made from sigma_filter.pro because of edge problems.
[Previous]
[Next]
NAME:
sigma_klip
PURPOSE:
Computes the mean and standard deviation of pixels in a box centered at
each pixel of the image, but excluding the center pixel. If the center
pixel value exceeds some # of standard deviations from the mean, it is
replaced by the mean in box. Note option to process pixels on the edges.
CALLING SEQUENCE:
out = sigma_klip(image,width,N_sigma=(#),/monitor)
INPUTS:
image = 2-D image (matrix)
CALLS: ***
big_smooth [1], big_smooth [2]
CALLED BY:
sxt_clean [1], sxt_clean [2]
OPTIONAL KEYWORD INPUT:
width = width of square filter box, in # pixels (default = 3)
N_sigma = # standard deviations to define outliers, floating point,
default = 3. For gaussian statistics:
N_sigma = 1 smooths 35% of pixels, 2 = 5%, 3 = 1%.
/MONITOR prints information about % pixels replaced.
OPTIONAL KEYWORD OUTPUTS:
N_CHANGE = # of pixels changed (replaced with neighborhood mean).
VARIANCE = image of pixel neighborhood variances * (N_sigma)^2,
DEVIATION = image of pixel deviations from neighborhood means, squared.
PROGRAMS CALLED:
big_smooth
PROCEDURE:
Compute mean over moving box-cars using smooth, subtract center values,
compute variance using smooth on deviations from mean,
check where pixel deviation from mean is within variance of box,
replace those pixels in smoothed image (mean) with orignal values,
return the resulting partial mean image.
MODIFICATION HISTORY:
10/20/96 [LWA] made from sigma_filter.pro because of edge problems.
[Previous]
[Next]
NAME:
simp_rule
PURPOSE:
Simpson's rule integration of a function
CALLING SEQUENCE:
f=simp_rule(x,y,dx)
INPUT:
x = array containing the independent variable,
must be at least 3 elements, Preferably,
N_ELEMENTS(x) should be odd.
y = dependent variable, y=f(x), or a scalar
y can be a 2d array of (n_elements(x), n_other)
dx = x(i+1)-x(i), of course, dx must be a constant,
If not input, dx = x(1)-x(0) is used.
OUTPUT:
f = the integral of y*dx
CALLED BY:
av_chflux, dem_models, fx_95_o, fx_96_o, fx_97_o, fx_98_o, fx_99_o
HISTORY:
4-nov-93 by JMM
24-oct-95, added 2-d y, jmm
[Previous]
[Next]
NAME:
SIMPLE_TV2
PURPOSE:
put an image into encapsulated PS for inclusion in a LaTeX file.
The figure insertion command in LaTeX will have an argument that
determines its size in the .ps file, and this should ideally
match the xsize parameter here (default 5 inches).
CATEGORY:
CALLING SEQUENCE:
simple_tv2, image, r, g, b, xsize = xsize
simple_tv2, image, r, g, b, xsize = xsize, /revcolor
INPUTS:
image, a byte-scaled image
r,g,b, the color table desired
OPTIONAL (KEYWORD) INPUT PARAMETERS:
xsize. By default it's 5.0 inches
revcolor
ROUTINES CALLED
TV2, of course, YESNOX
OUTPUTS:
if the plot goes to a PostScript file, its name will be "idl.eps"
and it will appear in the current directory
CALLS: ***
LOADCT, OVER, input [1], input [2], tv2 [1], tv2 [2], yesnox [1], yesnox [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
For reasons not known, you should use flareN for reverse B&W
MODIFICATION HISTORY:
HSH, written 22-Aug-96
JRL, fixed 23-Aug-96
HSH, documented 24-Aug-96
[Previous]
[Next]
NAME:
sld_sls_vstrips
PURPOSE:
To plot the SXT dark current signal or stray light signal
after the Nov-92 entrance filter failure.
CALLING SEQUENCE:
sld_sls_vstrips,index_d,sld
sld_sls_vstrips,index-s,sls
METHOD:
Dark frame images are taken with the Be x-ray analysis filter.
After 17-Nov-92 entrance filter failure, it was noticed that thedark
current signal increase dramatically. This routine monitorsthat
increase (which decreased after a few months).
A full frame image is taken and broken up into 51 verticalstrips
(20 columns per strip for FR, 10 for HR, and 5 for QR). Thevalues
plotted in the first plot are strip 5 and strip 0. Strip 5 isthe area
where the increase in the dark signal was seen. Strip 0 is offthe
area where the sun hits the CCD and is a reference area.
The QR images are converted to the equivalent signal for a HRimage.
Open /Al.1 Half Dark C 13 78.0 512x512
Open /AlMg Qrtr Dark C 13 78.0 256x256
CALLS: ***
PAUSE [1], UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6]
pause [2], plottime [1], plottime [2]
HISTORY:
Written Winter, 1992 by M.Morrison
22-May-93 (MDM) - Added header information
16-Aug-93 (LWA) adapted from PLOT_SLD to plot single strips.
2-Sep-93 (LWA) changed to display either SLD or SLS data.
[Previous]
[Next]
NAME:
sld_vstrips
PURPOSE:
To plot the SXT dark current signal after the Nov-92 entrancefilter
failure.
CALLING SEQUENCE:
sld_vstrips,index_d,sld
METHOD:
Dark frame images are taken with the Be x-ray analysis filter.
After 17-Nov-92 entrance filter failure, it was noticed that thedark
current signal increase dramatically. This routine monitorsthat
increase (which decreased after a few months).
A full frame image is taken and broken up into 51 verticalstrips
(20 columns per strip for FR, 10 for HR, and 5 for QR). Thevalues
plotted in the first plot are strip 5 and strip 0. Strip 5 isthe area
where the increase in the dark signal was seen. Strip 0 is offthe
area where the sun hits the CCD and is a reference area.
The QR images are converted to the equivalent signal for a HRimage.
Open /Al.1 Half Dark C 13 78.0 512x512
Open /AlMg Qrtr Dark C 13 78.0 256x256
CALLS: ***
PAUSE [1], UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6]
pause [2], plottime [1], plottime [2]
HISTORY:
Written Winter, 1992 by M.Morrison
22-May-93 (MDM) - Added header information
16-Aug-93 (LWA) adapted from PLOT_SLD to plot single strips.
[Previous]
[Next]
NAME: sleazy_rot
CALLING SEQUENCE:
img_rot = sleazy_rot(item1, img, time_in, time_out [,roll=roll])
INPUT PARAMETERS:
item1 Either an SXT index record or a vector with
the following elements
item1(0) = xcen in pixels from lower left
item1(1) = ycen in pixels from lower left
item1(2) = disk radius in pixels
img
time_in time associated with img
time_out time to rotate to
OPTIONAL KEYWORD INPUTS:
roll Explicit roll value (default is 0 except for SXT)
CALLS:
[Previous]
[Next]
NAME:
SLICE
PURPOSE:
Make Space-Time Slice Data.
CATEGORY:
Image processing.
CALLING SEQUENCE:
Result = SLICE(Image, XX, YY)
INPUTS:
Image: The data array representing the image. This array can be
of any type except complex. Cubic (2d space - time data).
Xy_from: [x, y] address of one end of the profile line. int(2)
Xy_to: [x, y] address of other end of the profile line. int(2)
KEYWORD PARAMETERS:
NONMARK: Set this keyword to inhibit marking the image with the
profile line.
WIDTH: the width of the profile line. If set, the avarage values
of the specified width are returned. If not set, width=1
MAX: Set this keyword to obtain the maximum values of the
specified width.
OUTPUTS:
SLICE returns a floating-point 2-d data which is the space (Y-
direction) - time (X-direction). The space information is the
values of the images along the profile line indicated by Xy_from
and Xy_to.
OPTIONAL OUTPUTS:
XX: After picking the end points, XX contains the X coordinates
of the points along the selected profile.
YY: After picking the end points, YY contains the Y coordinates
of the points along the selected profile.
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
PROFILE2 is used to obtain the values of the images along the
profile line.
HISTORY:
18 Nov 1994 TShimizu written
[Previous]
[Next]
NAME:
SLOFO (= SLOw FOurier)
PURPOSE:
does power spectra the hard way, good for unevenly sampled data
CALLING SEQUENCE:
slofo,seconds,timeseries,power,freq,freqrange,deltaf,/noverbose,/nonorm
INPUTS:
seconds: data times in seconds
timeseries: the time-series data
freqrange: optional frequency range ([f_min,f_max]) in Hz
deltaf: optional spacing of estimates in frequency in Hz
/noverbose defeats the messages
/nonorm defeats normalization to the mean (i.e. leaves dimensions in)
OUTPUTS:
power = power estimates (/Hz)
freq = at what frequencies estimated (Hz)
CALLS: ***
POLY_FIT, SLOFO, STDEV
HISTORY:
written by HSH, Jul. 23, 1992
optional frequency grid added Jul. 25 (HSH)
/noverbose, /nonorm keywords Aug. 21 (HSH)
[Previous]
[Next]
NAME:
SLOPE_TEMP.PRO
PURPOSE:
evaluate radial gradients of coronal models
in terms of scale_height temperatures
CATEGORY:
Yohkoh
CALLING SEQUENCE:
slope_temp, model, heights, fluxes, temp, te, em
INPUTS:
none
OPTIONAL (KEYWORD) INPUT PARAMETERS:
none
ROUTINES CALLED
WITH_INT
OUTPUTS:
heights, fluxes, scale-height temp, te, em
CALLS: ***
SXT_TEEM [1], SXT_TEEM [2], WITH_INT
RESTRICTIONS:
MODIFICATION HISTORY:
HSH written 4 April 1994
[Previous]
[Next]
NAME:
smooth_spec
PURPOSE:
Smooths the counts and flux using idl routine.
(replacing bsc_data structure).
CALLING SEQUENCE:
smooth_spec,bsc_index,bsc_data,smooth_data,smoothing
INPUTS:
bsc_index
bsc_data
smoothing Number of array points to smooth over.
KEYWORDS:
none
USAGE:
PROCEDURES:
OUTPUTS:
smooth_data = structure corresponding to bsc_data, but has
smoothed counts and flux values.
HISTORY:
12-Dec-95, Written. A. Sterling
14-Oct-96, Changed to handle single spectrum arrays. A. Sterling.
[Previous]
[Next]
NAME:
SMUDGE_SPECTRA
PURPOSE:
plot a smudge of the BCS spectra against time
using colour table 5
CALLING SEQUENCE:
smudge_spectra,dpsectra
INPUTS:
dspectra decompressed BCS spectra array
OUTPUTS:
OPTIONAL OUTPUTS:
CALLS: ***
LOADCT
CALLED BY:
BCS_SPMOVIE [1], BCS_SPMOVIE [2]
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
RDB Oct 1991
RDB 13-Dec-94 Replaced call to SUM with TOTAL
[Previous]
[Next]
NAME:
SOHO_COORDS
PURPOSE:
convert SOHO angular offsets into approximate Yohkoh pointing
coordinates
CATEGORY:
soho_coords, coords
CALLING SEQUENCE:
INPUTS:
coords, a two-element vector [arc sec w, arc sec n] wrt Sun center
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
CALLS: ***
conv_a2p [1], conv_a2p [2], lastsfd [1], lastsfd [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
JPW and HSH, written 3-oct-96
[Previous]
[Next]
NAME: sol_rot
PURPOSE: To take pixels in a 2D image map them onto a sphere, rotate the
sphere map the pixels back to the plane. For use in extrapolating
GBO data backward or forward in time.
METHOD: Take the pixel coordinates of the on disk points, map them
to heliocentric coordinates, add the appropriate differential
rotation, and map them back.
All pixels that have rotated behind the limb are marked by [-1,-1]
entries. For now just take longitude to +/- 90.
CALLING SEQUENCE:
out=gbo_rot_t(xx,yy,trgt,date,delt[,roll=roll])
PARAMETERS:
pixx vector with the x pixel coordinates.
pixy vector with the y pixel coordinates.
trgt a three vector, with the centroid and radius in the
same size pixels as the image.
date the time of the image, in standard 7 part form,
[DD-MMM-YY HH:MM:SS].
delt the rotation time, in decimal days.
out the return is a 2xn matrix with the new x & y pixel
coordinates.
KEYWORDS: roll optional roll correction. For SXT images you can
use 1.0.
stretch optional return. factor measuring the longitudinal
contraction/expansion of each pixel.
RETURN TYPE:
CALLS: ***
DIFF_ROT [1], DIFF_ROT [2], conv_h2p [1], conv_h2p [2], conv_p2h [1], conv_p2h [2]
CALLED BY:
gbo_pfi, gbo_rot_t, rect_rot
HISTORY: Drafted by A.McAllister, Feb. 1993.
Reworked for new conversion routines, Jun. 1993.
16-Oct-93 (MDM) - Modified call to CONV_P2H and H2P to use the
keyword input "roll" instead of "tilt"
Corrected output assignment indexing???, AHM, Dec 1, 93.
[Previous]
[Next]
NAME: sol_rot
CALLING SEQUENCE:
img_rot = dry_rot(item1, img, time_out [,roll=roll])
INPUT PARAMETERS:
item1 Either an SXT index record or a vector with
the following elements
item1(0) = xcen in pixels from lower left
item1(1) = ycen in pixels from lower left
item1(2) = disk radius in pixels
item1(3) = time of input image (img)
img
time_out time to rotate to
OPTIONAL KEYWORD INPUTS:
roll Explicit roll value (default is 0 except for SXT)
CALLS:
CALLED BY
gbo_pfi, gbo_rot_t, rect_rot
[Previous]
[Next]
Name:
sonyloop
Purpose:
Play a range of frames on the Sony LVR-5000A laser videodisk
recorder/player an arbitrary number of times
Calling sequence:
sonyloop, f0
sonyloop, f0, f1, sec_per_frame=sec_per_frame, reps=reps,
reverse=reverse, w1=w1, device=device
CALLED BY:
mk_vcr, vblink, video_blink [1], video_blink [2], video_menu
Examples:
sonyloop, 5000 ; Position to frame 5000
sonyloop, 5000, 5200 ; Play from 5000 to 5200 at normal speed
sonyloop, 5000, 5200, sec=2 ; Play a factor of 2 slower
sonyloop, 5200, 5000 ; Play backwards
sonyloop, 5000, 5200, /rev ; Play forward and backwards
sonyloop, 5000, 5200, w1=4 ; Position to 5000 and pause 4sec, then play
sonyloop, 5000, 5200, w2=4 ; Pause 4sec after playing
; If /rev switch is set, w2 wait is applied
;- before the reverse play starts.
Input:
f0, f1 = start and end frames of sequence to play
Optional Input Keywords:
sec_per_frame = dwell at each frame in units of 1/30 sec
1:255 are acceptable.
-1 corresponds to 1/5 speed (slow forward/reverse)
-2 corresponds to 3x normal (fast forward/reverse)
-3 corresponds to normal
reps = number of playback repeats at each playback speed
reverse = 0 to jump from last to first frame
= 1 to reverse play from last frame to first frame
w1 = wait interval after initial display before sequence begins
w2 = wait after the sequence ends
device = 0 for sony 3000 (/dev/tty08)
device = 1 for sony 5000 (default) (/dev/tty09)
CALLS: ***
command_laser, command_tty2, get_sony_cmd, tbeep [1], tbeep [2], tbeep [3]
Restrictions:
1. Must be used on isass3 only (physical port is on isass3)
2. Assumes lun=1 for I/O.
3. Reverse step (4d) and reverse slow (4c) gives normal play speeds.
Timing calculation, therefore, is sometimes off.
Method:
Modification History:
Written, 24-feb-92 - gls
Modified, 27-aug-92, JRL: Fixed the delay times, some of the logic.
18-Jun-93 (MDM) - Removed print statments
- Made default W1 wait 0 seconds
GLS - 26-apr-94 - Replaced 'printf' with calls to command_tty2
which calls a modified version of call_tty
- this was necessary after Ultrix upgrade
28-jan-95, JRL, Added beep keyword. Changed to call get_sony_cmd
2-Feb-95, JRL, Modified to be consistent with new get_sony_cmd
2-Mar-95, LS, modified the ports for the DEC alpha and terminal server
30-May-96, GAL, Found the working version of this routine in Greg's
personal area, without documentation for the changes.
It looks like Greg's newer version uses command_laser
instead of command_tty2 in most of the commands to the
sony.
[Previous]
[Next]
Name:
sonyloop
Purpose:
Play a range of frames on the Sony LVR-5000A laser videodisk
recorder/player an arbitrary number of times
Calling sequence:
sonyloop, f0
sonyloop, f0, f1, sec_per_frame=sec_per_frame, reps=reps,
reverse=reverse, w1=w1, device=device
CALLED BY:
mk_vcr, vblink, video_blink [1], video_blink [2], video_menu
Examples:
sonyloop, 5000 ; Position to frame 5000
sonyloop, 5000, 5200 ; Play from 5000 to 5200 at normal speed
sonyloop, 5000, 5200, sec=2 ; Play a factor of 2 slower
sonyloop, 5200, 5000 ; Play backwards
sonyloop, 5000, 5200, /rev ; Play forward and backwards
sonyloop, 5000, 5200, w1=4 ; Position to 5000 and pause 4sec, then play
sonyloop, 5000, 5200, w2=4 ; Pause 4sec after playing
; If /rev switch is set, w2 wait is applied
;- before the reverse play starts.
Input:
f0, f1 = start and end frames of sequence to play
Optional Input Keywords:
sec_per_frame = dwell at each frame in units of 1/30 sec
1:255 are acceptable.
-1 corresponds to 1/5 speed (slow forward/reverse)
-2 corresponds to 3x normal (fast forward/reverse)
-3 corresponds to normal
reps = number of playback repeats at each playback speed
reverse = 0 to jump from last to first frame
= 1 to reverse play from last frame to first frame
w1 = wait interval after initial display before sequence begins
w2 = wait after the sequence ends
device = 0 for sony 3000 (/dev/tty08)
device = 1 for sony 5000 (default) (/dev/tty09)
CALLS: ***
command_laser, command_tty2, get_sony_cmd, tbeep [1], tbeep [2], tbeep [3]
Restrictions:
1. Must be used on isass3 only (physical port is on isass3)
2. Assumes lun=1 for I/O.
3. Reverse step (4d) and reverse slow (4c) gives normal play speeds.
Timing calculation, therefore, is sometimes off.
Method:
Modification History:
Written, 24-feb-92 - gls
Modified, 27-aug-92, JRL: Fixed the delay times, some of the logic.
18-Jun-93 (MDM) - Removed print statments
- Made default W1 wait 0 seconds
GLS - 26-apr-94 - Replaced 'printf' with calls to command_tty2
which calls a modified version of call_tty
- this was necessary after Ultrix upgrade
28-jan-95, JRL, Added beep keyword. Changed to call get_sony_cmd
2-Feb-95, JRL, Modified to be consistent with new get_sony_cmd
2-Mar-95, LS, modified the ports for the DEC alpha and terminal server
30-May-96, GAL, Found the working version of this routine in Greg's
personal area, without documentation for the changes.
It looks like Greg's newer version uses command_laser
instead of command_tty2 in most of the commands to the
sony.
[Previous]
[Next]
Name:
sonyloop2
Purpose:
Play a range of frames on the Sony LVR-5000A laser videodisk
recorder/player an arbitrary number of times
Calling sequence:
sonyloop2, f0
sonyloop2, f0, f1, sec_per_frame=sec_per_frame, reps=reps,
reverse=reverse, w1=w1, device=device
Examples:
sonyloop2, 5000 ; Position to frame 5000
sonyloop2, 5000, 5200 ; Play from 5000 to 5200 at normal speed
sonyloop2, 5000, 5200, sec=2 ; Play a factor of 2 slower
sonyloop2, 5200, 5000 ; Play backwards
sonyloop2, 5000, 5200, /rev ; Play forward and backwards
sonyloop2, 5000, 5200, w1=4 ; Position to 5000 and pause 4sec, then play
sonyloop2, 5000, 5200, w2=4 ; Pause 4sec after playing
; If /rev switch is set, w2 wait is applied
;- before the reverse play starts.
Input:
f0, f1 = start and end frames of sequence to play
Optional Input Keywords:
sec_per_frame = dwell at each frame in units of 1/30 sec
1:255 are acceptable.
-1 corresponds to 1/5 speed (slow forward/reverse)
-2 corresponds to 3x normal (fast forward/reverse)
-3 corresponds to normal
reps = number of playback repeats at each playback speed
reverse = 0 to jump from last to first frame
= 1 to reverse play from last frame to first frame
w1 = wait interval after initial display before sequence begins
w2 = wait after the sequence ends
device = 0 for recorder/player (/dev/tty00)
device = 1 for player (/dev/tty01)
CALLS: ***
command_tty2
Restrictions:
1. Must be used on isass3 only (physical port is on isass3)
2. Assumes lun=1 for I/O.
3. Reverse step (4d) and reverse slow (4c) gives normal play speeds.
Timing calculation, therefore, is sometimes off.
Method:
Modification History:
Written, 24-feb-92 - gls
Modified, 27-aug-92, JRL: Fixed the delay times, some of the logic.
18-Jun-93 (MDM) - Removed print statments
- Made default W1 wait 0 seconds
[Previous]
[Next]
NAME:
soon2fits
PURPOSE:
Take a SOON tape and extract certain images into FITS files.
SAMPLE CALLING SEQUENCE:
soon2fits, 1
soon2fits, 1, [4,5,6]
soon2fits, tape_files, image_list, dev=dev
OPTIONAL INPUT:
tape_files - The tape file numbers to extract. If omitted, it
will read all files. Start counting at 1.
image_list - The images to extract for that tape file. If omitted,
it will extract all images. First image is 1.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GSN_INFO, anytim2ex [1]
anytim2ex [2], concat_dir [4], def_tapd [1], def_tapd [2], def_tapd [3]
ex2fid [1], ex2fid [2], mtcmd [1], mtcmd [2], wrt_fits [1], wrt_fits [2]
OPTIONAL KEYWORD INPUT:
dev - The device number. If not defined, it uses dev=0
offline - Eject the tape after reading
eject - Eject the tape after reading
outdir - The output directory. The default is the directory
which you are running from.
METHOD:
For every TAPE file, there is a 240 (or 120) byte file in front
and in back of the tape file. So it is:
Junk File1 Junk Junk File2 Junk Junk File3
Those "junk" files are the VMS FILES11 beginning of file and
end of file headers.
HISTORY:
Written 28-Jul-93 by M.Morrison
3-Aug-94 (MDM) - Added /EJECT
- Corrected some logic (allowed backward positioning
to work properly)
- Sorted the "tapefiles" list to do them in order
[Previous]
[Next]
NAME:
soon_sea
PURPOSE:
TO allow access to the SOON catalog
CALLING SEQUENCE:
.run soon_sea
HISTORY:
Written 5-Aug-94 by M.Morrison
23-Sep-94 (MDM) - Changed start/stop time format statement
- Change "LI" option to allow user to select
which tape files to list
- Added "SI" option to do per image listing of
search results.
19-Apr-95 (MDM) - Adjusted to work to search for full disk
images without specifying a region
- Corrected some catalog selection problems
(it wasn't parsing the times properly)
25-Apr-95 (MDM) - Corrected error where full disk searches
were not being reset.
[Previous]
[Next]
NAME:
soon_search
PURPOSE:
search the SOON catalog
CALLING EXAMPLES:
soon_search, starttime, endtime ,/full_disk [,/mail, address='emailadd']
soon_search, starttime, endtime ,helio='N12W12',ref_date='9-Jul-94'
soon_search, starttime, endtime ,helio='N12W12',ref_date='9-Jul-94', $
gif_file="gifname"
CALLS: ***
ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
FILE_SELTIME, anytim2ints [1], anytim2ints [2], concat_dir [4], data_chk [1]
data_chk [2], file_append [1], file_append [2], get_host [1], get_host [2]
get_user [1], get_user [2], gt_day [1], gt_day [2], in_fov, mail [1], mail [2]
plot_gsn, pr_gsn [1], pr_gsn [2], rd_gsn, rd_tfile [1], rd_tfile [2], strspecial [1]
strspecial [2], tbeep [1], tbeep [2], tbeep [3], tim2match [1], tim2match [2]
tim2match [3]
CALLED BY:
soon_search_www
HISTORY:
23-may-1995 (SLF) - Paramaterized MDM soon_sea (main program)
14-jul-1995 (SLF) - add gif_file keyword (passed to plot_gsn)
21-jul-1995 (SLF) - add image_list keyword and function
24-apr-1996 (SLF) - work around bug in file_seltime
26-apr-1996 (SLF) - add AR keyword and function
6-Jun-1996 (SLF) - expand AR search (allow SN..., etc)
[Previous]
[Next]
NAME:
SORT_FILES
PURPOSE:
Finds and sorts Yohkoh files (by time order) that may be stored out
of order.
CATEGORY:
CALLING SEQUENCE:
files = sort_files(fstring)
INPUTS:
fstring string to use for search
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
OUTPUTS:
files string array conatining sorted files (includes
directory information)
OPTIONAL OUTPUT PARAMETERS:
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], DATA_PATHS, break_file [4], concat_dir [4]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
Searches using data_paths unless directory already specified
MODIFICATION HISTORY:
RDB 26-JAN-94 Written
[Previous]
[Next]
NAME:
soup_info
PURPOSE:
To create a summary text line of the information in the SOUP header
SAMPLE CALLING SEQUENCE:
print, soup_info(header)
info_array = soup_info(head)
INPUT:
header - The SOUP header structure
OUTPUT:
returns a string array with the descriptor
CALLS: ***
fmt_tim [1], fmt_tim [2], moreidl [1], moreidl [2]
HISTORY:
Written 16-Apr-93 by M.Morrison
[Previous]
[Next]
NAME:
soup_obs2
PURPOSE:
To plot when images are taken for each of the particular
wavelength/offset.
CALLING SEQUENCE:
soup_obs2, head
soup_obs2, head, sel, ss
soup_obs2, head, roadmap=roadmap
INPUT:
header - The header structure
OPTIONAL OUTPUT:
selimg - If present, the user is prompted to mark a
starting and ending time of interest. The value
returned is an array of the same length as
the input array with the selected datasets
having a "1". The way to use this value is
something like the following:
ss = where(selimg)
ss = where(selimg and (roadmap.percentd eq 255))
ss - Return the list of indicies that were selected.
This should be used only if you do not want to
do other searches using the "where" function.
CALLS: ***
LPRINT, UNIQ [1], UNIQ [2], UNIQ [3], UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4]
UTPLOT [5], UTPLOT [6], draw_boxcorn [1], draw_boxcorn [2], int2secarr [1]
int2secarr [2], plot_lcur [1], plot_lcur [2]
HISTORY:
Written 16-Apr-93 by M.Morrison (using SOUP_OBS as a start)
[Previous]
[Next]
NAME:
soupdat
PURPOSE:
To act like the program YODAT for accessing SOUP data
HISTORY:
Written 8-Mar-93 by M.Morrison
16-Apr-93 (MDM) - Added SOUP_OBS2
[Previous]
[Next]
Project : SOHO - CDS
Name : SP_COMMON
Purpose : Contains common blocks used by SCANPATH.
Explanation : This is not a procedure as such, but contains the common blocks
used by SCANPATH and associated routines.
Common : Contains the common blocks SCANPATH, LIB_STUFF and PROCB.
Category : Documentation, Online_help.
Prev. Hist. : See SCANPATH.
Written : D. Zarro, GSFC/SDAC, 1993.
Modified : Version 1, William Thompson, GSFC, 23 April 1993.
Renamed to SP_COMMON for DOS compatibility, and
incorporated into CDS library.
Version 2, Dominic Zarro, GSFC, 1 August 1994.
Added additional common block (DEVICE) and
extended common block SCANPATH to accomodate
the new independent procedure widget base
Version 2.1, Dominic Zarro, GSFC, 3 September 1994.
Added SEARCH common block
Version : Version 2.1, 1 August 1993.
[Previous]
[Next]
Name: sparse
Purpose: treat sparse matrices as stream for memory conservation
For example, for large array which is mostly zeros, store
only the non-zero values.
Input Paramters:
input - if structure, convert sparse structure to array
if array, , convert array to sparse structure
index - (optional) only convert specified index (must be scalar)
Input Keyword Parameters:
lowcut - low value cutoff (currently,only used with data->structure)
highcut - high value cutoff (currently,only used with data->structure)
Calling Sequence:
structure=sparse(data [,lowcut=lowcut,highcut=highcut])
structure=sparse(data) ; sparse data array in, sparse structure out
structure=sparse(data,low=1) ; Save values where data ge 1
data=sparse(structure) ; sparse structure in, sparse data array out
data=sparse(structure,index) ; 3D arrays only, only specified 2D out
; Index is the index of the 3rd dimension.
CALLED BY:
SXT_PREP0, ffi_prep, sxt_satpix [1], sxt_satpix [2]
History:
slf - 24-feb-1993 -- Minor mods by JRL
CALLS: ***
FMT_TAG [1], FMT_TAG [2], MAKE_STR [1], MAKE_STR [2]
Restrictions:
proto - needs some more type/data size checking
[Previous]
[Next]
Name: sparse
Purpose: treat sparse matrices as stream for memory conservation
For example, for large array which is mostly zeros, store
only the non-zero values.
Input Paramters:
input - if structure, convert sparse structure to array
if array, , convert array to sparse structure
index - (optional) only convert specified index (must be scalar)
Input Keyword Parameters:
lowcut - low value cutoff (currently,only used with data->structure)
highcut - high value cutoff (currently,only used with data->structure)
Calling Sequence:
structure=sparse(data [,lowcut=lowcut,highcut=highcut])
structure=sparse(data) ; sparse data array in, sparse structure out
structure=sparse(data,low=1) ; Save values where data ge 1
data=sparse(structure) ; sparse structure in, sparse data array out
data=sparse(structure,index) ; 3D arrays only, only specified 2D out
; Index is the index of the 3rd dimension.
CALLED BY:
SXT_PREP0, ffi_prep, sxt_satpix [1], sxt_satpix [2]
History:
slf - 24-feb-1993 -- Minor mods by JRL
CALLS: ***
FMT_TAG [1], FMT_TAG [2], MAKE_STR [1], MAKE_STR [2]
Restrictions:
proto - needs some more type/data size checking
[Previous]
[Next]
NAME:
SPARTAN_PLANNER
PURPOSE:
Sketch out the Spartan/Yohkoh time line for observations. Very
ad hoc, must edit for every little change
CATEGORY:
Yohkoh
CALLING SEQUENCE:
spartan_planner, deltat
INPUTS:
deltat is the delay in hours from 13-Sep 19:45 UT for observation start
OPTIONAL (KEYWORD) INPUT PARAMETERS:
/early starts the plot early for the benefit of chief observers
OUTPUTS:
CALLS: ***
FMT_TIMER [1], FMT_TIMER [2], OUTPLOT [1], OUTPLOT [2], OUTPLOT [3], UTPLOT [1]
UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], anytim [1], anytim [2]
anytim [3], anytim [4], anytim [5]
COMMON BLOCKS:
SIDE EFFECTS:
makes a plot in your current window
RESTRICTIONS:
MODIFICATION HISTORY:
HSH, written 8-sep-94
HSH, added parameter for Shuttle slippage 10-sep-94
HSH, added the most recent times 12-sep-94
[Previous]
[Next]
NAME:
spatial_dem
PURPOSE:
Creates a 'spatial DEM' for an SXT image, or set of images.
This sums up all of the em's in individual temperature bins.
CALLING SEQUENCE:
dem47 = spatial_dem(te0, em0, t6_arr, t6_edges=t6_edges, n_t6bins=n_t6bins, $
t6_binsize = t6_binsize, t6_max = t6_max, t6_min = t6_min)
INPUT:
te0 = Log(T), can be any array
em0 = Log(EM), must be the same size as te0
OUTPUT:
dem47 = the DEM the emisison measure in each temperature bin
t6_arr= the temperature array that the dem is defined on, the
midpoints of the temperature bins.
KEYWORDS:
t6_edges= The bin edges for the T bins (OUTPUT)
n_t6bins= the number of bins, if passed in, then there will
be this many bins, either between the values of
t6_max and t6_min, or if t6_binsize is passed in,
then from t6_min to n_t6bins*t6_binsize
t6_binsize= The binsize for the T bins, the default is 1.0
t6_max= The max. temperature for the T bins, the default is the
bin edge above the max. of te0
t6_min = The min. temperature FOR the T bins, the default is the
minimum value of te0
CALLED BY:
multi_spatial_dem
HISTORY:
26-jan-96, jmm
[Previous]
[Next]
NAME:
spc_struct V0.9
PURPOSE:
Define structures for reading/writing SPC files
CALLING SEQUENCE:
SPC_struct
CALLS: ***
SPC_STRUCT
HISTORY:
wrote for spc files by atp 6/7/92 (july)
cleanup/rationalisation of version numbers atp 7/7/92
notes:
** in the descriptor field of an entry will
indicate that this entry is not in the file.
[Previous]
[Next]
PROJECT: SDAC
NAME: SPEX_ENV
PURPOSE: install the SPEX environmentals and path locally,
Two software directories needed are installed at the top of the path.
CALLING SEQUENCE:
Spex_env [,old_path=old_path]
CALLS: ***
ARR2STR [1], Arr2Str [2], CHKLOG [1], CHKLOG [2], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], FCHECK, STR_SEP, concat_dir [4]
MODIFICATION HISTORY:
ras, 21-apr-94
RAS, 14-OCT-94
ras, 13-jan-96, installation at ISAS
RAS, 15-jan-96, support ISAS and SSL from same script
RAS, 16-May-1997, change SSL paths. Soon to be obsolete, use SSW site setups!
[Previous]
[Next]
NAME:
spfdgrs.pro
PURPOSE:
Spawn spfdgrs program.
See Yohkoh WBS manual.
OPTIONAL INPUT:
disp - if set, write the fitting results on terminal.
HISTORY:
Written 7-Jan-94 by T.Hiraoka,K.Morimoto
[Previous]
[Next]
NAME:
spfdhxs.pro
PURPOSE:
Spawn spfdhxs program.
See Yohkoh WBS manual.
OPTIONAL INPUT:
disp - if set, write the fitting results on terminal.
HISTORY:
Written 7-Jan-94 by J.Sato,K.Morimoto
[Previous]
[Next]
NAME:
SPFDPLOT_GRS
PURPOSE:
To plot grs spectrum data for spfd.
CALLING SEQUENCE:
spfdplot_grs,spfd
spfdplot_grs,spfd,/datasp
spfdplot_grs,spfd,/model
spfdplot_grs,spfd,/residual
spfdplot_grs,spfd,/chimap
spfdplot_grs,spfd,comp=0
INPUTS:
spfd - SPFD_GRS structure. After the run of read_spfdgrs and
the extract of spfd.
OPTIONAL INPUTS:
( If no optional input, the data spectrum, the model spectrum
and the residuals divided by sigma are plotted. )
datasp - If set, only the data spectrum is plotted.
model - If set, only the model spectrum is plotted.
residual - If set, only the residuals divided by sigma are plotted.
chimap - If set, only the chi-square contour map is plotted.
comp - Number attached spectral component. If present,
only one spectal component is plotted.
notitle - If set, no title is plotted.
cm2 - If set, a unit of flux is counts/cm**2/sec/keV. If not set,
a unit of flux is counts/sec/keV.
photon - If set, a unit of flux is photon/cm**2/sec/keV.
yrange - If present, the data points below (above) yrange(0)
(yrange(1)) are plotted at the yrange(0) (yrange(1)).
PROCEDURE:
Photon flux is calculated from [count flux]x[conversion factor].
The conversion factor is the ratio of photon to count given
by fitting model spectrum.
CALLS: ***
ERRPLOT [1], ERRPLOT [2], FCHECK, GET_KBRD2
RESTRICTIONS:
One of five optional inputs,'datasp','model,'residual','comp'
and 'chimap' can be set.
HISTORY:
Written 14-dec-93 by T.Hiraoka ( Rikkyo Univ.)
[Previous]
[Next]
NAME:
SPFDPLOT_HXS
PURPOSE:
To plot hxs spectrum data for spfd.
CALLING SEQUENCE:
spfdplot_hxs,spfd
spfdplot_hxs,spfd,/datasp
spfdplot_hxs,spfd,/model
spfdplot_hxs,spfd,/residual
spfdplot_hxs,spfd,/chimap
spfdplot_hxs,spfd,comp=0
INPUTS:
spfd - SPFD_HXS structure. After the run of read_spfdhxs and
the extract of spfd.
OPTIONAL INPUTS:
( If no optional input, the data spectrum, the model spectrum
and the residual divided by sigma are plotted. )
datasp - If set, only the data spectrum is plotted.
model - If set, only the model spectrum is plotted.
residual - If set, only the residuals divided by sigma are plotted.
chimap - If set, only the chi-square contour map is plotted.
comp - Number attached spectral component. If present,
only one spectal component is plotted.
notitle - If set, no title is plotted.
cm2 - If set, a unit of flux is counts/cm**2/sec/keV. If not set,
a unit of flux is counts/sec/keV.
photon - If set, a unit of flux is photon/cm**2/sec/keV.
yrange - If present, the data points below (above) yrange(0)
(yrange(1)) are plotted at the yrange(0) (yrange(1)).
PROCEDURE:
Photon flux is calculated from [count flux]x[conversion factor].
The conversion factor is the ratio of photon to count given
by fitting model spectrum.
CALLS: ***
ERRPLOT [1], ERRPLOT [2], FCHECK, GET_KBRD2
RESTRICTIONS:
One of five optional inputs,'datasp','model,'residual','comp'
and 'chimap' can be set.
HISTORY:
Written 14-dec-93 by T.Hiraoka ( Rikkyo Univ.)
Updated 20-dec-93 by T.Hiraoka ; added photon option.
[Previous]
[Next]
NAME:
sphere_dist
PURPOSE:
angular separation on shpere
CATEGORY:
CALLING SEQUENCE:
distance = sphere_dist(alpha1, delta1, alpha2, delta2)
INPUTS:
alpha, delta the longitude and colatitude in degrees
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED
OUTPUTS:
angle from 1 to 2 in degrees
CALLED BY:
BURSTER_POSITION
COMMON BLOCKS:
SIDE EFFECTS:
seems to have errors of .03 degrees sometimes!
RESTRICTIONS:
MODIFICATION HISTORY:
HSH 12-Mar-96
[Previous]
[Next]
NAME: spike_1d_id
PURPOSE: To locate single element spikes in 1-D arrays.
METHOD: Default uses a boxcar smoothing filter as a
reference, takes the difference and compares it with the
cutoff value. The returned variable is a vector of pointers
to spikes (both - and +) in the input variable.
[Unless "pos" or "neg" are set.]
-- For many applications it is best to use ALOG(ARRAY)
so that the search is done as a change in a
multiplicative factor rather than an additive term.
CALLING SEQUENCE:
out = spike_1d_id(array,cutoff,[remove=remove,width=width])
PARAMETERS: array input array
cutoff comparison cutoff
KEYWORDS: remove when set return corrected
array
width boxcar filter size (default
is 5).
pos remove only + spikes
neg remove only - spikes
HISTORY: LWA, 3/12/94 from spike_id.pro
Made the test absolute to catch both - and + spikes. 3/15/94.
Added pos & neg keywords. 3/17/94 LWA
[Previous]
[Next]
NAME: spikes
PURPOSE: To locate single pixel spikes, like Cosmic Rays,
in 2-D images.
METHOD: Default uses a three point median filter as a
reference, takes the difference and compares it with the
cutoff value. The returned variable is a vector of pointers
to spikes in the input variable. Default mode is to remove
holes and spikes. Average filter is also available.
CALLING SEQUENCE: spikes=(img,cutoff,[remove=remove,width=width,
average=average, pos=pos, neg=neg])
PARAMETERS: img input image
cutoff comparison cutoff
KEYWORDS: /remove when set return corrected
image
width median filter size (default
is 3).
/average use an average filter instead
of median.
/pos remove only spikes (or bright val)
/neg remove only holes (or dark values)
CALLED BY:
NAME [3], de_spiker [1], de_spiker [2], despike, sfc_de_spiker, wl_process
Note: spikes will use -1 * abs(cutoff)
NOTE: Default is to remove pos and neg.
CALLS: ***
coord_v2l
HISTORY: Drafted by A.McAllister, following a B.Labonte
algorythm, 10-jun-93.
Added code to handle borders, and keyword to
return corrected image, 2-jul-93.
trap for no spikes, 9-aug-93.
added control to filter size (default is the orginal
value of 3), also added absolute value on difference
12-Jan-94, gal
17-Mar-94, gal, added average filter, options for removal
of only pos or neg; keeping the default mode as removing
both pos and neg.
12-dec-94, JRL, Changed code to make /pos and /neg options work.
Improved the interpretation of input keywords.
Fixed the /remove option (now consistent with de_spiker).
[Previous]
[Next]
NAME:
spikes_off
PURPOSE:
Remove spikes and streaks (e.g., SAA, dark spikes) in a data array.
CALLING SEQUENCE:
spikes_off,data,level,out [,ups,downs,neg=neg,both=both,width=width]
spikes_off,data,25,clean_array -- removes positive spikes only
spikes_off,data,7,clean_array,/neg -- removes negative spikes only
spikes_off,data,10,clean_array,ups,downs,/both -- removes
both + and - spikes and returns spike ID array of both types
INPUTS:
data = image or image cube of any type
level = amplitude of spike to be removed
(try 10 to start and move up or down by experiment)
OPTIONAL INPUT KEYWORDS:
neg, set this keyword to remove negative spikes from
dark frame subtraction, etc.
both, set this keyword to remove both + and - spikes to
amplitude set by level.
width, width of smoothing in call to median, default = 3
OUTPUTS:
clean_array = the data array cleaned of spikes.
ups = the ID array of the location of positive spikes
downs = the ID array of the location of negative spikes
ADVICE
I have found that it is sometimes necessary to put the data through the
program 2 or 3 times to achieve maximum cleaning.
For single SXT images, level = 7 is a reasonable value.
For composite images with their greater dynamic range try 25.
A good check on whether real data are being affected is to do the
following test:
test = original_image - clean_image
tvscl,test
If the pattern of pixels in the test image does not reflect any of
the structure of the solar image it is safe to assume the cleaning
is OK.
It is also useful to ask for the ups and downs in the call and do
test = bytarr(xs,ys) where xs and ys are the dimensions
of one of the images in your array.
test(downs) = 1
test(ups) = 2
tvscl, test
This shows which pixels were modified in the last image processed
CALLS: ***
sfd_comp, spike_id
CALLED BY:
WL_CUBE_II, mk_sun_mosaic
MODIFICATION HISTORY:
September-93, L. Acton, driver for SPIKES.PRO.
October-93, LWA, added keyword "both"
March-94, LWA, added feature to do spike ID on SFD_COMPRESSED image
if a non_byte image is passed in. Also had to create
spike_id.pro and call it in order to keep the ups/downs/both
feature of my program. Changed the program to a procedure
and added the ability to return the spike ID arrays.
3/9/94 put "NO SPIKES" messages outside of loop. LWA
[Previous]
[Next]
NAME:
SPLINE_LC
PROCEDURE:
Fit SPLINE curve on the SXT light curve.
INPUTS:
lc - values of intensity. one dimension.
index - sxt index corresponding to "lc"
OPTINAL INPUTS:
maxdn - Maximum increased intensity (DN/sec).
maxtm - Time at the maximum intensity (DD-MMM-YY HHMMSS, string)
backdn - Background intensity (DN/sec).
backtm - Time at the background data (DD-MMM-YY HHMMSS, string)
lifetime - calcurated LIFETIME (min.).
OUTPUTS:
result - result of SPLINE cureve,
x - vector of abcissae value(unit is min.), coresponding to
result.
CALLS: ***
Int2Ex [1], Int2Ex [2], PLOT_VLINE, SPLINE_PLOT, fmt_tim [1], fmt_tim [2]
gt_day [1], gt_day [2], gt_time [1], gt_time [2]
SIDE EFFECTS:
Plot "lc" vs time using UTPLOT. Then overlay the
SPLINE cureve on "lc" plot.
RESTRICTION:
Spline curve is calculated every 6 sec.
HISTORY:
19 Sep, 92 written by T.Shimizu
10 June,93 Add the options "maxdn", "maxtm", "backtm" and "lifetime"
13 June,93 Revise due to Bags.
Add the option "backdn".
[Previous]
[Next]
NAME:
SPLINE_PLOT
CALLED BY:
SPLINE_LC
PROCEDURE:
Fit SPLINE curve on the SXT light curve.
INPUTS:
lc - values of intensity. one dimension.
index - sxt index corresponding to "lc"
OPTINAL INPUTS:
%NO YET timestep - Change the step value for SPLINE curve fitting.
Default value is every 6 sec.
OUTPUTS:
result - result of SPLINE curve,
x - vector of abcissae value(unit is min.), coresponding to
result.
CALLS: ***
OUTPLOT [1], OUTPLOT [2], OUTPLOT [3], SPLINE, UTPLOT [1], UTPLOT [2], UTPLOT [3]
UTPLOT [4], UTPLOT [5], UTPLOT [6], gt_day [1], gt_day [2], gt_time [1], gt_time [2]
SIDE EFFECTS:
Plot "lc" vs time using UTPLOT. Then overlay the
SPLINE cureve on "lc" plot.
RESTRICTION:
Spline curve is calculated every 6 sec.
HISTORY:
19 Sep, 92 written by T.Shimizu
6 Nov, 94 to allow to plot over 2 days.
[Previous]
[Next]
NAME:
Split_w_h
PURPOSE:
Split w_h logical record into two logical records:
hxt and wbs.
CALLING SEQUENCE:
Split_w_h, w_h, [HXT=hxt, WBS=wbs]
INPUT:
w_h logical record vector for hxt and wbs.
OUTPUT/Keyword:
hxt logical record vector for hxt
wbs logical record vector for wbs
CALLED BY:
RdObsDat
HISTORY:
written 19-Aug-91, by GAL
[Previous]
[Next]
NAME:
SPLITSTR
PURPOSE:
Split a string into an array at specified character boundary
CATEGORY:
CALLING SEQUENCE:
array = splitstr(string,character)
INPUTS:
string = string to be split
character = character to split string on
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
array = string array
CALLED BY:
Check the ATT database vs the SXC limb fit database to look for bad
HXT_AUTOIMG, SXT_BAKEOUT_IN, makestr
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
character must be a single character string, e.g. ' ' or 'a'
PROCEDURE:
EXAMPLES:
array = splitstr('Hi There',' ')
array(0) is 'Hi'
array(1) is 'There'
MODIFICATION HISTORY:
T. Metcalf 1994-11-10
1995-03-15 Increased speed by a factor 3!
[Previous]
[Next]
NAME:
SPOTTER
PURPOSE:
Interactively define a sunspot, and then compute its centroid
location. This is done sequentially for each image in a data
cube. The intended use is for measuring relative proper motions
of sunspots within a given sunspot group. Decompression needs
to have been done.
CALLING SEQUENCE:
spotter, img, index, xx, yy, boxes
INPUT PARAMETERS:
Image array, integer format.
OUTPUT PARAMETERS:
Centroid coordinates xx,yy in the pixel definition of the images.
Box definitions in original pixels.
WARNINGS:
Expect subjectivity!
Rotation correction isn't very good - need to use HEL2PIX.
KEYWORDS:
SPECIAL TRICKS:
To define the centroid, the mean of the peripheral pixels
of the selected box is used as a photometric reference,
i.e. as the background level.
CALLS: ***
CENTROIDW [1], CENTROIDW [2], GET_BOXCORN, HXA_SUNCENTER, draw_boxcorn [1]
draw_boxcorn [2]
HISTORY:
HSH, written Dec. 24, 1992
[Previous]
[Next]
NAME:
SPPLOT_GRS
PURPOSE:
To plot the spectrum of WBS grs_phl.
CALLING SEQUENCE:
spplot_grs,flph,bgph
spplot_grs,flph
( If you do not extract the background data, no background-
subtracted data are plotted. )
INPUTS:
flph - WBS_GRSPHL structure. ( flare data )
bgph - WBS_GRSPHL structure. ( background data )
( after the run of out_grsphl1 or out_grsphl2 and the extract of
'flph','bgph'. )
OPTIONAL INPUTS:
cm2 - If set, the unit of flux is counts/cm**2/sec/keV.
Usually, counts/sec/keV.
notitle - If set, no title is plotted.
( title, xtitle, ytitle, etc.. )
noerr - If set, error bars are not plotted.
yrange - If present, the data points below (above) yrange(0)
(yrange(1)) are plotted at the yrange(0) (yrange(1)).
CALLS: ***
ERRPLOT [1], ERRPLOT [2], FCHECK, GET_KBRD2
CALLED BY:
TEST_OUTG
HISTORY:
Written 10-dec-93 by T.Hiraoka ( Rikkyo Univ.)
[Previous]
[Next]
NAME:
SPPLOT_HXS
PURPOSE:
To plot the spectrum of WBS hxs_ph.
CALLING SEQUENCE:
spplot_hxs,flph,bgph
spplot_hxs,flph
( If you do not extract the background data, no background-
subtracted data are plotted. )
INPUTS:
flph - WBS_HXSPH structure. ( flare data )
bgph - WBS_HXSPH structure. ( background data )
( after the run of out_hxsph and the extract of 'flph','bgph'. )
OPTIONAL INPUTS:
cm2 - If set, the unit of flux is counts/cm**2/sec/keV.
Usually, counts/sec/keV.
notitle - If set, no title is plotted.
( title, xtitle, ytitle, etc.. )
noerr - If set, error bars are not plotted.
yrange - If present, the data points below (above) yrange(0)
(yrange(1)) are plotted at the yrange(0) (yrange(1)).
CALLS: ***
ERRPLOT [1], ERRPLOT [2], FCHECK, GET_KBRD2
CALLED BY:
TEST_OUTH
HISTORY:
Written 10-dec-93 by T.Hiraoka ( Rikkyo Univ.)
[Previous]
[Next]
NAME:
SQRT2_LEV
PURPOSE:
To give contour levels with sqrt(2) step.
CALLING SEQUENCE:
level = sqrt2_lev(image)
INPUT:
image - Image which is to be expressed by contours.
CALLED BY:
PLOT_CINEMA2
OPTIONAL KEYWORD INPUT:
weak - If set, then also displays 4.4, 6.25, and 8.8 % levels.
nlevels - Specifies number of contour levels.
OUTPUT:
level - Contour levels with sqrt(2) step.
OPTIONAL KEYOWORD OUTPUT:
none
RESTRICTIONS:
none
HISTORY:
version 1.0 94.07.27 (Wed) T.Sakao written at MSSL.
version 1.1 94.07.29 (Fri)
Option nlevels added.
[Previous]
[Next]
NAME:
SS2DSET
PURPOSE:
Given an SS array for a single file, this routine returns the
structure required for DSET_ARR
CALLING SEQUENCE:
DSET_ARR = ss2dset(ss)
INPUT:
ss array of required records (from a single file)
OUTPUT:
structure needed for DSET_ARR.
OPTIONAL OUTPUT:
HISTORY
RDB Feb 1992 written
CALLS:
[Previous]
[Next]
NAME:
SS_SYMM
PURPOSE:
take an subscript array from DEFROI and generate the
four symmetrical areas relative to a fixed point [x,y]
CATEGORY:
CALLING SEQUENCE:
INPUTS:
ss = subscript array
xy = location
OPTIONAL (KEYWORD) INPUT PARAMETERS:
/sel allows interactive symmetry-point selection
/show recopies the image and shows you where the regions are
OUTPUTS:
rr = lonarr(4, *) of which rr(0, *) is the input subscripts
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
WARNINGS:
Watch out for wraparound!
MODIFICATION HISTORY:
HSH, written 4-May-97
[Previous]
[Next]
Name: ssc_files
Purpose: return SXT ssc (or sss/sxh) file names from user times
Input Parameters:
time0 - time to match or start time of range
time1 - end time of range
Keyword Parameters:
count - number of files returned
topdir - optional top level path (default via env: DIR_SXT_{SSC/SSS/SXH
sss_files (switch) if set, consider SSS files ("show" movie"
sxh_files (switch) if set, consider SXH files (histograms)
extension - ssc processing flags<=>file extension
collapse - if set, assume all files in top level
(default is yearly subdirect: <toplev>/YYYY/xxxyyyy...
prefix - specilized file prefix (default is derived from file_type
uaually 'ssc', 'sss', 'sxh'
CALLS: ***
BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE2TIME, TIME2FILE
UNIQ [1], UNIQ [2], UNIQ [3], anytim [1], anytim [2], anytim [3], anytim [4]
anytim [5], concat_dir [4], data_chk [1], data_chk [2], get_logenv [1]
get_logenv [2], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3]
reltime [1], reltime [2], sel_filetimes [1], sel_filetimes [2], strsplit
tim2dset [1], tim2dset [2], time_window, timegrid
CALLED BY:
get_ssc_best, sxt_ssc2file
History:
6-July-2000 - S.L.Freeland - helper routine
9-May-2001 - S.L.Freeland - add PREFIX keyword
2-aug-2004 - S.L.Freeland - strsplit -> ssw_strsplit
Method:
ssw standards like anytim, sel_filetimes, get_logenv,...
[Previous]
[Next]
Name: ssc_files
Purpose: return SXT ssc (or sss/sxh) file names from user times
Input Parameters:
time0 - time to match or start time of range
time1 - end time of range
Keyword Parameters:
count - number of files returned
topdir - optional top level path (default via env: DIR_SXT_{SSC/SSS/SXH
sss_files (switch) if set, consider SSS files ("show" movie"
sxh_files (switch) if set, consider SXH files (histograms)
extension - ssc processing flags<=>file extension
collapse - if set, assume all files in top level
(default is yearly subdirect: <toplev>/YYYY/xxxyyyy...
prefix - specilized file prefix (default is derived from file_type
uaually 'ssc', 'sss', 'sxh'
CALLS: ***
BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE2TIME, TIME2FILE
UNIQ [1], UNIQ [2], UNIQ [3], anytim [1], anytim [2], anytim [3], anytim [4]
anytim [5], concat_dir [4], data_chk [1], data_chk [2], get_logenv [1]
get_logenv [2], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3]
reltime [1], reltime [2], sel_filetimes [1], sel_filetimes [2], strsplit
tim2dset [1], tim2dset [2], time_window, timegrid
CALLED BY:
get_ssc_best, sxt_ssc2file
History:
6-July-2000 - S.L.Freeland - helper routine
9-May-2001 - S.L.Freeland - add PREFIX keyword
Method:
ssw standards like anytim, sel_filetimes, get_logenv,...
[Previous]
[Next]
NAME: ssc_scan2
PURPOSE: Program to compare TermSFC and SynSFC versions
of SSCs.
PROCEDURE
One day of data are read in according to keyword
input. A log scaled 1024x512 data cube,
with Terms on the left and Syns on the right, is prepared.
Initially, all stepper2 output flags are set to 0 which
means SynSFCs are selected. However, if keyword(term) has
been set the flag indices are all set to 1 as it is
anticipated that most images will use TermSFCs as will
be the case, e.g., for leak epochs 1 and 2.
A small AlMg image is displayed in the upper RH corner
for comparison purposes.
Selection flags can be toggled in the stepper2.pro fashion.
After the selection process is complete an sda data
file is written from the Term and Syn selections
combined. The saved AlMg selections are always SynSFCs.
CALLING EXAMPLE:
ssc_scan2,1993,decaday='013',nfils=[0,1],$
/debug
INPUT:
year, year to be analyzed
CALLS: ***
LOADCT, RD_XDA [1], RD_XDA [2], STEPPER2 [1], STEPPER2 [2], WDEF [1], WDEF [2]
curdir [1], curdir [2], gt_filtb, gt_res, safe_log10, sav_sda [1], sav_sda [2]
sav_sda [3], strwhere, tim2dset [1], tim2dset [2]
OPTIONAL KEYWORD INPUT:
month, month to be analyzed, e.g., month='03'
decaday, month_10day triplet, i.e., '092'
nfils, vector of files to be analyzed
Default: all available files for that year.
term, /term selects Al.1 TermSFCS as the initial choice.
/sscdir, write output to '/disk/yl1/ssc7/'+year+'/'
else write output to curcurrent directory.
/nouncert, don"t deal with the uncertainty files (for testing).
OUTPUT:
An sda file is written with mixes TermSFC and SynSFC
usage, as selected, for Al.1 SSCs.
RESTRICTIONS:
Hardwired to use /data/yl1/ssc6 and /data/yl1/SynSFC/ssc6.
Output to either curdir or /data/yl1/ssc7. In the latter
case the job must be run as software.
HISTORY:
11-Oct-2004 LWA Created from ssc_scan.pro.
12-Oct-2004 LWA Put QR AlMg image in UR corner.
8-Nov-2004 LWA Editted header.
[Previous]
[Next]
NAME:
SSDA
PURPOSE:
Obtain correlation coefficient and offset value of "data"
to the reference data "ref_data" using SSDA (sequential
similarity detection 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.
fast - fast calculation option. Obtain the coefficient of only
32x32 area in the center. If not supplied, it may take more than
1 hr to calculate the 2D correlation.
OUTPUTS:
r - R(a, b) map See below.
x_shift - offset value in X direction
y_shift - offset value in Y direction
CALLS: ***
anytim2ints [1], anytim2ints [2], gt_day [1], gt_day [2], gt_time [1], gt_time [2]
PROCEDURE:
SSDA:
Obtain the position at the minimum of
N-1 N-1
R(a, b)= \sigma \sigma |Ia,b(m, n) - T(m, n)|
m=0 n=0
where Ia,b(m,n) = data, T(m, n)= ref_data
See Data Analysis Handbook(ed,Takagi,Univ.of Tokyo) pp708
in detail.
HISTORY:
8 April, 1994 written by T.Shimizu (Univ. of Tokyo)
27 April, 1994 debug the calculation time
27 April, 1994 /fast --> correlation in the center 16x16 area
/medium -- > correlation in the center 64x64 area
3 August, 1994 data, ref_data are normalized.
[Previous]
[Next]
Name: sswfits_struct
Purpose: return "STANDARD" ssw structure (FITs->IDL mapping)
Input Parameters:
number (optional) - number structures returned - default is one
Keyword Parameters:
addfits - switch , if set, include FITS required minimal tags
Calling Sequence:
str=sswfits_struct( [number] [/addfits] )
CALLS: ***
JOIN_STRUCT [1], JOIN_STRUCT [2]
CALLED BY:
STEREO_SIMUL, anahead2struct, fitshead2struct, map2index, struct2ssw, zcheck_hdr
History:
15-jan-1997 - S.L. Freeland (from 'eit_struct.pro')
25-feb-1997 - SSW generic
10-apr-1998 - add CROTA (CED)
8-sep-1998 - add EXPTIME and WAVELNTH (CED)
15-oct-1998 - S.L.Freeland add SOLAR_L0, SOLAR_P, CROTA2,
XCEN, YCEN
/ADDFITS keyword and function - made version=2
4-Apr-2000 - Add CROTACN1 and CROTACN2 (floating)
5-oct-2005 - S.L.Freeland - add CUNIT1&CUNIT2
(World Coord System, Grisen&Calabretta)
[Previous]
[Next]
NAME:
sswhere
PURPOSE:
To produce an SS string for use with YODATroutine.
Given a roadmap or index of many frames you can select
a narrower subset.
When using index remember that the returned string
contains indices into the limited set defined by index,
NOT the full set defined by roadmap.
CALLING SEQUENCE:
ss=sswhere(roadmap)
or
sr=sswhere(index) then ss=ss(sr)
METHOD/OPERATION:
This routine opens a widget. There is are sliders to set
the minimum frame percentage and the maximum amount of
saturation, and buttons to select the image parameters.
The logic is OR within categories, and AND between categories,
except for the filters, where you can choose either AND or OR
logic, with OR being the default (unless there is only one
A filter or one B filter). If you choose AND then you must
select a filter in both the A & B lists obtaining frames with
that combination of filters. If you choose OR logic you get
all frames with any of the selected filters, thus you
only need to select a filter in A or B (if you do both
you get all frames with EITHER filter).
When you have finished setting the buttons, press
'Test' and you can see how many images match the parameters
you have selected. Pressing 'Select' will add the currently
selected images to a cumulative total SS string. You can choose
multiple sets of parameters, and the resulting SS strings are
OR'd together, while the text widget informs you of the total
images selected so far. Whenever you are done press 'Exit'.
If you want to start over press 'Clear'.
By popular request an 'All' button has been added to the DPE
list, which sets all the DPE values at once (either on or off).
Selection of any single DPE value resets this button.
You can also call either PLOT_FOV to select the field of view
or SHOW_OBS3 for selecting the time range. You DO NOT have to
do either, if you do then these selections are added to the
rest of the criterion to give a result. This can be seen with 'test'.
Each routine has its own CLEAR button which undoes any current
selection, returning to the default (everything). The general
clear button also resets these.
NB: The handling of the image percentage is done with direct
access to the input structure (in mk_mask) rather than through
one of the "gt_" routines.
KEYWORDS: ar when set allows post-widget selection of data
from a specific active region
CALLS: ***
UNIQ [1], UNIQ [2], UNIQ [3], XMANAGER, XMENU [1], XMENU [2], gt_comp, gt_dp_mode [1]
gt_dp_mode [2], gt_dpe, gt_expmode, gt_filta, gt_filtb, gt_res
CALLED BY:
rt_sxtdt
COMMON: initflg,wdgtid,wdgtlbs,wdgtind,pssbck
HISTORY:
drafted by A. McAllister, Feb. 1992
test and clear options added by A.McA., Apr. 1992
DPEs rearranged and 'All' added, A.McA., May 1992
Compression buttons added, A.McA., May 1992.
Logic switch added, A.McA., July 1992.
DP Mode option added, A.McA., Nov. 1992.
Rearranged layout, made single choice defaults, A.McA., Jan. 1993.
Added option to call PLOT_FOV and SHOW_OBS3, added saturation
slider, changed default logic to 'OR', A.McA., Mar. 1993.
Added AR option as a tag on at the end, A.McA., June 1993.
Corrected the indexing in the mduval for loops, A.McA., Jan. 1994.
Corrected "no saturation" message display, A.McA., Mar. 1995.
Trapped for single DPE value error, A.McA., Apr. 1996.
Merged SLF 28-Oct-1993 change (use /original in call to get_res)
RDB 7-Jan-97 Changed layout to fix problem of too big a widget:
more columns in DPE; Clears of FOV and Time/Seq in row;
test/select/clear boxed; message box _after_ test/select etc.
*** Conditional (on IDL version) call to XMANAGER - /block keyword
TO DO:
PFI options?
'All' buttons on the filters? Perhaps if there are alot?
Change calling sequence for index to include ss and create
a real ss as output?
[Previous]
[Next]
Name: sswstruct_fill
Purpose: fill missing SSW tags , if possible
CALLED BY:
struct2ssw
History:
24-October-1998 - S.L.Freeland - combine common function
25-October-1998 - S.L.Freeland - allow explicit pass via keyword inherit
27-November-1998 - D.M. Zarro - made more FITS standard compliant
2-December-1998 - Zarro - removed case block for modifying CRVAL
as this caused downstream problems.
7-Januaray-1999 - S.L.Freeland - auto flip date if DATE-OBS
uses old FITS standard
12-Januaray-1999 - S.L.Freeland - fill in HXT/HXI part
20-Januaray-1999 - S.L.Freeland - fix variable typo name for HXI conv.
25-feb-1999 - S.L.Freeland - add CROTA for sxt
2-Mar-1999 - S.L.Freeland - use 'str2number' instead of st2num
for DATE-OBS/TIME-OBS->SSW check
17-apr-1999 - S.L.Freeland - check SXT history for roll correction
22-apr-1999 - S.L.Freeland - pass ROLL/CROTA->gt_center
11-aug-1999 - S.L.Freeland - fixed a logic error in XCEN/YCEN->ssw derivation
8-Oct-2001 - Zarro (EITI/GSFC) - added logic that if roll correction
is not applied, then do not roll center fov
18-Mar-2002 - S.L.Freeland - relax DATE_OBS verification (iso change?)
24-Nov-2002 - Zarro(EER)/Biesecker(NOAA) - fixed degenerate structure dimension error
5-Oct-2004 - CUNIT1&CUNIT2 for sxt/hxi
Input Parameters:
sswstr - Structure vector, usually including SSW standards
Keyword Parameters:
nosolar - if set, do not fill in Solar ephemeris tags
notime - if set, do not fill in Time tags
nopointing - if set, do not fill in Pointing tags
xxx=value - where XXX =standard tag name, fill with VALUE
Category:
structure , SSW , time , alignment
[Previous]
[Next]
Name: stag_lab
Purpose: get staggered label coordinates for auto-label positioning
Calling Sequence:
norm_pos=stag_lab(labels [,min=min, max=max, sep=sep])
CALLED BY:
show_contacts
History:
10-apr-1995 (SLF) - for evt_grid use
[Previous]
[Next]
NAME:
STAT_MAP
PURPOSE:
to map the statistics of a data cube
CALLING SEQUENCE:
stat_map, data, index, stats, totals, indices, flare=flare
INPUTS:
data cube with index
flare = intarr(2) is the range of index values of a flare
OUTPUTS:
maps of stats (n,m,7):
- means from stdev
- sigmas from stdev
- slopes from poly_fit linear fit
- intercepts from poly_fit linear fit
- maximum
- minimum
- sigma of differenced data (good for high-frequency noise)
totals = the total DN summed across the cube area
indices = the array of INDEX indices used in the linear fits
USE:
Should work just like it looks. The index values in the variable
FLARE are omitted (exclusive, meaning that the values entered
are both supposed to be "background" values).
Note that the times fitted to the linear trend are expressed
in sec of the day (msod/1000., not gt_time directly)
HISTORY:
HSH, written May 3, 1992
HSH, May 6, 1992, added "difference filter" output
[Previous]
[Next]
NAME:
STATSUM
PURPOSE:
dump out stats on a variable
CALLING SEQUENCE:
INPUTS:
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
CALLS: ***
STDEV
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
HSH, written May 17, 1993
[Previous]
[Next]
NAME:
stdct
PURPOSE:
Get the r, g, b vectors for a standard IDL color table (256)
CALLING SEQUENCE:
stdct, table_number, r, g, b [, silent = silent]
INPUTS:
Table_number = number of table to load, from 0 to 15.
KEYWORD PARAMETERS:
Silent = If present and non-zero, supress the Color Table
message.
Tables = If present and non-zero, prints Color table names.
OUTPUTS:
r, g, b = 256 long byte vectors containing the r, g, b color table
CALLS: ***
FILEPATH
CALLED BY:
go_lasdisk golaserdisk, go_lasdisk2 golaserdisk, go_nvs5, mk_movie [1]
mk_movie [2], mk_nvs_movie, mk_ptv_movie
COMMON BLOCKS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
Works from the file: $IDL_DIR/colors1.tbl.
PROCEDURE:
The file colors.tbl is read. A maximum of 16 entries may
be defined. The titles of each table are contained in the first
16 * 32 characters/name bytes.
Based on loadct. Doesn't modify working color tables.
MODIFICATION HISTORY:
2-Mar-93, GAL major updated for colors1.tbl from colors.tbl.
3-Mar-93, GAL modified to work for idl ver. < 3 or > 3.
22-Jul-96, GLS modified to work for idl ver. up to 4.0.1.
[Previous]
[Next]
NAME:
StEnIdx
PURPOSE:
Compute and return start and end indices for input
data vector corresponding to a given file ID (FID).
CALLING SEQUENCE:
a = StEnIdx(fid, timlst)
INPUT:
fid
timlst
RETURNED:
a where a is a two-d array
a(0,*) is the start index and a(1,*) is the end
CALLS: ***
int2secarr [1], int2secarr [2]
CALLED BY:
fidmap
HISTORY:
written 15-Oct-91 by GAL
update, 16-Oct-91 to compare 1st times from fid and dvec.
[Previous]
[Next]
NAME:
STEPPER
PURPOSE:
Step through individual images a single frame at a time.
INPUTS:
DATA = Three-dimensional array
OPTIONAL INPUT KEYWORDS:
XSIZE,YSIZE = If present, the routine will use rebin to using the
the /sample option. If only XSIZE is present, YSIZE
will be set equal to XSIZE.
START = Index of starting image
INFO_ARRAY = String array containing descriptive text
NOSCALE = If set, will turn off tvscale
SUBSCRIPT = Subset of array is displayed.
MOVIE = If present and =1, will initiate movie mode when called
INTERP = Controls how REBIN is done. If present and set to 1,
/INTERP ==> REBIN(A,xsize,ysize)
else ==> REBIN(A,xsize,ysize,/sample)
COLOR = The color to use for displaying the info text string.
nolcur - If set, then stepper is being called from LCUR_IMAGE and
it should not allow the LCUR option to be used
VERSION:
V1.2 17-NOV-92
CALLS: ***
LOADCT, PROFILES [1], PROFILES [2], STEPPER_S1, SXT_GRID [1], SXT_GRID [2]
SXT_GRID [3], XLOADCT [1], XLOADCT [2], XLOADCT [3], ZOOM, data_type [1]
data_type [2], get_logenv [1], get_logenv [2], gt_pfi_ffi, hardcopy [1]
hardcopy [2], input [1], input [2], lcur_image, pfi_loc, tbeep [1], tbeep [2]
tbeep [3]
CALLED BY:
ALIGN1BIGGRAM, BOX_LC, LAY1GKM, PIXEL_LC, ext_subset [1], ext_subset [2], fstepper
go_nvs4, lastsfd [1], lastsfd [2], lastspd, lcur_image, video_title, wdefroi [3]
wdefroi [4]
HISTORY:
Written 20-sep-91, JRL and LWA
Updated 21-sep-91, JRL: Added xloadct and zoom options.
Updated 24-sep-91, JRL: Added SUBSCRIPT and MOVIE options.
Updated 2-dec-91, JRL: Break the text string into two lines if
info_array is > 44
Updated 15-dec-91, slf; Replaced get_kbrd calls with get_kbrd2
to work around SGI anomoly
Updated 16-apr-92, slf; To work with single image
Updated 28-apr-92, JRL: Break text if strlen(info) > 38
Updated 29-apr-92, JRL: Added the INTERP keyword
Updated 17-nov-92, JRL: Added color keyword. Allow info_array to
be a 2nd parameter
Updated 15-mar-93, JRL: Added an option to call profiles
Updated 13-may-93, SLF; Return last selected in lastss
------------------------------------------------------------
17-Oct-93 (MDM) - Broke the routine into two parts
Allowed new options
"g" will plot sxt grids
"l" will call LCUR_PLOT to plot curves
"h" will make hardcopies
"c" will call loadct
different panels for different filters
19-Oct-93 (MDM) - Allowed exit from STEPPER when using q to exit movie
25-Oct-93 (MDM) - Added passing NOSCALE parameter to LCUR_IMAGE
29-Nov-93 (MDM) - Added NOLCUR option
- Added /NORMALIZE to LCUR_IMAGE call
10-Jan-94 (MDM) - Added "O" option - obs region location
11-Jan-94 (MDM) - Corrected "O" option
21-Feb-94 (MDM) - Added "W" option - calls WSHOW to pop the window
- Replaced call to GET_KBRD2 with GET_KBRD
18-Apr-94 (MDM) - Added /NODEL_WIN_P to not delete window after light
curve plot is made
10-Jun-94 (MDM) - Added option to establish the breakpoint location
in the info_array by setting STEPPER_BREAK
24-Aug-94 (MDM) - Added NONORMALIZE option
15-Jan-02, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
xloadct did not work (tested on Linux, IDL 5.3 and Windows NT,
IDL 5.5). Adding keyword /block fixed the problem. Assuming that
widget blocking is the problem and since blocking was introduced
in IDL 5.0, /block is now added to xloadct when
!version.release >= 5.0
[Previous]
[Next]
NAME:
STEPPER
PURPOSE:
Step through individual images a single frame at a time.
CALLING SEQUENCE:
STEPPER,DATA [,XSIZE=XSIZE,YSIZE=YSIZE,START=START,INFO_ARRAY=INFO_ARRAY,$
/NOSCALE,SUBSCRIPT=SUBSCRIPT,/MOVIE,/INTERP]
INPUTS:
DATA = Three-dimensional array
OPTIONAL INPUT PARAMETERS:
XSIZE,YSIZE = If present, the routine will use rebin to using the
the /sample option. If only XSIZE is present, YSIZE
will be set equal to XSIZE.
START = Index of starting image
INFO_ARRAY = String array containing descriptive text
NOSCALE = If set, will turn off tvscale
SUBSCRIPT = Subset of array is displayed.
MOVIE = If present and =1, will initiate movie mode when called
INTERP = Controls how REBIN is done. If present and set to 1,
/INTERP ==> REBIN(A,xsize,ysize)
else ==> REBIN(A,xsize,ysize,/sample)
VERSION:
V1.1 24-sep-91
CALLS: ***
STEPPER_S1, UNIQ [1], UNIQ [2], UNIQ [3], data_type [1], data_type [2], get_info [1]
get_info [2], get_info [3], get_info [4], gt_filta, gt_filtb, gt_seq_num
CALLED BY:
ALIGN1BIGGRAM, BOX_LC, LAY1GKM, PIXEL_LC, ext_subset [1], ext_subset [2], fstepper
go_nvs4, lastsfd [1], lastsfd [2], lastspd, lcur_image, video_title, wdefroi [3]
wdefroi [4]
HISTORY:
Written 20-sep-91, JRL and LWA
Updated 21-sep-91, JRL: Added xloadct and zoom options.
Updated 24-sep-91, JRL: Added SUBSCRIPT and MOVIE options.
Updated 2-dec-91, JRL: Break the text string into two lines if
info_array is > 44
Updated 15-dec-91, slf; Replaced get_kbrd calls with get_kbrd2
to work around SGI anomoly
Updated 16-apr-92, slf; To work with single image
Updated 28-apr-92, JRL: Break text if strlen(info) > 38
Updated 29-apr-92, JRL: Added the INTERP keyword
[Previous]
[Next]
NAME:
STEPPER
PURPOSE:
Step through individual images a single frame at a time.
INPUTS:
DATA = Three-dimensional array
OPTIONAL INPUT PARAMETERS:
XSIZE,YSIZE = If present, the routine will use rebin to using the
the /sample option. If only XSIZE is present, YSIZE
will be set equal to XSIZE.
START = Index of starting image
INFO_ARRAY = String array containing descriptive text
NOSCALE = If set, will turn off tvscale
SUBSCRIPT = Subset of array is displayed.
VERSION:
V1.1 24-sep-91
CALLS: ***
STP, XLOADCT [1], XLOADCT [2], XLOADCT [3], ZOOM
CALLED BY:
ALIGN1BIGGRAM, BOX_LC, LAY1GKM, PIXEL_LC, ext_subset [1], ext_subset [2], fstepper
go_nvs4, lastsfd [1], lastsfd [2], lastspd, lcur_image, video_title, wdefroi [3]
wdefroi [4]
HISTORY:
Written 20-sep-91, JRL and LWA
Updated 21-sep-91, JRL: Added xloadct and zoom options.
Updated 24-sep-91, JRL: Added SUBSCRIPT and MOVIE options.
Updated 2-dec-91, JRL: Break the text string into two lines if
info_array is > 44
Updated 24-apr-92, LWA: Break test string a bit differently in
order to put more info on 256x256 window
[Previous]
[Next]
NAME:
STEPPER
PURPOSE:
Step through individual images a single frame at a time.
INPUTS:
DATA = Three-dimensional array
OPTIONAL INPUT PARAMETERS:
XSIZE,YSIZE = If present, the routine will use rebin to using the
the /sample option. If only XSIZE is present, YSIZE
will be set equal to XSIZE.
START = Index of starting image
INFO_ARRAY = String array containing descriptive text
NOSCALE = If set, will turn off tvscale
SUBSCRIPT = Subset of array is displayed.
VERSION:
V1.1 24-sep-91
CALLS: ***
STP_NOSAMP, XLOADCT [1], XLOADCT [2], XLOADCT [3], ZOOM
CALLED BY:
ALIGN1BIGGRAM, BOX_LC, LAY1GKM, PIXEL_LC, ext_subset [1], ext_subset [2], fstepper
go_nvs4, lastsfd [1], lastsfd [2], lastspd, lcur_image, video_title, wdefroi [3]
wdefroi [4]
HISTORY:
Written 20-sep-91, JRL and LWA
Updated 21-sep-91, JRL: Added xloadct and zoom options.
Updated 24-sep-91, JRL: Added SUBSCRIPT and MOVIE options.
Updated 2-dec-91, JRL: Break the text string into two lines if
info_array is > 44
Updated 24-apr-92, LWA: Break test string a bit differently in
order to put more info on 256x256 window
[Previous]
[Next]
NAME:
STEPPER2
PURPOSE:
Step through individual images a single frame at a time
and permit flagging the output vector with a 0 or 1.
It is possible to switch back and forth on a given image
as much as you want. No movie mode here but otherwise
stepping or jumping through the data cube is the same
as in stepper.
SAMPLE CALLING SEQUENCE:
output = stepper2(input1, [input2, input3, $
INFO_ARRAY=INFO_ARRAY, SUBSCRIPT=SUBSCRIPT, $
NOSCALE=NOSCALE, COLOR=COLOR, $
qstop=qstop,wunz=wunz]
out = stepper2(data)
out = stepper2(index,data)
out = stepper2(index,data,info_array)
out = stepper2(data,info_array)
INPUT:
DATA = Three-dimensional array
OUTPUT
A vector of 0's and 1's permitting easy selection or
de-selection of images for further processing.
OPTIONAL INPUTS:
INDEX = The index structure that goes with the data
INFO_ARRAY = descriptive text string (pass as parameter or keyword)
OPTIONAL INPUT KEYWORDS:
INFO_ARRAY = String array containing descriptive text
NOSCALE = If set, will turn off tvscale
SUBSCRIPT = Subset of array is displayed.
COLOR = The color to use for displaying the info text string.
WUNZ = Initially sets the output array to 1 rather than 0.
CALLS: ***
STEPPER2_s1 [1], STEPPER2_s1 [2], data_chk [1], data_chk [2], data_type [1]
data_type [2], get_info [1], get_info [2], get_info [3], get_info [4]
CALLED BY:
ssc_scan2
HISTORY:
11-Nov-2002, LWA; created from stepper to return 0/1 vector.
21-May-2003, LWA; corrected program to return vector of 0's and 1's
11-Oct-2004, LWA; added wwnz keyword
[Previous]
[Next]
NAME:
STEPPER2
PURPOSE:
Step through individual images a single frame at a time
and permit flagging the output vector with a 0 or 1.
It is possible to switch back and forth on a given image
as much as you want. No movie mode here but otherwise
stepping or jumping through the data cube is the same
as in stepper.
SAMPLE CALLING SEQUENCE:
output = stepper2(input1, [input2, input3, $
INFO_ARRAY=INFO_ARRAY, SUBSCRIPT=SUBSCRIPT, $
NOSCALE=NOSCALE, COLOR=COLOR, $
qstop=qstop]
out = stepper2(data)
out = stepper2(index,data)
out = stepper2(index,data,info_array)
out = stepper2(data,info_array)
INPUT:
DATA = Three-dimensional array
OUTPUT
A vector of 0's and 1's permitting easy selection or
de-selection of images for further processing.
OPTIONAL INPUTS:
INDEX = The index structure that goes with the data
INFO_ARRAY = descriptive text string (pass as parameter or keyword)
OPTIONAL INPUT KEYWORDS:
INFO_ARRAY = String array containing descriptive text
NOSCALE = If set, will turn off tvscale
SUBSCRIPT = Subset of array is displayed.
COLOR = The color to use for displaying the info text string.
CALLS: ***
STEPPER2_s1 [1], STEPPER2_s1 [2], data_chk [1], data_chk [2], data_type [1]
data_type [2], get_info [1], get_info [2], get_info [3], get_info [4]
CALLED BY:
ssc_scan2
HISTORY:
11-Nov-2002, LWA; created from stepper to return 0/1 vector.
21-May-2003, LWA; corrected program to return vector of 0's and 1's
[Previous]
[Next]
NAME:
STEPPER2_s1
PURPOSE:
Step through individual images a single frame at a time
and permit flagging the output vector with a 0 or 1.
It is possible to switch back and forth on a given image
as much as you want. No movie mode here but otherwise
stepping or jumping through the data cube is the same
as in stepper.
INPUTS:
DATA = Three-dimensional array
OUTPUT
A vector of 0's and 1's permitting easy selection or
de-selection of images for further processing.
OPTIONAL INPUT KEYWORDS:
INFO_ARRAY = String array containing descriptive text
NOSCALE = If set, will turn off tvscale
SUBSCRIPT = Subset of array is displayed.
COLOR = The color to use for displaying the info text string.
CALLS: ***
data_chk [1], data_chk [2], get_logenv [1], get_logenv [2]
CALLED BY:
STEPPER2 [1], STEPPER2 [2]
HISTORY:
11-Nov-2002 LWA, Gutted stepper_s1 for purposes of stepper2.pro.
11-Oct-2004 LWA, Moved info to UL corner.
[Previous]
[Next]
NAME:
STEPPER2_s1
PURPOSE:
Step through individual images a single frame at a time
and permit flagging the output vector with a 0 or 1.
It is possible to switch back and forth on a given image
as much as you want. No movie mode here but otherwise
stepping or jumping through the data cube is the same
as in stepper.
INPUTS:
DATA = Three-dimensional array
OUTPUT
A vector of 0's and 1's permitting easy selection or
de-selection of images for further processing.
OPTIONAL INPUT KEYWORDS:
INFO_ARRAY = String array containing descriptive text
NOSCALE = If set, will turn off tvscale
SUBSCRIPT = Subset of array is displayed.
COLOR = The color to use for displaying the info text string.
CALLS: ***
data_chk [1], data_chk [2], get_logenv [1], get_logenv [2]
CALLED BY:
STEPPER2 [1], STEPPER2 [2]
HISTORY:
11-Nov-2002 LWA, Gutted stepper_s1 for purposes of stepper2.pro.
[Previous]
[Next]
NAME:
STEPPER_LP
PURPOSE:
Step through individual images a single frame at a time.
SAMPLE CALLING SEQUENCE:
STEPPER_LP, DATA
STEPPER_LP, INDEX, DATA
STEPPER_LP, INDEX, DATA
INPUTS:
DATA = Three-dimensional array
OPTIONAL INPUTS:
INDEX = The index structure that goes with the data
OPTIONAL INPUT KEYWORDS:
XSIZE,YSIZE = If present, the routine will use rebin to using the
the /sample option. If only XSIZE is present, YSIZE
will be set equal to XSIZE.
If one of the "panels" options is used, then this is the
size of a single panel (the size that a single image
should be displayed)
START = Index of starting image
INFO_ARRAY = String array containing descriptive text
NOSCALE = If set, will turn off tvscale
SUBSCRIPT = Subset of array is displayed.
MOVIE = If present and =1, will initiate movie mode when called
INTERP = Controls how REBIN is done. If present and set to 1,
/INTERP ==> REBIN(A,xsize,ysize)
else ==> REBIN(A,xsize,ysize,/sample)
COLOR = The color to use for displaying the info text string.
noinfo - If set, then do not build the INFO_ARRAY string even
when the index is passed in.
panels - An array with the same number of images as the data saying
which panel to display the image in (ie: 0,1,2,3,0,1,2...).
This allows images from a different filters to be displayed
in a different region on the x-window.
filter_panels - If set, then build the "panels" array based on the
unique filters
sequence_panels - If set, then build the "panels" array based on the
SXT sequence number
nolcur - If set, then stepper is being called from LCUR_IMAGE and
it should not allow the LCUR option to be used
VERSION:
V1.2 17-NOV-92
V2.0 19-Oct-93
CALLS: ***
STEPPER_S1, UNIQ [1], UNIQ [2], UNIQ [3], data_type [1], data_type [2], get_info_lp
gt_filta, gt_filtb, gt_seq_num
HISTORY:
Written 20-sep-91, JRL and LWA
Updated 21-sep-91, JRL: Added xloadct and zoom options.
Updated 24-sep-91, JRL: Added SUBSCRIPT and MOVIE options.
Updated 2-dec-91, JRL: Break the text string into two lines if
info_array is > 44
Updated 15-dec-91, slf; Replaced get_kbrd calls with get_kbrd2
to work around SGI anomoly
Updated 16-apr-92, slf; To work with single image
Updated 28-apr-92, JRL: Break text if strlen(info) > 38
Updated 29-apr-92, JRL: Added the INTERP keyword
Updated 17-nov-92, JRL: Added color keyword. Allow info_array to
be a 2nd parameter
Updated 15-mar-93, JRL: Added an option to call profiles
Updated 13-may-93, SLF; Return last selected in lastss
------------------------------------------------------------
Updated 17-Oct-93, MDM; Broke the routine into two parts
Allowed new options
"g" will plot sxt grids
"l" will call LCUR_PLOT to plot curves
"h" will make hardcopies
"c" will call loadct
different panels for different filters
Updated 29-Nov-93, MDM; Added NOLCUR option
Revised 17 Jun 94 T.Shimizu for LaPalma data
Revised 12 Nov 94 T.Shimizu just stamp observing time.
[Previous]
[Next]
NAME:
STIRLING_APPROX
PURPOSE:
Evaluate the Stirling approximation for large arguments
of the gamma function
CATEGORY:
Math stuff hoked up for Yohkoh work
CALLING SEQUENCE:
logfact = stirling_approx(arg)
INPUTS:
arg > 0
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
base 10 logarithm of the approximate factorial
RESTRICTIONS
same as the gamma function, which is used for small arg
CALLS: ***
GAMMA
MODIFICATION HISTORY:
HSH, written 12-oct-93
[Previous]
[Next]
NAME:
STONY
PURPOSE:
Stonyhurst disk overlay. Adds
grid lines to images, if you know where the image is.
CATEGORY: Image Processing
CALLING SEQUENCE:
stony,image,yr,mo,da,hr,xx,yy,rad,color=color,line=line
INPUTS:
image: byte image to display
yr: year, e.g. 1991
mo: month, 1-12
da: day, 1-31
hr: hour, e.g. 15.325
xx: X center of image, image pixels
yy: Y center, image pixels
rad: radius, image pixels
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
color: color to draw grid, 0-255
line: linestyle, 0-5.
no_p: if set, then uses p-angle=0 (i.e. for YOHKOH data..)
OUTPUTS:
Image with grid overlay; prints ephemeris. Output is to
current graphics device.
OPTIONAL OUTPUT PARAMETERS:
CALLS: ***
SPHINIT, SPHLAT, SPHLNG, SUN [1], SUN [2]
CALLED BY:
plot_lat_cmd
COMMON BLOCKS:
sph_com
SIDE EFFECTS:
RESTRICTIONS:
Requires nruns, sphinit, sphlat, sphlng,sun,
ymd2jd,recpol,isarray,array,datatype,monthnames,
strsec,makex,maken,polrec3d,polrec,rot_3d,
vect_angle,sphlng,getrun
PROCEDURE:
MODIFICATION HISTORY:
Written DLM 1991 Nov 13, using routines from the JHUAPL library.
[Previous]
[Next]
NAME: str2alp
purpose: convert a str to pure alpha characters.
Parameters:
newstring = str2alp(str, plus='_', nonalpha=' ')
str is the input string to convert
plus is the addition non-alpha char to allow
nonalpha is the char to sub. for non-alpha chars.
num is a switch to allow numerics 0-9
CALLS: ***
isalpha
CALLED BY:
modvolume_inf [1], modvolume_inf [2]
Restrictions:
note: If nonalpha is not defined, non-alpha chars are
converted to '_'. I would like to change this
to removing non-alpha chars when nonalpha is not
defined
History:
written by gal, 6-Mar-96
[Previous]
[Next]
NAME:
STR2BYTARR
PURPOSE:
Converts a structure to a byte array on a byte by byte basis.
CATEGORY:
CALLING SEQUENCE:
array = str2bytarr(structure)
INPUTS:
structure = structure to be converted into a byte array
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
array = the byte array
CALLED BY:
STR_FILL
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
T. Metcalf November 1992
[Previous]
[Next]
NAME :
STR2INT
PURPOSE:
Convert string of number to integer.
CALLING SEQUENCE:
xx = str2int(str)
INPUTS:
str = string of number
MODIFICATION HISTORY
Written April 10, 1992 by Bachtiar Anwar
[Previous]
[Next]
Name: str_copy_tags
Purpose: copy structures where the tag names match. The
default is NOT to copy the tags "index_version"
and "entry_type"
Input Parameters:
str1 - destination structure (template)
str2 - source structure
Optional Input:
vercopy - If present, then the keywords "index_version" and
"entry_type" are not copied (to preserve the
new structure version number)
Output: function return value is type str1 copy of str2 contents
CALLED BY:
BSC_FIELD, EIT_CATRD [1], EIT_PREP, MK_SSX, RD_XDA [1], RD_XDA [2], TRACE_PREP
def_yssysv [1], def_yssysv [2], fit_bsc, fit_bsc_as, get_dc_image [2]
get_dc_image [3], get_leak_image [1], get_leak_image [2], get_leak_image [3]
get_sxa, mk_week_file [1], mk_week_file [2], rd_dt_genx, rd_sdl, rd_sld, rd_sls
rd_sot, rd_sxtgoes, rd_trace_i0 [1], rd_trace_i0 [2], rd_week_file [1]
rd_week_file [2], rd_week_file [3], rd_week_file [4], read_genxcat
str_concat [1], str_concat [2], str_ver_update [1], str_ver_update [2]
sxt_prep [1], sxt_prep [2], sxt_prep [3], weekid [2], ydb_exist [2]
History: slf, 10/24/91
slf, 10/24/91 - streamlined recursive segment
mdm, 11/10/91 - took "str_copy" and made it copy by
matching tag names
12-Nov-91 MDM - Added "spare1" and "spare2" to the skip-list
18-Dec-92 MDM - Added code to avoid copying any SPARE tags all the
time (not just if /vercopy is set)
4-Jan-94 MDM - Modified so that it will work if passing in
an index with .GEN, .SXT, and .HIS and the other
structure just has .GEN and .SXT.
- Previously, the input structure was being modified.
Made changes to not corrupt the input template
29-Sep-97 MDM - Patch to not crash when trying to copy a longer
input into an output
12-Mar-98 SLF - fix 'subscript w/-1' bug in 29-sep change
11-Mar-2003 - SLF - sprinle liberally with 'reform's sinc RSI
screwed us with degenerate structure/vector dimensions
circa IDL V5.5
15-apr-2003 - SLF - remove one of the 11-March reforms per Barry Labonte
suggested - avoid problems at least on linux 5.6
16-may-2003 - SLF - change the syntax of the insertion string
to explicitly match n-dimen of value
Method: recursive for nested structures
[Previous]
[Next]
Name: str_copy_tags
Purpose: copy structures where the tag names match. The
default is NOT to copy the tags "index_version"
and "entry_type"
Input Parameters:
str1 - destination structure (template)
str2 - source structure
Optional Input:
vercopy - If present, then the keywords "index_version" and
"entry_type" are not copied (to preserve the
new structure version number)
Output: function return value is type str1 copy of str2 contents
CALLED BY:
BSC_FIELD, EIT_CATRD [1], EIT_PREP, MK_SSX, RD_XDA [1], RD_XDA [2], TRACE_PREP
def_yssysv [1], def_yssysv [2], fit_bsc, fit_bsc_as, get_dc_image [2]
get_dc_image [3], get_leak_image [1], get_leak_image [2], get_leak_image [3]
get_sxa, mk_week_file [1], mk_week_file [2], rd_dt_genx, rd_sdl, rd_sld, rd_sls
rd_sot, rd_sxtgoes, rd_trace_i0 [1], rd_trace_i0 [2], rd_week_file [1]
rd_week_file [2], rd_week_file [3], rd_week_file [4], read_genxcat
str_concat [1], str_concat [2], str_ver_update [1], str_ver_update [2]
sxt_prep [1], sxt_prep [2], sxt_prep [3], weekid [2], ydb_exist [2]
History: slf, 10/24/91
slf, 10/24/91 - streamlined recursive segment
mdm, 11/10/91 - took "str_copy" and made it copy by
matching tag names
12-Nov-91 MDM - Added "spare1" and "spare2" to the skip-list
18-Dec-92 MDM - Added code to avoid copying any SPARE tags all the
time (not just if /vercopy is set)
4-Jan-94 MDM - Modified so that it will work if passing in
an index with .GEN, .SXT, and .HIS and the other
structure just has .GEN and .SXT.
- Previously, the input structure was being modified.
Made changes to not corrupt the input template
29-Sep-97 MDM - Patch to not crash when trying to copy a longer
input into an output
12-Mar-98 SLF - fix 'subscript w/-1' bug in 29-sep change
7-Mar-2003 SLF - protect against RSI 5.5 screwup with
degenerate dimensions
Method: recursive for nested structures
[Previous]
[Next]
NAME:
STR_FILL
PURPOSE:
Fill a structure from a data array or another structure - simulates an
equivalence stetement for structures.
The structure is filled byte by byte from the data array. If the array
is longer (in bytes) than the structure, the first part of the array
is used. If the array is too short, as much of the structure as
possible is filled.
CATEGORY:
CALLING SEQUENCE:
bytes = str_fill(structure,array,index=index,tags=tags)
INPUTS:
structure = the structure to be filled
array = the array of data to use in filling the structure (can be
another structure). Can be of any type.
OPTIONAL INPUT PARAMETERS:
index = If the structure to be filled is an array of structures,
setting index fills only specific structure elements of the
array of structures. Index gives the element number(s). This
is necessary since IDL passes an element of a structure array by
value, not by address. Hence passing strucure(index) to
str_fill will not fill the structure array element. The entire
array must always be passed. Hence to fill an array element,
pass the entire structure and specify the index keyword. Index
can be a vector of indices. Default = all elements of the array.
tags = The same problem crops up if you only want to fill certain tags
in the structure. The tags input is a vector of tag numbers to
be filled. The others are left alone. Default = All tags.
KEYWORD PARAMETERS
/check = Check that the array has at least enough data to fill the
structure.
/exact = Check that the array will EXACTLY fill the structure.
/printable = force strings to be composed of printable characters
only (32b to 126b).
OUTPUTS:
The input structure is modified (filled).
bytes = the number of BYTES from array put into the structure
CALLS: ***
STR2BYTARR
COMMON BLOCKS:
SIDE EFFECTS:
The input structure is filled
RESTRICTIONS:
The number of bytes in each data type is hardwired to:
nbytes = [0,1,2,4,4,8,8,1,1]
PROCEDURE:
EXAMPLES:
To load a structure from a byte array:
IDL> c={a:0,b:0}
IDL> print,str_fill(c,[0b,1b,0b,2b])
4
IDL> help,c,/str
** Structure <1daf88>, 2 tags, length=4, refs=1:
A INT 1
B INT 2
To determine the byte size of a structure:
IDL> print,str_fill(c,c,/nocheck)
4
To fill a few elements of an array of structures:
IDL> c={a:0,b:0}
IDL> c=replicate(c,4)
IDL> a={a:5,b:5}
IDL> print,str_fill(c,replicate(a,2),index=[1,2])
8
IDL> print,c
{ 0 0}{ 5 5}{ 5 5}{ 0 0}
MODIFICATION HISTORY:
T. Metcalf November 1992
T. Metcalf December 1992 Fixed the string code so that 0b is never
output to a string (this fouls things up
since 0b is the end-of-string marker. If
/printable is set 0b through 31b becomes a
space. If /printable is not set, 0b becomes 1b.
[Previous]
[Next]
NAME:
STR_LOAD
PURPOSE:
Load a strucutre from an identical sturcture (same definition of tags).
You would think you can just type "a=b" in IDL, but if the structure
names are different, you will get an error, even if the structures
are identical. This routine gets around this problem byt loading the
structure tags one at a time.
CALLING SEQUENCE:
str_load, filee, filler
INPUTS:
filler = the structure from which data is taken
KEYWORD INPUT:
index = if the fillee structure is an array of structures and you only
want to fill some elements of the array, set index equal to the
the array indices to be filled. You can't simply pass something
like fillee(index) in the call to str_load because IDL will pass
fillee(index) by value rather than by reference.
tags = if you want to fill just a few tags in the structure, pass
a vector of tag index numbers in tags. Applies to both fillee
and filler.
OUTPUTS:
fillee = the structure to be filled. It must have the same definition
as filler.
CALLED BY:
hxt_multimg, hxt_sources, hxtpix, makimg0
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
The two structures must have the same difinition execpt possibly for the
structure fdname. If the definitions are not exactly the same, an error
will result: use str_fill.pro in this case.
EXAMPLES:
a = replicate({a,a:0,b:0},5)
b = {b,a:1,b:2
str_load, a, index=2, b
PROCEDURE:
Transfers data tag by tag from filler into fillee. The routine is
recursive so that it will work with tags which are themselves structures.
MODIFICATION HISTORY:
Written 25-Jun-93 by T. Metcalf
[Previous]
[Next]
Name: str_merge
Purpose: merge (append) a new structure tag into an existing structure
Input Parameters:
str1 - top level structure (or vector of stuctures)
str2 - new structure to merge (becomes new tag of str1)
Optional Keyword Parameters:
nest_name - optional tag name (default is 1st 3 char of structure name)
down - switch, if set, nest str1 (str1 and str2 at same level)
CALLS: ***
FMT_TAG [1], FMT_TAG [2], MAKE_STR [1], MAKE_STR [2]
CALLED BY:
BSC_FIELD, MK_BSC_STR [1], MK_BSC_STR [2], fort2hxi [1], fort2hxi [2], his_index
hxt_memimg, hxt_multimg, hxt_sources, hxtpix, makimg0
History: 30-Jun-93 (SLF) - Adapt 'make_str' to MDM str_merge logic
7-Jul-93 (SLF) - allow vectors and assign values properly
8-Jul-93 (MDM) - Corrected problem when STR2 was one element
and STR1 had several elements.
28-Jul-93 (SLF) - allow non-structure tages
29-Jul-93 (SLF) - 1 parameter option, down keyword (recursive)
Calling Sequence:
newstr=str_merge(str1, str2 [,nest_name=nest_name, /down])
Calling Examples:
newstr=str_merge(str1,str2) ; str2 becomes new tag of str1
newstr=str_merge(str1) ; nests str1 one level down
newstr=str_merge(str1,str2,/down) ; same and then merges str2
Method: uses make_str to assure uniq structure names
[Previous]
[Next]
NAME:
STRAY_CORR
PURPOSE:
a mini-PREP that does dark, stray, and vignetting corrections
CATEGORY:
Yohkoh
CALLING SEQUENCE:
stray_corr, index, data, index_stray, data_stray, final_img
INPUTS:
index and data of image to correct
index and data of stray reference image
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
final_img is the corrected output
CALLS: ***
dark_sub [1], dark_sub [2], dark_sub [3], gt_expdur [1], gt_expdur [2]
sxt_off_axis, sxt_vignette
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
HSH 23-nov-94
[Previous]
[Next]
NAME:
STRETCH2
PURPOSE:
Stretch the image display color tables so the full range
runs from Low to High.
CATEGORY:
Image processing, point operations.
CALLING SEQUENCE:
Stretch2, Low, High, Gamma, r, g, b [,CHOP = Chop]
INPUTS:
Low = lowest pixel value. If omitted 0 is assumed.
Must range from 0 to the number of available colors-1.
High = highest pixel value. If omitted, colors-1 is assumed.
Must range from 0 to colors-1.
Gamma = Gamma correction factor. Optional parameter, if
omitted, 1.0 is assumed. Color indices are raised
to the Gamma power, assuming they are scaled to the
range of 0 to 1.
INPUTS/OUTPUTS:
r,g,b = Color tables to be modified.
KEYWORD INPUTS:
Chop = Set values above the upper threshold to color index 0.
Normally, values above the upper threshold are clipped
to the maximum color index.
CALLED BY:
go_lasdisk golaserdisk, go_lasdisk2 golaserdisk, go_nvs5, mk_movie [1]
mk_movie [2], mk_nvs_movie, mk_ptv_movie
COMMON BLOCKS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
r,g,b must be 1-d vectors of byte type.
PROCEDURE:
New R, G and B vectors are created by linearly interpolating
the vectors in common from Low to High.
The R, G, B vectors will be changed.
MODIFICATION HISTORY:
14-apr-92, JRL - Adapted from Stern's stretch routine.
[Previous]
[Next]
NAME:
strip_data
PURPOSE:
Gets rid of open filter, and non full res images from a flare
SXT data set. Also will dump non-64X64 images
CALLING SEQUENCE:
strip_data, index, data
INPUT/OUTPUT:
index and data, SXT, data is optional
KEYWORDS:
filterb= filter number you want to keep, all the rest will be gotten rid of
CALLS: ***
gt_filtb, gt_res
CALLED BY:
align_hxi, box_sxthxt_fsp, sxt_fl_analxpro, sxt_fsp, sxt_thfsp, sxtbox_fsp
sxthxt_fsp
HISTORY:
1/24/95/jmm
[Previous]
[Next]
Name:
StrMap
Purpose:
Decode the input string 'str' and return the ith 'idx'
occurance of the item in the input string.
CALLING SEQUENCE:
req_str = StrMap(nfn, str, idx, [delimitor=delimitor])
Input:
nfn number of items encoded in input string.
str input string to decode
idx item number (0 - n-1), note if idx = nfn
all items will be decoded and returned.
KeyWord:
delimitor Default is ',', else caller defined.
Returned:
requested string
CALLED BY:
DsetVec, TrimDvec
History:
created 3-May-91 by GAL
updated for delimitor keyword 10-May-91.
[Previous]
[Next]
Name: strmids
Purpose: strmid with vectorized parameters
Input Parameters:
inarry - initial string array to split
start_position - first position (array ok)
exlength - length to extract (array ok)
Output:
function return value is trimmed string array
Calling Sequence:
strarr=strmid(inarray, start_positions, exlength )
Calling Examples:
IDL> more,strmids(replicate('123456789',5), indgen(5), indgen(5)+1 )
1
23
345
4567
56789
CALLS: ***
UNIQ [1], UNIQ [2], UNIQ [3], data_chk [1], data_chk [2]
CALLED BY:
LIST_PRINTER_UNIX, MDI_COPY, UNFORMAT_INTERVALS, ef2time, eit_file2path
extract_fids, gt2exe [1], gt2exe [2], hsi_ui_qlimage, html_get_files, make_mirror
mk_sxh, mreadfits_header, read_trace, soon_cadence, ssw_install [2]
ssw_instr_info, ssw_kyoto2dst, ssw_start_rpcserver, ssw_swmap_info
ssw_swmap_uniqinfo, sswdb_upgrade, timeline, topsdb [1], topsdb [2]
tr_mk_seq_alph, trace_dph2struct [1], trace_files, trace_movie_context
trace_request_summary, trace_struct2filename, url_encode, web_seq, xdisp_fits
History:
12-sep-1997 - S.L.Freeland
16-sep-1997 - S.L.Freeland - ignore action for any '-1' paramters
(allow strpos direct pass through)
17-sep-1997 - S.L.Freeland - dont bother initializing output array
Method:
calls strmid - vectorized for uniq combinations of
of start position and length
[Previous]
[Next]
NAME: strnames
PURPOSE: define main level variables using tag names of structure
CALLING SEQUENCE:
1: [define main level structure variable with name <struct>]
2: .run strnames
CALLING EXAMPLES:
restgen,struct=struct (define struct from genx file)
.run strnames (convert struct tags to main level variables)
struct=!d (define struct from existing structure)
.run strnames (convert struct tags to main level variables)
HISTORY:
SLF, 3-Mar-1993 - for use with generic files)
SLF, 30-Mar-1993 - fleshed out documentation
RESTRICTIONS:
only one level of variable clobber protection
[Previous]
[Next]
Name:
Strs2Mat
Purpose:
Convert a group of strings within a structure to
a matrix of the same data-type specified by the
Keyword "blank".
CALLING SEQUENCE:
matrix = Strs2mat([structure=a, stVal=stTag,
enVal=enTag, blank=val])
Input/Keywords:
a input structure to be converted
stTag starting Tag number for the conversion
enTag ending Tag number for the conversion
val default value for blanks and data type of
return matrix.
Returned:
matrix of type equal to the data-type for the Keyword
specifier "blank".
CALLS: ***
STR2ARR [1], STR2ARR [2]
CALLED BY:
MkFnMapMake Filename Map
History:
written 26-June-91 by GAL
[Previous]
[Next]
NAME: strsub
Purpose: Search for a char and replace all occurrences of that
char with the replacement char "replchar".
CALLED BY:
STREP [1], STREP [4], STRESS [1], STRESS [2], STRESS [3]
History: written by GAL, 1-June-95
[Previous]
[Next]
Name: stt_plot
Purpose: plot STT(Star Tracker) ouput signal level ( to check STT ).
Input Parameter:
indate - date in yohkoh date format
ada-data files of this date will be dispalyed in the selection
menu.
(if not sepecified, last 5 files will be displayed )
Description:
You can chose one of most recent 5 reformatted data (or those of a given
date) and get a plot of STT signal level vs. time.
If STT is working correctly, the signal level should be in between
400 and 800, and also it varies only in the priod set by STT timer.
This way, you can check STT.
CALLS: ***
DATA_PATHS, RD_ADA, UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5]
UTPLOT [6], anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
file_list [1], file_list [2]
History:
17-Aug-97 (KLA) - Written to Simplify (complicate?) Toban duties
[Previous]
[Next]
IDL routine to stuff a Yohkoh logo in the corner of an image
PRO stuff_yo_logo, image, corner
Input:
image = byte array to put logo in
corner = corner to put it in, 1 - 4, clockwise
from upper left
Routines called: yo_logo, wdef, wdelete
Written April 29, 1993 Barry LaBonte
Fix to use free window May 28, 1993 BJL
CALLS:
CALLED BY
background_new
[Previous]
[Next]
Pro subs_twod,i,j,ipix,jpix,ij
Returns position ij in an (ipix,jpix) matrix, given (i,j), the 2d position
[Previous]
[Next]
NAME:
substruc
PURPOSE:
This function creates a copy of a structure, replacing fields which are
2-D arrays with subarrays of the specified dimensions. Scalar and
1-D fields are passed unchanged.
CALLING SEQUENCE:
result = substruc (struc, [name,] x0, x1, y0, y1, help=help)
INPUTS:
struc = original structure from which to extract subarrays.
[Optional:
name = string specifying new name of structure type (must be different from
any name currently in use; this function will test for uniqueness).]
x0, x1, y0, y1 = integers specifying subarray, as in array(x0:x1,y0:y1).
OUTPUT:
result = new structure with reduced arrays.
KEYWORDS:
help = nonzero to print calling sequence summary and exit.
OTHER ROUTINES INVOKED:
strstat (T. R. Metcalf), get_def (TRM), makestr (TRM).
CALLS: ***
get_def, makestr, strstat [1], strstat [2]
RESTRICTIONS:
The makestr procedure is Unix-specific.
MODIFICATION HISTORY:
26 Feb 1992: Written by J-F de La Beaujardiere, with assistance from
T. R. Metcalf.
920917 ANM: Allow "name" to be omitted, using anonymous structures
[Previous]
[Next]
NAME:
SUM
PURPOSE:
Function to do a 1-d summation of a 2-d data set.
CALLING SEQUENCE:
out = SUMIT(in)
INPUTS:
in 2-d input array
OUTPUTS:
out 1-d summation of array
OPTIONAL OUTPUTS:
CALLS: ***
SUMIT
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
RDB 1990 Emulated IDL version 1 routine
[Previous]
[Next]
NAME:
sum_bsc.pro
PURPOSE:
Sum up elements in input bsc index and data structures.
CALLING SEQUENCE:
sum_bsc,bsc_index,bsc_data,sum_bsc_index,sum_bsc_data
INPUTS:
bsc_index bsc_index with elements to be summed
bsc_data bsc_data with elements to be summed
KEYWORDS:
NOTES:
OUTPUTS:
sum_bsc_index new bsc_index with one element (summed flux and counts)
sum_bsc_data new bsc_data with one element
CALLS: ***
BSC_ERRCAL [1], BSC_ERRCAL [2]
HISTORY:
11-Oct-96. Written. A.C. Sterling
02-Jun-97. ACS. Added error field
09-Sep-98. ACS. Fixed error in counts sum (removed faulty time norm).
11-Sep-98. ACS. Switched to Dominic's bsc_errcal code.
[Previous]
[Next]
NAME:
SUM_FLUXES
PURPOSE:
sum fluxes in an image over an array of pixels above a fraction
of the peak-brightness pixel within that array
CATEGORY:
Yohkoh
CALLING SEQUENCE:
sum_flux = sum_flux(image, indices, fraction)
sum_flux = sum_flux(image, indices, fraction, /fixed)
INPUTS:
image is an array of images
indices is an array of pixel numbers, gotten eg from DEFROI
fraction is the cut, eg 0.1 or 0.5, of peak brightness within
the area defined
OPTIONAL (KEYWORD) INPUT PARAMETERS:
/fixed forces interpreting fraction as a fixed level in image
brightness units
OUTPUTS:
sum of pixel contents meeting those conditions
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
HSH, written 16-Mar-94
[Previous]
[Next]
NAME:
SUMM_CALS
PURPOSE:
Reports countrate, HV and Temps for Source Cals
CALLING SEQUENCE:
summ_cals [,/log]
INPUTS:
OPTIONAL INPUTS:
KEYWORD INPUTS:
log name of file for log; not logged if absent
pause if present, pauses at key places...
OUTPUTS:
OPTIONAL OUTPUTS:
CALLS: ***
AHK_CONV, ALL_VALS [1], ALL_VALS [2], BREAK_FILE [1], BREAK_FILE [2]
BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], RD_BDA_DP
STR2ARR [1], STR2ARR [2], break_file [4], concat_dir [4], fmt_tim [1], fmt_tim [2]
systime2 [1], systime2 [2]
RESTRICTIONS:
No allowance for background made. Channels 1,2 can have high
values at times because of particle background...
PROCEDURE:
MODIFICATION HISTORY:
RDB 29-Nov-97 Written...
[Previous]
[Next]
SUMMARY.PRO
Program to produce summary plots of BDA data files
Use:
IDL> .run test_rd (include dp_sync data)
IDL> .run summary
Based on original pp_cratex.pro RDB Fall '91
CDP Dec '91
Bug fix to cope with roadmap and dp_sync data starting on different
sides of 00:00 hrs UT Jan 92 CDP
Generalize extraction of file name and extension Mar 92 CDP
Fix to bypass the yohkoh_events May 92
[Previous]
[Next]
NAME:
SUMROW
PURPOSE:
Some along rows of a matrix
CALLING SEQUENCE:
Vector = SUMROW(A)
CALLED BY
HXT_LOW_SUM, font_size [1], font_size [2], lcwda, sat_obs_loc, text_size
[Previous]
[Next]
Name: sumvec
Purpose: running sum of a vector (must have been done 10e9 times)
Method: brute force (hurry)
CALLS: ***
TOTVEC, deriv_arr [1], deriv_arr [2]
History:
14-mar-1995 (SLF)
[Previous]
[Next]
NAME:
SUN_B0
PURPOSE:
Calculate solar reference angle B0 for date specified by D79
CALLING SEQUENCE:
B0 = SUN_B0(DAY79)
INPUT:
DAY79 = Decimal days since 1 January, 1979
OUTPUT:
B0 = Heliographic latitude of the central point of the
CALLS: ***
dont_use_this [1], dont_use_this [2]
MODIFICATION HISTORY:
Version 1.0 - Jan, 1991, Written, G. L. Slater, LPARL
NOTES:
See PB0R.PRO for more information on this calculation.
[Previous]
[Next]
NAME:
sun_grid
PURPOSE:
read a full disk solar image and overlay a grid
CATEGORY:
CALLING SEQUENCE:
grid_gif,file,date
INPUTS:
file = file name (default: pop up menu of the current directory)
date = 'dd-mmm-yy' for b-angle (default = current date)
KEYWORDS (INPUT):
/click = do not use limb finder, but manually click limbs
/ten = plot grid at 10 degree intervals (default = 15 degrees)
/geo = for images with terrestrial N up and E to the left.
roll = roll angle. Direction to heliographic N, measured in
degrees ccwise from image top.
Default = 0 (or p-angle, if /geo set).
/nogrid = don't draw grid (just display the image)
Keywords specific to the Hawaii directory structure:
/big = search the directory /solar/daily/GroundObs/BigBear.
/sel = search the directory /solar/daily/GroundObs/SEL.
/kit = search the directory /solar/daily/GroundObs/KittPeak.
/cat = search the directory /solar/daily/GroundObs/Catania.
/sxt = search the directory /solar/daily/Yohkoh/data.
/bb = search the directory ~/BB_IMAGE.
OUTPUTS:
KEYWORDS (OUTPUT):
CALLS: ***
CLICKLIMB, DRAW_GRID [1], DRAW_GRID [2], DRAW_GRID [3], FITIM2INTS, MWLT_CENTER
READ_GIF, RFITS [1], RFITS [2], RFITS [3], file_menu [1], file_menu [2]
get_rb0p [1], get_rb0p [2], gt_pix_size, restsys [1], restsys [2], savesys [1]
savesys [2], sxt_cen [1], sxt_cen [2]
COMMON BLOCKS:
None.
SIDE EFFECTS:
RESTRICTIONS:
Can only read gif, jpeg, and fits files at this point
Limb finder works for SEL Ha gif and BBSO Ha jpg.
Does NOT work with BBSO fts (S up, labels too big).
PROCEDURE:
MODIFICATION HISTORY:
JPW, 3-aug-95
[Previous]
[Next]
NAME:
SUN_P
PURPOSE:
Calculate solar reference angle P date specified by D79
CALLING SEQUENCE:
P = SUN_P(DAY79)
INPUT:
DAY79 = Decimal days since 1 January, 1979
OUTPUT:
P = Position angle of the northern extremity of the axis
of the sun's rotation, measured eastward from the
geographic north point of the solar disk.
CALLS: ***
dont_use_this [1], dont_use_this [2]
MODIFICATION HISTORY:
Version 1.0 - Jan, 1991, Written, G. L. Slater, LPARL
NOTES:
See PB0R.PRO for more information on this calculation.
[Previous]
[Next]
NAME:
SUN_R
PURPOSE:
Calculate the solar radius in arc seconds measured outside
earth's atmosphere for the date specified by D79
CALLING SEQUENCE:
R = SUN_R(DAY79)
INPUT:
DAY79 = Decimal days since 1 January, 1979
OUTPUT:
R = Solar radius in arc seconds measured outside earth's
atmosphere
CALLS: ***
dont_use_this [1], dont_use_this [2]
MODIFICATION HISTORY:
Version 1.0 - Jan, 1991, Written, G. L. Slater, LPARL
NOTES:
See PB0R.PRO for more information on this calculation.
[Previous]
[Next]
NAME:
sun_today
PURPOSE:
create sun_today image for showpix (guts from first_light)
read the existing genx file version by default (speed)
Calling Sequence:
sun_today, suntoday, r, g, b,/generate ; create new image (slow)
sun_today, suntoday, r, g, b ; read existing showpix copy (faster)
Input Parameters:
none
Output Parameters:
suntoday - collage of SXT and groundbase images [bytarr(850,850)]
CATEGORY:
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DIST, FILE_EXIST [2], HALP, LOADCT
ROT, SIGMA_FILTER, WDEF [1], WDEF [2], concat_dir [4], data_chk [1], data_chk [2]
file_exist [1], file_exist [3], fl_annotate [1], fl_annotate [2]
fl_suntoday [1], fl_suntoday [2], fl_suntoday [3], fmt_tim [1], fmt_tim [2]
get1gbo, get_info [1], get_info [2], get_info [3], get_info [4], get_logenv [1]
get_logenv [2], get_newsoon, get_rb0p [1], get_rb0p [2], gntcleen, histscale [1]
histscale [2], lastsfd [1], lastsfd [2], mk_pix [1], mk_pix [2], restgen [1]
restgen [2], rm_darklimb, savegen [1], savegen [2], scale_gbo, sxt_cen [1]
sxt_cen [2], wc_where [1], wc_where [2]
MODIFICATION HISTORY:
------- edited modification history for first_light -------
HSH, written July 1993
da 30-Apr-94, Produces collage of SXT + 4 GBO images
BNH 6-Jul-94, Changed display stuff for collage to
(hopefully) better deal with varying
background in gki, gkm images
SLF - 10-Jul-1994 Broke out collage, wrote to Z-buffer
return the collage and color table vectors
SLF - 12-Jul-1994 Scale character size (Z ne X), allow read of existing
SLF - 6-Sep-1994 Eliminate offpoint check
SLF - 15-Sep-1994 Only reposition GBO for non-offpoint images
incorporate fl_annotate (specialized)
SLF - 8-oct-1994 Call GAL's <halp.pro> to clean big bear
SLF - 9-oct-1994 Fill out ~256 pixels for better resolution
make white light temporary file.
SLF - 10-oct-1994 took out rotation of white light (FITS arrows flipped??)
SLF - 19-oct-1994 use get1gbo instead of lastgbo
SLF - 16-jan-1995 protect against no recent gbw case
SLF - 3-mar-1995 expand window (temporary fix)
SLF - 21-jun-1995 He 10830 scaling per J.Gurman/H.Jones
SLF - 5-jul-1995 verify GNT image integrity or go back in time...
SLF - 10-jul-1995 use SOON instead of BBSO (format problem)
SLF - 24-sep-1995 adjusted scaling for soon/gbh/gkm
Call histscale.pro for gbh, gkm
SLF - 12-mar-1996 gkm scaling (may already be scaled)
NN - 9-May-98 shrank He 10830 image slightly so that time be readable.
[Previous]
[Next]
NAME:
sun_today
PURPOSE:
create sun_today image for showpix (guts from first_light)
read the existing genx file version by default (speed)
Calling Sequence:
sun_today, suntoday, r, g, b,/generate ; create new image (slow)
sun_today, suntoday, r, g, b ; read existing showpix copy (faster)
Input Parameters:
none
Output Parameters:
suntoday - collage of SXT and groundbase images [bytarr(850,850)]
CATEGORY:
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DIST, FILE_EXIST [2], HALP, LOADCT
ROT, SIGMA_FILTER, WDEF [1], WDEF [2], concat_dir [4], data_chk [1], data_chk [2]
file_exist [1], file_exist [3], fl_annotate [1], fl_annotate [2]
fl_suntoday [1], fl_suntoday [2], fl_suntoday [3], fmt_tim [1], fmt_tim [2]
get1gbo, get_info [1], get_info [2], get_info [3], get_info [4], get_logenv [1]
get_logenv [2], get_newsoon, get_rb0p [1], get_rb0p [2], gntcleen, histscale [1]
histscale [2], lastsfd [1], lastsfd [2], mk_pix [1], mk_pix [2], restgen [1]
restgen [2], rm_darklimb, savegen [1], savegen [2], scale_gbo, sxt_cen [1]
sxt_cen [2], wc_where [1], wc_where [2]
MODIFICATION HISTORY:
------- edited modification history for first_light -------
HSH, written July 1993
da 30-Apr-94, Produces collage of SXT + 4 GBO images
BNH 6-Jul-94, Changed display stuff for collage to
(hopefully) better deal with varying
background in gki, gkm images
SLF - 10-Jul-1994 Broke out collage, wrote to Z-buffer
return the collage and color table vectors
SLF - 12-Jul-1994 Scale character size (Z ne X), allow read of existing
SLF - 6-Sep-1994 Eliminate offpoint check
SLF - 15-Sep-1994 Only reposition GBO for non-offpoint images
incorporate fl_annotate (specialized)
SLF - 8-oct-1994 Call GAL's <halp.pro> to clean big bear
SLF - 9-oct-1994 Fill out ~256 pixels for better resolution
make white light temporary file.
SLF - 10-oct-1994 took out rotation of white light (FITS arrows flipped??)
SLF - 19-oct-1994 use get1gbo instead of lastgbo
SLF - 16-jan-1995 protect against no recent gbw case
SLF - 3-mar-1995 expand window (temporary fix)
SLF - 21-jun-1995 He 10830 scaling per J.Gurman/H.Jones
SLF - 5-jul-1995 verify GNT image integrity or go back in time...
SLF - 10-jul-1995 use SOON instead of BBSO (format problem)
SLF - 24-sep-1995 adjusted scaling for soon/gbh/gkm
Call histscale.pro for gbh, gkm
SLF - 12-mar-1996 gkm scaling (may already be scaled)
[Previous]
[Next]
NAME:
sunsets
PURPOSE:
To examine sunset images and select good ones.
CALLING SEQUENCE:
sunsets,data,info_array,sx=[2,3]
INPUTS:
data = SXT data cube, all images of same exposure.
info_array = the usual produced by get_info2(index) or yodat
sx = index array of pairs of sunlight and sunset images where the
sunlight images come first, e.g.,
sx=[1,2,3,4,10,9,10,11,12,13,17,18]
OUTPUTS:
First the sunset image is displayed with a pause, no tv scaling is done
Then the normal image is displayed with a pause, no tv scaling is done
Then the difference of the (sum of lines 10:15)/6 is presented
INTERPRETATION
No x-ray features and scatter around 0 = good sunset image
Largely positive values = sunset image too late (faint)
Negative values = poor choice of sunlight image, try again.
NOTE -- the following is to remind me how to select sunset images.
From morrison@sxt2.space.lockheed.com Thu Aug 12 10:04:09 1993
rd_roadmap, infil, roadmap ;or have already done this through YODAT
tim2orbit, roadmap, tim2night=tim2night
ss = where(tim2night lt 1) ;tim2night is in minutes
MODIFICATION HISTORY
Programmed 12-Aug-93 by LWA
CALLS:
[Previous]
[Next]
Name: sw2tree
Purpose: distribute files in path into Yohkoh SW tree.
original purpose is for atest
Input Parameters:
path - input pathname (default=/ys/atest/soft)
Keyword Parameters
olderthan - age of files to afect - only files older than this
interactive - if set, user can specify action for files not on line
testing - if set, no commands are actually spawned
History: slf, 4-Feb-1993
slf, 7-Feb-1993 ; delete, user input options
slf, 13-may-1993 ; asthetic details
slf, 26-oct-1993 ; clean up not online file
CALLS: ***
ATEST2TREE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1]
CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], SPLIT_FILES, break_file [4]
concat_dir [4], file_append [1], file_append [2], file_exist [1], file_exist [3]
mk_mapfile [1], mk_mapfile [2], path_sw [1], path_sw [2], prstr [1], prstr [2]
wmenu_sel [1], wmenu_sel [2]
Restrictions: unix only, user generally requires root priviledge
[Previous]
[Next]
NAME:
SW_ELAPSED_TIME
PURPOSE:
Estimate elapsed time for solar wind flow to a given radial distance
(eg, distance = 1.5 means out to 0.5 Ro above photosphere; distance =
214 means out to one AU).
The calculation is for the Withbroe minimum polar hole model,
but with the ref_vel keyword one can scale to any velocity
at one AU (default 588 km/s)
CATEGORY:
Yohkoh
CALLING SEQUENCE:
time = sw_elapsed_time(distance)
INPUTS:
distance in solar radii
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ref_vel = sw speed in km/s
ref_dist = radial distance of reference, AU (default 1)
bin = integration grid (points per Ro, default 1000)
OUTPUTS:
time in days
CALLS: ***
SW_VEL_MODEL
CALLED BY:
HELIO_FOOT
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
doesn't handle some special cases.
MODIFICATION HISTORY:
HSH, written 8-Feb-1994
HSH, modified to vectorize and extend range 13-Feb-1994
HSH, extended the range again to 1000 R_sun via SW_VEL_MODEL
[Previous]
[Next]
Name: sw_tape
Purpoes: save or restore yokoh software to and from archive tapes
Input Parameters:
device - string variable containing device name (tape,disk)
Keyword Parameters:
save (input) - if set, generates tar commands to save software to
the tape
restore (input) - if set, generates tar command to restore
software from tape to disk.
direct (input) - if set, uses this string variable as the upper
pathname for save and restore - default to /ys
subsets (input) - subdirectories to save - relatvie to direct
all (input) - restore only - all software restored
disc (input) - if set, output to disc at direct=disc
file names derived from subset names
Ouput - function returns string array of tar commands - it is
assumed that these are appended or form a script file
which is written by the calling program or they can be
spawned by the caller.
History - written by slf, 11/8/91
13-Jun-93 (MDM) - Modified so that the compressed tar files are
saved to the tape
CALLS:
CALLED BY
RdTap [1], RdTap [2], RdTap [3], mktap
[Previous]
[Next]
NAME:
SW_VEL_MODEL
PURPOSE:
generate a velocity profile based on Withbroe's model for polar
@ solar minimum (reference G.L. Withbroe, Ap. J. 325, 442, 1988)
the crude assumption here is that the solar wind doubles in speed
(from 294 to 588 km/s) between 10 Ro and 1 AU.
CATEGORY:
Yohkoh
CALLING SEQUENCE:
vel = sw_vel_model(radii, vel=vel, rad=rad)
INPUTS:
radii to calculate at (monotonic, units R_sun)i
KEYWORDS:
vel scales the whole model to an observation at 1 A.U.
rad provides an input for a reference radial distance for the scaling
velocity, ie if Ulysses were not at 1 AU for example
OUTPUTS:
velocities on the grid of points in radii
CALLS: ***
DSPLINE
CALLED BY:
SW_ELAPSED_TIME
RESTRICTIONS:
only works out to 1000 R_sun = 4.67 A.U., and probably doesn't
mean much that far out anyway (blame Withbroe, of course)
MODIFICATION HISTORY:
HSH written 8 Feb. 1994 (rad not implemented)
[Previous]
[Next]
NAME:
sxl2radiance
PURPOSE
To calculate the spectral radiance at the sun in a band from SXT signals
averaged over specified time intervals. Assumed spectrum is from
the temperature derived from Al.1/AlMg filter ratio for the same
time interval. Convert to irradiance if keyword set.
CALLING EXAMPLES
output_structure=sxl2radiance([10,18],24.*60.*60.)
out=sxl2radiance(edges,dtime,index,flux,indata=indata, $
sttime=sttime,endtime=endtime, $
photon=photon,erg=erg,debug=debug,loud=loud, $
irradiance=irradiance,new=new)
INPUT
edges, 1-d array of wavelengths (A) defining bands for flux ratio analysis
Note: Band limits must lie within the range 1.26867-298.029 A.
dtime, length of averaging time intervals (seconds)
OPTIONAL INPUT
index, index structure from sxl_analysis.pro
flux, signal structure from sxl_analysis.pro
OPTIONAL KEYWORD INPUT
indata, name of .genx file with the sxl fluxes and index
required if index and flux are not passed in.
sttime, starting time of desired analysis interval
endtime, ending time of desired analysis interval
Note: If sttime or endtime are not provided analysis refers
to index for the start and/or end time.
/photon, do computations in photons
/erg, do computations in ergs (default)
/debug, stops program just before end
/loud, prints out a lot of results to screen
/new, force reading of sxl data from SXT database
/irradiance, output irradiance, i.e., (flux/cm^2/s) at earth.
OUTPUT
IDL structure containing:
time, day: structure times of midpoints of intervals
fmttim: ascii time of midpoints of intervals
units: ergs/cm^2/s, ergs/s, photons/cm^2/s, or photons/s
temp: alog10(temperature), [K]
em: alog10(emission measure), [cm^-3]
interp: =0 for temp & em values computed from data
=1 for interpolated temp & em values
al: SXT Al.1 average full-disk signal for interval (DN/s)
almg: SXT AlMg average full-disk signal for interval (DN/s)
band: edges in angstrom of spectral band(s)
rad: spectral radiance(s) for the specified band(s)
in photons or ergs per wavelength bin
CALLS: ***
INTERPOL, KILL_INDEX [1], KILL_INDEX [2], PMM [3], SXT_TEEM2 [1], SXT_TEEM2 [2]
SXT_TEEM2 [3], UNIQ [1], UNIQ [2], UNIQ [3], anytim2ints [1], anytim2ints [2]
choose_pairs, divyup, fmt_tim [1], fmt_tim [2], gt_filtb, pmm [1], pmm [2]
restgen [1], restgen [2], sxl_analysis, sxl_select, sxt_chk_era, sxt_flux [1]
sxt_flux [2], sxt_flux [3], sxt_sig_per_dn_lwa, tim2dset [1], tim2dset [2]
Example: ** Structure <40373688>, 10 tags, length=944, refs=1:
TIME LONG 43200000
DAY INT 5672
FMTTIM STRING '12-JUL-94 12:00:00'
UNITS STRING 'photons/s'
TEMP FLOAT 6.35518
EM FLOAT 48.8143
INTERP INT 0
AL FLOAT 4.75468e+06
ALMG FLOAT 2.36557e+06
EDGES FLOAT Array[111]
RAD FLOAT Array[110]
OPTIONAL KEYWORD OUTPUT
PRINTED OUTPUT
RESTRICTIONS
Oribital variation of AU ignored in computing irradiance.
PROGRAMS CALLED
sxl_analysis, sxl_select, sxt_flux, sxt_teem2,
sxt_sig_per_dn_lwa, stdev
HISTORY
14-Jul-99 LWA Created from sxl2radiance.pro.
19-Jul-99 LWA Temporary fix to for-loop to deal with JUMP.
3-Aug-99 LWA Derive temperatures from sxt images out to
Rsun=1.1 only, to improve signal to noise.
2-Nov-99 LWA Deleted all unused junk still in sxl2rad3.pro.
3-Nov-99 LWA Changed step 2 to force use of right date.
Added irradiance keyword.
4-Nov-99 LWA Added code to properly handle leak-era boundaries.
Pad arrays to make alout and dgout same length.
18-May-00 LWA Changed all "for loops" to data type long.
19-May-00 LWA Installed check to assure data series are same length.
24-Jan-01 LWA Renamed from sxl2rad5.pro
21-Dec-01 LWA Deleted obsolete te_corr keyword.
Changed all indgen to lindgen.
[Previous]
[Next]
NAME: sxl_analysis
PURPOSE: Collect data from the SXL data base for study of the
radiative output of the corona within different brightness
regimes versus time. Basic input data are the SXL
histograms. Output data are total decompressed DN/HRpix/sec.
The normalization to /sec comes from the fact that the
SFDs are normalized this way.
COMMENTS - (3/10/96):
Changed the conversion to throw away sxl(dn)=0
to compensate error introduced by mk_sfd ignoring
negative values after dark/leak subtraction. Kept integer
truncation of sfd_decomp as this gave a more accurate
result for the 1 case (25-May-95) tested.
However, for the on-disk fluxes between levels I have
kept the sxl(dn)=0 in the sum because the on-disk intensities
are more likely to be above background.
CALLING SEQUENCE:
sxl_analysis, sttime, entime, index, flux $
[, filter=filter, res=res, lvls=lvls]
sxl_analysis,'1-dec-92','15-feb-93',ind0,flux0
sxl_analysis,'1-dec-92','15-feb-93',ind0,flux0, $
filter=2,res=[1,2]
INPUT:
sttime = starting time
entime = ending time
OPTIONAL KEYWORD INPUT
filter, (2=Al.1, 3=AlMg), default=3
can do either filter or both, i.e., filter=[2,3]
res = resolution, (1=half, 2=qrtr), default=1
CALLED BY:
sxl2radiance
Note: QR data have been multipled by 4 to match HR data.
lvls = Brightness levels in sfd_compressed DN for basis
of sorting on-disk data.
Default: lvls = [0, 50, 100, 150, 255]; for AlMg
Use: lvls = [0, 62, 112, 161, 255]; for Al.1
/loud, prints out diagnostic info
RETURNED/OUTPUT:
***Note: QR data HAVE BEEN multipled by 4 to match HR data.***
index = index(nn) of sfd images analyzed
flux(6,nn) = array of fluxes in decompressed DN/sec
flux(0,nn) = signal in the entire image
flux(1,nn) = signal above radius = 1.05 solar radius
flux(2:5,nn) = Total DN per second of on-disk (R<0.86Rsun) image
within the intervals set
by the array lvls within the program.
Presently lvls = [0,50,100,150,255].
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], KILL_INDEX [1]
KILL_INDEX [2], RD_XDA [1], RD_XDA [2], concat_dir [4], file_exist [1]
file_exist [3], gt_filta, gt_filtb, gt_res, prstr [1], prstr [2], sfd_decomp
str_concat [1], str_concat [2], sxt_cen [1], sxt_cen [2], week_loop [1]
week_loop [2], week_loop [3]
RESTRICTIONS:
1. Program returns at least a full week of data, even if
sttime, entime span less than a week.
HISTORY:
Written by LWA 25-Feb-94
Expanded and changed to read one week at a time 2-Mar-94
Changed to output roadmap rather than index 2-mar-94. lwa
Changed to allow keywords and print info while running,
also use STR_CONCAT. 3-Mar-94, lwa.
Changed header to explicitely state that output is
decompressed DN/sec.
Added clarifications on QR data and sttime, entime span
LWA 11/18/95, 12/8/95.
Empirical mod to compensate for serious "flux enhancement"
by mk_sfd for low signal cases where all zero or negative
values of the corrected image are set = 1. LWA 3/10/96
Incorporate smaller index structure. LWA 3/10/96
Changed name from sxl_analysis2 to sxl_analysis. LWA 12/5/97
Changed variable filtr back to filter for historical reasons.
and modified so both Al.1 and AlMg can be done at once. LWA 6/24/99
4-Jul-99 LWA, Added keyword loud.
4-Nov-99 LWA, Replaced delind with kill_index.
21-Jul-00 LWA, Clarified header definition of flux(2:5,nn)
and changed extension to a.03.
1-Aug-00 LWA, Changed extension back to a.02 (dumb mistake).
10-May-01 LWA, Fixed Y2K problem in file generator.
[Previous]
[Next]
NAME:
sxl_clip
PURPOSE
Written to identify extra high or low SXL flux values.
Plot results for eyeball judgment of effectiveness.
CALLING SEQUENCE
sxl_clip,data,out [,ii=ii,width=width,level=level,/verbose $
,/keep,/verbose]
INPUT
data, data array from sxl_analysis to clip, e.g, data(0,*).
OPTIONAL KEYWORD INPUT
ii, array of indices to process. Default: All data.
width, smoothing width. Default: 17
level, +/- clipping level. Default: 0.25
/keep, return the indices of unclipped data.
/verbose, print out "help" listings of input and output arrays.
/noplot, skip plot output
OUTPUT
out, vector of indices of rejected or accepted (/keep)
data points. I.e., if array ii is input then output
is out=ii(rejected) or out=ii(accepted).
HISTORY
11/18/95, LWA, written.
12/08/95, LWA, cleaned up and generalized.
12/11/95, LWA, added keyword verbose.
8/10/98, LWA, put in test for negative values.
put in forgotten keyword ii.
8/03/00, LWA, corrected error in neg value logic.
CALLS:
CALLED BY
sxl_select
[Previous]
[Next]
NAME:
sxl_select
PURPOSE
To prepare data for sxl2irradiance.
1. Identify SXL data to be rejected because of offpointing
hot CCD, eclipse, etc., etc. (about 2%).
2. Average data into dtime intervals, uses divyup.pro.
INPUT
index, index structure from output of sxl_analys.pro
data, DN/s signal array from sxl_analysis
dtime, time interval (seconds) over which to average data
KEYWORD INPUT
start, the starting time for grouping of data by divyup.pro
endt, the ending time for grouping of data. If groups extend
beyond this time the later groups are deleted.
OPTIONAL KEYWORD INPUT
minsamp, minimum samples in an interval required for processing,
default = 1
OUTPUT
Array of average signal levels for each time interval.
Intervals with no valid data set equal to -1.
KEYWORD OUTPUT
tout, structure of mid-points of day averages.
OPTIONAL KEYWORD OUTPUT
nout, array giving number of samples in each average value.
ok, indices of good data
PROGRAMS CALLED
int2secarr, sxl_clip, divyup
HISTORY
24-Jun-99, LWA, rewritten from sxl_dg_analysis.pro
28-Jun-99, LWA, added start keyword
CALLS:
CALLED BY
sxl2radiance
[Previous]
[Next]
NAME:
SXS_EFF
PURPOSE:
read calibration file for SXS spectral response (effective area
data provided by Takahashi_kun in file PHEF.DATA
CALLING SEQUENCE:
sxs_eff,energy,area,plot=plot
OUTPUTS:
energy = energy of calculation (fltarr(2) for SXS1 and SXS2)
area = effective area (fltarr(2))
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], RDFILE [1], RDFILE [2]
concat_dir [4]
note: there are 128 points
KEYWORDS:
/plot makes a plot
HISTORY:
HSH, written Nov. 27, 1992
[Previous]
[Next]
ROUTINE:
SXSCV
PURPOSE:
Return a structure of SXS-PC data including time-data.
A dead-time correction is also performed. Output data is
pulse count data (count/sec) with full time resolution.
The begin time of time-data is corresponding to time
of index(0).
INPUT:
data - structure data (from WDA data)
index - index structure
OUTOUT:
** Structure SXS_PC, 5 tags
TIME DOUBLE Array
PC11 DOUBLE Array
PC12 DOUBLE Array
PC21 DOUBLE Array
PC22 DOUBLE Array
KEY WORD PARAMETER:
plot - If set, SXSPC is called and PC-data
is ploted with UTPLOT.
CALLS: ***
SXSPC
EXAMPLE:
idl> pcdata=sxscv(data,index)
of idl> pcdata=sxscv(data,index,/plot)
PLOT:
Use UTPLOT in the follwing example,
idl> utplot,pcdata.time,pcdata.pc11,index(0)
You can also use SXSPC which was made by me
in the following,
idl> sxspc,pcdata,index
HISTORY:
M.Takahashi(Tokai Univ.) Early 1-Sep-1992
1-Jun-1993 For UTPLOT
11-Jun-1993 Dead time correction
16-Aug-1993 Changed to Function
[Previous]
[Next]
NAME:
SXSPC
PURPOSE:
From sxs-pc data made by sxscv, light curve is ploted,
blown up and Post Script file is made. All operation
is performed with mouse-device.
INPUT:
pc_data - Structure data made by SXSCV
index - index data structure
CALLS: ***
UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6]
plot_lcur [1], plot_lcur [2], wmenu_sel [1], wmenu_sel [2]
CALLED BY:
SXSCV
EXAMPLE:
idl> sxspc,pc_data,index
HISTORY:
M.Takahashi (Tokai Univ.) Early 1-Sep-1992
1-Jun-1993 for UTPLOT
16-Aug-1993 for PLOT_LCUR
[Previous]
[Next]
Name: sxt2file
Purpose: Convert an SXT image file to a standard format (fits/jpeg/gif/tiff)
Input Parameters:
index - SXT Index record(s)
data - SXT image(s)
r,g,b - if permitted by output format, optional 8bit color table values
Keyword Parameters:
infil - If supplied, read from SDA file to get INDEX and DATA
ss - (used with infil option only) - only process these file images
outsize - if set, image will be "congridded" to this size
mag_fact - if set, magnification factor (instead of outsize)
outdir - output directory (default is apprpriate WWW image area)
replace - if set, overwrite existing file
fits - if set, output files are FITS format
gif - if set, output files are GIF format
jpeg - if set, output files are JPEG format
tiff - if set, output files are TIFF format
pict - if set, output files are PICT format
quality - optional quality (JPEG only)
currentcolor - switch, if set, use current R,G,B values
red/green/blue - optional color table values (3x256 bytes)
prefix - if set, output file prefix name (default='sxt')
goes (input) switch, if set, merge GOES lightcure/timeline w/imag
Calling Sequence:
sxt2file, index, data, [r,g,b, /gif,/tiff,/jpeg,/fits, outsize=outsize]
sxt2file, infil=infil, /gif,/tiff,/jpeg,/fits, red=red,blue=blue,green=green
Calling Examples:
sxtfile, index, data, /gif, outsize=256
sxtfile, infil='$DIR_SXT_SFM/sfm950300.0000', /jpeg, quality=25
Notes:
Makes one file per SXT image - output file name is:
PREyymmdd.hhmm.XXX (PRE=user supplied prefix, default='sxt')
(XXX=gif/fits/tiff/jpeg/pict)
If r,g,b postional or RED,GREEN,BLUE keywords are not specified then:
switch /CURRENTCOLOR - will use current color table
otherwise, a default RED greyscale table is assigned
(original color is restored prior to return)
If OUTDIR not specified, looks under WWW area (environ "path_http")
for 1) ../im*g*/XXX (ex: ../images/gif, ../img/fits)
2) ../im*g* (ex: ../img, ../image, /images)
If OUTDIR and $path_http not defined, uses current directory
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], CONGRID [1], CONGRID [2]
CONGRID [3], FILE_EXIST [2], FMT_TAG [1], FMT_TAG [2], LOADCT, RD_SDA [1]
RD_SDA [2], RD_SDA [3], SINCE_VERSION [1], SINCE_VERSION [2], STRETCH
anytim2ex [1], anytim2ex [2], concat_dir [4], curdir [1], curdir [2], data_chk [1]
data_chk [2], event_movie [1], event_movie [2], ex2fid [1], ex2fid [2]
file_exist [1], file_exist [3], get_logenv [1], get_logenv [2], get_subdirs [1]
get_subdirs [2], gt_shape_cmd, is_member [1], is_member [2], pr_status [1]
pr_status [2], prstr [1], prstr [2], rd_tfile [1], rd_tfile [2], savegen [1]
savegen [2], str_replace [1], str_replace [2], ut_time [1], ut_time [2]
wc_where [1], wc_where [2]
CALLED BY:
sxt2mpeg
Restrictions:
TODO: Update FITS header if outsize specified
History:
22-Sep-1995 (SLF) - simplify WWW and other file interchange work
20-oct-1995 (SLF) - add PICT keyword and function
25-oct-1995 (SLF) - add LOG and PREFIX keywords and function
13-nov-1995 (SLF) - add MAG_FACT keyword
[Previous]
[Next]
NAME:
SXT2HXAXY
PURPOSE:
Transform SXT suncenter coordinates into HXA coordinates and
perform time dependent corrections. Inverse of hxaxy2sxt.
Time dependent corrections are: orbital phase correction,
orbit duration correction, mission time correction (non-periodic).
CATEGORY:
CALLING SEQUENCE:
s_sunc = hxa_suncenter(time_index,h_sunc)
INPUTS:
time_index = time vector, e.g., pnt, atr, or ada_index structure.
s_sunc = array(2,*). suncenter coordinates in SXT fullresolution
pixels (FRE pixels).
sunc(0,*) = sxt_x, sunc(1,*) = sxt_y
KEYWORDS (INPUT):
/noorbit = do not correct for orbital variations of the offset
between HXT and SXT.
/nomission = do not correct for mission time variation of the offset
between HXT and SXT.
OUTPUTS:
h_sunc = array(2,*). suncenter coordinates in HXA detector pixels.
sunc(0,*) = hxa_x, sunc(1,*) = hxa_y
KEYWORDS (OUTPUT):
CALLS: ***
HXA_PARMS [1], HXA_PARMS [2], HXA_PARMS [3], gt_day [1], gt_day [2], tim2orbit [1]
tim2orbit [2]
CALLED BY:
show_hxafid
COMMON BLOCKS:
None.
SIDE EFFECTS:
RESTRICTIONS:
The mission time variation of the offset between HXT and SXT is
well corrected for the first year of Yohkoh. The correction
needs to be updated as the project goes on.
PROCEDURE:
MODIFICATION HISTORY:
28-Jul-93 (JPW) - from hxaxy2sxt
22-Sep-94 (JPW) Changed to apply mission correction only to pre-1993
data. Extrapolation beyond that caused large errors.
Slightly changed algorithm for orbital phase corr.
[Previous]
[Next]
Name: sxt2mpeg
Purpose: convert an SXT SDA file to mpeg movie
Input Parameters:
sxtfile - sxt file name (default is most recent spd file)
Keyword Paramters:
movie_name - mpg file name (default is derived)
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], FILE_EXIST [2], FMT_TIMER [1], FMT_TIMER [2], RD_SDA [1]
RD_SDA [2], RD_SDA [3], Rd_Roadmap [2], anytim2ex [1], anytim2ex [2]
break_file [4], concat_dir [4], ex2fid [1], ex2fid [2], file_append [1]
file_append [2], file_exist [1], file_exist [3], get_logenv [1], get_logenv [2]
grid_data [1], grid_data [2], int2secarr [1], int2secarr [2], line_table, mkthumb
newfiles [1], newfiles [2], newfiles [3], rd_roadmap [1], rd_tfile [1]
rd_tfile [2], ssw_deltat, str_replace [1], str_replace [2], sxt2file, ut_time [1]
ut_time [2]
History:
6-nov-1995 (SLF)
8-nov-1995 (SLF) - make a thumbnail and html for mpg interface.
[Previous]
[Next]
NAME:
SXT2POS
PURPOSE:
dump the Yohkoh/SXT active-region selections
CATEGORY:
CALLING SEQUENCE:
sxt2pos, index
sxt2pos, index, out
INPUTS:
an SXT index record. Takes the first of an array.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
out is the coordinate array (4,6) = (sxt, heliographic, angular)
CALLS: ***
conv_p2a [1], conv_p2a [2], conv_p2h [1], conv_p2h [2], fmt_tim [1], fmt_tim [2]
gtab_roi
COMMON BLOCKS:
SIDE EFFECTS:
prints the coordinates
RESTRICTIONS:
MODIFICATION HISTORY:
14-Jun-99, written by Hugh Hudson
[Previous]
[Next]
Name: sxt_adjacent_image
Purpose: return observing log records for preceding/following
Input Parameters:
times - index/roadmap/times of desired images
Output:
function returns observing logs (inc times...) of image
immediately preceding or following input
Keyword Parameters:
before/preceding (synonyms) - return preceding image info
after/following (synonyms) - return following image info [DEFAULT]
exact - if set, return eact match (or closest) from obslog
Calling Examples:
preceding=sxt_adjacent_image(index,/before)
subsequent=sxt_adjacent_image(index,/after)
exact=sxt_adjacent_image(index,/exact)
CALLS: ***
BOX_MESSAGE, get_utevent [1], get_utevent [2], sort_index [1], sort_index [2]
tim2dset [1], tim2dset [2], time_window
History:
7-Aug-2001 - S.L.Freeland
[Previous]
[Next]
NAME:
sxt_align
PURPOSE:
Determine offest between SXT NaBan and X-Ray images
CATEGORY:
CALLING SEQUENCE:
sxt_align,output_file,sfrfile_list,ss
INPUTS:
ouput_file = file name to dump data to
sfrfile_list = string array(nfiles) of sfr file names
ss = array(2,nfiles) containing image number of naban and then xray image
NaBan must always be listed first!
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
/read = if set read previously prepared data file
max_time = Maximum time difference between images (minutes) (def=5 min)
/reverse = reverse the order of the sfrfile_list vector (do the
files in the reverse order)
/plot = plot the offsets vs. time
scut = number of standard deviations away from the mean to cut the
data. 0 = off, 1 = 1 stdev, 2 = 2 stdev etc.
/ellipse = fit with an ellipse (passed to sxt_center)
fltol = tolerance for NaBan sxt_center vs. find_limb check
/verbose = print stats after every good file
/norfit = do not fit radius in sxt_center
/fast = use fast derivative in sxt_center
OUTPUTS:
statistics on the offset
CALLS: ***
FIND_LIMB, RD_SDA [1], RD_SDA [2], RD_SDA [3], SQUEEZE, STDEV, SXT_ALIGN_STATS
UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], fmt_tim [1]
fmt_tim [2], gt_day [1], gt_day [2], gt_time [1], gt_time [2], sxt_center
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
Calls sxt_center repeatedly
MODIFICATION HISTORY:
T. Metcalf 5/2/1992
T. Metcalf 1/21/1994
o Added call to find_limb and find_limb check.
o Added scut keyword
o Added check for duplicates
[Previous]
[Next]
NAME:
sxt_anycomp
PURPOSE:
Calculates the expected SXT response for a spectral fit
CALLING SEQUENCE:
cps = sxt_anycomp(tyspec, a, date = date)
INPUT:
tyspec= spectral type,
a = fit parameters, an array of (ma, ntimes)
tyspec=1, single p.l., a(0)=K, a(1)=gamma
=2, double p.l., a(0)=K1, a(1)=gamma1, a(2)=gamma2, a(3)=ebr
(ebr is the break energy in keV)
=3, Thermal, a(0)=em/1.0e47, a(1)=T/1.0e6
=4, Thermal + p.l., a(0)=em/1.0e47, a(1)=T/1.0e6, a(2)=K,
a(3)=gamma
=5, Double Thermal, a(0)=em1/1.0e47, a(1)=T1/1.0e6,
a(2)=em2/1.0e47, a(3)=T2/1.0e6
=6, p.l.+p.l., a(0)=K1, a(1)=gamma1, a(2)=K2, a(3)=gamma2
=7, Thermal below Ebr, p.l. above Ebr,
a(0)=K, a(1)=gamma, a(2)=T/1.0e6, a(3)=Ebr
=8 Thermal + double p.l., a(0)=em/1.0e47, a(1)=T/1.0e6,
a(2)=K1, a(3)=gamma1, a(4)=gamma2, a(5)=Ebr
=9 Triple P.L., a(0)=K1, a(1)=gamma1, a(2)=gamma2,
a(3)=gamma3, a(4)=eb1 (between gamma1 & gamma2),
a(5)=eb2 (between gamma2 and gamma3)
=10, Thermal, a(0)=em/1.0e47, a(1)=T/1.0e6, includes
SXR lines
=11, Thermal + p.l., a(0)=em/1.0e47, a(1)=T/1.0e6, a(2)=K,
a(3)=gamma, includes SXR lines
=12, single p.l. flattens below e0, a(0)=K, a(1)=gamma, a(2)=e0
=13, single p.l. cuts off below e0, a(0)=K, a(1)=gamma, a(2)=e0
=14, Double Thermal, a(0)=em1/1.0e47, a(1)=T1/1.0e6,
a(2)=em2/1.0e47, a(3)=T2/1.0e6, includes lines
=95, a(0) = EM at 1MK, a(1) = c_2, a(2)=c_3
=96, Double Power Law in temperature, variable T cutoff, Tb=5MK
a(0) = EM at 1MK, a(1) = low pl. index OF T,
a(2) = high pl. index of T, a(3) = cutoff T
=97, Gaussian in temperature
a(0) = EM at peak, a(1) = peak T, a(2) = width in T
=98, Power Law in temperature, variable T cutoff,
a(0) = EM at 1MK, a(1) = pl. index OF T, a(2) = Max. T
=99, Power Law in temperature, constantT cutoff,
a(0) = EM at 1MK, a(1) = pl. index OF T
KEYWORDS:
date= a time for the SXT, to be sure that entrance filter
holes are dealt with correctly
CALLS: ***
ADDTIME [1], ADDTIME [2], Countrate, Multresponses, anytim2ints [1]
anytim2ints [2], fdf10_init, ma_labels
HISTORY:
2-Apr-1996, jmm
[Previous]
[Next]
Averages SXT PFI images and computes temperature and
emission measure from average.
PRO sxt_av_teem, ix1, da1, ix2, da2, te, em, d_te, d_em, $
align=align, $ ; Input
av1=av1, av2=av2, sum1=sum1, sum2=sum2, $ ; Output
expose1=expose1, expose2=expose2, $ ; Output
error1=error1, error2=error2, $ ; Output
xy1=xy1, xy2=xy2 ; Output
Inputs:
ix1, da1 = index, data for filter 1
ix2, da2 = index, data for filter 2
Outputs:
te, em = temperature, emission measure images
d_te, d_em = errors in temperature, emission measure
Optional Keywords:
Input
align = input - if set, does alignment to subpixel accuracy.
Otherwise, uses registration of SXT_PREP only.
Output
av1, av2 = average images, output, DN per millisecond
sum1, sum2 = sum images, output, DN.
expose1, expose2 = total exposure time images, milliseconds.
error1, error2 = uncompression uncertainty images, DN.
xy1, xy2 = fine alignment offsets, pixels
Method:
Calibrates and aligns data, averages, then uses averaged
data to get Te, EM. Makes correction for SXT vignetting
as a function of energy.
Routines called: SXT_PREP, SXT_AVERAGE1, SXT_TEEM, KORREL
CALLS: ***
AVG [1], AVG [2], KORREL, SXT_TEEM [1], SXT_TEEM [2], gt_expdur [1], gt_expdur [2]
gt_res, gt_shape, str_concat [1], str_concat [2], sxt_average1, sxt_off_axis
sxt_prep [1], sxt_prep [2], sxt_prep [3]
Restrictions:
Cannot handle switching between Open/NuDen internal to
the data sequence.
History:
Written Barry LaBonte May 28, 1993
Accurate time units, June 3, 1993 BJL
Use new SXT_PREP for cal and coarse alignment, add error determination
rewrite fine alignment. February 3, 1994 BJL
Fix case of no missing data March 3, 1994 BJL
Add vignetting correction. March 4, 1994 BJL
[Previous]
[Next]
Aligns and averages a cube of images, accounting for saturated and missing
data.
PRO sxt_average, index, data, average
Inputs:
index, data = index, data cube, uncalibrated
Outputs:
average = average image, DN/millisec
Routines called:
SXT_PREP, ALIGN_AR, GT_EXPDUR, SXT_AVERAGE1
CALLS: ***
ALIGN_AR, gt_expdur [1], gt_expdur [2], sxt_average1, sxt_prep [1], sxt_prep [2]
sxt_prep [3]
History:
Written June 1, 1993 Barry LaBonte
Separated out SXT_AVERAGE1 June 3, 1993 BJL
[Previous]
[Next]
Averages a cube of images, accounting for saturated and missing
data.
PRO sxt_average1, data, texp, average, satpix=satpix, unc=unc, error=error, sum=sum, expose=expose, missing=missing
Inputs:
data = data cube, calibrated, to be averaged.
texp = vector of exposure times for the images in data, milliseconds
Outputs:
average = average image, DN/millisec
Optional Keywords:
Input:
satpix = cube of saturated pixels
unc = cube of decompression uncertainty. Used to compute error image.
missing = lowest valid data value. Default = 0. To preserve
accuracy, set this to a large negative number, < -4096.
Output:
sum = sum image, DN
expose = exposure time image, milliseconds
error = uncertainty image, DN. Derived from unc cube.
CALLED BY:
sxt_av_teem, sxt_average
History:
Written June 3, 1993 Barry LaBonte
Add uncertainty, sum, time images February 2, 1994 BJL
Add /MISSING keyword March 4, 1994 BJL
[Previous]
[Next]
function sxt_bakeout_in,index,cooling_time=incooling_time
NAME:
SXT_BAKEOUT_IN
PURPOSE:
Determine if an image is during a bakeout
CATEGORY:
CALLING SEQUENCE:
bake = sxt_bakeout_in(index)
INPUTS:
index = index or time. Used to get the time of the observation
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
cooling_time = Time after the end of the bakeout before the CCD
is considered to be cool (hours). Default = 0.0
OUTPUTS:
bake = byte array, 0 or 1 depending on whether the index time is
during a bakeout
CALLS: ***
SPLITSTR, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
get_yo_dates [1], get_yo_dates [2], get_yo_dates [3], sel_timrange [1]
sel_timrange [2]
CALLED BY:
mk_sdc [2], mk_sdc [3], mk_sdc [4]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
T. Metcalf 2002-Dec-03
[Previous]
[Next]
NAME:
sxt_bleedtest
PURPOSE
Test for severe CD bleed in SXT images.
CALLING SEQUENCE
boolean_array=sxt_bleed(index,data)
INPUT
index, SXT index structure
data, SXT raw, compressed, image or data cube
OUTPUT
Boolean vector indicating images with bleed
0 = no bleed
1 = bleed in >10% of pixels
PROCEDURE
Test to see if more than 10% of the pixels in
row 20 (HR) or row 10 (QR) have DN=255.
HISTORY
20-Jan-2004 LWA
CALLS:
CALLED BY
mk_sff_pair [1], mk_sff_pair [2]
[Previous]
[Next]
NAME:
SXT_CADENCES
PURPOSE:
Estimate nominal cadence based on bitrate, fov, flush count.
Has capability of predicting cadence for non-ideal setups.
CATEGORY:
Yohkoh
CALLING SEQUENCE:
INPUTS:
User is prompted for fov size, flush count, FFI/PFI-dom state, and DPE.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
OUTPUTS:
CALLS: ***
EXPTIM2DPE [1], EXPTIM2DPE [2], gt_dpe, input [1], input [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
Flush inputs must be decimal, not hex.
MODIFICATION HISTORY:
04-jun-98, DMcK, written in rough form
08-jun-98, DMcK, added estimation of resultant cadence for
'marginal' DPEs
7-oct-98, S.L.Freeland renamed 'cadences' to 'sxt_cadences'
Eventually want to allow hex input for 'A', since F is a commonly
used value....DMcK
[Previous]
[Next]
Name: sxt_cba2os1
Purpose: extract OS1 from CBA 'index,data'
Input Parametesr:
cbaii, cbadd - index,data from 'rd_xda,cbafiles,-1,cbaii,cbadd'
Output:
function returns extracted OS1 structure vector
CALLS: ***
ADD_TAG [1], ADD_TAG [2], BOX_MESSAGE, GETOS1, SXT_STRUCT, data_chk [1]
data_chk [2]
CALLED BY:
yo_mkos1_dbase
History:
Circa August 5, 20001 S.L.Freeland
(for shuttere encoder investigations)
30-Apr-2003 - "complete" for Yohkoh-Galileo project
6-jul-2005 - add minor frame 05 (res/comp/nexposures)
[Previous]
[Next]
Name: sxt_cba2os1
Purpose: extract OS1 from CBA 'index,data'
Input Parametesr:
cbaii, cbadd - index,data from 'rd_xda,cbafiles,-1,cbaii,cbadd'
Output:
function returns extracted OS1 structure vector
CALLS: ***
ADD_TAG [1], ADD_TAG [2], BOX_MESSAGE, GETOS1, SXT_STRUCT, data_chk [1]
data_chk [2]
CALLED BY:
yo_mkos1_dbase
History:
Circa August 5, 20001 S.L.Freeland
(for shuttere encoder investigations)
[Previous]
[Next]
NAME:
sxt_cen
PURPOSE:
To return the pixel coordinates of the center of the SXT image using
either GET_SUNCENTER, HXA_SUNCENTER or S/C commanded values.
SAMPLE CALLING SEQUENCE:
out = sxt_cen(index)
out = sxt_cen(index, att_perfect=att=perfect)
out = sxt_cen(index, /hxa)
out = sxt_cen(index, /cmd)
out = sxt_cen(index, roll=roll)
out = sxt_cen(index, roll=roll, /cmd)
out = sxt_cen(index, /rawcmd) ; dont apply seasonal correct.
INPUT:
times - The list of times for which the coordinates are required
CALLS: ***
GET_NBYTES, HXA_SUNCENTER, UNIQ [1], UNIQ [2], UNIQ [3], get_att, get_logenv [1]
get_logenv [2], get_roll, get_suncenter2, sxt_cmd_pnt, tbeep [1], tbeep [2]
tbeep [3], ydb_exist [1], ydb_exist [2], ydb_exist [3], ydb_exist [4]
CALLED BY:
ALIGN1BIGGRAM
Check the ATT database vs the SXC limb fit database to look for bad
GET_POINTS, LAY1GKM, MK_SSX, NORH_NORH2SXT [1], NORH_NORH2SXT [2]
NORH_NORH2SXT [3], NORH_NORH2SXT [4], PFI_CENTER, PLOT_CLON, POLAR_GRID
PP_MWLT2SXT, PP_SXT2ANY, PP_SXT2VLA, PROM_ON_DISK, QUICKDRIFT [1], QUICKDRIFT [2]
QUICKLIMB [1], QUICKLIMB [2], SFD_PHOT, SXT_EXPOSURE_MAP, SXT_GRID [1]
SXT_GRID [2], SXT_GRID [3], SXT_RPAXY, TERM_FIDS, TERM_QUICK, TERM_REVIEW
TERM_REVIEW_GIF, TEST_ATT, agl2cut, align_prep [1], align_prep [2], align_prep [3]
check_sfd_leak, coal_image, coal_rot, conv_a2p [1], conv_a2p [2], conv_p2a [1]
conv_p2a [2], fl_suntoday [1], fl_suntoday [2], fl_suntoday [3], gbo_obs_coord
gbo_pfi, get_epoch_sfcs [1], get_epoch_sfcs [2], gt_sxt_cen, his_suncen
match_index [1], match_index [2], mk_sfd [1], mk_sfd [2], mk_sfd [3], mk_sfd [4]
mk_strip_file, mk_sxc, mk_sxh, mk_sxl, mk_syn_sfc [1], mk_syn_sfc [2]
mk_synsfc_coeff [1], mk_synsfc_coeff [2], op_term_score, pfi_loc, plot_ar_pfi
plot_nar [1], plot_nar [2], rest_low8_cube [1], rest_low8_cube [2], scale_gbo
sda2fits, sleazy_rot, sol_rot [2], sun_grid, sun_today [1], sun_today [2]
sun_today [3], sxl_analysis, sxt_deleak [1], sxt_deleak [2], sxt_obs_coord [1]
sxt_obs_coord [2], sxt_plot_fov, sxt_xsaa, term_score2, termlite, xsxt_prep_event
xy_lwa
OPTIONAL KEYWORD INPUT:
hxa - If set, use HXA_SUNCENTER. Default is to use GET_SUNCENTER
cmd - If set, use the S/C commanded pointing data file. The true
suncenter can be up to 4-5 pixels different because of the
"slop" in the attitude control. Default is to use
GET_SUNCENTER
oride_pnt_chk - If set, then do not compare the ATT/GET_SUNCENTER
results to the commanded values to see that they are
truly valid points. This is useful for times when the
commanded pointing history file is not updated properly
or for real time applications when the commanded pointing
history is not updated yet.
rawcmd - if set, use commanded and do not apply seasonal correction
OPTIONAL KEYWORD OUTPUT:
delta - Time difference (in s) between index time and pnt
time for each sun center position. A value larger than a few
seconds indicates that the suncenter position may not be
reliable. It is only valid when not using /HXA or /CMD
options.
roll - The SXT roll in degrees. The CCD-north is "roll" degrees
counter clock wise from solar-N.
att_ok - Indices of those pointings which have ATT files within 1 second
of times and which have perfect (att.status1=4) HXA solutions.
METHOD:
This routine is intended as a front end to return the pointing
information. It does a check to see that the PNT files exist
when using GET_SUNCENTER or HXA_SUNCENTER.
The seasonal/mission long drift correction can be disabled
the the IDL command: setenv,'ys_no_attcmd_corr=1'
HISTORY:
Written 10-Jun-93 by M.Morrison
10-Jul-93 (MDM) - Check that the value to be returned is believable
and if not, use the /CMD option for the bad values.
14-Jul-93 (MDM) - Replaced some code with a call to PNT_EXIST
18-Aug-93 (MDM) - Replaced PNT_EXIST call with YDB_EXIST
- Replaced call to GET_SUNCENTER with a call to
GET_ATT if the ATT files exist
19-Aug-93 (MDM) - Added DELTA variable
17-Sep-93 (MDM) - Added ROLL keyword output
Introduced code to call GET_ROLL
2-Oct-93 (MDM) - Corrected error where a problem arises when some
of the ATT files exist, but not the one needed.
16-Oct-93 (MDM) - Make sure that the roll variable is defined
19-Nov-93 (MDM) - Added "min_status=2" call to GET_ATT so that the
results returned are at least acceptably good
11-Jan-94 (MDM) - Modified not to display "values returned are
unreasonable" message if /CMD is set.
10-Feb-94 (MDM) - Modified the criteria that is used to recognize bad
results in the ATT database to use the relative
offset from commanded IN ADDITION to the absolute value
of "lt 100 or gt 900". If x or y is more than 50
pixels from expected, and outside the above range, then
it is flagged as bad and the expected (commanded value)
is used.
21-Feb-94 (MDM) - Added /ORIDE_PNT_CHK to optionally not compare the
ATT/GET_SUNCENTER results to the commanded values to see
that they are truly valid points
21-Feb-94 (MDM) - Added capability of setting /ORIDE_PNT_CHK by setting
and environment variable "YS_ORIDE_PNT_CHK" to non-null
29-Nov-94 (MDM) - Print warning statement if the ATT record that it selects
is over 5 minutes from the requested time.
14-Feb-95 (MDM) - Changed warning message to say ATR instead of PNT
9-Mar-95 (MDM) - Modified SXT_CMD_PNT to apply the correction required for
the seasonal/mission long drift between the
commanded and actual.
25-mar-95 (SLF) - add RAWCMD keyword and function
15-sep-98 (LWA) - added att_perfect as an option keyword output.
21-sep-98 (LWA) - corrected min_status bug introduced on 15-sep-98.
23-May-99 (NN) - included in the ATT mismatch warning the time of interest
and the closet ATT time.
8-Jun-99 (NN) - fixed the bug that resulted from the 23-May-99 change.
[Previous]
[Next]
NAME:
sxt_cen
PURPOSE:
To return the pixel coordinates of the center of the SXT image using
either GET_SUNCENTER, HXA_SUNCENTER or S/C commanded values.
SAMPLE CALLING SEQUENCE:
out = sxt_cen(index)
out = sxt_cen(index, /hxa)
out = sxt_cen(index, /cmd)
out = sxt_cen(index, roll=roll)
out = sxt_cen(index, roll=roll, /cmd)
out = sxt_cen(index, /rawcmd) ; dont apply seasonal correct.
INPUT:
times - The list of times for which the coordinates are required
CALLS: ***
GET_NBYTES, HXA_SUNCENTER, UNIQ [1], UNIQ [2], UNIQ [3], get_att, get_logenv [1]
get_logenv [2], get_roll, get_suncenter2, sxt_cmd_pnt, tbeep [1], tbeep [2]
tbeep [3], ydb_exist [1], ydb_exist [2], ydb_exist [3], ydb_exist [4]
CALLED BY:
ALIGN1BIGGRAM
Check the ATT database vs the SXC limb fit database to look for bad
GET_POINTS, LAY1GKM, MK_SSX, NORH_NORH2SXT [1], NORH_NORH2SXT [2]
NORH_NORH2SXT [3], NORH_NORH2SXT [4], PFI_CENTER, PLOT_CLON, POLAR_GRID
PP_MWLT2SXT, PP_SXT2ANY, PP_SXT2VLA, PROM_ON_DISK, QUICKDRIFT [1], QUICKDRIFT [2]
QUICKLIMB [1], QUICKLIMB [2], SFD_PHOT, SXT_EXPOSURE_MAP, SXT_GRID [1]
SXT_GRID [2], SXT_GRID [3], SXT_RPAXY, TERM_FIDS, TERM_QUICK, TERM_REVIEW
TERM_REVIEW_GIF, TEST_ATT, agl2cut, align_prep [1], align_prep [2], align_prep [3]
check_sfd_leak, coal_image, coal_rot, conv_a2p [1], conv_a2p [2], conv_p2a [1]
conv_p2a [2],