[Previous]
[Next]
NAME:
HADEC2ALTAZ
PURPOSE:
Converts Hour Angle and Declination to Horizon (alt-az) coordinates.
EXPLANATION:
Can deal with NCP/SCP singularity. Intended mainly to be used by
program EQ2HOR
CALLING SEQUENCE:
HADEC2ALTAZ, ha, dec, lat ,alt ,az [ /WS ]
INPUTS
ha - the local apparent hour angle, in DEGREES, scalar or vector
dec - the local apparent declination, in DEGREES, scalar or vector
lat - the local latitude, in DEGREES, scalar or vector
OUTPUTS
alt - the local apparent altitude, in DEGREES.
az - the local apparent azimuth, in DEGREES, all results in double
precision
CALLED BY:
EQ2HOR
OPTIONAL KEYWORD INPUT:
/WS - Set this keyword for the output azimuth to be measured West from
South. The default is to measure azimuth East from North.
EXAMPLE:
What were the apparent altitude and azimuth of the sun when it transited
the local meridian at Pine Bluff Observatory (Lat=+43.07833 degrees) on
April 21, 2002? An object transits the local meridian at 0 hour angle.
Assume this will happen at roughly 1 PM local time (18:00 UTC).
IDL> jdcnv, 2002, 4, 21, 18., jd ; get rough Julian date to determine
;Sun ra, dec.
IDL> sunpos, jd, ra, dec
IDL> hadec2altaz, 0., dec, 43.078333, alt, az
===> Altitude alt = 58.90
Azimuth az = 180.0
REVISION HISTORY:
Written Chris O'Dell Univ. of Wisconsin-Madison May 2002
[Previous]
[Next]
Project : SOHO - CDS
Name : HANDLE_KILLER
Purpose : Kill handles hooked up with HANDLE_KILLER.
Explanation : Since unused but non-freed handles clogs up IDL's handle
hash table, it is important that handles used by widget
applications are freed when the application dies.
HANDLE_KILLER_HOOKUP stores handle ID numbers on unrealized
widget bases that will be killed if the supplied GROUP_LEADER
base is destroyed. The KILL_NOTIFY keyword is used to invoke
HANDLE_KILLER when the widget base is destroyed.
HANDLE_KILLER will free all the handles that have been hooked
up on that widget base.
Use : If you have to, use widget_base(kill_notify='HANDLE_KILLER')
Inputs : ID : The base being killed, should have an array of handle IDs
as its UVALUE
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : None.
Calls : ***
HANDLE_KILLER_HOOKUP
Common : HANDLE_KILLER_CACHE : Shared with HANDLE_KILLER_HOOKUP, to
keep the number of unrealized bases down.
Restrictions: Works best with widget applications, slightly dangerous
when used for stuff you don't want to loose in case of
a crash etc.
Needs to be able to use widgets.
Side effects: Generates some unrealized widget bases.
Category : Utility, Handles
Prev. Hist. : None.
Written : s.v.h.haugan@astro.uio.no, UiO, 2 August 1996
Modified : Not yet
Version : 1, 2 August 1996
[Previous]
[Next]
Project : SOHO - CDS
Name : HANDLE_KILLER_HOOKUP
Purpose : Hook up handles for automatic freeing when widget dies.
Explanation : Since unused but non-freed handles clogs up IDL's handle
hash table, it is important that handles used by widget
applications are freed when the application dies.
This routine stores handle ID numbers on unrealized widget
bases that will be killed if the supplied GROUP_LEADER
base is destroyed. It uses the KILL_NOTIFY keyword to invoke
the routine HANDLE_KILLER when the widget base is destroyed.
HANDLE_KILLER will free all the handles that have been hooked
up on that widget base.
If no group leader is supplied, an unrealized widget without a
group leader will be used as group leader, and the cleanup
operation will be invoked whenever WIDGET_CONTROL,/RESET is
performed.
Use : HANDLE_KILLER_HOOKUP,HANDLE [,GROUP_LEADER=GROUP_LEADER]
Inputs : HANDLE : The handle(s) to be automatically freed.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : GROUP_LEADER : Normally the (top base of) widget that
creates the handle. When GROUP_LEADER dies,
HANDLE will be freed automatically.
Calls : ***
DEFAULT, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], TRIM, delvarx [5]
CALLED BY:
CWF_FIT, CWF_STATUS, CWQ_CUBE, CW_CUBEVEIW, CW_PZOOM [1], HANDLE_KILLER
XCDS_ANALYSIS, XCFIT_BLOCK, XCROP_CUBE, XPLOTSCALE, XTVSCALE, cw_pzoom [2]
Common : HANDLE_KILLER_CACHE : Shared with HANDLE_KILLER, to keep the
number of unrealized bases down.
Restrictions: Works best with widget applications, slightly dangerous
when used for stuff you don't want to loose in case of
a crash etc.
Needs to be able to use widgets.
Side effects: Generates some unrealized widget bases.
Category : Utility, Handles
Prev. Hist. : None.
Written : s.v.h.haugan@astro.uio.no, UiO, 2 August 1996
Modified : Version 2, SVHH, 17 September 1997
HANDLE may be an array of handles.
Version : 2, 17 September 1997
[Previous]
[Next]
NAME:
hardcopy
PURPOSE:
Dump an 'X' window screen display to the hardcopy laser
printer. The default is to use black and white. PPRINT
is used to determine the print queues.
CALLING SEQUENCE:
hardcopy ; Default is black/white printer
hardcopy,/black ; Send to black/white printer
hardcopy,/color ; Send to color printer
hardcopy,/landscape ; Rotate to landscape on output
hardcopy,xsize=xsize ; Specify x size in inches (def=7. inches)
hardcopy,image ; Image must be a 2-d array
hardcopy,image,r,g,b,/color
OPTIONAL INPUTS:
image = 2-d Array to plot (doesn't read screen in this case)
Red = Red color vector
Green = Green color vector
Blue = Blue color vector
OPTIONAL INPUT KEYWORDS:
bin - If the display was made by expanding the raw
data using "REBIN", it is advised to pass that
binning factor to this routine. It will reduce
the resolution by that fact before sending the
data to the printer which will speed it up
considerably.
file - The name of the IDL output postscript file. If
absent, it will create the file on your root
directory with file name "idl.ps"
black - If present, print if black and white and send
output to "isass0 lp0"
landscape - Rotate the output into landscape mode
xsize - Specify the x size (of the plot - even in landscape mode)
in inches. Default = 7 inch
xpos,ypos - Origin of the plot. Default = 0.5 inch
METHOD:
The routine checks the size of the window and does a TVRD
to get what is on the screen. It is advisable to make the
screen just the size of your output item. If the data is
over 256 pixels in either dimension, it asks if it can reduce
the resolution of the image dump to speed up the printing
to the laser printer.
CALLS: ***
CONGRID [1], CONGRID [2], CONGRID [3], get_logenv [1], get_logenv [2], input [1]
input [2], pprint [1], pprint [2], tbeep [1], tbeep [2], tbeep [3], yesno [1]
yesno [2]
CALLED BY:
STEPPER [3], STEPPER [4], XRASTER [1], XRASTER [2], hard_center
HISTORY:
Written 20-Oct-91 by M.Morrison
9-Nov-92 (MDM) - Modified to use CONGRID instead of REBIN
to get rid of the integer multiple problem.
18-nov-92 (JRL) - Fixed the a bug with setting xsiz and ysiz
16-apr-93 (JRL) - Added the landscape option
21-apr-93 (JRL) - Added the xsize, xpos, ypos keywords
13-may-93 (JRL) - Force color=0 for /black option. Make /black the
default.
19-may-93 (JRL) - Fix x offset for color option.
6-Oct-93 (MDM) - Modified to use PPRINT instead of PR_PLASER
8-Oct-93 (MDM) - Incorporated GLS filename fix (it was only an
error in the PPRINT call)
5-Nov-93 (SLF) - add noprint keyword and ys_noprint env
16-feb-95 (SLF) - andd NOPROMPT keyword non-interactive runs
6-Oct-95 (JRL) - For /black option, if the color table is a
grey-scale (i.e., red=green=blue), then use
tv,red(dump). This will make user-defined gamma
changes and effective.
Always the restore the input !d.name upon exit.
[Previous]
[Next]
PROJECT:
SOHO - CDS/SUMER
NAME:
HAS_ERROR()
PURPOSE:
Handles an error message and return the error status
CATEGORY:
Utility
EXPLANATION:
This routine checks the given error string, which is usually
returned from a calling program, to see if it is null. If not,
the error string is shown in a pop-up widget and the routine
returns 0; otherwise it returns 1.
SYNTAX:
Result = has_error(error)
CALLED BY:
EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], IMAGE_TOOL_EVENT
ITOOL_OVERLAYER
EXAMPLES:
a = anytim2utc(b, /ecs, error=error)
IF has_error(error) then return
INPUTS:
ERROR - String scalar for error message
OPTIONAL INPUTS:
None.
OUTPUTS:
RESULT - 0/1, flag indicating ERROR is null or not
OPTIONAL OUTPUTS:
None.
KEYWORDS:
PREFIX - String scalar or vector which will be used as prefix
of message string to show up
CALLS: ***
XACK
COMMON:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
If ERROR is not null, a message window is popped up and
operation can not preceed until this window is dismissed.
HISTORY:
Version 1, September 18, 1997, Liyun Wang, NASA/GSFC. Written
CONTACT:
Liyun Wang, NASA/GSFC (Liyun.Wang.1@gsfc.nasa.gov)
[Previous]
[Next]
NAME:
has_overlap.pro
PROJECT:
ETHZ Radio Astronomy, HESSI
CATEGORY:
gen
PURPOSE:
This routines accepts two arrays of intervals, and returns 1
if both overlap. Else, 0 is returned.;
CALLING SEQUENCE:
res=has_overlap(interval1,interval2 [,inter=inter])
INPUT:
interval1 : a 2-element array (float, int, double, ANYTIM string,...)
interval2 : a 2-element array (float, int, double, ANYTIM string,...)
If one or both of the intervals are in string format, then it is
assumed they are dates in an ANYTIM format, and the proper
conversion to ANYTIM format (i.e. doubles) is done for comparison.
Intervals need not be given in ascending order, i.e.:
has_overlap([a,b],[c,d])
has_overlap([b,a],[c,d])
has_overlap([a,b],[d,c])
has_overlap([b,a],[d,c])
... all give the same result.
OUTPUT:
0 (no overlap) or 1 (overlap).
KEYWORD OUTPUT:
inter : the interval which is common to both input intervals. If none, returns -1
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], anytim [1], anytim [2], anytim [3]
anytim [4], anytim [5]
CALLED BY:
rapp_get_spectrogram
RESTRICTIONS:
If input intervals are of string type, they are assumed to be ANYTIM-compatible times
No error checking is done.
EXAMPLES:
IDL> res=has_overlap([3,7],[2.5,3.5])
IDL> res=has_overlap(['09:00:00','10:00:00'],['09:30:00','10:30:00'])
IDL> res=has_overlap('2000/09/03 '+['09:00:00','10:00:00'],'2000/09/03 '+['09:30:00','10:30:00'])
HISTORY:
2001/05/18 created. Pascal Saint-Hilaire [shilaire@astro.phys.ethz.ch]
MODIFICATIONS:
PSH 2001/11/16 : allowed the possibility to enter intervals in any ANYTIM format.
PSH 2002/03/14 : added keyword inter
PSH 2004/08/09 : corrected a bug where we had overlap also when the end of an interval corresponded to the beginning of the other one...
Also removed conversion to ECS format...
[Previous]
[Next]
Project : HESSI
Name : HASTA__DEFINE
Purpose : Define a HASTA data object
Category : Ancillary GBO Synoptic Objects
Syntax : IDL> c=obj_new('hasta')
CALLS: ***
DPRINT, GET_UTC, HASTA::CLEANUP, HASTA::GET_SDIR, HASTA::INIT, HASTA::SYNOP
History : Written 9 Aug 2001, D. Zarro (EITI/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
HASTROM
PURPOSE:
Linear transformation of an image to align it with a reference image
EXPLANATION:
A linear transformation is applied (using POLY_2D) to an image so that
its astrometry is identical with that in a reference header. This
procedure can be used to align two images.
CALLING SEQUENCE:
HASTROM, oldim, oldhd, newim, newhd, refhd, [MISSING =, INTERP = ]
or
HASTROM, oldim, oldhd, refhd, [MISSING =, INTERP ={0,1,2}, NGRID =,
CUBIC =, DEGREE = ]
INPUTS:
OLDIM - Image array to be manipulated. If only 3 parameters are
supplied then OLDIM and OLDHD will be modified to contain
the output image array and header
OLDHD - FITS header array for OLDIM, containing astrometry parameters
REFHD - Reference header, containing astrometry parameters. OLDIM
will be rotated, shifted, and compressed or expanded until
its astrometry matches that in REFHD.
OUTPUTS:
NEWIM - Image array after linear tranformation has been performed.
The dimensions of NEWIM will be identical to the NAXIS1 and
NAXIS2 keywords specified in REFHD. Regions on the reference
image that do not exist in OLDIM can be assigned a value with
the MISSING keyword.
NEWHD - Updated FITS image header associated with NEWIM
OPTIONAL INPUT KEYWORDS:
MISSING - Set this keyword to a scalar value which will be assigned
to pixels in the output image which are out of range of the
supplied imput image. If not supplied, then linear
extrapolation is used. See the IDL manual on POLY_2D.
***NOTE: A bug was introduced into the POLY_2D function in IDL
V5.5 (fixed in V6.1) such that the MISSING keyword
may not work properly with floating point data***
INTERP - Scalar, one of 0, 1, or 2 determining type of interpolation
0 nearest neighbor, 1 (default) bilinear interpolation,
2 cubic interpolation.
CUBIC - a scalar value between -1 and 0 specifying cubic interpolation
with the specified value as the cubic interpolation parameter.
(see poly_2d for info). Setting CUBIC to a value greater
than zero is equivalent to setting CUBIC = -1.
NGRID - Integer scalar specifying the number of equally spaced grid
points on each axis to use to specify the transformation.
The value of NGRID must always be greater than DEGREE + 1.
The default is DEGREE + 2 which equals 3 (9 total points) for
DEGREE=1 (linear warping).
DEGREE - Integer scalar specifying the degree of the transformation.
See the routine POLYWARP for more info. Default =
1 (linear transformation) unless polynomial ('SIP') distortion
parameters are present in either the input or reference FITS
header. In that case, the default degree is equal to the
degree of the distortion polynomial.
OPTIONAL OUTPUT KEYWORD:
ERRMSG - If this keyword is supplied, then any error messages will be
returned to the user in this parameter rather than depending on
on the MESSAGE routine in IDL. If no errors are encountered
then a null string is returned.
NOTES:
(1) The 3 parameter calling sequence is less demanding on virtual
memory.
(2) The astrometry in OLDHD will be precessed to match the equinox
given in REFHD.
(3) If an ST Guidestar image is used for the reference header, then the
output header will be converted to standard astrometry.
CALLS: ***
AD2XY, CHECK_FITS [1], CHECK_FITS [2], EXTAST, GETROT, GET_EQUINOX, GSSSADXY, GSSSXYAD
GSSS_STDAST, HPRECESS, POLYWARP, PUTAST, SXADDHIST [1], SXADDHIST [2], SXADDPAR [1]
SXADDPAR [2], SXADDPAR [3], SXPAR [1], SXPAR [2], SXPAR [3], TAG_EXIST [1]
TAG_EXIST [2], XY2AD, ZPARCHECK [1], ZPARCHECK [2], ZPARCHECK [3]
EXAMPLE:
Suppose one has an image array, IM, and an associated FITS header H.
One desires to warp the image array so that it is aligned with another
image with a FITS header, HREF. Both headers contain astrometry info.
Set pixel values to 0 where there is no overlap between the input and
reference image, and use linear interpolation (default)
IDL> hastrom, IM, H, HREF, MISSING = 0
PROCEDURES USED:
ad2xy, check_FITS, extast, get_EQUINOX(), gsssextast, hprecess,
putast, sxaddpar, sxaddhist, sxpar(), xy2ad, zparcheck
REVISION HISTORY:
Written W. Landsman, STX Co. Feb, 1989
Updated to CHECK_FITS Dec, 1991
New astrometry keywords Mar, 1994
Recognize GSSS header W. Landsman June, 1994
Added CUBIC keyword W. Landsman March, 1997
Converted to IDL V5.0 W. Landsman September 1997
Accept INTERP=0, Convert output GSS header to standard astrometry
W. Landsman June 1998
Remove calls to obsolete !ERR system variable March 2000
Added ERRMSG output keyword W. Landsman April 2000
Need to re-extract astrometry after precession W. Landsman Nov. 2000
Check for distortion parameters in headers, add more FITS HISTORY
information W. Landsman February 2005
Use different coefficient for nearest neighbor to avoid half-pixel
shift with POLY_2D W. Landsman Aug 2006
[Previous]
[Next]
Project : SOHO - CDS
Name : HAVE_EXE
Purpose : Check if an executable program exists
Category : utility system
Syntax : IDL> have=have_exe(name)
Inputs : NAME = program name
Outputs : HAVE = 1/0 for have/have not
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], ESPAWN, OS_FAMILY, TRIM
CALLED BY:
gzip, uncompress
History : Zarro (SM&A/GSFC), 20 April 2000
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : HESSI
Name : HAVE_FILES
Purpose : given a directory and a set of filenames, return
the names of files aleady in directory
Category : system utility
Syntax : IDL> ofile=have_files(ifile,dir)
Inputs : IFILE = list of filenames to check for
DIR = directory name to check [def=current]
Outputs : OFILE = list of matching files (blank if no matches)
Keywords : INDEX = indices of matching files
MISSING = list of filenames not in directory
COUNT = # of matches found
MCOUNT = # of non-matches
CALLS: ***
APPEND_ARR, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_BREAK, IS_BLANK
IS_DIR, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], PR_SYNTAX, concat_dir [4]
CALLED BY:
read_ftp
History : Written, 22-Dec-1999, Zarro (SM&A/GSFC)
Modified, 28-Dec-2003, Zarro (L3Com/GSFC)
- changed directory default
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : HESSI
Name : HAVE_METHOD
Purpose : check if method is supported by object
Category : utility objects
Explanation : checks CLASS__DEFINE procedure
Syntax : IDL> chk=have_method(class,method)
Inputs : CLASS = class name or object variable name
METHOD = name of method to check for
Outputs : CHK = 1/0 if have/have not
;
Keywords : None
CALLS: ***
EXIST, MERGE_STRUCT, OBJ_METHODS, PR_SYNTAX
CALLED BY:
OBJ_EVENT, READER__DEFINE, SHOW_SYNOP__DEFINE
History : Written 25 May 1999, D. Zarro, SM&A/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : HESSI
Name : HAVE_NETWORK
Purpose : check if network connection is available
Category : system utility sockets
Syntax : IDL> a=have_network()
Optional : SERVER = server to lookup [def eq 'www.google.com']
Inputs :
Outputs : 1/0 if yes/no
Keywords : INTERVAL = seconds between rechecking
(otherwise use result of last check)
RESET = set to force check without waiting INTERVAL (same as INTERVAL=0)
CALLS: ***
DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], IS_BLANK, IS_STRING
MERGE_STRUCT, delvarx [5], is_number [1], is_number [2], is_struct
CALLED BY:
EIS_LIST_EXPER [1], EIS_LIST_EXPER [2], EIS_SERVER [1], EIS_SERVER [2]
EIS_SOCK_FIND [1], EIS_SOCK_FIND [2], GOES_SDAC_SERVER, GOES_YOHKOH_SERVER
SOCK_FILES, SOCK_RPC, SOCK_SERVER, SSW_SERVER, SXI_SERVER, SYNOP_SERVER, VSO_SERVER
eit_server
History : 8 Mar 2002, Zarro (L-3Com/GSFC)
22 Apr 2005, Zarro (L-3Com/GSFC) - return error message
when network is down.
1 Dec 2005, Zarro (L-3Com/GSFC) - removed http object
from common because of unwanted side effects.
13 Jan 2007, Zarro (ADNET/GSFC) - added support for
checking multiple servers
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO - CDS
Name : HAVE_PROC
Purpose : Check if a program exists in !path
Category : utility
Explanation : calls 'which' and saves result in common block
Syntax : IDL> have=have_proc(name)
Inputs : NAME = program name
Outputs : HAVE = 1/0 for have/have not
Keywords : OUTFILE = full name of found file
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DELVARX [1], DELVARX [2]
DELVARX [3], DELVARX [4], DPRINT, IS_BLANK, MERGE_STRUCT, TRIM, WHICH, break_file [4]
delvarx [5], is_struct
CALLED BY:
ADD_METHOD, ADD_TAG [1], DO_EIT_SCALING, EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2]
EIT_PARTIAL, EIT__DEFINE, FITS__DEFINE, GET_CDS_DELAY, GET_CDS_DUR, GET_CDS_HOME
GET_GEV, GET_GIS_DELAY, GET_GZIP, GET_NAR, GOES__DEFINE, HXRS__DEFINE, IMAGE_TOOL
ITOOL_RD_FITS, ITOOL_TRACE_SCALE, JOIN_STRUCT [1], LOAD_EIT_COLOR, LOAD_PATH
MAP2MPEG, MK_MPEG, MK_PLAN_PLOT, OBJ_DISSECT, PB0R, PLOT_CDS_POINT [1]
PLOT_CDS_POINT [2], READ_EIT_FILE, RECOMPILE, REM_TAG [1], RM_FILE
SPECPLOT__DEFINE, SUMER_TOOL_PD_EVENT, SYNOP_DEFINE, VALID_CDS_POINT, VALID_GIF
VALID_JPEG, VALID_PNG, XCAT, mk_sumer_dbase_ff, sumer_ffdb
to return the structure of default values for the specified function
Restrictions: Only checks routine name (ignores extensions such as .pro)
History : Version 1, 10-Jul-1998, Zarro (SAC/GSFC)
Modified, Zarro (SM&A/GSFC), 8 Oct 1999
-- added OUTFILE keyword
Modified, Zarro (EIT/GSFC), 8 Aug 2000
-- added check for blank outfile
Modified, Zarro (EET/GSFC), 3 Feb 2003
-- added /INIT
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO - CDS
Name : HAVE_TAG
Category : Utility
Purpose : Checks if structure has a specified tag name
Explanation : Same as CHKTAG or TAG_EXIST, but looks for
substring match
Syntax : IDL> have=have_tag(struct,tag_name)
Inputs : STRUCT = structure to check
TAG_NAME = tag name to check
Opt. Inputs : None
Outputs : HAVE = 1 for at least one match, 0 none.
Opt. Outputs: INDEX = index position of found tag
Keywords : SORT_INDEX = sort found tags indicies
EXACT= set for exact match
COUNT = # of matches found
NO_RECURSE = do not recurse
START = tag name match at start of string
TAGS = tag names corresponding to index
RECURSE = set to recurse
CALLS: ***
APPEND_ARR, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, GREP
RTAG_NAMES, TRIM, delvarx [5], get_uniq
CALLED BY:
BBSO__DEFINE, BOOST_TAG, DROT_MAP, DROT_NAR, EIS_CHECK_POINT [1]
EIS_CHECK_POINT [2], EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2]
EIS_ITOOL_PTOOL [1], EIS_ITOOL_PTOOL [2], EIS_ITOOL_STC [1], EIS_ITOOL_STC [2]
EIS_PLAN_STC [1], EIS_PLAN_STC [2], EIS_VALID_POINT [1], EIS_VALID_POINT [2]
EIT_PARTIAL, EIT_PREP, EIT__DEFINE, FITS CLASS DEFINITION, FITS2MAP [1]
FITS2MAP [2], GEN__DEFINE, GET_CDS_ASRUN, GET_FITS_CEN, GET_FITS_TIME
GET_PLAN_PROG, GOES__DEFINE, HESSI EVENTLIST CLASS DEFINITION
HESSI IMAGE FILE CLASS DEFINITION [1], HSI_GET_CLOCK_SYNCH, HSI_PTR_LISTSORT
HSI_SPECTROGRAMCHAN_OVERLAP_FIX, HSI_SPECTROGRAM_DECIM_CORRECT
HSI_SPECTROGRAM_DECIM_TABLE, HSI_tplot2any, HTTP__DEFINE, IS_BATCH
ITOOL_RD_FITS, KPNO__DEFINE, MAP__DEFINE, MDI__DEFINE, OBJ_EVENT, OS_FAMILY
PLOT_MAP, PLOT_MAP2 WARNINGTEMPORARY FIX ONLY FOR 16 bit ZBuffer support
RD_GOES, READER__DEFINE, REM_TAG [2], REP_TAG_NAME, REP_TAG_VALUE, ROT_FITS_HEAD
ROT_MAP, SHIFT_MAP, SHOW_SYNOP__DEFINE, SPECTROGRAM CLASS DEFINITION, SPLIT_TAGS
VALID_QL, XYPLOT__DEFINE, Y2KFIX, fit_comp_kw, hsi_image_fitsread
hsi_spectrogramACCBIN [2], hsi_spectrogram__define [1]
hsi_spectrogram__define [2], hsi_spectrogram__define [3]
hsi_spectrogram__get_obs [1], hsi_spectrogram__livetime [1]
phoenix_spg_autoimprove
History : Version 1, 23-Aug-1998, D.M. Zarro. Written
Version 2, 16-June-2002, Zarro (LAC/GSFC) - added /START
Version 3, 22-Dec-2002, Zarro (EER/GSFC) - made NO_RECURSE the default
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : SOHO - CDS
Name :
HAVE_WIDGETS
Purpose :
Tests whether current graphics device supports widgets.
Explanation :
The system variable !D.FLAGS is examined to see if the current graphics
device supports widgets.
Use :
Result = HAVE_WIDGETS()
IF HAVE_WIDGETS() THEN ...
Inputs :
None.
Opt. Inputs :
None.
Outputs :
The result of the function is either 0 (false) or 1 (true) depending on
whether or not the current graphics device supports widgets.
Opt. Outputs:
None.
Keywords :
None.
Calls :
None.
CALLED BY:
ALLOW_WINDOWS, COUNTDOWN, CRS, GE_WINDOW_SIM, MK_CDS_PLAN, MK_PLAN_CUSTOM, MK_SOHO
MK_SOHO_CUSTOM, MK_STUDY, SCANPATH, SHOW_SYNOP__DEFINE, TVVALUE, XCALENDAR, XCAMP
XCAT, XCHOICE, XCLONE_PLAN, XCPT, XDOC, XIAP, XINPUT, XLIST, XMESSAGE, XPORT, XPROGRAM
XPROGRAM_ADD, XREPORT, XREPORT_EDIT, XSHOW_RASTER, XSTRUCT, XSTUDY, XZOOM_PLAN
ethz_XCHOICE
Common :
None.
Restrictions:
In general, the SERTS graphics devices routines use the special system
variables !BCOLOR and !ASPECT. These system variables are defined in
the procedure DEVICELIB. It is suggested that the command DEVICELIB be
placed in the user's IDL_STARTUP file.
Side effects:
None.
Category :
Utilities, Devices.
Prev. Hist. :
William Thompson, April 1992.
Written :
William Thompson, GSFC, April 1992.
Modified :
Version 1, William Thompson, GSFC, 27 April 1993.
Incorporated into CDS library.
Version :
Version 1, 27 April 1993.
[Previous]
[Next]
Project : SOHO - CDS
Name :
HAVE_WINDOWS
Purpose :
Tests whether current graphics device supports windows.
Explanation :
The system variable !D.FLAGS is examined to see if the current graphics
device supports windows.
Use :
Result = HAVE_WINDOWS()
IF HAVE_WINDOWS() THEN ...
Inputs :
None.
Opt. Inputs :
None.
Outputs :
The result of the function is either 0 (false) or 1 (true) depending on
whether or not the current graphics device supports windows.
Opt. Outputs:
None.
Keywords :
None.
Calls :
None.
CALLED BY:
ALLOW_WINDOWS, CFIT_APIXLIST, DOC_MENU, F_USE_WIDGET, HESSI, HSI_LOC_FILE, PLOTBATSE
PLOTBATSE_QL, SCALE_TV, SELECT_BOX, SELECT_WINDOWS, SET_X [1], SET_X [2], SNU
TVPROFILE, TVREAD [1], TVSCREEN, TVSELECT, TVUNSELECT, TWIDGET, WDISPLAY, X2GIF, X2JPEG
print2d_plot, rd_wbs_pha [1], rd_wbs_pha [2], spex_preview [1], spex_preview [2]
text_output
Common :
None.
Restrictions:
In general, the SERTS graphics devices routines use the special system
variables !BCOLOR and !ASPECT. These system variables are defined in
the procedure DEVICELIB. It is suggested that the command DEVICELIB be
placed in the user's IDL_STARTUP file.
Side effects:
None.
Category :
Utilities, Devices.
Prev. Hist. :
William Thompson, April 1992.
Written :
William Thompson, GSFC, April 1992.
Modified :
Version 1, William Thompson, GSFC, 27 April 1993.
Incorporated into CDS library.
Version :
Version 1, 27 April 1993.
[Previous]
[Next]
NAME:
HBOXAVE
PURPOSE:
Box average an image array and update the FITS header array
EXPLANATION:
The function BOXAVE() is used. This procedure is recommended for
integer images when photometric precision is desired, because it
performs intermediate steps using REAL*4 arithmetic. Otherwise, the
procedure HREBIN is much faster.
CALLING SEQUENCE:
HBOXAVE, Oldim, Oldhd, Newim, Hewhd, box
or
HBOXAVE, Oldim, Oldhd, box
INPUTS:
Oldim - the original image array
Oldhd - the original image FITS header, string array
OPTIONAL INPUTS:
box - the box size to be used, integer scalar. If omitted, then
HBOXAVE will prompt for this parameter.
OPTIONAL OUTPUTS:
Newim - the image after boxaveraging
Newhd - header for newim containing updated astrometry info
If output parameters are not supplied, the program
will modify the input parameters OLDIM and OLDHD
to contain the new array and updated header.
OPTIONAL KEYWORD OUTPUT:
ERRMSG - If this keyword is supplied, then any error mesasges will be
returned to the user in this parameter rather than depending on
on the MESSAGE routine in IDL. If no errors are encountered
then a null string is returned.
PROCEDURE:
The parameters BSCALE, NAXIS1, NAXIS2, CRPIX1, and CRPIX2 and
the CD (or CDELT) parameters are updated for the new FITS header.
CALLS: ***
BOXAVE, CHECK_FITS [1], CHECK_FITS [2], EXTAST, STRN [1], STRN [2], STRN [3]
SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], SXPAR [1], SXPAR [2], SXPAR [3]
EXAMPLE:
Compress the image in a FITS file 'image.fits' by a factor of 4 and
update the astrometry in the FITS header
IDL> im = readfits('image.fits',hdr) ;Read FITS file into IDL arrays
IDL> hboxave, im, hdr, 4 ;Boxaverage by 4
IDL> writefits,'image.fits',im,hdr ;Write a new FITS file
CALLED PROCEDURES:
CHECK_FITS - Check that the FITS header is appropriate to the image
BOXAVE() - Performs box averaging of an image
SXPAR(), SXADDPAR - Read and write FITS keyword values
MODIFICATION HISTORY:
Written, Aug. 1986 W. Landsman, STI Corp.
IDLV2 changes, sxaddpar format keyword added, J. Isensee, July,1990
Fix 0.5 pixel offset in new CRPIX computation W. Landsman, Dec, 1991
Update BSCALE even if no astrometry present W. Landsman, May 1997
Converted to IDL V5.0 W. Landsman September 1997
Added ERRMSG keyword, Use double formatting W. Landsman April 2000
Recognize PC matrix astrometry format W. Landsman December 2001
[Previous]
[Next]
NAME:
HCK_BS
PURPOSE:
Evaluate formulae in Hudson, Canfield, and Kane
("Indirect estimation of energy deposition by non-thermal
electrons in solar flares", Solar Phys. 60, 137-142, 1978)
CATEGORY:
CALLING SEQUENCE:
print, hck_bs(slope)
print, hck_bs(3.5, /energy) * 20. will give you the ergs/s in electrons
for an observed slope of 3.5 and 20-keV flux of 20/cm^2.s.keV
INPUTS:
slope, the slope of the observed spectral number flux
OPTIONAL (KEYWORD) INPUT PARAMETERS:
thick or thin, if in doubt about the difference
energy, switches to ergs instead of particle numbers
verbose, spells it out for you
OUTPUTS:
CALLS: ***
BETA
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written Jan. 13, 2000 (HSH)
May 8, 2001, added thin-target domain (HSH) and verboseness
May 8, 2001, added energy formulae
[Previous]
[Next]
NAME:
HCONGRID
PURPOSE:
CONGRID an image and update astrometry in a FITS header
EXPLANATION:
Expand or contract an image using CONGRID and update the
associated FITS header array.
CALLING SEQUENCE:
HCONGRID, oldhd ;Update FITS header only
HCONGRID, oldim, oldhd, [ newim, newhd, newx, newy, /HALF_HALF
CUBIC = , INTERP=, OUTSIZE=, ERRMSG=, ALT= ]
INPUTS:
OLDIM - the original image array
OLDHD - the original image FITS header, string array
OPTIONAL INPUTS:
NEWX - size of the new image in the X direction
NEWY - size of the new image in the Y direction
The OUTSIZE keyword can be used instead of the
NEWX, NEWY parameters
OPTIONAL OUTPUTS:
NEWIM - the image after expansion or contraction with CONGRID
NEWHD - header for newim containing updated astrometry info
If output parameters are not supplied, the program
will modify the input parameters OLDIM and OLDHD
to contain the new array and updated header.
OPTIONAL KEYWORD INPUTS:
ALT - Single character 'A' through 'Z' or ' ' specifying which astrometry
system to modify in the FITS header. The default is to use the
primary astrometry of ALT = ' '. See Greisen and Calabretta (2002)
for information about alternate astrometry keywords.
CUBIC - If set and non-zero, then cubic interpolation is used. Valid
ranges are -1 <= Cubic < 0. Setting /CUBIC is equivalent to
CUBIC = -1 and also equivalent to INTERP = 2. See INTERPOLATE
for more info. Setting CUBIC = -0.5 is recommended.
ERRMSG - If this keyword is supplied, then any error mesasges will be
returned to the user in this parameter rather than depending on
on the MESSAGE routine in IDL. If no errors are encountered
then a null string is returned.
/HALF_HALF - Due to edge effects, the default behaviour of CONGRID is
to introduce a slight shift in the image center. Craig Markwardt
(http://cow.physics.wisc.edu/~craigm/idl/misc.html )has written
a modified version of CONGRID called CMCONGRID that when used with
the /HALF_HALF keyword eliminates any shift. The use of the
/HALF keyword emulates CMCONGRID and eliminates any shift in the
image centroid.
INTERP - 0 for nearest neighbor, 1 for bilinear interpolation
(default), 2 for cubic (=-1) interpolation.
OUTSIZE - Two element integer vector which can be used instead of the
NEWX and NEWY parameters to specify the output image dimensions
OPTIONAL KEYWORD OUTPUT:
ERRMSG - If this keyword is supplied, then any error mesasges will be
returned to the user in this parameter rather than depending on
on the MESSAGE routine in IDL. If no errors are encountered
then a null string is returned.
PROCEDURE:
Expansion or contraction is done using the CONGRID function, unless
HALF_HALF is set.
The parameters BSCALE, NAXIS1, NAXIS2, CRPIX1, and CRPIX2 and
the CD (or CDELT) parameters are updated for the new header.
NOTES:
A FITS header can be supplied as the first parameter without having
to supply an image array. The astrometry in the FITS header will be
updated to be appropriate to the specified image size.
If the FITS header contains astrometry from a ST Guide Star image,
then the astrometry will be converted to an approximately equivalent
tangent projection before applying CONGRID.
CALLS: ***
CHECK_FITS [1], CHECK_FITS [2], CONGRID [1], CONGRID [2], CONGRID [3], EXTAST
GSSS_STDAST, STRN [1], STRN [2], STRN [3], SXADDHIST [1], SXADDHIST [2]
SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], SXDELPAR [1], SXDELPAR [2], SXDELPAR [3]
SXPAR [1], SXPAR [2], SXPAR [3], ZPARCHECK [1], ZPARCHECK [2], ZPARCHECK [3]
EXAMPLE:
Congrid an 512 x 512 image array IM and FITS header H to size 300 x 300
using cubic interpolation. Use the HALF_HALF keyword to avoid
a shift of the image centroid
IDL> hcongrid, IM ,H, OUT = [300, 300], CUBIC = -0.5, /HALF
The variables IM and H will be modified to the new image size.
PROCEDURES CALLED:
CHECK_FITS, CONGRID(), EXTAST, GSSS_STDAST, SXADDHIST,
SXADDPAR, SXPAR(), ZPARCHECK
MODIFICATION HISTORY:
Written, Aug. 1986 W. Landsman, STI Corp.
Added interp keywords, J. Isensee, July, 1990
Add cubic interpolation W. Landsman HSTX January 1994
Recognize a GSSS FITS header W. Landsman June 1994
Fix case where header but not image supplied W. Landsman May 1995
Remove call to SINCE_VERSION() W. Landsman March 1996
Assume since IDL V3.5, add CUBIC keyword W. Landsman March 1997
Update BSCALE even if no astrometry present W. Landsman May 1997
Converted to IDL V5.0 W. Landsman September 1997
Added HALF_HALF keyword W. Landsman February 2000
Added ERRMSG keyword, use double precision formatting W.L. April 2000
Recognize PC00n00m astrometry format W. Landsman December 2001
Now works when both /INTERP and /HALF are set W. Landsman January 2002
Fix output astrometry for non-equal plate scales for PC matrix or
CROTA2 keyword, added ALT keyword. W. Landsman May 2005
[Previous]
[Next]
Project : SOHO-CDS
Name : HEAD2STC
Purpose : convert FITs header to structure
Category : imaging
Explanation :
Syntax : stc=head2stc(head)
CALLED BY:
MK_IVM_MAP
Examples :
Inputs : HEAD = FITS header
Opt. Inputs : None
Outputs : STC = structure with header keys as tags
Opt. Outputs: None
Keywords : None
CALLS: ***
ADD_TAG [1], ADD_TAG [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], STREP [1]
STREP [2], STREP [3], STREP [4], STREP [5], TRIM
Common : None
Restrictions: None
Side effects: None
History : Written - 22 November 1996, D. Zarro, ARC/GSFC
Modified - 22 May 1999, Zarro (SM&A/GSC), added check
for extra fields without comments
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
HEADER_FILTER
PURPOSE:
Removes the keys listed in keysToFilter array from the input string array
CALLING SEQUENCE:
Result = HEADER_FILTER(header, keysToFilter)
INPUTS:
Header = String array containing keys to be filtered
KeysToFilter = String array containing keys to filter out from the Header
OUTPUTS:
Result of function = filtered string array
EXAMPLE:
Remove the elements matching with words specified in keysToFilter from the header
of a FITS file extension
IDL> print, HEADER_FILTER(header, keysToFilter)
PROCEDURES CALLED
MODIFICATION HISTORY:
Sandhia Bansal - Initial release - 11/05/2004
[Previous]
[Next]
NAME:
HEADFITS
PURPOSE:
Read a FITS (primary or extension) header into a string array.
EXPLANATION:
HEADFITS() can also read gzip (.gz) or Unix compressed (.Z) FITS files.
CALLING SEQUENCE:
Result = HEADFITS(Filename/Fileunit ,[ ERRMSG =, EXTEN= , COMPRESS=,
/SILENT ])
INPUTS:
Filename = String containing the name of the FITS file to be read.
File names ending in '.gz' are assumed to be gzip'ed compressed
and under Unix file names ending in '.Z' are assumed to be
Unix compressed, and file names ending in .bz2 are assumed to
be bzip2 compressed. If this default behaviour is not
sufficient then use the COMPRESS keyword.
or
Fileunit - A scalar integer specifying the unit of an already opened
FITS file. The unit will remain open after exiting
HEADFITS(). There are two possible reasons for choosing
to specify a unit number rather than a file name:
(1) For a FITS file with many extensions, one can move to the
desired extensions with FXPOSIT() and then use HEADFITS(). This
is more efficient that repeatedly starting at the beginning of
the file.
(2) For reading a FITS file across a Web http: address after opening
the unit with the SOCKET procedure (IDL V5.4 or later,
Unix and Windows only)
OPTIONAL INPUT KEYWORDS:
EXTEN = Either an integer scalar, specifying which FITS extension to
read, or a scalar string specifying the extension name (stored
in the EXTNAME keyword). For example, to read the header of
the first extension set EXTEN = 1. Default is to read the
primary FITS header (EXTEN = 0). The EXTEN keyword cannot
be used when a unit number is supplied instead of a file name.
COMPRESS - If this keyword is set and non-zero, then treat the file
as compressed. If 1 assume a gzipped file. Use IDL's
internal decompression facilities for gzip files, while for
Unix or bzip2 compression spawn off a process to decompress and
use its output as the FITS stream. If the keyword is not 1,
then use its value as a string giving the command needed for
decompression. See FXPOSIT for more info.
/SILENT - If set, then suppress any warning messages about invalid
characters in the FITS file.
OPTIONAL KEYWORD OUTPUT:
ERRMSG = If this keyword is present, then any error messages will be
returned to the user in this parameter rather than
depending on the MESSAGE routine in IDL. If no errors are
encountered, then a null string is returned.
OUTPUTS:
Result of function = FITS header, string array
CALLS: ***
FXPOSIT [1], FXPOSIT [2], MRD_HREAD [1], MRD_HREAD [2]
CALLED BY:
ATV, CAT_FITS, CENTER_NRH2, COMP_DATE, CREATE_NRH_PFILE, CW_HEADER, CW_POS
CW_XTD_NRHF, EIT_DAILY, EIT_DISPLAY, EIT_IMAGE, EIT_PREP, EVAL_SHERB, FF_SUMMARY
FITS CLASS DEFINITION, FITS_HDR__READ [1], FLUX_NRH2, FOPEN_NRH2, FOPEN_STD_GMRT
FOPEN_STD_SOHO, FOPEN_YOHKOH, Fits_spectra [1], Fits_spectra [2]
GET_SUN_CENTER [1], GT_FPOINT, HEAD_SEFRAM, INIT_NRH_CFILE, INTGCOMP_NRH2
LASCO_READFITS [1], LIST_FITS, LIST_HDR_SUM, LIT_HEADER_NRH1, MAKE_DAILY_IMAGE
MKFILEPOS, MKMOVIE_kpd, MK_DAILY_C1_MED, MK_DAILY_MIN, MK_EIT_L1, MK_IMG, MK_RESUME
MK_SUMER_CAT, MOVIE_MAKER, NORH_RD_IMG [1], NORH_RD_IMG [2], NRHR, NRHRCAL
NRHRCALIBRATION, NRH_FLUXASCI, NRH_FOPEN, NRH_HSI_FITS, NRH_IDFREQ, NRH_PLOTF
NRH_PLOTI, NRH_SOURCEASCI, OPEN_NRH_CFILE, PLOT_MAXPOS, PLOT_SOURCES
READ_COMPRESSED, READ_CONT_FITS, READ_DISCSC, READ_DISCSP_FITS, READ_MER
READ_NRHPOS, READ_SHER, READ_SHERB, READ_STTE, READ_TTS_FITS, SELECTD, SFITSLIST
SHOW_FITS_HDR, SUMER_FITS, SUMER_SEARCH_PD_EVENT, SUMER_SERIAL, TIME_IND_NRH
UPD_NRH2DFITS, WCALCNEW, WLISTER, WLOAD, WLOADINFO1, WMESSAGE [1], WRITE_FLUXNRH
WRITE_POSINRH, XSEL_PD_EVENT, ZCLIP, ZPICK, datify, eit_dump, eit_getlimb, eit_lzsort
fits2spectrum, fitsgen, ft_sumread_fits, htmd_cat, mk_query [1], mk_query [2]
mreadfits, mreadfits_header, qImage_cw_DrawEphem, rd_sumer [1], rd_sumer [2]
read_ovsa_fits, slog_headinfo, smei_frm_read, smei_fts_read, smei_hdr_update
smei_sky_read, smei_star_remove, smei_zodiac_remove, spartan_pb2fits
spartan_roll2fits [1], where_are [1], where_are [2], xsm_fits2spectrum
EXAMPLE:
Print the main FITS header of a file 'test.fits' into a string
variable, h
IDL> print, headfits( 'test.fits')
Print the second extension header of a gzip compressed FITS file
'test.fits.gz'. Use HPRINT for pretty format
IDL> hprint, headfits( 'test.fits.gz', ext=2)
Read the extension named CALSPEC
IDL> hprint,headfits('test.fits.gz',ext='CALSPEC')
PROCEDURES CALLED
FXPOSIT(), MRD_HREAD
MODIFICATION HISTORY:
adapted by Frank Varosi from READFITS by Jim Wofford, January, 24 1989
Keyword EXTEN added, K.Venkatakrishna, May 1992
Make sure first 8 characters are 'SIMPLE' W. Landsman October 1993
Check PCOUNT and GCOUNT W. Landsman December 1994
Major rewrite, work for Unix gzip files, W. Landsman April 1996
Added COMPRESS keyword W. Landsman April 2000
Added ERRMSG keyword W. Landsman July 2000
Added /SILENT keyword W. Landsman December 2000
Option to read a unit number rather than file name W.L October 2001
Test output status of MRD_HREAD call October 2003 W. Landsman
Allow extension to be specified by name Dec 2006 W. Landsman
[Previous]
[Next]
NAME:
HEADFITS
PURPOSE:
Read a FITS (primary or extension) header into a string array.
EXPLANATION:
HEADFITS() can also read gzip (.gz) or Unix compressed (.Z) FITS files.
CALLING SEQUENCE:
Result = HEADFITS(Filename/Fileunit ,[ ERRMSG =, EXTEN= , COMPRESS=,
/SILENT ])
INPUTS:
Filename = String containing the name of the FITS file to be read.
File names ending in '.gz' are assumed to be gzip'ed compressed
and under Unix file names ending in '.Z' are assumed to be
Unix compressed, and file names ending in .bz2 are assumed to
be bzip2 compressed. If this default behaviour is not
sufficient then use the COMPRESS keyword.
or
Fileunit - A scalar integer specifying the unit of an already opened
FITS file. The unit will remain open after exiting
HEADFITS(). There are two possible reasons for choosing
to specify a unit number rather than a file name:
(1) For a FITS file with many extensions, one can move to the
desired extensions with FXPOSIT() and then use HEADFITS(). This
is more efficient that repeatedly starting at the beginning of
the file.
(2) For reading a FITS file across a Web http: address after opening
the unit with the SOCKET procedure (IDL V5.4 or later,
Unix and Windows only)
OPTIONAL INPUT KEYWORDS:
EXTEN = Either an integer scalar, specifying which FITS extension to
read, or a scalar string specifying the extension name (stored
in the EXTNAME keyword). For example, to read the header of
the first extension set EXTEN = 1. Default is to read the
primary FITS header (EXTEN = 0). The EXTEN keyword cannot
be used when a unit number is supplied instead of a file name.
COMPRESS - If this keyword is set and non-zero, then treat the file
as compressed. If 1 assume a gzipped file. Use IDL's
internal decompression facilities for gzip files, while for
Unix or bzip2 compression spawn off a process to decompress and
use its output as the FITS stream. If the keyword is not 1,
then use its value as a string giving the command needed for
decompression. See FXPOSIT for more info.
/SILENT - If set, then suppress any warning messages about invalid
characters in the FITS file.
OPTIONAL KEYWORD OUTPUT:
ERRMSG = If this keyword is present, then any error messages will be
returned to the user in this parameter rather than
depending on the MESSAGE routine in IDL. If no errors are
encountered, then a null string is returned.
OUTPUTS:
Result of function = FITS header, string array
CALLS: ***
FXPOSIT [1], FXPOSIT [2], MRD_HREAD [1], MRD_HREAD [2]
CALLED BY:
ATV, CAT_FITS, CENTER_NRH2, COMP_DATE, CREATE_NRH_PFILE, CW_HEADER, CW_POS
CW_XTD_NRHF, EIT_DAILY, EIT_DISPLAY, EIT_IMAGE, EIT_PREP, EVAL_SHERB, FF_SUMMARY
FITS CLASS DEFINITION, FITS_HDR__READ [1], FLUX_NRH2, FOPEN_NRH2, FOPEN_STD_GMRT
FOPEN_STD_SOHO, FOPEN_YOHKOH, Fits_spectra [1], Fits_spectra [2]
GET_SUN_CENTER [1], GT_FPOINT, HEAD_SEFRAM, INIT_NRH_CFILE, INTGCOMP_NRH2
LASCO_READFITS [1], LIST_FITS, LIST_HDR_SUM, LIT_HEADER_NRH1, MAKE_DAILY_IMAGE
MKFILEPOS, MKMOVIE_kpd, MK_DAILY_C1_MED, MK_DAILY_MIN, MK_EIT_L1, MK_IMG, MK_RESUME
MK_SUMER_CAT, MOVIE_MAKER, NORH_RD_IMG [1], NORH_RD_IMG [2], NRHR, NRHRCAL
NRHRCALIBRATION, NRH_FLUXASCI, NRH_FOPEN, NRH_HSI_FITS, NRH_IDFREQ, NRH_PLOTF
NRH_PLOTI, NRH_SOURCEASCI, OPEN_NRH_CFILE, PLOT_MAXPOS, PLOT_SOURCES
READ_COMPRESSED, READ_CONT_FITS, READ_DISCSC, READ_DISCSP_FITS, READ_MER
READ_NRHPOS, READ_SHER, READ_SHERB, READ_STTE, READ_TTS_FITS, SELECTD, SFITSLIST
SHOW_FITS_HDR, SUMER_FITS, SUMER_SEARCH_PD_EVENT, SUMER_SERIAL, TIME_IND_NRH
UPD_NRH2DFITS, WCALCNEW, WLISTER, WLOAD, WLOADINFO1, WMESSAGE [1], WRITE_FLUXNRH
WRITE_POSINRH, XSEL_PD_EVENT, ZCLIP, ZPICK, datify, eit_dump, eit_getlimb, eit_lzsort
fits2spectrum, fitsgen, ft_sumread_fits, htmd_cat, mk_query [1], mk_query [2]
mreadfits, mreadfits_header, qImage_cw_DrawEphem, rd_sumer [1], rd_sumer [2]
read_ovsa_fits, slog_headinfo, smei_frm_read, smei_fts_read, smei_hdr_update
smei_sky_read, smei_star_remove, smei_zodiac_remove, spartan_pb2fits
spartan_roll2fits [1], where_are [1], where_are [2], xsm_fits2spectrum
EXAMPLE:
Print the main FITS header of a file 'test.fits' into a string
variable, h
IDL> print, headfits( 'test.fits')
Print the second extension header of a gzip compressed FITS file
'test.fits.gz'. Use HPRINT for pretty format
IDL> hprint, headfits( 'test.fits.gz', ext=2)
Read the extension named CALSPEC
IDL> hprint,headfits('test.fits.gz',ext='CALSPEC')
PROCEDURES CALLED
FXPOSIT(), MRD_HREAD
MODIFICATION HISTORY:
adapted by Frank Varosi from READFITS by Jim Wofford, January, 24 1989
Keyword EXTEN added, K.Venkatakrishna, May 1992
Make sure first 8 characters are 'SIMPLE' W. Landsman October 1993
Check PCOUNT and GCOUNT W. Landsman December 1994
Major rewrite, work for Unix gzip files, W. Landsman April 1996
Added COMPRESS keyword W. Landsman April 2000
Added ERRMSG keyword W. Landsman July 2000
Added /SILENT keyword W. Landsman December 2000
Option to read a unit number rather than file name W.L October 2001
Test output status of MRD_HREAD call October 2003 W. Landsman
Allow extension to be specified by name Dec 2006 W. Landsman
[Previous]
[Next]
Project : SOHO - CDS
Name : HEL2ARCMIN()
Purpose : Compute position relative to sun centre from heliographic.
Explanation : Using the input heliographic coordinates of a feature,
calculate the position in arcmin relative to the sun centre
taking account of the sun's orientation (B0). The current
date is assumed unless specified. West and North are
considered positive.
You can rely on PB0R to calculate the solar position,
B angle, etc. from SOHO or Earth's vantage points, or
specify complete observer coordinates in the Heliographic
Spherical coordinate system: B0, L0, R0. You may also
specify the P angle.
Use : IDL> print, hel2armin(ns, ew, date = dat)
eg print,hel2arcmin('S34','E23')
or print,hel2arcmin(-34,-23)
or xy = hel2arcmin(ns,ew,visible,date=dat)
Inputs : ns - the Heliographic latitude in degrees (can be a
string with N/S first character instead of sign).
ew - the Heliographic longitude in degrees (can be a
string with E/W first character instead of sign).
Opt. Inputs : None
Outputs : Function returns the (x,y) location in arcmins relative to
sun disk centre.
Opt. Outputs: If mentioned, the VISIBLE parameter gets a boolean
array indicating whether each point is in front of
theSun.
Keywords : date - the date to use in the calculation of B0.
error - Output keyword containing error message;
a null string is returned if no error occurs
soho - if set uses the SOHO view point rather than
the Earth. Note this functionality is
duplicated by the system variable SC_VIEW,
which in turn is set by the procedures
USE_EARTH_VIEW or USE_SOHO_VIEW.
B0 - The B angle, in degrees
P - The P angle, in degrees
R0 - The distance of the observer from the Sun,
in solar radii (use "zunits" to convert between
solar radii and, say, kilometers)
L0 - The longitude of the observer, relative to Earth,
in degrees.
Calls : ***
ANYTIM2UTC [1], ANYTIM2UTC [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_UTC
PB0R, TRIM, is_number [1], is_number [2]
CALLED BY:
ALIGN_AR, CNVT_COORD [1], DROT_COORD, DROT_RASTER, EIT_SUB_MAN_INPUT
EIT_SUB_UTIL_ROT, GET_FITS_CEN, GET_NAR, HEL2XY, ITOOL_SOLAR_GRID, LIST_GEV
MK_IVM_MAP, PLOT_HELIO [1], PLOT_HELIO [2], RD_AR, ROT_XY, SEL_AR, SOHO_XY, SOLAR_GRID
ssw_track_fov, todays_targets, zhelio2xy
Restrictions: None
Side effects: None
Category : Utilities, coordinates.
Prev. Hist. : Yohkoh routine by Hudson/Wuelser.
Written : CDS version, C D Pike, RAL, 6 Sept 93
Modified : To use CDS time and pb0r routines, CDP, 17-May-94
Version 2, William Thompson, GSFC, 14 November 1994
Modified .DAY to .MJD
Version 3, 26-Feb-96, CDP
Added SOHO keyword
Version 4, March 11, 1996, Liyun Wang, GSFC/ARC
Modified such that point of view can be changed to
SOHO if the env variable SC_VIEW is set to 1
Added ERROR keyword
Version 5, Allow input format of eq 'N3.4', 'E9.12'. CDP, 12-Apr-96
Version 6, 7-Jan-99, Zarr (SMA/GSFC)
- made use of SOHO keyword more logical
Version 7, 15-Jan-99, C. DeForest
- added VISIBLE boolean array on return
Version 8, 22-Feb-99, C. DeForest
- Added b0, l0, p, r0 coordinates if desired (thwarting
PB0R if enough are specified)
Version 9, 8-Apr-99, C. DeForest (Stanford/GSFC)
- Converted R0 calculation to use arctan instead of division
(correct even for smaller distances from Sun).
Version 10, 9-Apr-99, Andretta (CUA/GSFC)
- Input keywords P, B0 etc. are now protected from any
changes made in this routine (B0 used to be converted in
radians)
Version 11, 14-Mar-2000, DeForest (SWRI)
Version 12, 22-Aug-2001, Zarro (EITI/GSFC)
Added ANGLES keyword
Version 13, 15-Mar-2002, Zarro/Andretta. Corrected
bugs in use of ANGLES and SOHO keywords
Modified, 8-Jan-2005, Zarro (L-3Com/GSFC) - added /DEBUG
[Previous]
[Next]
Project : HESSI
Name : HEL2XY
Purpose : convert heliographic coords to heliocentric
Category : synoptic
Syntax : IDL> coords=hel2xy(value,date=date)
Inputs : VALUE = coordinates, e.g., 'N23 W34'
Outputs : COORDS = [-100,200] arcsecs
Keywords : DATE = pertinent date
PANGLE = position angle (angle CCW from Solar N)
CALLS: ***
HEL2ARCMIN [1], HEL2ARCMIN [2], IS_BLANK
CALLED BY:
LIST_GEV, LIST_NAR
History : 6-Nov-2000, D.M. Zarro (EIT/GSFC), Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
NAME:
HELIO
PURPOSE:
Compute (low-precision) heliocentric coordinates for the planets.
EXPLANATION:
The mean orbital elements for epoch J2000 are used. These are derived
from a 250 yr least squares fit of the DE 200 planetary ephemeris to a
Keplerian orbit where each element is allowed to vary linearly with
time. For dates between 1800 and 2050, this solution fits the
terrestrial planet orbits to ~25" or better, but achieves only ~600"
for Saturn.
Use PLANET_COORDS (which calls HELIO) to get celestial (RA, Dec)
coordinates of the planets
CALLING SEQUENCE:
HELIO, JD, LIST, HRAD, HLONG, HLAT, [/RADIAN]
INPUTS:
JD = Julian date, double precision scalar or vector
LIST = List of planets array. May be a single number.
1 = merc, 2 = venus, ... 9 = pluto.
OUTPUTS:
HRAD = array of Heliocentric radii (A.U).
HLONG = array of Heliocentric (ecliptic) longitudes (degrees).
HLAT = array of Heliocentric latitudes (degrees).
These output parameters will be dimensioned Nplanet by Ndate,
where Nplanet is the number of elements of list, and Ndate is
the number of elements of JD.
OPTIONAL INPUT KEYWORD:
/RADIAN - If set, then the output longitude and latitude are given in
radians.
CALLED BY:
PLANET_COORDS
EXAMPLE:
(1) Find the current heliocentric positions of all the planets
IDL> GET_JULDATE, jd ;Get current Julian date
IDL> HELIO,jd,indgen(9)+1,hrad,hlong,hlat ;Get radius, long, and lat
(2) Find heliocentric position of Mars on August 23, 2000
IDL> JDCNV, 2000,08,23,0,jd
IDL> HELIO,JD,2,HRAD,HLONG,HLAT
===> hrad = 1.6407 AU hlong = 124.3197 hlat = 1.7853
For comparison, the JPL ephemeris gives
hrad = 1.6407 AU hlong = 124.2985 hlat = 1.7845
(3) Find the heliocentric positions of Mars and Venus for every day in
November 2000
IDL> JDCNV, 2000, 11, 1, 0, jd ;Julian date of November 1, 2000
IDL> helio, jd+indgen(30), [4,2], hrad,hlong,hlat ;Mars=4, Venus=2
hrad, hlong, and hlat will be dimensioned [2,30]
first column contains Mars data, second column Venus
CALLS: ***
CIRRANGE
COMMON BLOCKS:
None
ROUTINES USED:
CIRRANGE - force angle between 0 and 2*!PI
NOTES:
(1) The calling sequence for this procedure was changed in August 2000
(2) This program is based on the two-body model and thus neglects
interactions between the planets. This is why the worst results
are for Saturn. Use the procedure JPLEPHINTERp for more accurate
positions using the JPL ephemeris. Also see
http://ssd.jpl.nasa.gov/cgi-bin/eph for a more accurate ephemeris
generator online.
(3) The coordinates are given for equinox 2000 and *not* the equinox
of the supplied date(s)
MODIFICATION HISTORY:
R. Sterner. 20 Aug, 1986.
Code cleaned up a bit W. Landsman December 1992
Converted to IDL V5.0 W. Landsman September 1997
Major rewrite, use modern orbital elements, vectorize, more accurate
solution to Kepler's equation W. Landsman August 2000
Wasn't working for planet vectors W. Landsman August 2000
[Previous]
[Next]
NAME:
HELIO_JD
PURPOSE:
Convert geocentric (reduced) Julian date to heliocentric Julian date
EXPLANATION:
This procedure correct for the extra light travel time between the Earth
and the Sun.
CALLING SEQUENCE:
jdhelio = HELIO_JD( date, ra, dec, /B1950, /TIME_DIFF)
INPUTS
date - reduced Julian date (= JD - 2400000), scalar or vector, MUST
be double precision
ra,dec - scalars giving right ascension and declination in DEGREES
Equinox is J2000 unless the /B1950 keyword is set
OUTPUTS:
jdhelio - heliocentric reduced Julian date. If /TIME_DIFF is set, then
HELIO_JD() instead returns the time difference in seconds
between the geocentric and heliocentric Julian date.
OPTIONAL INPUT KEYWORDS
/B1950 - if set, then input coordinates are assumed to be in equinox
B1950 coordinates.
/TIME_DIFF - if set, then HELIO_JD() returns the time difference
(heliocentric JD - geocentric JD ) in seconds
CALLS: ***
BPRECESS, POLY, XYZ, ZPARCHECK [1], ZPARCHECK [2], ZPARCHECK [3]
EXAMPLE:
What is the heliocentric Julian date of an observation of V402 Cygni
(J2000: RA = 20 9 7.8, Dec = 37 09 07) taken June 15, 1973 at 11:40 UT?
IDL> juldate, [1973,6,15,11,40], jd ;Get geocentric Julian date
IDL> hjd = helio_jd( jd, ten(20,9,7.8)*15., ten(37,9,7) )
==> hjd = 41848.9881
Wayne Warren (Raytheon ITSS) has compared the results of HELIO_JD with the
FORTRAN subroutines in the STARLINK SLALIB library (see
http://star-www.rl.ac.uk/) .
Time Diff (sec)
Date RA(2000) Dec(2000) STARLINK IDL
1999-10-29T00:00:00.0 21 08 25. -67 22 00. -59.0 -59.0
1999-10-29T00:00:00.0 02 56 33.4 +00 26 55. 474.1 474.1
1940-12-11T06:55:00.0 07 34 41.9 -00 30 42. 366.3 370.2
1992-02-29T03:15:56.2 12 56 27.4 +42 10 17. 350.8 350.9
2000-03-01T10:26:31.8 14 28 36.7 -20 42 11. 243.7 243.7
2100-02-26T09:18:24.2 08 26 51.7 +85 47 28. 104.0 108.8
PROCEDURES CALLED:
bprecess, xyz, zparcheck
REVISION HISTORY:
Algorithm from the book Astronomical Photometry by Henden, p. 114
Written, W. Landsman STX June, 1989
Make J2000 default equinox, add B1950, /TIME_DIFF keywords, compute
variation of the obliquity W. Landsman November 1999
[Previous]
[Next]
NAME:
HELIO_RV
PURPOSE:
Return the heliocentric radial velocity of a spectroscopic binary
EXPLANATION:
This function will return the heliocentric radial velocity of a
spectroscopic binary star at a given heliocentric Julian date (HJD)
given its orbit.
CALLING SEQUENCE:
Result = HELIO_RV ( Reduced_HJD ,T ,Period ,Gamma , K, [,e ,Omega ] )
INPUT:
Reduced_HJD - Reduced_HJD of observation
T - Reduced_HJD of periastron passage (max. +ve velocity
for circular orbits)
Period - the period in days
Gamma - systemic velocity
K - velocity semi-amplitude in the same units as Gamma.
e - eccentricity of the orbit, default is 0.
Omega - longitude of periastron in degrees. Must be specified for
eccentric orbits.
OUTPUT:
The predicted heliocentric radial velocity in the same units as Gamma
for the date(s) specified by Reduced_HJD.
RESTRICTIONS:
To ensure consistency with the routines JULDATE and HELIO_JD, the
reduced HJD must be used throughtout.
EXAMPLES:
Example 1
What was the heliocentric radial velocity of the primary component of HU Tau
at 1730 UT 25 Oct 1994?
IDL> juldate ,[94,10,25,17,30],JD ;Get Geocentric julian date
IDL> hjd = helio_jd(jd,ten(04,38,16)*15.,ten(20,41,05)) ; Convert to HJD
IDL> print, helio_rv(hjd,46487.5303D,2.0563056D,-6.0,59.3)
-63.661180
NB. 1. The routines JULDATE and HELIO_JD return a reduced HJD (HJD - 2400000)
and so T and P must be specified in the same fashion.
2. The user should be careful to use double precision format to specify
T and P to sufficient precision where necessary.
Example 2
Plot two cycles of an eccentric orbit, e=0.6, omega=45 for both
components of a binary star
IDL> phi=findgen(100)/50.0 ; Generates 100 phase points
IDL> plot, phi,helio_rv(phi,0,1,0,100,0.6,45),yrange=[-100,150]
IDL> oplot, phi,helio_rv(phi,0,1,0,50,0.6,45+180)
This illustrates both the use of arrays to perform multiple calculations
and generating radial velocities for a given phase by setting T=0 and P=1.
Note also that omega has been changed by 180 degrees for the orbit of the
second component (the same 'trick' can be used for circular orbits).
MODIFICATION HISTORY:
Written by: Pierre Maxted CUOBS, October, 1994
Circular orbits handled by setting e=0 and omega=0 to allow
binary orbits to be handled using omega and omega+180.
Pierre Maxted,Feb 95
BUG - omega was altered by the routine - corrected Feb 95,Pierre Maxted
Iteration for E changed to that given by Reidel , Feb 95,Pierre Maxted
/SINGLE keyword removed. May 96,Pierre Maxted
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Name: help_windows
Purpose: Print help text for starting SolarSoft under Windows
Input Parameters:
Calling Examples:
help_windows
Calls: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4], prstr [1]
prstr [2], rd_tfile [1], rd_tfile [2]
Restrictions:
History:
12-May-2000 rdb Created
[Previous]
[Next]
NAME:
HERMITE
PURPOSE:
To compute Hermite spline interpolation of a tabulated function.
EXPLANATION:
Hermite interpolation computes the cubic polynomial that agrees with
the tabulated function and its derivative at the two nearest
tabulated points. It may be preferable to Lagrangian interpolation
(QUADTERP) when either (1) the first derivatives are known, or (2)
one desires continuity of the first derivative of the interpolated
values. HERMITE() will numerically compute the necessary
derivatives, if they are not supplied.
CALLING SEQUENCE:
F = HERMITE( XX, FF, X, [ FDERIV = ])
INPUT PARAMETERS:
XX - Vector giving tabulated X values of function to be interpolated
Must be either monotonic increasing or decreasing
FF - Tabuluated values of function, same number of elements as X
X - Scalar or vector giving the X values at which to interpolate
OPTIONAL INPUT KEYWORD:
FDERIV - function derivative values computed at XX. If not supplied,
then HERMITE() will compute the derivatives numerically.
The FDERIV keyword is useful either when (1) the derivative
values are (somehow) known to better accuracy than can be
computed numerically, or (2) when HERMITE() is called repeatedly
with the same tabulated function, so that the derivatives
need be computed only once.
OUTPUT PARAMETER:
F - Interpolated values of function, same number of points as X
EXAMPLE:
Interpolate the function 1/x at x = 0.45 using tabulated values
with a spacing of 0.1
IDL> x = findgen(20)*0.1 + 0.1
IDL> y = 1/x
IDL> print,hermite(x,y,0.45)
This gives 2.2188 compared to the true value 1/0.45 = 2.2222
IDL> yprime = -1/x^2 ;But in this case we know the first derivatives
IDL> print,hermite(x,y,0.45,fderiv = yprime)
== 2.2219 ;and so can get a more accurate interpolation
NOTES:
The algorithm here is based on the FORTRAN code discussed by
Hill, G. 1982, Publ Dom. Astrophys. Obs., 16, 67. The original
FORTRAN source is U.S. Airforce. Surveys in Geophysics No 272.
HERMITE() will return an error if one tries to interpolate any values
outside of the range of the input table XX
PROCEDURES CALLED:
None
REVISION HISTORY:
Written, B. Dorman (GSFC) Oct 1993, revised April 1996
Added FDERIV keyword, W. Landsman (HSTX) April 1996
Test for out of range values W. Landsman (HSTX) May 1996
Converted to IDL V5.0 W. Landsman September 1997
Use VALUE_LOCATE instead of TABINV W. Landsman February 2001
[Previous]
[Next]
PROJECT:
HESSI
NAME:
HESSI IMAGE CONTROL STRUCTURE DEFINITION
PURPOSE:
Defines the RATE header structure to store required keywords for rate header.
CATEGORY:
HESSI / Imaging
CALLING SEQUENCE:
var = {rate_struct}
EXAMPLES:
r = {rate_struct}
help, r, /structure
CALLS: ***
RATE_HEADER__DEFINE
SEE ALSO:
http://hessi.ssl.berkeley.edu/software/reference.html
rate_header
HISTORY:
24-Sep-2004 Sandhia Bansal Added author field to the structure.
16-Nov-2004 Sandhia Bansal Added new fields - fitFuntion and area,
backapp, deadapp, vignapp, observer, and
timversn.
[Previous]
[Next]
NAME:
HEULER
PURPOSE:
Change the coordinate system of a FITS header or astrometry structure
EXPLANATION:
Converts a FITS header or a astrometry structure containing WCS (world
coordinate system) information between celestial, ecliptic, and
Galactic coordinates
CALLING SEQUENCE:
HEULER, hdr, [/GALACTIC, /CELESTIAL, /ECLIPTIC, ALT_IN = , ALT_OUT=]
or
HEULER, astr, /GALACTIC, /CELESTIAL, /ECLIPTIC
INPUT/OUTPUT PARAMETERS:
hdr - FITS header (string array) containing WCS information
or
Astr - Astrometry structure as extracted from a FITS header
by extast.pro (See EXTAST for more info).
Header or astrometry structure will be modified by the program to
contain astrometry in the new coordinates system.
REQUIRED INPUT KEYWORDS:
One of the following exclusive keywords is *required*
/GALACTIC - Convert the header to Galactic coordinates
/CELESTIAL - Convert the header to celestial (RA & Dec) coordinates
/ECLIPTIC - Convert the header to ecliptic coordinates
OPTIONAL INPUT KEYWORDS:
The following two keywords apply if the FITS header contains multiple
WCS keywords. See Section 3.3 of Greisen & Calabretta (2002, A&A, 395,
1061) for information about alternate astrometry keywords.
ALT_IN - single character 'A' through 'Z' or ' ' specifying an
alternate astrometry system present in the input FITS header. The
default isto use the primary astrometry or ALT = ' '. If /ALT_IN
is set, then this is equivalent to ALT_IN = 'A'.
ALT_OUT - single character specifying the alternate WCS keywords
to write the *output* astrometry. If not specified, then ALT_OUT
is set equal to ALT_IN.
CALLS: ***
EULER, EXTAST, GSSS_STDAST, PUTAST, SXADDHIST [1], SXADDHIST [2], WCS_ROTATE
CALLED BY:
XYXY
RESTRICTIONS:
Currently assumes that celestial and ecliptic coordinates are in
J2000. Use HPRECESS if this is not the case.
ST Guide Star (DSS) image headers are first converted to a standard
tangent projection, prior to the coordinate conversion
METHOD:
The algorithm used is described in Section 2.7 of Calabretta & Greisen
(2002, A&A, 395, 1077). The CRVAL coordinates are transformed
directly using EULER. The new LONPOLE and LATPOLE values are then
determined by transforming the pole of the new system to the old, and
converted to native coordinates using WCS_ROTATE.
EXAMPLE:
A FITS header, hdr, has a standard tangent projection WCS information.
Add an alternate 'G' Galactic projection. Note that the original
WCS information will be left unchanged
IDL> heuler, hdr, /Galactic, alt='G'
PROCEDURES USED:
EULER, EXTAST, GSSS_STDAST, PUTAST, SXADDHIST, WCS_ROTATE
REVISION HISTORY:
Written W. Landsman June 2003
Use PV2 tag in astrometry structure rather than PROJP1 W. L. May 2004
Use double precision to compute new North pole W.L. Aug 2005
[Previous]
[Next]
Project : SOHO - CDS
Name : HEX2BIN
Purpose : Convert hexadecimal number to binary representation.
Explanation : The binary representation of a hexadecimal number is calculated
and can be displayed or returned or both or neither.
Use : IDL> hex2bin, hexadecimal [, binary, /quiet]
Inputs : hexadecimal - the number to convert (string).
Opt. Inputs : None
Outputs : See below
Opt. Outputs: binary - the binary representation of the input.
Keywords : quiet - unless given the binary number is printed to the
terminal
Calls : ***
DEC2BIN, HEX2DEC
Restrictions: Input must be a character string.
Side effects: None
Category : Utils, Numerical
Prev. Hist. : None
Written : C D Pike, RAL, 7-Oct-93
Modified :
Version : Version 1, 7-Oct-93
[Previous]
[Next]
Project : SOHO - CDS
Name : HEX2DEC
Purpose : Convert hexadecimal representation to decimal integer.
Explanation : A hexadecimal string is converted to a decimal integer and
can be displayed or returned or both or neither.
Use : IDL> hex2dec, hex [, decimal, /quiet]
Inputs : hex - hexadecimal string
Opt. Inputs : None
Outputs : See below
Opt. Outputs: decimal - the decimal integer equivalent of the input.
Keywords : quiet - unless given the decimal number is printed to the
terminal
Calls : ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], VALID_NUM [1], VALID_NUM [2]
VALID_NUM [3]
CALLED BY:
HEX2BIN, READ_BITP_SCE, READ_EIS_CMD_FROM_SLBSIB [1]
READ_EIS_CMD_FROM_SLBSIB [2]
Restrictions: Input must be a string.
Side effects: None
Category : Utils, Numerical
Prev. Hist. : None
Written : C D Pike, RAL, 7-Oct-93
Modified :
9-28-05, N.Rich Allow H or X in input
Version : Version 1, 7-Oct-93
[Previous]
[Next]
NAME:
HEXTRACT
PURPOSE:
Extract a subimage from an array and update astrometry in FITS header
EXPLANATION:
Extract a subimage from an array and create a new FITS header with
updated astrometry for the subarray
CALLING SEQUENCE:
HEXTRACT, Oldim, Oldhd, [ Newim, Newhd, x0, x1, y0, y1, /SILENT ]
or
HEXTRACT, Oldim, Oldhd, [x0, x1, y0, y1, /SILENT, ERRMSG = ]
INPUTS:
Oldim - the original image array
Oldhd - the original image header
OPTIONAL INPUTS:
x0, x1, y0, y1 - respectively, first and last X pixel, and first and
last Y pixel to be extracted from the original image, integer scalars.
If omitted, HEXTRACT will prompt for these parameters
OPTIONAL OUTPUTS:
Newim - the new subarray extracted from the original image
Newhd - header for newim containing updated astrometry info
If output parameters are not supplied or set equal to
-1, then the HEXTRACT will modify the input parameters
OLDIM and OLDHD to contain the subarray and updated header.
OPTIONAL INPUT KEYWORD:
/SILENT - If set and non-zero, then a message describing the extraction
is not printed at the terminal. This message can also be
suppressed by setting !QUIET.
OPTIONAL KEYWORD OUTPUT:
ERRMSG - If this keyword is supplied, then any error mesasges will be
returned to the user in this parameter rather than depending on
on the MESSAGE routine in IDL. If no errors are encountered
then a null string is returned.
CALLED BY:
WFPC2_READ
PROCEDURE:
The FITS header parameters NAXIS1, NAXIS2, CRPIX1, and CRPIX2 are
updated for the extracted image.
CALLS: ***
CHECK_FITS [1], CHECK_FITS [2], STRN [1], STRN [2], STRN [3], SXADDHIST [1]
SXADDHIST [2], SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], SXPAR [1], SXPAR [2]
SXPAR [3]
EXAMPLE:
Read an image from a FITS file 'IMAGE', extract a 512 x 512 subimage
with the same origin, and write to a new FITS file 'IMAGENEW'
IDL> im = READFITS( 'IMAGE', hdr ) ;Read FITS files into IDL arrays
IDL> hextract, im, h, 0, 511, 0, 511 ;Extract 512 x 512 subimage
IDL> writefits, 'IMAGENEW', im ,h ;Write subimage to a FITS file
PROCEDURES CALLED
CHECK_FITS, STRN(), SXPAR(), SXADDPAR, SXADDHIST
MODIFICATION HISTORY:
Written, Aug. 1986 W. Landsman, STX Corp.
Use astrometry structure, W. Landsman Jan, 1994
Minor fix if bad Y range supplied W. Landsman Feb, 1996
Added /SILENT keyword W. Landsman March, 1997
Converted to IDL V5.0 W. Landsman September 1997
Added ERRMSG keyword W. Landsman May 2000
[Previous]
[Next]
Project : HESSI
Name : HFITS__DEFINE
Purpose : Define a HFITS class that reads remote FITS files via HTTP
Explanation :
f='~zarro/synop/mdi_mag_fd_20001126_0136.fits ; file to read
a=obj_new('hfits') ; create a FITS HTTP object
a->open,'orpheus.nascom.nasa.gov' ; open a URL socket
a->hread,f,header ; read header
print,header ; print header
a->readfits,file,data ; read into data array
a->close ; close socket
This works too:
a->read,'orpheus.nascom.nasa.gov/~zarro/synop/mdi_mag_fd_20001126_0136.fits'
Category : objects sockets fits
Syntax : IDL> a=obj_new('hfits')
CALLS: ***
ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], DELVARX [1], DELVARX [2], DELVARX [3]
DELVARX [4], DPRINT, EXIST, GET_FID, GET_UTC, HFITS::CLEANUP, HFITS::FILTER_PATTERN
HFITS::FILTER_TIMES, HFITS::FIND, HFITS::GET_SERVER, HFITS::HREAD, HFITS::INIT
HFITS::MREADFITS_URL, HFITS::READFITS, HFITS::READ_DATA, HFITS::READ_HEADER
IS_BLANK, IS_STRING, MRDFITS [1], MRDFITS [2], MRD_HREAD [1], MRD_HREAD [2]
PARSE_TIME, TRIM, VALID_TIME, delvarx [5], fitshead2struct, is_number [1]
is_number [2], is_struct
History : Written 11 Oct 2001, D. Zarro (EITI/GSFC)
Modified 10 Oct 2005, Zarro (L-3Com/GSFC)
- added _ref_extra
Modified 11 Nov 2006, Zarro (ADNET/GSFC)
- fixed bug parsing URL's without http prefix
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
HGREP
PURPOSE:
Find a substring in a FITS header (or any other string array)
CALLING SEQUENCE:
HGREP, header, substring, [/KEEPCASE, /LINENUM ]
INPUTS:
header - FITS header or other string array
substring - scalar string to find in header; if a numeric value is
supplied, it will be converted to type string
OPTIONAL INPUT KEYWORDS:
/KEEPCASE: if set, then look for an exact match of the input substring
Default is to ignore case .
/LINENUM: if set, prints line number of header in which
substring appears
OUTPUTS:
None, results are printed to screen
EXAMPLE:
Find every place in a FITS header that the word 'aperture'
appears in lower case letters and print the element number
of the header array:
IDL> hgrep, header, 'aperture', /keepcase, /linenum
HISTORY:
Written, Wayne Landsman (Raytheon ITSS) August 1998
Adapted from STIS version by Phil Plait/ ACC November 14, 1997
Remove trailing spaces if a non-string is supplied W. Landsman Jun 2002
[Previous]
[Next]
Project : SOHO - CDS
Name :
HISCAL()
Purpose :
Performs histogram equalization on an array.
Explanation :
Scales an array such that the histogram of the output array is
approximately the same for all data values.
Use :
Result = HISCAL(ARRAY)
Inputs :
ARRAY = Array to be scaled.
Opt. Inputs :
None.
Outputs :
The function returns the scaled array.
Opt. Outputs:
None.
Keywords :
MISSING = Value flagging missing pixels.
MAX = The maximum value of IMAGE to be considered in calculating
the histogram, as used by HISTOGRAM. The default is the
maximum value of IMAGE.
MIN = The minimum value of IMAGE to be considered in calculating
the histogram, as used by HISTOGRAM. The default is the
minimum value of IMAGE.
Calls : ***
GET_IM_KEYWORD, GOOD_PIXELS, WHERE_MISSING
Common :
None.
Restrictions:
ARRAY must have some range of values.
In general, the SERTS image display routines use several non-standard
system variables. These system variables are defined in the procedure
IMAGELIB. It is suggested that the command IMAGELIB be placed in the
user's IDL_STARTUP file.
Some routines also require the SERTS graphics devices software,
generally found in a parallel directory at the site where this software
was obtained. Those routines have their own special system variables.
Side effects:
None.
Category :
Utilities, Image_display.
Prev. Hist. :
W.T.T., Oct. 1987.
William Thompson, November 1992, added MISSING, MAX and MIN keywords.
No longer scales into byte array.
Written :
William Thompson, GSFC, October 1987.
Modified :
Version 1, William Thompson, GSFC, 13 May 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 25 May 1993.
Changed call to HISTOGRAM to be compatible with OpenVMS/ALPHA
Version 3, 11-May-2005, William Thompson, GSFC
Handle NaN values
Version :
Version 3, 11-May-2005
[Previous]
[Next]
NAME:
HISTOGAUSS
PURPOSE:
Histograms data and overlays it with a Gaussian. Draws the mean, sigma,
and number of points on the plot.
CALLING SEQUENCE:
HISTOGAUSS, Sample, A, [XX, YY, GX, GY, /NOPLOT, /NOFIT, FONT=,
CHARSIZE = ]
INPUT:
SAMPLE = Vector to be histogrammed
OUTPUT ARGUMENTS:
A = coefficients of the Gaussian fit: Height, mean, sigma
A[0]= the height of the Gaussian
A[1]= the mean
A[2]= the standard deviation
A[3]= the half-width of the 95% conf. interval of the standard
mean
A[4]= 1/(N-1)*total( (y-mean)/sigma)^2 ) = a measure of
normality
Below: superceded. The formula is not entirely reliable.
A[4]= measure of the normality of the distribution. =1.0, perfectly
normal. If no more than a few hundred points are input, there are
formulae for the 90 and 95% confidence intervals of this quantity:
M=ALOG10(N-1) ; N = number of points
T90=ABS(.6376-1.1535*M+.1266*M^2) ; = 90% confidence interval
IF N LT 50 THEN T95=ABS(-1.9065-2.5465*M+.5652*M^2) $
ELSE T95=ABS( 0.7824-1.1021*M+.1021*M^2) ;95% conf.
(From Martinez, J. and Iglewicz, I., 1981, Biometrika, 68, 331-333.)
XX = the X coordinates of the histogram bins (CENTER)
YY = the Y coordinates of the histogram bins
GX = the X coordinates of the Gaussian fit
GY = the Y coordinates of the Gaussian fit
OPTIONAL INPUT KEYWORDS:
/NOPLOT - If set, nothing is drawn
/FITIT If set, a Gaussian is actually fitted to the distribution.
By default, a Gaussian with the same mean and sigma is drawn;
the height is the only free parameter.
CHARSIZE Size of the characters in the annotation. Default = 0.82.
FONT - scalar font graphics keyword (-1,0 or 1) for text
_EXTRA - Any value keywords to the PLOT command (e.g. XTITLE) may also
be passed to HISTOGAUSS
SUBROUTINE CALLS:
BIWEIGHT_MEAN, which determines the mean and std. dev.
AUTOHIST, which draws the histogram
GAUSSFIT() (IDL Library) which does just that
REVISION HISTORY:
Written, H. Freudenreich, STX, 12/89
Modified for IDL Version 2, 1/91, HF
More quantities returned in A, 2/94, HF
Added NOPLOT keyword and print if Gaussian, 3/94
Stopped printing confidence limits on normality 3/31/94 HF
Added CHARSIZE keyword, changed annotation format, 8/94 HF
Simplified calculation of Gaussian height, 5/95 HF
Convert to V5.0, use T_CVF instead of STUDENT_T, GAUSSFIT instead of
FITAGAUSS W. Landsman April 2002
Correct call to T_CVF for calculation of A[3], 95% confidence interval
P. Broos/W. Landsman July 2003
Allow FONT keyword to be passed. T. Robishaw Apr. 2006
CALLS:
[Previous]
[Next]
PROJECT: SSW
NAME: HISTOGRAM_PLUS
PURPOSE: Returns the normal IDL histogram, with the reverse_indices packaged into
a pointer to avoid the nasty syntax.
CATEGORY:
CALLING SEQUENCE:
hist = histogram_plus( array, $
Select, Nselect=Nselect, REV_PTR= rev_ptr, $
[, BINSIZE=value] [, INPUT=variable] [, MAX=value] [, MIN=value] [, /NAN] $
[, NBINS=value] [, OMAX=variable] [, OMIN=variable] $
[, /L64 | REVERSE_INDICES=variable] )
CALLS:
Return Value
Returns a 32-bit or a 64-bit integer vector equal to the density function of the input Array.
none
INPUTS:
Array -The vector or array for which the density function is to be computed.
OPTIONAL INPUTS:
OUTPUTS:
Select - valid indices from histogram(ARRAY)
OPTIONAL OUTPUTS:
none
KEYWORDS:
NSELECT - number of elements in select
REV_PTR - Ptr array of indices corresponding to elements of Select.
If no value are found, REV_PTR is set to 0.
All Keyword Inputs available to HISTOGRAM
CALLED BY:
hsi_select_by_coincidence
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
Input array is scanned using histogram function. The valid indices are returned
in Select.
MODIFICATION HISTORY:
24-Jan-2002, Version 1, richard.schwartz@gsfc.nasa.gov
28-Jan-2002, ras, fixed bug with r, used r[select[i]] not r[i]
[Previous]
[Next]
NAME:
HOR2EQ
PURPOSE:
Converts local horizon coords (alt-az) of something to equatorial (ra-dec).
EXPLANATION:
This is a nice code to calculate equatorial (ra,dec) coordinates from
horizon (alt,az) coords. It is typically accurate to about 1 arcsecond
or better (I have checked the output against the publicly available XEPHEM
software). It preforms precession, nutation, abberation, and refraction
corrections. The perhaps best thing about it is that it can take arrays
as inputs, in all variables and keywords EXCEPT Lat, lon, and Altitude
(the code assumes these aren't changing), and uses vector arithmetic in
every calculation except when calculating the precession matrices.
CALLING SEQUENCE:
HOR2EQ, alt, az, jd, ra, dec, [ha, LAT= , LON= , /WS, OBSNAME= , $
/B1950 , PRECESS_= 0, NUTATE_= 0, REFRACT_= 0, $
ABERRATION_= 0, ALTITUDE= , /VERBOSE, _EXTRA= ]
INPUT VARIABLES
alt : altitude (in degrees) [scalar or vector]
az : azimuth angle (in degrees, measured EAST from NORTH, but see
keyword WS below.) [scalar or vector]
JD : Julian Date [scalar or vector]
Note: if RA and DEC are arrays, then alt and az will also be arrays.
If RA and DEC are arrays, JD may be a scalar OR an array of
the same dimensionality.
OPTIONAL INPUT KEYWORDS:
lat : north geodetic latitude of location in degrees
lon : EAST longitude of location in degrees
(Specify west longitude with a negative sign.)
/WS : Set this to get the azimuth measured westward from south
(not East of North).
obsname : Set this to a valid observatory name to be used by the
astrolib OBSERVATORY procedure, which will return the latitude
and longitude to be used by this program.
/B1950 : Set this if your ra and dec are specified in B1950,
FK4 coordinates (instead of J2000, FK5)
precess_ : Set this to 1 to force precession [default], 0 for no
precession.
nutate_ : Set this to 1 to force nutation [default], 0 for no nutation.
aberration_ : Set this to 1 to force aberration correction [default],
0 for no correction.
refract_ : Set to 1 to force refraction correction [default], 0 for
no correction.
altitude: The altitude of the observing location, in meters. [default=0].
/verbose: Set this for verbose output. The default is verbose=0.
_extra: This is for setting TEMPERATURE or PRESSURE explicity, which are
used by CO_REFRACT to calculate the refraction effect of the
atmosphere. If you don't set these, the program will make an
intelligent guess as to what they are (taking into account your
altitude). See CO_REFRACT for more details.
OUTPUT VARIABLES
ra : Right Ascension of object (J2000) in degrees (FK5); scalar or
vector.
dec : Declination of object (J2000) in degrees (FK5), scalar or vector.
ha : hour angle (in degrees) (optional)
DEPENDENCIES:
NUTATE, PRECESS, ADSTRING(), SUNPOS, OBSERVATORY (from the astrolib)
CO_NUTATE, CO_ABERRATION, CO_REFRACT, HADEC2ALTAZ
BASIC STEPS
Precess Ra-Dec to current equinox.
Nutation Correction to Ra-Dec
Aberration correction to Ra-Dec
Calculate Local Mean Sidereal Time
Calculate Local Apparent Sidereal Time
Calculate Hour Angle
Do Spherical Trig to find Apparent Alt-Az
Apply refraction correction to find observed Alt.
CORRECTIONS I DO NOT MAKE:
* Deflection of Light by the sun due to GR. (typically milliarcseconds,
can be arseconds within one degree of the sun)
* The Effect of Annual Parallax (typically < 1 arcsecond)
* and more (see below)
TO DO
* Better Refraction Correction. Need to put in wavelength dependence,
and integrate through the atmosphere.
* Topocentric Parallax Correction (will take into account elevation of
the observatory)
* Proper Motion (but this will require crazy lookup tables or something).
* Difference between UTC and UT1 in determining LAST -- is this important?
* Effect of Annual Parallax (is this the same as topocentric Parallax?)
* Polar Motion
* Better connection to Julian Date Calculator.
CALLS: ***
ADSTRING, ALTAZ2HADEC, CO_ABERRATION, CO_NUTATE, CO_REFRACT, CT2LST, OBSERVATORY
PRECESS
EXAMPLE:
You are at Kitt Peak National Observatory, looking at a star at azimuth
angle 264d 55m 06s and elevation 37d 54m 41s (in the visible). Today is
Dec 25, 2041 and the local time is 10 PM precisely. What is the ra and dec
(J2000) of the star you're looking at? The temperature here is about 0
Celsius, and the pressure is 781 millibars. The Julian date for this
time is 2466879.7083333
IDL> hor2eq, ten(37,54,41), ten(264,55,06), 2466879.7083333d, ra, dec, $
/verb, obs='kpno', pres=781.0, temp=273.0
The program produces this output (because the VERBOSE keyword was set):
Latitude = +31 57 48.0 Longitude = *** 36 0.0 ; longitude prints weirdly b/c of negative input to ADSTRING!!
Julian Date = 2466879.708333
Az, El = 17 39 40.4 +37 54 41.0 (Observer Coords)
Az, El = 17 39 40.4 +37 53 39.6 (Apparent Coords)
LMST = +03 53 54.1
LAST = +03 53 53.6
Hour Angle = +03 38 30.1 (hh:mm:ss)
Ra, Dec: 00 15 23.5 +15 25 1.9 (Apparent Coords)
Ra, Dec: 00 15 24.2 +15 25 0.1 (J2041.9841)
Ra, Dec: 00 13 14.1 +15 11 0.3 (J2000)
The star is therefore Algenib! Compare the derived Ra, Dec with what XEPHEM
got:
Ra, Dec: 00 13 14.2 +15 11 1.0 (J2000)
AUTHOR:
Chris O'Dell
Univ. of Wisconsin-Madison
Observational Cosmology Laboratory
Email: odell@cmb.physics.wisc.edu
[Previous]
[Next]
NAME:
HOST_TO_IEEE
PURPOSE:
Translate an IDL variable from host to IEEE representation
EXPLANATION:
The variable is converted from the format used by the host architecture
into IEEE-754 representation (as used, for example, in FITS data ).
Duplicates most of the functionality of the SWAP_ENDIAN_INPLACE procedure
introduced in V5.6, with the addition of the IDLTYPE keyword.
CALLING SEQUENCE:
HOST_TO_IEEE, data, [ IDLTYPE = ]
INPUT-OUTPUT PARAMETERS:
data - any IDL variable, scalar or vector. It will be modified by
HOST_TO_IEEE to convert from host to IEEE representation. Byte
and string variables are returned by HOST_TO_IEEE unchanged
OPTIONAL KEYWORD INPUTS:
IDLTYPE - scalar integer (1-15) specifying the IDL datatype according
to the code given by the SIZE function. This keyword
will usually be used when supplying a byte array that needs
to be interpreted as another data type (e.g. FLOAT).
CALLS: ***
CONV_UNIX_VAX, CONV_VAX_UNIX, SINCE_VERSION [1], SINCE_VERSION [2]
CALLED BY:
CHECKSUM32, CH_WRITE_FITS, DBCLOSE [1], DBCLOSE [2], DBCLOSE [3], DBCREATE [1]
DBCREATE [2], DBCREATE [3], DBINDEX [1], DBINDEX [2], DBINDEX [3], DBWRT [1]
DBWRT [2], DBWRT [3], DB_ENT2EXT [1], DB_ENT2EXT [2], DB_ENT2EXT [3], FXBWRITE [1]
FXBWRITE [2], FXBWRITM, FXWRITE [1], FXWRITE [2], HSI_BUILD_MONITOR_PACKETS
HSI_FILL_FASTRATE_PACKET, HSI_MK_FASTRATE_PACKET, HSI_MK_PACKETHEADER
HSI_SIM_FILE, TAI2OBT, WRITE_MONTH_CAT, mxf_decomp_data
EXAMPLE:
Suppose FITARR is a 2880 element byte array to be converted to a FITS
record and interpreted a FLOAT data.
IDL> host_to_ieee, FITARR, IDLTYPE = 4
METHOD:
The BYTEORDER procedure is called with the appropriate keywords
MODIFICATION HISTORY:
Adapted from CONV_UNIX_VAX, W. Landsman Hughes/STX January, 1992
Version for IDL V5.0 August 1997
Converted to IDL V5.0 W. Landsman September 1997
Added new integer datatypes C. Markwardt/W. Landsman July 2000
Use /SWAP_IF_LITTLE_ENDIAN keyword for 64bit types W. Landsman Feb 2003
[Previous]
[Next]
NAME:
HOST_TO_IEEE
PURPOSE:
Translate an IDL variable from host to IEEE representation
EXPLANATION:
The variable is converted from the format used by the host architecture
into IEEE-754 representation ("big endian" as used, e.g., in FITS data ).
Duplicates most of the functionality of the SWAP_ENDIAN_INPLACE procedure
introduced in V5.6, with the addition of the IDLTYPE keyword.
CALLING SEQUENCE:
HOST_TO_IEEE, data, [ IDLTYPE = ]
INPUT-OUTPUT PARAMETERS:
data - any IDL variable, scalar or vector. It will be modified by
HOST_TO_IEEE to convert from host to IEEE representation. Byte
and string variables are returned by HOST_TO_IEEE unchanged
OPTIONAL KEYWORD INPUTS:
IDLTYPE - scalar integer (1-15) specifying the IDL datatype according
to the code given by the SIZE function. This keyword
will usually be used when supplying a byte array that needs
to be interpreted as another data type (e.g. FLOAT).
CALLS: ***
CONV_UNIX_VAX, CONV_VAX_UNIX, SINCE_VERSION [1], SINCE_VERSION [2]
CALLED BY:
CHECKSUM32, CH_WRITE_FITS, DBCLOSE [1], DBCLOSE [2], DBCLOSE [3], DBCREATE [1]
DBCREATE [2], DBCREATE [3], DBINDEX [1], DBINDEX [2], DBINDEX [3], DBWRT [1]
DBWRT [2], DBWRT [3], DB_ENT2EXT [1], DB_ENT2EXT [2], DB_ENT2EXT [3], FXBWRITE [1]
FXBWRITE [2], FXBWRITM, FXWRITE [1], FXWRITE [2], HSI_BUILD_MONITOR_PACKETS
HSI_FILL_FASTRATE_PACKET, HSI_MK_FASTRATE_PACKET, HSI_MK_PACKETHEADER
HSI_SIM_FILE, TAI2OBT, WRITE_MONTH_CAT, mxf_decomp_data
EXAMPLE:
Suppose FITARR is a 2880 element byte array to be converted to a FITS
record and interpreted a FLOAT data.
IDL> host_to_ieee, FITARR, IDLTYPE = 4
METHOD:
The BYTEORDER procedure is called with the appropriate keywords
MODIFICATION HISTORY:
Adapted from CONV_UNIX_VAX, W. Landsman Hughes/STX January, 1992
Version for IDL V5.0 August 1997
Converted to IDL V5.0 W. Landsman September 1997
Added new integer datatypes C. Markwardt/W. Landsman July 2000
Use /SWAP_IF_LITTLE_ENDIAN keyword for 64bit types W. Landsman Feb 2003
Do not use XDR keywords to BYTEORDER for much improved speed
W. Landsman April 2006
[Previous]
[Next]
NAME:
HPRECESS
PURPOSE:
Precess the astrometry in a FITS header to a new equinox
CALLING SEQUENCE:
HPRECESS, HDR, [ yearf ]
INPUT-OUTPUT:
HDR - FITS Header, must contain the CRVAL astrometry keywords,
and either an EPOCH or EQUINOX keyword.
HDR will be modified to contain the precessed astrometry
OPTIONAL INPUT:
YEARF - Scalar, giving the year of the new (Final) equinox.
If not supplied, user will be prompted for this value.
METHOD:
The CRVAL and CD (or CROTA) keywords are extracted from the header
and precessed to the new equinox. The EPOCH or EQUINOX keyword in
the header is updated. A HISTORY record is added
CALLS: ***
EXTAST, GETROT, GET_EQUINOX, GSSS_STDAST, PRECESS, PRECESS_CD, PUTAST, SXADDHIST [1]
SXADDHIST [2], SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], ZPARCHECK [1]
ZPARCHECK [2], ZPARCHECK [3]
CALLED BY:
HASTROM, IMDBASE
RESTRICTIONS:
The FK5 reference frame is assumed for both equinoxes.
PROCEDURES USED:
EXTAST, GET_EQUINOX(), SXADDPAR, SXADDHIST, PRECESS, PRECESS_CD
PUTAST, ZPARCHECK
REVISION HISTORY:
Written W. Landsman STX July, 1988
CD matrix precessed - February, 1989
Update EQUINOX keyword when CROTA2 present November, 1992
Recognize a GSSS header June, 1994
Additional Noparams value recognize for storing CDs. RSH, 6 Apr 95
Converted to IDL V5.0 W. Landsman September 1997
Understand reversed X,Y (X-Dec, Y-RA) axes, W. Landsman October 1998
Correct algorithm when CROTA2 is in header W. Landsman April 2006
[Previous]
[Next]
NAME:
HPRINT
PURPOSE:
Print a FITS header (or other string array) one line at a time
EXPLANATION:
The string array is printed 1 line at a time.
Needed because IDL will add an extra space to the 80 character
FITS lines on TTY terminals, causing a space to appear between lines.
CALLING SEQUENCE:
HPRINT, h, [ firstline ]
INPUTS:
H - FITS header (or any other string array).
OPTIONAL INPUT:
FIRSTLINE - scalar integer specifying the first line to begin
displaying. The default is FIRSTLINE = 1, i.e. display
all the lines. If Firstline is negative, then the first
line to be printed is counted backward from the last line.
NOTES:
HPRINT has the following differences from the intrinsic PRINT procedure
(1) Arrays are printed one line at a time to avoid a space between 80
character lines
(2) Lines are trimmed with STRTRIM before being printed to speed up
display
(3) The /more option is used for output.
CALLS: ***
FILEPATH, XDISPSTR
CALLED BY:
FITS_OPEN, PR_CAL_HDR
EXAMPLE:
Read the header from a FITS file named 'test.fits' and display it at the
terminal beginning with line 50
IDL> h = headfits( 'test.fits') ;Read FITS header
IDL> hprint, h, 50 ;Display starting at line 50
To print the last 25 lines of the header
IDL> hprint, h, -25
REVISION HISTORY:
Written W. Landsman July, 1990
Added test for user quit July, 1991
Added optional FIRSTLINE parameter November, 1992
Modified for when STDOUT is not a TTY W. Landsman September 1995
Converted to IDL V5.0 W. Landsman September 1997
Fixed printing in IDLDE, C. Gehman August, 1998
Skip PRINTF if IDL in demo mode W. Landsman October 2004
Fixed bug on non-terminals, William Thompson, 18-Oct-2004
[Previous]
[Next]
NAME:
HPRINT
PURPOSE:
Display a FITS header (or other string array)
EXPLANATION:
On a GUI terminal, the string array is displayed using XDISPSTR.
If printing at a non-GUI terminal, the string array is printed 1 line
at a time, to make sure that each element of the string array is
displayed on a separate line.
CALLING SEQUENCE:
HPRINT, h, [ firstline ]
INPUTS:
H - FITS header (or any other string array).
OPTIONAL INPUT:
FIRSTLINE - scalar integer specifying the first line to begin
displaying. The default is FIRSTLINE = 1, i.e. display
all the lines. If Firstline is negative, then the first
line to be printed is counted backward from the last line.
NOTES:
When displaying at the terminal, HPRINT has the following differences
from the intrinsic PRINT procedure
(1) Arrays are printed one line at a time to avoid a space between 80
character lines
(2) Lines are trimmed with STRTRIM before being printed to speed up
display
(3) The /more option is used for output.
CALLS: ***
FILEPATH, XDISPSTR
CALLED BY:
FITS_OPEN, PR_CAL_HDR
EXAMPLE:
Read the header from a FITS file named 'test.fits' and display it at the
terminal beginning with line 50
IDL> h = headfits( 'test.fits') ;Read FITS header
IDL> hprint, h, 50 ;Display starting at line 50
To print the last 25 lines of the header
IDL> hprint, h, -25
REVISION HISTORY:
Written W. Landsman July, 1990
Added test for user quit July, 1991
Added optional FIRSTLINE parameter November, 1992
Modified for when STDOUT is not a TTY W. Landsman September 1995
Converted to IDL V5.0 W. Landsman September 1997
Fixed printing in IDLDE, C. Gehman August, 1998
Skip PRINTF if IDL in demo mode W. Landsman October 2004
Fixed bug on non-terminals, William Thompson, 18-Oct-2004
Assume since V5.4 Use BREAK instead of GOTO W. Landsman Apr 2006
Call XDISPSTR on a GUI terminal W. Landsman Jun 2006
[Previous]
[Next]
NAME:
HREBIN
PURPOSE:
Expand or contract a FITS image using (F)REBIN and update the header
EXPLANATION:
If the output size is an exact multiple of the input size then REBIN is
used, else FREBIN is used. User can either overwrite the input array,
or write to new variables.
CALLING SEQUENCE:
HREBIN, oldhd ;Special calling sequence to just update header
HREBIN, oldim, oldhd, [ newim, newhd, newx, newy, OUTSIZE = ,/SAMPLE,
ERRMSG = ]
INPUTS:
OLDIM - the original image array
OLDHD - the original image FITS header, string array
OPTIONAL INPUTS:
NEWX - size of the new image in the X direction, integer scalar
NEWY - size of the new image in the Y direction, integer scalar
HREBIN will prompt for NEWX and NEWY if not supplied
OPTIONAL OUTPUTS:
NEWIM - the image after expansion or contraction with REBIN
NEWHD - header for newim containing updated astrometry info
If output parameters are not supplied, the program will modify
the input parameters OLDIM and OLDHD to contain the new array and
updated header.
OPTIONAL INPUT KEYWORDS:
/SAMPLE - Expansion or contraction is done using REBIN which uses
bilinear interpolation when magnifying and boxaveraging when
minifying. If the SAMPLE keyword is supplied and non-zero,
then nearest neighbor sampling is used in both cases. Keyword
has no effect when output size is not a multiple of input size.
OUTSIZE - Two element integer vector which can be used instead of the
NEWX and NEWY parameters to specify the output image dimensions
ALT - Single character 'A' through 'Z' or ' ' specifying which astrometry
system to modify in the FITS header. The default is to use the
primary astrometry of ALT = ' '. See Greisen and Calabretta (2002)
for information about alternate astrometry keywords.
OPTIONAL KEYWORD OUTPUT:
ERRMSG - If this keyword is supplied, then any error mesasges will be
returned to the user in this parameter rather than depending on
on the MESSAGE routine in IDL. If no errors are encountered
then a null string is returned.
PROCEDURE:
The parameters BSCALE, NAXIS1, NAXIS2, CRPIX1, and CRPIX2 and the CD
(or CDELT) parameters are updated for the new FITS header.
CALLS: ***
CHECK_FITS [1], CHECK_FITS [2], EXTAST, FREBIN, GSSS_STDAST, STRN [1], STRN [2]
STRN [3], SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], SXDELPAR [1], SXDELPAR [2]
SXDELPAR [3], SXPAR [1], SXPAR [2], SXPAR [3], ZPARCHECK [1], ZPARCHECK [2]
ZPARCHECK [3]
EXAMPLE:
Compress a 2048 x 2048 image array IM, with FITS header HDR, to a
724 x 724 array. Overwrite the input variables with the compressed
image and header.
IDL> hrebin, im, hdr, OUT = [724, 724]
PROCEDURES USED:
CHECK_FITS, EXTAST, FREBIN, GSSS_STDAST, STRN(), SXPAR(), SXADDHIST,
SXADDPAR, ZPARCHECK
MODIFICATION HISTORY:
Written, December 1990 W. Landsman, ST System Corp.
Update CD1_1 keywords W. Landsman November 1992
Check for a GSSS header W. Landsman June 1994
Update BSCALE even if no astrometry present W. Landsman May 1997
Converted to IDL V5.0 W. Landsman September 1997
Use FREBIN to accept sizes that are not a integer multiple of the original
size W. Landsman August 1998
Correct for "edge" effects when expanding with REBIN W. Landsman Apr. 1999
Fixed initialization of header only call broken in Apr 98 change May. 1999
Remove reference to obsolete !ERR W. Landsman February 2000
Use double precision formatting for CD matrix W. Landsman April 2000
Recognize PC00n00m astrometry format W. Landsman December 2001
Correct astrometry for integral contraction W. Landsman April 2002
Fix output astrometry for non-equal plate scales for PC matrix or
CROTA2 keyword, added ALT keyword. W. Landsman May 2005
[Previous]
[Next]
NAME:
HREVERSE
PURPOSE:
Reverse an image about either dimension and update FITS astrometry
EXPLANATION:
Reverse an image about either the X or Y axis, and create a new
header with updated astrometry for the reversed image.
CALLING SEQUENCE:
HREVERSE,oldim,oldhd, [ subs, /SILENT ] ;Update input image and header
or
HREVERSE, oldim, oldhd, newim, newhd, [ subs, /SILENT ]
INPUTS:
OLDIM - the original image array
OLDHD - the original image header
OPTIONAL INPUTS:
SUBS - Subs equals 1 to reverse the order of the X dimension,
2 to reverse Y order. If omitted, then HREVERSE will
prompt for this scalar parameter.
OPTIONAL OUTPUTS:
NEWIM - the rotated image, with the same dimensions as Oldim
NEWHD - header for newim containing updated astrometry info
If output parameters are not supplied, the program
will modify the input parameters OLDIM and OLDHD
to contain the rotated image and updated header.
CALLS: ***
CHECK_FITS [1], CHECK_FITS [2], EXTAST, REVERSE, STRN [1], STRN [2], STRN [3]
SXADDPAR [1], SXADDPAR [2], SXADDPAR [3]
OPTIONAL KEYWORD INPUT:
SILENT - if set and non-zero, then informative messages are suppressed.
OPTIONAL KEYWORD OUTPUT:
ERRMSG - If this keyword is supplied, then any error mesasges will be
returned to the user in this parameter rather than depending on
on the MESSAGE routine in IDL. If no errors are encountered
then a null string is returned.
SIDE EFFECTS:
A right-handed coordinate system is converted into a left-
handed one, and vice-versa.
PROCEDURE:
The User's Library procedure REVERSE is used to reverse the image.
The CD and CRPIX header parameters are updated for the new header.
For AIPS type astrometry, the CDELT parameters are also updated.
A history record is also added to the header
PROCEDURES USED:
CHECK_FITS, EXTAST, REVERSE(), STRN(), SXADDPAR
MODIFICATION HISTORY:
Written, Aug. 1986 W. Landsman, STI Corp.
Error modifying CROTA angles corrected 9-23-88
Added format keyword, J. Isensee, July, 1990
Work for ST Guide Star images, W. Landsman HSTX, May 1995
Compute CRPIX1 correctly for X reversal W. Landsman HSTX August 1995
Converted to IDL V5.0 W. Landsman September 1997
Added ERRMSG, Use double precision formatting, W. Landsman April 2000
Recognize PC00n00m astrometry matrix W. Landsman December 2001
[Previous]
[Next]
NAME:
HROT
PURPOSE:
Rotate an image and create new FITS header with updated astrometry.
EXPLANATION:
Cubic, bilinear or nearest neighbor interpolation can be used.
CALLING SEQUENCE:
HROT, oldim, oldhd, [ newim, newhd, angle, xc, yc, int,
MISSING =, INTERP =, CUBIC = , /PIVOT]
INPUTS:
OLDIM - the original image array
OLDHD - the original FITS image header, string array
OPTIONAL INPUTS:
NEWIM - If NEWIM is set to -1, then the old image and header will
be updated
ANGLE - Rotation angle, degrees clockwise, scalar
XC - X Center of rotation (-1 for center of image)
YC - Y Center of rotation (-1 for center of image)
INT - 0 for nearest neighbor, 1 for bilinear interpolation
2 for cubic interpolation.
OPTIONAL OUTPUTS:
NEWIM - the rotated image, with the same dimensions as Oldim
NEWHD - header for newim containing updated astrometry info
If output parameters are not supplied, the program
will modify the input parameters OLDIM and OLDHD
to contain the rotated image and updated header.
OPTIONAL INPUT KEYWORD:
MISSING - Set this keyword to a scalar value which will be assigned
to pixels in the output image which do not correspond to
existing input images (e.g if one rotates off-center).
If not supplied then linear extrapolation is used.
***NOTE: A bug was introduced into the POLY_2D function in IDL
V5.5 (fixed in V6.1) such that the MISSING keyword
may not work properly with floating point data***
INTERP - scalar set to either 0 (nearest neighbor interpolation),
1 (bilinear interpolation), or 2 (cubic interpolation).
The interpolation type can be specified by either the INTERP
keyword or the int parameter
CUBIC - If set and non-zero then cubic interpolation is used (see ROT),
which is equivalent to setting INT = 2. In IDL V5.0 and later,
this keyword can also be set to a value between -1 and 0.
/PIVOT - Setting this keyword causes the image to pivot around the point
XC, YC, so that this point maps into the same point in the
output image. If this keyword is set to 0 or omitted, then the
point XC, YC in the input image is mapped into the center of
the output image.
OPTIONAL OUTPUT KEYWORD:
ERRMSG - If this keyword is supplied, then any error mesasges will be
returned to the user in this parameter rather than depending on
on the MESSAGE routine in IDL. If no errors are encountered
then a null string is returned.
EXAMPLE:
Rotate an image non-interactively 30 degrees clockwise. Use
bilinear interpolation, and set missing values to 0.
IDL> HROT, im_old, h_old, im_new, h_new, 30, -1, -1, 1, MIS = 0
As above but update the input image and header and pivot about (100,120)
IDL> HROT, im_old, h_old, -1, -1, 30, 100, 120, 1, MIS = 0, /PIVOT
CALLS: ***
CHECK_FITS [1], CHECK_FITS [2], EXTAST, GETOPT, GSSS_STDAST, ROT, STRN [1], STRN [2]
STRN [3], SXADDPAR [1], SXADDPAR [2], SXADDPAR [3]
RESTRICTIONS:
Unlike the ROT procedure, HROT cannot be used to magnify or
or demagnify an image. Use HCONGRID or HREBIN instead.
PROCEDURE:
The image array is rotated using the ROT procedure.
The CD (or CROTA) and CRPIX parameters, if present in the FITS header,
are updated for the new rotation.
History records are also added to the header
PROCEDURES USED:
CHECK_FITS, EXTAST, GETOPT(), GETROT, ROT(), STRN(), SXADDPAR
MODIFICATION HISTORY:
Written, Aug. 1986 W. Landsman, ST Systems Corp.
Added MISSING keyword, W. Landsman March, 1991
Added cubic interpolation, use astrometry structure Feb 1994
Removed call to SINCE_VERSION() W. Landsman March 1996
Assume at least V3.5, add CUBIC parameter W. Landsman March 1997
Converted to IDL V5.0 W. Landsman September 1997
Fix for CROTA2 defined and CDELT1 NE CDELT2, W. Landsman November 1998
Fix documentation to specify clockwise rotation W. Landsman Dec. 1999
Added /PIVOT keyword W. Landsman January 2000
Added ERRMSG, Use double precision formatting, W. Landsman April 2000
Consistent conversion between CROTA and CD matrix W. Landsman Oct 2000
Work for both CD001001 and CDELT defined W. Landsman March 2001
Recognize PC matrix astrometry W. Landsman December 2001
Update astrometry correctly when /PIVOT applied W. Landsman March 2002
Update CROTA2 astrometry correctly, approximate GSSS W.L. June 2003
Work with CD1_1, PC1_1 and CROTA keywords W. L. July 2003
Work with angle as a 1 element vector W.L. May 2006
[Previous]
[Next]
NAME:
HROTATE
PURPOSE:
Apply the IDL ROTATE function and update astrometry in a FITS header
EXPLANATION:
Apply the intrinsic IDL ROTATE function to an image and update
astrometry in the associated FITS header.
CALLING SEQUENCE:
HROTATE, oldim, oldhd, newim, newhd, direction
or
HROTATE, oldim, oldhd, direction
INPUTS:
OLDIM - the original image array
OLDHD - the original FITS image header, string array
DIRECTION - Scalar integer (0-7) specifying rotation direction,
exactly as specified by the IDL ROTATE function.
Direction Transpose? Rot. CCW X1 Y1
----------------------------------------
0 No None X0 Y0 (no change)
1 No 90 -Y0 X0
2 No 180 -X0 -Y0
3 No 270 Y0 -X0
4 Yes None Y0 X0
5 Yes 90 -X0 Y0
6 Yes 180 -Y0 -X0
7 Yes 270 X0 -Y0
OPTIONAL OUTPUTS:
NEWIM - the rotated image, with the same dimensions as Oldim
NEWHD - header for newim containing updated astrometry info
If output parameters are not supplied, the program
will modify the input parameters OLDIM and OLDHD
to contain the rotated image and updated header.
OPTIONAL KEYWORD OUTPUT:
ERRMSG - If this keyword is supplied, then any error mesasges will be
returned to the user in this parameter rather than depending on
on the MESSAGE routine in IDL. If no errors are encountered
then a null string is returned.
CALLED BY:
WFPC2_READ
EXAMPLE:
Rotate an image exactly 90 degrees counterclockwise and update the
FITS image array and header.
IDL> HROT, im, h, im_new, h_new, 1
PROCEDURE:
The image array is rotated using the ROTATE function.
The CD (or CROTA) and CRPIX parameters, if present in the FITS header,
are updated for the new rotation.
History records are also added to the header
CALLS: ***
CHECK_FITS [1], CHECK_FITS [2], EXTAST, GSSS_STDAST, SXADDHIST [1], SXADDHIST [2]
SXADDPAR [1], SXADDPAR [2], SXADDPAR [3]
RESTRICTIONS:
Does not work Guide Star Survey (GSS) astrometry. Use GSSS_STDAST to
first convert
PROCEDURES USED:
CHECK_FITS(), SXADDPAR, EXTAST
MODIFICATION HISTORY:
Written, Mar 1997 W. Landsman, Hughes STX
Work for non-square images W. Landsman June 1998 Raytheon STX
Converted to IDL V5.0 W. Landsman June 1998
Fix for different plate scales, and CROTA2 defined, November 1998
Added ERRMSG, Use double precision formatting, W. Landsman April 2000
Consistent conversion between CROTA and CD matrix W. Landsman Oct 2000
Correct update when CROTA keyword present W. Landsman June 2003
Update CDELT for AIPS-style astrometry headers M. Perrin/WL Jul 2003
Convert GSS astrometry to WCS W. Landsman November 2004
[Previous]
[Next]
Project : HESSI
Name : hsi_gbo
Purpose : update Max Millennium catalog with RHESSI flare catalog info
Category : synoptic gbo hessi
Syntax : IDL> hsi_gbo
Inputs : TSTART,TEND = time range to process
Keywords : REPROCESS = reprocess existing entries
BACK = # of days back to process
VERBOSE = set verbose output
CALLS: ***
ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], ARR2STR [1], Arr2Str [2], DEF_GBO
GBO_TIME, IS_BLANK, IS_STRING, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], OS_FAMILY
PURGE_GBO, RD_GEV, RESTORE_GBO, STR_FORMAT, TEST_OPEN, TIME2FID, TRIM2, UPDATE_GBO
VALID_TIME, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], gt_day [1]
gt_day [2], gt_time [1], gt_time [2], hsi_read_flarelist, is_number [1]
is_number [2], is_struct
Restrictions: Unix only
History : Written 28 July 2002, D. Zarro (LAC/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Name: hsi_get_debug
Project: HESSI
Purpose: Return the current debug level from SSW_FRAMEWORK_DEBUG or
from the DEBUG env. var
Calling sequence: debug = get_debug()
Written: Kim Tolbert 23-Oct-2002
Modifications:
2003-11-29 changed from hsi_get_debug to get_debug and adds
a test for the debug env. var (used by dmz)
CALLS:
CALLED BY
FITS CLASS DEFINITION, FRAMEWORK ABSTRACT CLASS DEFINITION
HESSI CALIBRATED EVENTLIST CLASS DEFINITION [3]
HESSI EVENTLIST CLASS DEFINITION, HESSI PACKET FILE ABSTRACT CLASS
HESSI ROLL_DB CLASS DEFINITION, hsi_aspect [1], hsi_aspect [2]
hsi_count_rebin, hsi_sas_rdlimb
[Previous]
[Next]
PROJECT:
HESSI
NAME:
HSI_tplot2any
PURPOSE:
This function returns the time in a any format available
using ANYTIM from the tplot time values. What it does is
basically moves the refeence time from 1/1/1970 to 1/1/1979
CATEGORY:
HESSI
CALLING SEQUENCE:
any_time = tplot2ANY( tplot_time )
INPUTS:
tplot_time: time referenced to 1/1/70
OUTPUTS:
any_time: The default is to return the time in seconds,
but all output formats available to ANYTIM are available.
OPTIONAL KEYWORD INPUTS:
All keywords available through ANYTIM using keyword inheritance:
out_style - Output representation, specified by a string:
INTS - structure with [msod, ds79]
STC - same as INTS
2XN - longword array [msod,ds79] X N
EX - 7 element external representation (hh,mm,ss,msec,dd,mm,yy)
UTIME - Utime format, Real*8 seconds since 1-jan-79, DEFAULT!!!!
SEC - same as Utime format
SECONDS - same as Utime format
TAI - standard seconds from 1-jan-1958. Includes leap seconds unlike "SECONDS" output.
NB- The TAI format cannot be used as an input to ANYTIM because it will be interpreted as
number of days (in seconds) from 1-jan-1979.
ATIME - Variable Atime format, Yohkoh
Yohkoh style - 'dd-mon-yy hh:mm:ss.xxx' or
HXRBS pub style - 'yy/mm/dd, hh:mm:ss.xxx'
depending on atime_format set by
hxrbs_format or yohkoh_format
YOHKOH - yohkoh style string
HXRBS - HXRBS Atime format /pub, 'yy/mm/dd, hh:mm:ss.xxx'
YY/MM/DD- same as HXRBS
MJD - UTC-type structure
= The UTC date/time as a data structure with the
elements:
MJD = The Modified Julian Day number
TIME = The time of day, in milliseconds
since the start of the day.
Both are long integers.
UTC_INT - Same as MJD
UTC_EXT - UTC external format, a structure
containing the elements, YEAR, MONTH, DAY, HOUR, MINUTE,
SECOND, and MILLISECOND as shortword integers.
CCSDS - A string variable containing the calendar date in the
format recommended by the Consultative Committee for
Space Data Systems (ISO 8601), e.g.
"1988-01-18T17:20:43.123Z"
ECS - A variation on the CCSDS format used by the EOF Core
System. The "T" and "Z" separators are eliminated, and
slashes are used instead of dashes in the date, e.g.
"1988/01/18 17:20:43.123"
VMS - Similar to that used by the VMS operating system, this
format uses a three-character abbreviation for the
month, and rearranges the day and the year, e.g.
"18-JAN-1988 17:20:43.123"
STIME - Based on !STIME in IDL, this format is the same as the
second accuracy, e.g.
VMS format, except that the time is only given to 0.01
second accuracy, e.g.
"18-JAN-1988 17:20:43.12"
or by keywords
/ints -
/stc
/_2xn
/external
/utime
/seconds
/atimes
/yohkoh
/hxrbs
/yymmdd
/mjd
/utc_int
/utc_ext
/ccsds
/ecs
/vms
/stime
/TAI
mdy - If set, use the MM/DD/YY order for converting the string date
date_only - return only the calendar date portion,
e.g. anytim('93/6/1, 20:00:00',/date_only,/hxrbs) ==> '93/06/01'
time_only - return only the time of day portion
e.g. anytim('93/6/1, 20:00:00',/time_only,/hxrbs) ==> '20:00:00.000'
truncate - truncate the msec portion of the time displayed in strings.
CALLS: ***
HAVE_TAG, TPLOT2ANY, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
is_struct
MODIFICATION HISTORY:
Version 1, csillag@ssl.berkeley.edu, march 2003
[Previous]
[Next]
Name: html_basics
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], concat_dir [4]
data_chk [1], data_chk [2], file_append [1], file_append [2], file_exist [1]
file_exist [3], get_logenv [1], get_logenv [2], get_user [1], get_user [2]
rd_tfile [1], rd_tfile [2], str_replace [1], str_replace [2], ut_time [1]
ut_time [2]
CALLED BY:
timeline, web_seq
NOTE: see html_doc.pro , slightly different but ~supported evolutionary branch
Purpose: Return standard header/trailer html
Input Paramters:
filename (optional) - appends the text to this file
Keyword Paramters:
header - if set, return header html
trailer - if set, return trailer html
credits - if set, include credits in trailer
noimg - if set, leave off logo
simple - if set, then just make the basic header and trailer
History:
Written ?? by S.Freeland
24-Oct-96 (MDM) - Renamed from "sxt_html" to "html_basics"
6-Jan-99 (MDM) - Added /SIMPLE option
[Previous]
[Next]
Project : HESSI
Name : HTML_DECHUNK
Purpose : remove chunked encoding from HTML output
Category : http utility
Inputs : INPUT - HTML string array
Outputs : OUTPUT - HTML array with chunked lines rejoined
CALLS: ***
IS_BLANK
CALLED BY:
HTTP__DEFINE
History : 15-April-2005, D.M. Zarro (L-3Com/GSFC). Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Name: html_doc
Purpose: handle standard header and trailer html documents (templates)
Input Paramters:
filename (optional) - appends the text to this file
Keyword Paramters:
template - if set, name of template file (default from $path_http/...)
header - if set, return header html
trailer - if set, return trailer html
credits - if set, include SXT credits in trailer
outarr - (output) - returns contents of template file
base_url - if specified, add a BASE URL tag
(relative tags will default to this parent)
notemplate - dont use the default $path_http/template even if it exists
CALLS: ***
BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
concat_dir [4], data_chk [1], data_chk [2], file_append [1], file_append [2]
file_exist [1], file_exist [3], get_host [1], get_host [2], get_logenv [1]
get_logenv [2], get_user [1], get_user [2], rd_tfile [1], rd_tfile [2]
str_replace [1], str_replace [2], strarrinsert, ut_time [1], ut_time [2]
CALLED BY:
eit_proton_summary, go_sxt_sss2secondary, html_remove_template
mk_lasteit_movie, special_movie, ssw_findstuff2html, ssw_install [1]
ssw_install [2], ssw_track_demo, sswdb_info, sswdb_install, sxt_ssn2fits [1]
trace_cosmic2hist_accum, trace_get1www_image, trace_last_movie [1]
trace_last_movie [2], trace_last_movie [3], trace_movie_index [1]
trace_movie_index [2], trace_request_summary, trace_special_movie [1]
trace_special_movie [2], trace_special_movie [3], trace_special_movie2
trace_submit_request, trace_success_file
Note:
If template file not supplied, defaults are:
$path_http/header_template.html /header
$path_http/trailer_template.html /trailer
$path_http/trailer_wcredit_template.html /credits
Calling Example:
IDL> htmlfile='$path_http/xxx.html' ; doc name
IDL> html_doc, htmlfile , /header ; start doc w/header info
IDL> file_append,htmlfile , HTML ; build your html doc
(etc, etc)
IDL> htmldoc, htmlfile, /trailer ; finish documnent
History:
4-Jan-1997 - Sam Freeland (Generic version of 'sxt_html.pro')
14-apr-1998 - S.L.Freeland (supply basal,inline html if no template $
file exists)
9-Sep-1999 - S.L.Freeland - add BASE_URL keyword and function
[Previous]
[Next]
Name: html_form_addtime
Purpose: add times to an html form (template)
Input Parameters:
template - input text (html excluding time menus)
start_sel - default start time to use
stop_sel - default stop time to use
Keyword Parameters:
timerange - time range for menus
outfile - if set, output .html document (default is <template>.html
replace - string to replace with time menus (in template)
default is <!** time_range **>
Calling Sequence:
html_form_addtime, template, start_sel [,stop_sel], timerange=timerange
CALLS:
[Previous]
[Next]
Name: html_get_files
Purpose: get relative files referenced by an html doc (recursive)
Input Parameters:
htmlparent - the top level .html document
Output Parameters
filelist - the relative filelist referenced by this htmldoc
Keyword Parameters:
tarfile - if set, write a tarfile (supply name or use as switch)
loud - if set, more verbose
ppath (output) - the parent path implied for htmldoc and filelist
striptemplate, rewrite, original - strip html header/trailer from
parent html (often site specific)
Motivation:
Simplify relocation of an html doc and its local files
Calls: ***
ARR2STR [1], Arr2Str [2], BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2]
BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DELVARX [1]
DELVARX [2], DELVARX [3], DELVARX [4], FILE_EXIST [2], IS_DIR, break_file [4]
concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2], delvarx [5]
file_exist [1], file_exist [3], html_remove_template, rd_tfile [1], rd_tfile [2]
rem_elem [1], rem_elem [2], str_replace [1], str_replace [2], strextract
strfind_urls, strmids [1], strmids [2], uniqo [1], uniqo [2], wc_where [1]
wc_where [2]
History:
15-November-2000 - S.L.Freeland - written
16-November-2000 - S.L.Freeland - protect against endless recursion
(list of processed *.html files)
Restrictions:
only gets those things (gif/mpeg/html...) which are
RELATVIE to input htmldoc (does not follow aboslute URLS...)
Side Effects:
may write a tar file
[Previous]
[Next]
Name: html_highlight
Purpose: highlight some user specified html (usually tables)
Input Parameters:
strarray - 1d or 2d (table) string array
row_number - subscripts of rows to highlight (default=all)
column_number - subcripts of columns to highlight (default=all)
Keyword Parameters:
color - html color command (mnemonic like 'red', 'blue' or #RRGGBB)
(can also set color by keyword inheritance, /red,/blue, etc)
rsize - relative font size
emphasize - use <em>xxx</em>
/XXX - keyword inheritance - assumed COLOR (/yellow, /blue, /green..)
Calling Sequence:
highlighted=html_highlight(strarray [,row,col], $
color='color', rsize=nn [,/emphasize]
Calling Example:
Use in conjunction with 'str2cols' and 'strtab2html' and
file_append to include html tables with accented information.
IDL> table=str2cols(string_array) ; column justified 1D->2D table
IDL> hightab=html_highlight(table, -1, 4, color='red',rsize=2)
IDL> htmltab=strtab2html(hightab) ; convert ascii 2D strarry
; to an html table
CALLS: ***
BOX_MESSAGE, data_chk [1], data_chk [2], positive [1], positive [2]
CALLED BY:
sswdb_info
History:
12-June-1998 - S.L.Freeland - break out an a useful function
[Previous]
[Next]
Name: html_linklist
Purpose: make a series of htmlfiles a 'linked list'
Input Parameters:
htmlfiles - list of html files
giffiles (optional) - list of gifs for inline menu
Keyword Parameters:
absolute - use absolute URL links (default is relative)
(requires $path_http and $top_http defined)
relative - all linked files assumed relative (default)
insert - INSERT the linked list html after this string pattern
(required on initial run - subsequent updates use
inserted markers (see strarrinsert for generic routine)
Calling Sequence:
html_linklist, htmlfiles [,gifs, head='headfile', tail='tailfile']
Restrictions:
GIF stuff not yet implemented directly
(see mkthumb.pro and str2html.pro for ~solution)
History:
12-Jun-1997 - S.L.Freeland (extract code from fl_queue and simplify
(via call to <strarrinsert.pro> )
TODO:
generate HTML linked docs if not supplied directly from a GIFLIST
(ie, series of images -> linked HTML list w/inline GIFS)
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], FILE_EXIST [2], break_file [4]
data_chk [1], data_chk [2], file_append [1], file_append [2], file_exist [1]
file_exist [3], http_names, prstr [1], prstr [2], rd_tfile [1], rd_tfile [2]
str2html [1], str2html [2], str2html [3], strarrinsert, strtab2html
Side Effects:
every file in <htmlfiles> list is updated - inserted HTML includes
markers (comments) forward and backward links - optionally <tail>
and <head> links if supplied. Uses HTML V3 table via <strarr2html.pro>
[Previous]
[Next]
Name: html_remove_template
Purpose: remote html header and trailer templates (site specific)
Input Paramters:
htmldoc - the html file to look at
Output Parameters:
strippeddoc - the html text less header/trailer
Keyword Parameters:
rewrite - if set, name rewrite the file
if string, new name
if switch, old name *.html -> *_v2.html
original - if set, rewrite with original name (replace) - WWW masters only
newname (output) - html file name used for rewrite
CALLS: ***
BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
concat_dir [4], data_chk [1], data_chk [2], file_append [1], file_append [2]
file_exist [1], file_exist [3], html_doc, last_nelem, rd_tfile [1], rd_tfile [2]
str_replace [1], str_replace [2]
CALLED BY:
html_get_files
Restrictions:
not for casual use...
assumes header & trailer template html files in $path_http
[Previous]
[Next]
Project : HESSI
Name : HTML_TAGS
Purpose : include file for useful HTML tags
Category : HTML
Syntax : IDL>@html_tags
Inputs : None
Outputs : None
Keywords : None
History : 11-Aug-1999, D.M. Zarro. Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : HTTP__DEFINE
Purpose : Define a HTTP class
Explanation : defines a HTTP class to open URL's and download (GET)
files. Example:
a=obj_new('http') ; create a HTTP object
a->open,'orpheus.nascom.nasa.gov' ; open a URL socket
a->head,'~zarro/dmz.html' ; view file info
a->list,'~zarro/dmz.html' ; list text file from server
a->copy,'~zarro/dmz.html' ; copy file
a->close ; close socket
If using a proxy server, then set environmental
http_proxy, e.g:
setenv,'http_proxy=orpheus.nascom.nasa.gov:8080'
or
a->hset,'http_proxy='orpheus.nascom.nasa.gov:8080'
Category : objects sockets
Syntax : IDL> a=obj_new('http')
CALLS: ***
ADD_METHOD, ALLOW_SOCKETS, ANYTIM2UTC [1], ANYTIM2UTC [2], APPEND_ARR
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHKLOG [1], CHKLOG [2], CHMOD
CLOSE_LUN, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DELVARX [1]
DELVARX [2], DELVARX [3], DELVARX [4], DPRINT, EXIST, HAVE_TAG, HTML_DECHUNK
HTTP::CHECK_HEADER, HTTP::CLEANUP, HTTP::CLEAR, HTTP::CLOSE, HTTP::COPY
HTTP::EXTRACT_HREF, HTTP::FILE_CONTENT, HTTP::FILE_FOUND, HTTP::GET_URL_TYPE
HTTP::HEAD, HTTP::HELP, HTTP::HGET, HTTP::HSET, HTTP::INIT, HTTP::IS_OPEN
HTTP::IS_SOCKET_OPEN, HTTP::IS_URL, HTTP::LAST_URL, HTTP::LINKS, HTTP::LIST
HTTP::MAKE, HTTP::OPEN, HTTP::PARSE_HREF, HTTP::PARSE_URL, HTTP::POST, HTTP::READF
HTTP::REQUEST, HTTP::SAME_SIZE, HTTP::SEND, HTTP::STRIP, HTTP::USE_PROXY
HTTP::VALID_SERVER, IS_BLANK, IS_STRING, LOCAL_NAME, PARSE_TIME, RDWRT_BUFF
RD_ASCII_BUFF, STR2ARR [1], STR2ARR [2], STR_FORMAT, STR_MATCH, TRIM, TRIM2, WRITE_DIR
XANSWER, break_file [4], concat_dir [4], curdir [1], curdir [2], delvarx [5]
file_size [1], file_size [2], is_number [1], is_number [2], is_struct
str_replace [1], str_replace [2], strarrcompress, url_encode
History : Written, 6 June 2001, D. Zarro (EITI/GSFC)
Modified, 31 December 2002, Zarro (EER/GSFC) - made PORT
a property
Modified, 5 January 2003, Zarro (EER/GSFC) - improved
proxy support
13-Jan-2002, Zarro (EER/GSFC) - added cache support
and /reset
26-Jan-2003, Zarro (EER/GSFC) - added URL path check
4-May-2003, Zarro (EER/GSFC) - added POST support & switched
default to HTTP/1.1
20-Sep-2003, Zarro (GSI/GSFC) - added RANGE and CACHE-CONTROL directives
30-Sep-2003, Zarro (GSI/GSFC) - added READ_TIMEOUT property to control
proxy timeouts
28-Jun-2004, Kim Tolbert - set self.unit=0 after closing to avoid conflicts
15-Apr-2005, Zarro (L-3Com/GSFC) - added call to HTML_DECHUNK
20-Apr-2005, Zarro (L-3Com/GSFC) - allowed PORT to be set from URL
11-Sep-2005, Zarro (L-3Com/GSFC) - added COPY_FILE keyword to ::COPY
10-Nov-2005, Hourcle (L-3Com/GSFC) - added support for adding headers
11-Nov-2005, Zarro (L-3Com/GSFC) - changed from using pointer
to keyword for extra header
1-Dec-2005, Zarro (L-3Com/GSFC) - minor bug fixes with
closing and validating servers
16-Dec-2005, Zarro (L-3Com/GSFC) - fixed case where
socket was not closing after a request
26-Dec-2005, Zarro (L-3Com/GSFC) - added more
diagnostic output to /VERBOSE
16-Nov-2006, Zarro (ADNET/GSFC) - sped up copy
by not checking remote file size twice.
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Name: http_names
Purpose: convert filename to WWW link
Input Parameters:
names - filename or wwwlink name
Keyword Paramters:
file2link - input filename changed to WWW link
link2file - input WWW link changed to file name
relative - if set, URLs are relative, not absolute
Calling Sequence:
pathname=http_names(linkname [/link2file] )
linkname=http_names(pathname [/file2link] )
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], break_file [4], data_chk [1]
data_chk [2], get_logenv [1], get_logenv [2], str_replace [1], str_replace [2]
CALLED BY:
html_linklist, image2movie, mk_lasteit_movie, soon_catstat, special_movie
sswdb_install, trace_get1www_image, trace_request_summary
trace_special_movie [2], trace_special_movie [3]
Restrictions:
environmentals 'path_http' and 'top_http' are defined
History:
18-Jun-1996 S.L.Freeland
[Previous]
[Next]
Project : HESSI
Name : HXRS__DEFINE
Purpose : Define a HXRS data object
Category : Ancillary GBO Synoptic Objects
Syntax : IDL> c=obj_new('hxrs')
CALLS: ***
ADD_PATH [1], ADD_PATH [2], DPRINT, FILE_BREAK, FIND_COMPRESSED, GET_UTC, HAVE_PROC
HXRS::CLEANUP, HXRS::GET_SDIR, HXRS::INIT, HXRS::READ, HXRS::SET_FORMAT
HXRS::SYNOP, IDL_RELEASE, IS_COMPRESSED, IS_DIR, IS_STRING, MRD_HEAD, OS_FAMILY
READ_HXRS_4_SPEX [1], READ_HXRS_4_SPEX [2], READ_HXRS_4_SPEX [3], STR_FORMAT
TRIM, VALID_FITS, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
History : Written 17 Jul 2001, D. Zarro (EITI/GSFC)
Contact : dzarro@solar.stanford.edu