[Previous]
[Next]
NAME: rd_photon_list
PURPOSE: read in a histogram of photons binned in rotation angle
CALLING SEQUENCE:
First call for a new filename,
out = rd_photon_list(file=filename, xoff=xoff, yoff=yoff, $
map=map, collimator_pitches=collimator_pitches)
Next call,
out = rd_photon_list(2.)
or they may be combined in a single call
out = rd_photon_list(2., file=filename, xoff=xoff, yoff=yoff, $
map=map, collimator_pitches=collimator_pitches)
INPUTS:
pitch_in - return list for this collimator pitch (in arcseconds),
selects from collimator_pitches for the closest collimator pitch
in absolute value. If no pitch is entered or a pitch of
of zero, then the data file is read and the keyword outputs
made available.
OPTIONAL INPUTS:
filename - name of photon list file generated by make_lists.pro
/new - forces the data file to be read
OUTPUTS:
returns number of events in rotation angle bins, nbins
OPTIONAL OUTPUTS:
collimator_pitches - 12 values, pitch of each collimator
nbins - number of evenly spaced rotation angle bins
xoff - offset from telescope axis to image field along first index
yoff -
map- brightness map used to create histogram of rotation angles
secs_per_pix - number of arcseconds per pixel,
doc_out - text with even more information about the creation of the data file
datacube - total datacube used to create photon lists
quiet - if set the data is read in noiselessly
PROCEDURE:
Reads in data file created by make_lists.pro
For each collimator pitch there is a histogram of events grouped
by their rotation angle. This histogram is returned
CALLS:
COMMON BLOCKS:
rd_photon_list
RESTRICTIONS:
MODIFICATION HISTORY:
ras, 14-feb-95
added secs_per_pix, info, 16-feb-95
ras, 24-feb-95, added many features
[Previous]
[Next]
Project : HESSI
Name : READ_GDFILE_GD
Purpose : This procedure reads in the HESSI grid file characteristics table.
Category : HESSI
Explanation : The file is read and parsed.
Subprogram of GD.PRO used to read in Strawman Grid Characteristics
for the proposed HESSI instrument, from a user generated file
The old format for this filecan be found in
perm$data:gd_13_b.dat
Use : read_gdfile_gd,gdfile,grid_sep,bottom_diam,top_diam,$
dfov,frac,subarr,density,$
gridnm,res,pitch,slit_width,thickness,fov,ngrids,$
fine_res,coarse_res,tfset
Inputs : Gdfile - grid table filename, full path,
Open gdfile for reading, if no file suffix is indicated, supply '.dat'
if no file is found, exit with an error
Opt. Inputs : None
Outputs :
Gdfile - Text file with full path or in hessi, curdir, or SSWDB_HESSI.
Grid_sep- grid separation distance in mm.
Bottom_diam - bottom grid diameter or length.
Top_diam - top grid diameter or length.
Dfov- Angular overlap, degrees.
Frac- Slit width to pitch ratio.
Subarr- Grid materials, string.
Density - Array of Density of grid materials in gm/cm3.
Res - angular resolution of each grid pair, unused.
Gridnm - number of each grid, starts with 1.
Pitch - Array of grid pitches in mm.
Slit_width - width of grid slits in mm.
Thickness - Array of grid thicknesses in mm.
Fov - field of view of grid pair (degrees), limited by thickness.
Ngrids- total number of grids.
Fine_res- finest resolution in arcseconds.
Coarse_res- coarsest resolution in arcseconds.
Tfset - a logical. If set then FOV isn't calculated but input ad hoc.
Opt. Outputs: None
Keywords : LABEL - If this is a string, the label information for gd_title.pro is
extracted, if it exists, and placed into an executable statement which defines
the structure label.
Calls : ***
ARR2STR [1], Arr2Str [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_GDFILE, HESSI_DATA_PATHS [1]
HESSI_DATA_PATHS [2], LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], STR_SEP
break_file [4], rd_tfile [1], rd_tfile [2], strsplit
CALLED BY:
ANGC_GET_GD, GD, GD_TITLE, hesi_grid_trans, hessi_grid_trans
Common : None
Restrictions:
Side effects: None.
Prev. Hist : EAC, Hughes/STX, February 1, 1995
Modifications to format, April 1995 (EAC)
Modified : Version 3, RAS, 14-apr-1997
Version 4, RAS, 28-apr-1997, added label keyword and interpreter
Version 5, RAS, 23-may-1997, improved path specification.
Version 6, RAS, 18-dec-1997, improved path specification.
Version 7, richard.schwartz@gsfc.nasa.gov, 12-jan-1997, use get_gdfile().
Version 8, richard.schwartz@gsfc.nasa.gov, 6-aug-1998, raise to SSW tree standards.
[Previous]
[Next]
NAME: READ_HESI_DAT
PURPOSE: Reads text files containing info on HESSI background and efficiency.
CATEGORY: hard X-ray, gamma-ray modeling, spectroscopy
CALLING SEQUENCE:
read_hesi_dat, evec, backs, effarea
CALLED BY:
CALLS: ***
INTERPOL, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], READ_SEQFILE, UNIQ [1], UNIQ [2]
UNIQ [3]
INPUTS:
none explicit, only through fixed data files
OPTIONAL INPUTS:
plot - if set, plot the background rate
OUTPUTS:
evec - energy vector for background rates and effective area curves, MeV
backs - structure containing Dave Smith's background rates (cnts/cm2/s/MeV) for
the front segment of the HESSI Ge detectors and the total detector
comments are included as byte arrays in the structure
effarea - structure containing Said Slassi effective area curves for the
HESSI Ge detectors including comments, 10 separate curves:
Front Segments Photopeak Effective area (cm2)
Rear Segments Photopeak Effective area (cm2)
Segment Coincidence Photopeak Effective area (cm2)
Single Escape Peak Effective areay (cm2)
Double Escape Peak Effective area (cm2)
Total Photopeak Effective area (cm2) [c2+c3+c4]
Total Peaks Effective area (cm2) [c2+c3+c4+c4+c6]
Detector-Detector coincidence Photopeak Effective
Array Total Peaks Effective area (cm2) [c2+c3+c4+
Any interaction Effective area (cm2)
OPTIONAL OUTPUTS:
none
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
none
MODIFICATION HISTORY:
ras, 18-may-1995
richard.schwartz@gsfc.nasa.gov, 30-dec-1997
[Previous]
[Next]
NAME: READ_HESSI_DAT
PURPOSE: Reads text files containing info on HESSI background and efficiency.
CATEGORY: hard X-ray, gamma-ray modeling, spectroscopy
CALLING SEQUENCE:
read_hessi_dat, evec, backs, effarea
CALLED BY:
CALLS: ***
HESSI_DATA_PATHS [1], HESSI_DATA_PATHS [2], INTERPOL, LOC_FILE [1], LOC_FILE [2]
LOC_FILE [3], READ_SEQFILE, UNIQ [1], UNIQ [2], UNIQ [3]
INPUTS:
none explicit, only through fixed data files
OPTIONAL INPUTS:
plot - if set, plot the background rate
OUTPUTS:
evec - energy vector for background rates and effective area curves, MeV
backs - structure containing Dave Smith's background rates (cnts/cm2/s/MeV) for
the front segment of the HESSI Ge detectors and the total detector
comments are included as byte arrays in the structure
effarea - structure containing Said Slassi effective area curves for the
HESSI Ge detectors including comments, 10 separate curves:
Front Segments Photopeak Effective area (cm2)
Rear Segments Photopeak Effective area (cm2)
Segment Coincidence Photopeak Effective area (cm2)
Single Escape Peak Effective areay (cm2)
Double Escape Peak Effective area (cm2)
Total Photopeak Effective area (cm2) [c2+c3+c4]
Total Peaks Effective area (cm2) [c2+c3+c4+c4+c6]
Detector-Detector coincidence Photopeak Effective
Array Total Peaks Effective area (cm2) [c2+c3+c4+
Any interaction Effective area (cm2)
OPTIONAL OUTPUTS:
none
CALLED BY:
NEW_EFFECTIVE_AREAS_CODE
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
none
MODIFICATION HISTORY:
ras, 18-may-1995
richard.schwartz@gsfc.nasa.gov, 30-dec-1997
Version 3, richard.schwartz@gsfc.nasa.gov, 6-aug-1998, modify file search
change to hessi from hesi.
[Previous]
[Next]
NAME:
READCOL
PURPOSE:
Read a free-format ASCII file with columns of data into IDL vectors
EXPLANATION:
Lines of data not meeting the specified format (e.g. comments) are
ignored. Columns may be separated by commas or spaces.
Use READFMT to read a fixed-format ASCII file. Use RDFLOAT for
much faster I/O (but less flexibility).
CALLING SEQUENCE:
READCOL, name, v1, [ v2, v3, v4, v5, ... v25 ,
DELIMITER= ,FORMAT = , /DEBUG , /SILENT , SKIPLINE = , NUMLINE = ]
INPUTS:
NAME - Name of ASCII data file, scalar string. In VMS, an extension of
.DAT is assumed, if not supplied.
OPTIONAL INPUT KEYWORDS:
FORMAT - scalar string containing a letter specifying an IDL type
for each column of data to be read. Allowed letters are
A - string data, B - byte, D - double precision, F- floating
point, I - integer, L - longword, Z - longword hexadecimal,
and X - skip a column.
Columns without a specified format are assumed to be floating
point. Examples of valid values of FMT are
'A,B,I' ;First column to read as a character string, then
1 column of byte data, 1 column integer data
'L,L,L,L' ;Four columns will be read as longword arrays.
' ' ;All columns are floating point
If a FORMAT keyword string is not supplied, then all columns are
assumed to be floating point.
/SILENT - Normally, READCOL will display each line that it skips over.
If SILENT is set and non-zero then these messages will be
suppressed.
/DEBUG - If this keyword is non-zero, then additional information is
printed as READCOL attempts to read and interpret the file.
DELIMITER - single character specifying delimiter used to separate
columns. Default is either a comma or a blank.
SKIPLINE - Scalar specifying number of lines to skip at the top of file
before reading. Default is to start at the first line.
NUMLINE - Scalar specifying number of lines in the file to read.
Default is to read the entire file
OUTPUTS:
V1,V2,V3,...V25 - IDL vectors to contain columns of data.
Up to 25 columns may be read. The type of the output vectors
are as specified by FORMAT.
CALLED BY:
STEREO_LOOP, eit_norm_response [1]
EXAMPLES:
Each row in a file POSITION.DAT contains a star name and 6 columns
of data giving an RA and Dec in sexigesimal format. Read into IDL
variables. (NOTE: The star names must not contain internal spaces.)
IDL> FMT = 'A,I,I,F,I,I,F'
IDL> READCOL,'POSITION',F=FMT,name,hr,min,sec,deg,dmin,dsec
The HR,MIN,DEG, and DMIN variables will be integer vectors.
Alternatively, all except the first column could be specified as
floating point.
IDL> READCOL,'POSITION',F='A',name,hr,min,sec,deg,dmin,dsec
To read just the variables HR,MIN,SEC
IDL> READCOL,'POSITION',F='X,I,I,F',HR,MIN,SEC
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], CW_BGROUP, CW_FIELD, DATATYPE [1]
DATATYPE [2], DATATYPE [3], GETTOK [1], GETTOK [2], GETTOK [3], GETTOK [4]
GO_CONTROL, HSI_PACKET, HSI_PACKET2SOH, HSI_SOHDATA::INIT, HSI_SOHDATA::PLOT
HSI_SOHDATA::PROCESS, HSI_SOHDATA::SET, HSI_SOHDATA__DEFINE, NUMLINES [1]
NUMLINES [2], OLD_READCOL, REMCHAR [1], REMCHAR [2], REMCHAR [3], REPCHR [1]
REPCHR [2], REPCHR [3], SOH_BASE_EVENT, SOH_TEXT_CONTROL, STRNUMBER [1]
STRNUMBER [2], STRNUMBER [3], STRNUMBER [4], VALID_RANGE, XMANAGER, ZPARCHECK [1]
ZPARCHECK [2], ZPARCHECK [3], anytim [1], anytim [2], anytim [3], anytim [4]
anytim [5], concat_dir [4], plotman
RESTRICTIONS:
This procedure is designed for generality and not for speed.
If a large ASCII file is to be read repeatedly, it may be worth
writing a specialized reader.
Columns to be read as strings must not contain the delimiter character
(i.e. commas or spaces by default). Either change the default
delimiter with the DELIMITER keyword, or use READFMT to read such files.
Numeric values are converted to specified format. For example,
the value 0.13 read with an 'I' format will be converted to 0.
PROCEDURES CALLED
GETTOK(), NUMLINES(), REPCHR(), STRNUMBER(), ZPARCHECK
REVISION HISTORY:
Written W. Landsman November, 1988
Modified J. Bloch June, 1991
(Fixed problem with over allocation of logical units.)
Added SKIPLINE and NUMLINE keywords W. Landsman March 92
Read a maximum of 25 cols. Joan Isensee, Hughes STX Corp., 15-SEP-93.
Call NUMLINES() function W. Landsman Feb. 1996
Added DELIMITER keyword W. Landsman Nov. 1999
Fix indexing typos (i for k) that mysteriously appeared W. L. Mar. 2000
Hexadecimal support added. MRG, RITSS, 15 March 2000.
[Previous]
[Next]
PROJECT:
RHESSI
NAME:
RHESSI IMAGE SINGLE CLASS DEFINITION
PURPOSE:
Generates and provides access to single images. This is the
former hsi_image interface. It generates single images,
and passes the generated images to the concrete classes of
hsi_image_strategy, in fact always hsi_image_raw__define.
Ususally you dont want to call hsi_image_single directly
-- although there this could be bpossible
CATEGORY:
RHESSI Imaging
CONSTRUCTION:
image_obj = Obj_Name( 'hsi_image_single' )
image_obj = Hsi_Image_Single()
(INPUT) CONTROL PARAMETERS DEFINED IN THIS CLASS:
image_alg: a string determining which algorithm to
use. Currently defined are: 'BACK PROJECTION',
'CLEAN', 'MEM SATO',
'PIXON', 'FORWARD
FITTING'
see hsi_image_single_control__define
(OUTPUT) INFO PARAMETERS DEFINED IN THIS CLASS:
image_alg_used: a string giving the name of the imaging
algorithm used to create the image.
see hsi_image_single_info__define
CLASS RELATIONSHIPS:
HSI_Strategy_Holder: parent class
HSI_Modpat_Products: source class
HSI_Bproj, HSI_Clean, HSI_MEM_Sato, HSI_Pixon, HSI_Forwardfit: strategies
CALLS: ***
CHECKVAR [1], EXIST, GREP, HSI_ANNSEC2XY [1], HSI_ANNSEC2XY [2], HSI_IMAGE_SINGLE
HSI_IMAGE_SINGLE::GET, HSI_IMAGE_SINGLE::GETDATA, HSI_IMAGE_SINGLE::INIT
HSI_IMAGE_SINGLE::PLOT, HSI_IMAGE_SINGLE::SET, HSI_IMAGE_SINGLE_CONTROL
HSI_IMAGE_SINGLE_TEST, HSI_IMAGE_SINGLE__DEFINE, HSI_USE_SIM, TAG_EXIST [1]
TAG_EXIST [2], checkvar [2], hsi_get_alg_name, hsi_image_plot, hsi_is_obj_nested
prstr [1], prstr [2]
SEE ALSO:
hsi_image__define, hsi_image_single, hsi_image_strategy__define
HISTORY:
13-Mar-2005, acs, change cacth handling in getdata such that wehne called
from hsi_image_raw it does not bubble up but go on to the next
image
March 2005, Kim + acs, imagecube release
24-Oct-2002, Kim. Added @hsi_insert_catch in getdata, and commented out some extra checks
for when no files are available - catch will handle it now.
19-Jul-2002, Kim. Call heap_gc (if >= 5.5) in getdata method to prevent memory leaks
10-Jun-02, Kim. In Getdata, if not hsi_use_sim, using hsi_eventlist_packet, and no file, then error
Development for Release 3, July-October 1999
Development for Release 2, March-July 1999,
A Csillaghy, csillag@ssl.berkeley.edu
[Previous]
[Next]
NAME:
rhessi_get_spin_axis_position.pro
PROJECT:
HESSI at ETHZ
CATEGORY:
PURPOSE:
Returns the spin axis position (a 2-element array), or -1 if something went amiss.
CALLING SEQUENCE:
spin_axis_pos=rhessi_get_spin_axis_position(time)
INPUT:
time : a time in ANYTIM format, or a time interval (2-element array of such times)
If a single time is given, routine assumes a time interval of 1 min (-30 to +30 secs.)
This should be ok most of the time.
OPTIONAL INPUT:
None
OUTPUT:
The spin axis' x- and y-coordinates (2-element array), in arcsec from Sun-center (averaged over time interval, or 1 min. if a single time was given).
INPUT KEYWORDS:
None
OUTPUT KEYWORDS:
radius : distance between spin axis and imaging axis.
CALLS: ***
CIR_3PNT, EXIST, HSI_ASPECT_SOLUTION [2], MEAN, STDDEV, STRN [1], STRN [2], STRN [3]
anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
hsi_aspect_solution [1]
CALLED BY:
HSI_LOCATE_FLARE [2], HSI_LOCATE_FLARE [4], hsi_flare_position_image [1]
hsi_flare_position_image [2], hsi_full_sun_image [1], hsi_full_sun_image [2]
hsi_locate_flare [1], hsi_locate_flare [3], hsi_one_qlook_image
EXAMPLE:
spin_axis_pos=rhessi_get_spin_axis_position('2002/02/26 10:27:00')
HISTORY:
PSH, 2002/12/06 written.
Added aspect_obj input/output, jmm, 7-feb-2003
[Previous]
[Next]
PROJECT:
HESSI
NAME:
ROLL_DB_TEST
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
roll_db_test,
INPUTS:
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORDS:
None.
COMMON BLOCKS:
None.
PROCEDURE:
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
EXAMPLES:
CALLS: ***
HSI_ROLL_DB, HSI_ROLL_DB_FULL, HSI_ROLL_DB_TEST, POPD, PUSHD
SEE ALSO:
HISTORY:
Version 1, May 2, 2003,
A Csillaghy, csillag@ssl.berkeley.edu
[Previous]
[Next]
NAME:
ROUTINE_NAME
PURPOSE:
Tell what your routine does here. I like to start with the words:
"This function (or procedure) ..."
Try to use the active, present tense.
CATEGORY:
Put a category (or categories) here. For example:
Widgets.
CALLING SEQUENCE:
Write the calling sequence here. Include only positional parameters
(i.e., NO KEYWORDS). For procedures, use the form:
ROUTINE_NAME, Parameter1, Parameter2, Foobar
Note that the routine name is ALL CAPS and arguments have Initial
Caps. For functions, use the form:
Result = FUNCTION_NAME(Parameter1, Parameter2, Foobar)
Always use the "Result = " part to begin. This makes it super-obvious
to the user that this routine is a function!
INPUTS:
Parm1: Describe the positional input parameters here. Note again
that positional parameters are shown with Initial Caps.
OPTIONAL INPUTS:
Parm2: Describe optional inputs here. If you don't have any, just
delete this section.
KEYWORD PARAMETERS:
KEY1: Document keyword parameters like this. Note that the keyword
is shown in ALL CAPS!
KEY2: Yet another keyword. Try to use the active, present tense
when describing your keywords. For example, if this keyword
is just a set or unset flag, say something like:
"Set this keyword to use foobar subfloatation. The default
is foobar superfloatation."
OUTPUTS:
Describe any outputs here. For example, "This function returns the
foobar superflimpt version of the input array." This is where you
should also document the return value for functions.
OPTIONAL OUTPUTS:
Describe optional outputs here. If the routine doesn't have any,
just delete this section.
CALLS: ***
CW_ALOGSLIDER, CW_BGROUP, CW_FIELD, CW_FSLIDER, DATPLOT, DETECTOR_FIELD, FCHECK
FILTER_ATTEN, HESI_WINDOWS, MINMAX [1], MINMAX [2], PLOTDATE, PSPLOT [1], PSPLOT [2]
STATUS_FIELD, TOP_BASE_EVENT, XMANAGER, edge_products, get_slider, linecolors [1]
linecolors [2], mewe_spec [1], mewe_spec [2], other_filters [1]
other_filters [2], out_spectra_4_designer, set_field, xsec
COMMON BLOCKS:
BLOCK1: Describe any common blocks here. If there are no COMMON
blocks, just delete this entry.
SIDE EFFECTS:
Describe "side effects" here. There aren't any? Well, just delete
this entry.
RESTRICTIONS:
Describe any "restrictions" here. Delete this section if there are
no important restrictions.
PROCEDURE:
You can describe the foobar superfloatation method being used here.
You might not need this section for your routine.
EXAMPLE:
Please provide a simple example here. An example from the PICKFILE
documentation is shown below.
Create a PICKFILE widget that lets users select only files with
the extensions 'pro' and 'dat'. Use the 'Select File to Read' title
and store the name of the selected file in the variable F. Enter:
F = PICKFILE(/READ, FILTER = ['pro', 'dat'])
MODIFICATION HISTORY:
Written by: Your name here, Date.
July, 1994 Any additional mods get described here. Remember to
change the stuff above if you add a new keyword or
something!