[Previous]
[Next]
Project : VSO
Name : WALK_DOM*
Purpose : Print the contents of an XML DOM structure
Explanation : Prints the contents of an XML DOM structure, for use in
debugging XML structures.
Category : Utility, Class3
Syntax : IDL> walk_dom, domObject
CALLS: ***
is_number [1], is_number [2]
History : Ver 1, 08-Nov-2005, J A Hourcle. Released
Derived from IDL's documentation, with some extra error checking
Contact : oneiros@grace.nascom.nasa.gov
Inputs : oNode - the DOM Node(s) (or NodeList(s)) to walk
: indent - (assumed 0), number of columns to indent the report
Outputs : None
[Previous]
[Next]
Project : SOHO - CDS
Name : WAS_CALLED
Purpose : check if procedure has been called in a heirarchy of calls
Category : utility
Explanation : Useful to know if a procedure has been called somewhere
along the line before current application is reached.
Syntax : IDL> status=was_called(name)
CALLED BY:
RECOMPILE
Examples :
Inputs : NAME = string procedure name to check
Opt. Inputs : None.
Outputs : status = 1 if procedure was called
Opt. Outputs: None.
Keywords : None
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DATATYPE [1], DATATYPE [2]
DATATYPE [3], TRIM, break_file [4]
Common : None.
Restrictions: None.
Side effects: None.
History : Version 1, 17-May-1997, D M Zarro. Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Name: wc_where
Purpose: return subscripts of input array where a pattern match is
found - allows use of multiple wild card characters (*)
Input Paramters:
inarray - string array to search
inpattern - string (scaler) to match - may include wild cards (*)
Output:
function returns subscripts of inarray where match found (-1 if none)
mcount - number of matches found
Calling Examples:
ss=wc_where(files_arr,'*9201*',mcount)
ss=wc_where(files_arr,'sfr*1230*')
ss=wc_where(routine_arr,'*time*.pro',mcount)
CALLS: ***
STR2ARR [1], STR2ARR [2], STR_LASTPOS [1], str_lastpos [2], strrempat [1]
strrempat [2], wc_whereq [1], wc_whereq [2]
CALLED BY:
FLARE_F_NAME, FLARE_XRAY_MODEL, GE_WINDOW [1], HESSI_MODEL_COUNTS
NEW_FIG4_INPUTS, PLOT_GD, PLOT_MAP, SPECTRA2FITS, SPEX_DATA_GENX [1]
SPEX_DATA_GENX [2], STRUCTURE MANAGER CLASS, add_kw2hdr, cdrom_files [2]
check_log [1], check_log [2], ctraj2orbit, disp_sci5k, doc_head [1], doc_head [2]
doc_head [3], eit_files, file_list [1], file_list [2], find_fits_ext
fl_suntoday [1], fl_suntoday [2], fl_suntoday [3], get_history, get_hk_mnem
get_ksc_holiday, get_logenv [1], get_logenv [2], gt_tagval [1], gt_tagval [2]
help_prefix, html_get_files, lastgbo, mk_pix [1], mk_pix [2], mk_spd, mon_sci5k
msok_copy_jpg, msok_poi_copy [1], msok_poi_copy [2], new_disp_sci5k [1]
new_disp_sci5k [2], nobeyama_update, oneline_event [1], oneline_event [2]
password_info, path_sw [1], path_sw [2], path_ucon, pathfix, plotman, printx [1]
printx [2], rd_orbit_event, rd_tr_seq_head, rd_week_file [1], rd_week_file [2]
rd_week_file [3], rd_week_file [4], redo_disploi, redo_mon_sci5k, reg_check
reltime [1], reltime [2], save_idl_routines, search [1], search [2], show_pix [1]
show_pix [2], show_pix_event [1], show_pix_event [2], show_pix_event [3]
ssw_install [1], ssw_install [2], ssw_packages, ssw_path, ssw_strfind
ssw_swmap_info, sswloc, str2html [1], str2html [2], str2html [3], str_tagval [1]
str_tagval [2], strwhere, sun_today [1], sun_today [2], sun_today [3], sxt2file
sxt_etemp, tbb_info [1], tbb_info [2], timeline, topsdb [1], topsdb [2], tr_lut_conv
ucon_path, uvf_interval, wc_where_arr, web_seq, weekid [2], xread_hist
xset_chain [1], xset_chain [2], xso_butevents [1], xso_butevents [2], xsw2tree
xsw2tree_event, xswlist [2], ydb_exist [2]
History:
slf, 8-Jan-1993
slf,13-Jan-1993 - patched last segment logic
slf,15-Jan-1993 - added case_ignore keyword
slf,12-apr-1993 - dont clobber pattern via case_ignore
slf,17-feb-1994 - fix bug in last segment logic
slf,30-jun-1994 - call wc_whereq if pattern has embedded "?" character
acs,23-jul-2004 - checks for idl version tu use strmatch if avail
[Previous]
[Next]
Name: wc_where_arr
Purpose: return subscripts of input array where a pattern match is
found - allows use of multiple wild card characters (*),
works for pattern arrays
this is an extension of wc_where
Input Paramters:
inarray - string array to search
inpattern_array - string (scalar or array) to match - may include wild cards (*)
Output:
function returns subscripts of inarray where match(es) found (-1 if none)
mcount - number of matches found
Calling Examples:
IDL> stringarr = ['hello', 'guys', 'how', 'are', 'you', 'doing', 'today', '?']
IDL> print, wc_where( stringarr, 'how' )
2
IDL> print, wc_where( stringarr, ['how', 'today'] )
2
IDL> print, wc_where_arr( stringarr, ['how', 'today'], count )
2 6
IDL> print, count
2
IDL> print, wc_where_arr( stringarr, ['how', 'today'], /notequal )
0 1 3 4 5 7
IDL> print, wc_where_arr( stringarr, ['how', 'TODAY'] )
2
IDL> print, wc_where_arr( stringarr, ['how', 'TODAY'], /CASE_IGNORE )
2 6
CALLS: ***
APPEND_ARR, get_uniq, wc_where [1], wc_where [2], where_arr [1], where_arr [2]
CALLED BY:
str_subset
History:
acs 1999-dec extension of slf's wc_where, which gets called for each pattern
[Previous]
[Next]
Name: wc_whereq
Purpose: find strarry elements matching pattern w/imbeded question marks
CALLED BY:
wc_where [1], wc_where [2]
History:
30-jun-1995 (SLF)
[Previous]
[Next]
Project : SDAC
Name : WCHECK_SET
Purpose :
Checks whether a window has been created (window_in variable exists)
and if so, sets the active window to that index.
Category : GRAPHICS
Explanation :
Checks whether a window has been created (window_in variable exists)
and if so, sets the active window to that index. If not, creates a window
with an unused index and returns that index in window_in.
Use : wcheck_set, window_in, title=title, retain=retain, $
xpos=xpos, ypos=ypos, xsize=xsize, ysize=ysize
CALLED BY:
HXRBS
Examples :
wcheck_set, goes_window, title='GOES Plot', retain=2
Inputs : Window_in - window index to check.
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords :
These keywords have the same meaning as in the WINDOW procedure
title
retain
xpos
ypos
xsize
ysize
Calls : ***
CHECKVAR [1], WINUP [5], checkvar [2], winup [1], winup [2], winup [3], winup [4]
Common : None
Restrictions:
Side effects: None.
Prev. Hist :
Kim Tolbert 5/1/92
Modified :
documented, richard.schwartz@gsfc.nasa.gov, 8-sep-1997.
[Previous]
[Next]
Project : STEREO
Name : WCS2FITSHEAD()
Purpose : Generate FITS header from WCS structure
Category : FITS, Coordinates, WCS
Explanation : This procedure takes a WCS structure and converts it into a
either a FITS header or index structure. Information from the
original header can also be folded in.
Syntax : Header = WCS2FITSHEAD( WCS [, DATA ] )
Examples : Header = WCS2FITSHEAD( WCS, DATATYPE=3 )
Inputs : WCS = Structure containing World Coordinate System
information. See FITSHEAD2WCS for more information.
Opt. Inputs : DATA = Data array associated with WCS. This is used only to
determine the data type for setting BITPIX.
Outputs : The result of FITS header generated from the WCS.
Alternatively can be returned as an index structure via
FITSHEAD2STRUCT.
Opt. Outputs: None.
Keywords : DATATYPE = The IDL numerical type code of the data array. Used
to determine BITPIX. If passed, then overrides the
DATA parameter.
BUNIT = String variable describing the units of the data.
ADD_XCEN = Add the SolarSoft mapping keywords XCEN, YCEN. When
applied to an N-dimensional array, the center pixel
along *ALL* the axes is used to calculate the
result.
ADD_ROLL = Add the nonstandard keyword CROTA (without a number)
to the FITS header. Ignored if the WCS does not
contain a roll value.
OLDHEAD = The original FITS header, in either string array or
index structure format. Annotative keywords from
OLDHEAD are folded into the result, while keywords
related to the data coordinates or values are
filtered out.
STRUCTURE= If set, then the result is returned as an index
structure.
EXTEND = If set, then the keyword EXTEND=T is added to the
header.
DATE = If set, then the DATE keyword is added to the
header.
Calls : ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], FXADDPAR [1], FXADDPAR [2], FXHMAKE [1]
FXHMAKE [2], FXPAR [1], FXPAR [2], NTRIM, TAG_EXIST [1], TAG_EXIST [2], VALID_WCS
WCS_GET_COORD, WCS_HCLEAN, fitshead2struct, struct2fitshead
Common : None.
Restrictions: Currently only supports one WCS structure at a time.
Side effects: Some keywords relating to coordinates from OLDHEAD may show up
in the output. This is particularly true for non-standard
keywords.
Prev. Hist. : None.
History : Version 1, 19-Sep-2006, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : SOHO - CDS
Name : WCS2MAP
Purpose : Convert a WCS structure into a SolarSoft image map
Category : FITS, Coordinates, WCS, Image-processing
Explanation : Converts a World Coordinate System structure, plus associated
data array, into a SolarSoft image map structure.
Syntax : WCS2MAP, DATA, WCS, MAP, ID=ID
Examples : WCS2MAP, DATA, WCS, MAP, ID="EIT 195"
Inputs : DATA = Data array associated with the WCS structure
WCS = World Coordinate System structure from FITSHEAD2WCS
Opt. Inputs : None.
Outputs : MAP = SolarSoft image map structure.
Opt. Outputs: None.
Keywords : ID = Character string describing the contents of the data.
Calls : ***
ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], IS_STRING, TAG_EXIST [1]
TAG_EXIST [2], VALID_WCS, WCS_GET_COORD
Common : None.
Restrictions: The WCS must be marked as simple, i.e. wcs.simple=1
Side effects: None.
Prev. Hist. : None.
History : Version 1, 15-Apr-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_DECOMP_ANGLE
Purpose : Derive a rotation angle from WCS PC or CD matrix.
Category : FITS, Coordinates, WCS
Explanation : This procedure examines the FITS World Coordinate System
structure from FITSHEAD2WCS, and tries to decompose the PC or
CD matrix into CDELT and CROTA values.
Syntax : WCS_DECOMP_ANGLE, WCS, ROLL_ANGLE, CDELT, FOUND
CALLED BY:
FITSHEAD2WCS, WCS_SIMPLIFY
Examples : See usage in fitshead2wcs.pro
Inputs : WCS = Structure from FITSHEAD2WCS
Opt. Inputs : None.
Outputs : ROLL_ANGLE = Angle consistent with PC or CD matrix, in degrees.
CDELT = Pixel spacing consistent with PC or CD matrix
FOUND = Success code (0 or 1).
Opt. Outputs: None.
Keywords : PRECISION = Precision to be used when determining if the angle
can be successfully derived, and if there are any
significant cross terms involving non-spatial
dimensions. The default is 1e-5, i.e. the results
should be correct to about 5 significant figures.
NOXTERMS = If set, then success is dependent on not having any
cross terms involving non-spatial dimensions.
ADD_TAGS = If set, then the ROLL_ANGLE, CDELT tags are added
to the structure.
Calls : ***
ADD_TAG [1], ADD_TAG [2], SIGN, TAG_EXIST [1], TAG_EXIST [2], VALID_WCS
Common : None.
Restrictions: Currently, only one WCS can be examined at a time.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 13-Apr-2005, William Thompson, GSFC
Version 2, 06-Feb-2006, William Thompson, GSFC
Corrected roll sign convention for PC variation
Contact : WTHOMPSON
[Previous]
[Next]
NAME:
WCS_DEMO
PURPOSE:
Demonstrate the basic capabilities of procedures WCSSPH2XY & WCSXY2SPH
CATEGORY:
Mapping and Auxilary FITS Demo Routine
CALLING SEQUENCE:
.run wcs_demo: compiles wcs_demo and the supporting demo routines
wcs_demo: run the demo
INPUT PARAMETERS:
none
OUTPUT PARAMETERS:
none
PROCEDURE:
This is a demo program which is meant to call the routines
wcssph2xy.pro and wcsxy2sph.pro. Since the purpose of this
routine is both to show what the routines can do and what the
user has to do, a file is created with all of the commands
needed to complete the desired operation. Wcs_demo actually
executes this command file, so the user can exactly duplicate
the results by simply re-executing this file. Also, this
allows a user to edit an already existing file which calls
wcssph2xy.pro and wcsxy2sph.pro properly and extend the file's
usefulness. This demo program allows several possible tests.
The first option is to simply draw a grid of evenly spaced
latitude and longitude lines in a particular map transformation.
Another possibility is to do a full loop, creating a Cartesian
grid of latitude and longitude lines and calling wcssph2xy.pro
to convert them to a particular map. Then, wcsxy2sph.pro is
called to invert the process and the difference between the
original and final latitudes and longitudes can be plotted.
This allows one to assess the level of the numerical errors
introduced by the mapping routines. A third possible option is to
look at some of the map transformations and include rotations of
the reference points so that a different perspective is given.
CALLS: ***
INVERSION_ERROR, WCSSPH2XY_PLOT, WCS_ROT
COMMON BLOCKS:
none
PROCEDURES CALLED:
SPHDIST(), WCSXY2SPH, WCSSPH2XY
COPYRIGHT NOTICE:
Copyright 1991, The Regents of the University of California. This
software was produced under U.S. Government contract (W-7405-ENG-36)
by Los Alamos National Laboratory, which is operated by the
University of California for the U.S. Department of Energy.
The U.S. Government is licensed to use, reproduce, and distribute
this software. Neither the Government nor the University makes
any warranty, express or implied, or assumes any liability or
responsibility for the use of this software.
AUTHOR:
Rick Balsano
MODIFICATIONS/REVISION LEVEL:
1.1 8/31/93
1.2 3/19/96 - J. Bloch - LANL
- Made compatible with wcslib-2.2 by Calabretta.
Converted to IDL V5.0 W. Landsman September 1997
Updated for conical projections W. Landsman July 2003
[Previous]
[Next]
Project : STEREO
Name : WCS_FIND_KEYWORD()
Purpose : Finds keywords in primary or table header.
Category : FITS, Coordinates, WCS
Explanation : This procedure examines the FITS index structure, and finds the
requested WCS keyword. Keywords will have one form for the
primary FITS header, and another form for binary tables. For
example, a keyword might appear as "WCSAXES" in the primary
header, but as "WCAX3" in the binary table header. Each may
also have alternate forms.
This routine is normally called from FITSHEAD2WCS.
Syntax : Value = WCS_FIND_KEYWORD(INDEX, TAGS, COLUMN, SYSTEM, COUNT, $
PRIMARY, BINTABLE)
CALLED BY:
FITSHEAD2WCS, WCS_FIND_PIXEL_LIST, WCS_FIND_POSITION, WCS_FIND_SPECTRUM
WCS_FIND_TIME
Examples : See fitshead2wcs.pro
Inputs : INDEX = Index structure from FITSHEAD2STRUCT.
TAGS = The tag names of INDEX
COLUMN = String containing binary table column number, or
the null string.
SYSTEM = A one letter code "A" to "Z", or the null string
(see wcs_find_system.pro).
PRIMARY = String(*) to test against primary headers.
BINTABLE = String(*) to test against binary table headers.
Most keywords end in the column number and the
system code. If the column number is in a different
location, this can be signalled with a "#"
character, e.g. '3V#_1'.
PRIMARY and BINTABLE can also be string arrays, in order of
preference. If the string contains '*', then STRMATCH is used.
Opt. Inputs : Although the normal usage is to include all of the parameters,
the BINTABLE parameter can be left off.
Outputs : COUNT = The number of matches found.
The result of the function is the value(s) of the keyword,
or -1 if not found.
Opt. Outputs: None.
Keywords : ALLOW_PRIMARY = If set, then the primary header form can also
be used in binary tables.
NAMES = The names of the tags found, for when the input
strings contain "*".
LUNFXB = The logical unit number returned by FXBOPEN,
pointing to the binary table that the header
refers to. Usage of this keyword allows
implementation of the "Greenbank Convention",
where keywords can be replaced with columns of
the same name.
ROWFXB = Used in conjunction with LUNFXB, to give the
row number in the table. Default is 1.
Calls : ***
FXBCOLNUM [1], FXBCOLNUM [2], FXBFIND [1], FXBFIND [2], FXBHEADER [1]
FXBHEADER [2], FXBISOPEN [1], FXBISOPEN [2], FXBREAD [1], FXBREAD [2], FXBREAD [3]
Common : None.
Restrictions: Because this routine is intended to be called only from
FITSHEAD2WCS, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 22-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_FIND_PIXEL_LIST
Purpose : Find pixel list information in FITS header
Category : FITS, Coordinates, WCS
Explanation : This procedure extracts pixel list information from a
FITS index structure, and adds it to a World Coordinate System
structure in a separate PIXEL_LIST substructure. Parts of the
WCS structure is modified to use the PIXEL_LIST coordinates.
This routine is normally called from FITSHEAD2WCS.
Syntax : WCS_FIND_PIXEL_LIST, WCS, LUNFXB, INDEX, TAGS, SYSTEM
CALLED BY:
FITSHEAD2WCS
Examples : See fitshead2wcs.pro
Inputs : WCS = A WCS structure, from FITSHEAD2WCS.
LUNFXB = The logical unit number returned by FXBOPEN,
pointing to the binary table that the header
refers to.
INDEX = Index structure from FITSHEAD2STRUCT.
TAGS = The tag names of INDEX
SYSTEM = A one letter code "A" to "Z", or the null string
(see wcs_find_system.pro).
Opt. Inputs : None.
Outputs : The output is the structure PIXEL_LIST, which will contain
an array of coordinate positions already processed through the
WCS keywords.
Opt. Outputs: None.
Keywords : None.
Calls : ***
ADD_TAG [1], ADD_TAG [2], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
FITSHEAD2WCS, FXADDPAR [1], FXADDPAR [2], FXBREAD [1], FXBREAD [2], FXBREAD [3]
FXHMAKE [1], FXHMAKE [2], NTRIM, REM_TAG [1], REM_TAG [2], REP_TAG_VALUE
TAG_EXIST [1], TAG_EXIST [2], VALID_NUM [1], VALID_NUM [2], VALID_NUM [3]
WCS_FIND_KEYWORD, WCS_GET_COORD, delvarx [5]
Common : None.
Restrictions: Currently, only one FITS header, and one WCS, can be examined
at a time.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 11-Oct-2006, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_FIND_POSITION
Purpose : Find position information in FITS header
Category : FITS, Coordinates, WCS
Explanation : This procedure extracts observer's position information from a
FITS index structure, and adds it to a World Coordinate System
structure in a separate POSITION substructure.
This routine is normally called from FITSHEAD2WCS.
Syntax : WCS_FIND_POSITION, INDEX, TAGS, SYSTEM, WCS
CALLED BY:
FITSHEAD2WCS
Examples : See fitshead2wcs.pro
Inputs : INDEX = Index structure from FITSHEAD2STRUCT.
TAGS = The tag names of INDEX
SYSTEM = A one letter code "A" to "Z", or the null string
(see wcs_find_system.pro).
WCS = A WCS structure, from FITSHEAD2WCS.
Opt. Inputs : None.
Outputs : The output is the structure POSITION, which at the minimum
should contain the following parameters:
SOHO True if TELESCOP contains "SOHO"
POS_ASSUMED True if the position was assumed to be
Earth's, based on the date. IF SOHO=1,
then DIST_OBS is multiplyed by 0.99.
If no positional information at all is
found, then this is set to -1.
DSUN_OBS Distance to Sun center (meters)
SOLAR_B0 Solar B0 angle
CARR_EARTH Carrington heliographic longitude of Earth
Depending on the contents of the FITS header, one or more of
the following parameters may also be included:
HGLN_OBS Stonyhurst heliographic longitude
HGLT_OBS " " latitude
CRLN_OBS Carrington heliographic longitude
CRLT_OBS " " latitude
The following are X,Y,Z triplets, in meters:
GEI_OBS Geocentric Equatorial Inertial
GEO_OBS Geographic
GSE_OBS Geocentric Solar Ecliptic
GSM_OBS Geocentric Solar Magnetic
SM_OBS Solar Magnetic
MAG_OBS Geomagnetic
HAE_OBS Heliocentric Aries Ecliptic
HEE_OBS Heliocentric Earth Ecliptic
HEQ_OBS Heliocentric Earth Equatorial
HCI_OBS Heliocentric Intertial
If POS_ASSUMED is true, the only parameters which are
(potentially) affected are DSUN_OBS and SOLAR_B0.
Note that SOLAR_B0, HGLT_OBS, and CRLT_OBS are all synonyms.
The POSITION structure is added to the WCS structure.
Opt. Outputs: None.
Keywords : LUNFXB = The logical unit number returned by FXBOPEN,
pointing to the binary table that the header
refers to. Usage of this keyword allows
implementation of the "Greenbank Convention",
where keywords can be replaced with columns of
the same name.
ROWFXB = Used in conjunction with LUNFXB, to give the
row number in the table. Default is 1.
Calls : ***
ADD_TAG [1], ADD_TAG [2], PB0R, REM_TAG [1], REM_TAG [2], TAG_EXIST [1]
TAG_EXIST [2], TIM2CARR, WCS_FIND_KEYWORD
Common : None.
Restrictions: Currently, only one FITS header, and one WCS, can be examined
at a time.
Because this routine is intended to be called only from
FITSHEAD2WCS, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 15-Apr-2005, William Thompson, GSFC
Version 2, 02-Mar-2006, William Thompson, GSFC
Changed test for get_orbit.pro
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_FIND_SPECTRUM
Purpose : Find spectral axis information in FITS header
Category : FITS, Coordinates, WCS
Explanation : This procedure extracts spectral axis information from a
FITS index structure, and adds it to a World Coordinate System
structure in a separate SPECTRUM substructure.
This routine is normally called from FITSHEAD2WCS.
Syntax : WCS_FIND_SPECTRUM, INDEX, TAGS, SYSTEM, WCS
CALLED BY:
FITSHEAD2WCS
Examples : See fitshead2wcs.pro
Inputs : INDEX = Index structure from FITSHEAD2STRUCT.
TAGS = The tag names of INDEX
SYSTEM = A one letter code "A" to "Z", or the null string
(see wcs_find_system.pro).
WCS = A WCS structure, from FITSHEAD2WCS.
Opt. Inputs : None.
Outputs : The output is the structure SPECTRUM, which will contain
keywords relevant to the spectral axis. The primary keywords
are
SPEC_INDEX: Index of the spectral axis
RESTFRQ: Rest frequency
RESTWAV: Rest wavelength
and the remainder concern the reference frame that the data
were taken in.
If successful, the SPECTRUM structure is added to the WCS
structure.
Opt. Outputs: None.
Keywords : COLUMN = String containing binary table column number, or
the null string.
LUNFXB = The logical unit number returned by FXBOPEN,
pointing to the binary table that the header
refers to. Usage of this keyword allows
implementation of the "Greenbank Convention",
where keywords can be replaced with columns of
the same name.
ROWFXB = Used in conjunction with LUNFXB, to give the
row number in the table. Default is 1.
Calls : ***
ADD_TAG [1], ADD_TAG [2], NTRIM, REM_TAG [1], REM_TAG [2], TAG_EXIST [1]
TAG_EXIST [2], WCS_FIND_KEYWORD
Common : None.
Restrictions: Currently, only one FITS header, and one WCS, can be examined
at a time.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 06-Jun-2005, William Thompson, GSFC
Version 2, 23-Jun-2005, William Thompson, GSFC
Add support for binary tables
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_FIND_SYSTEM()
Purpose : Find alternate WCS coordinate system in FITS header
Category : FITS, Coordinates, WCS
Explanation : This procedure examines the FITS header (or index structure),
and finds the letter code representing the desired alternate
World Coordinate System keywords. For example, the primary
coordinate system has keywords CRPIX1, CRVAL1, etc., while an
alternate might have CRPIX1A, CRVAL1A, etc.
Syntax : Result = WCS_FIND_SYSTEM( HEADER, SYSTEM )
CALLED BY:
FITSHEAD2WCS
Examples : Result = WCS_FIND_SYSTEM( HEADER, 'A' )
Result = WCS_FIND_SYSTEM( INDEX, "Helioprojective-Cartesian")
Result = WCS_FIND_SYSTEM( INDEX, "CR" ) ;Carrington
Inputs : HEADER = Either a FITS header, or an index structure from
FITSHEAD2STRUCT.
SYSTEM = Selects which alternate coordinate system should be
used. The coordinate system can be specified in one
of three ways:
* Single letter "A" through "Z".
* Value of a WCSNAME keyword in the header
* One of a standard list of coordinate systems, based
on the following table
Abb. Name
HP Helioprojective-Cartesian
HR Helioprojective-Radial
HG Stonyhurst-Heliographic
CR Carrington-Heliographic
Either the full-name, or the two-letter abbreviation,
can be used. If the alternate coordinate system is
not found in the header structure, then the primary
coordinate system is returned.
Opt. Inputs : None.
Outputs : The result of the function is either the null string, or a
single (uppercase) letter from "A" to "Z".
Opt. Outputs: None.
Keywords : LOWERCASE = If set, then the result is returned as lowercase.
COLUMN = String containing binary table column number, or
the null string.
Calls : ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], TAG_EXIST [1], TAG_EXIST [2]
fitshead2struct
Common : None.
Restrictions: Currently, only one WCS can be examined at a time.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 1-Apr-2005, William Thompson, GSFC
Version 2, 21-Jun-2005, William Thompson, GSFC
Add support for binary tables.
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_FIND_TABLE
Purpose : Find lookup table information in FITS header
Category : FITS, Coordinates, WCS
Explanation : This procedure extracts lookup table information from a
FITS index structure, and adds it to a World Coordinate System
structure in a separate LOOKUP_TABLE substructure.
This routine is normally called from FITSHEAD2WCS.
Syntax : WCS_FIND_TABLE, WCS, FILENAME
CALLED BY:
FITSHEAD2WCS
Examples : See fitshead2wcs.pro
Inputs : WCS = A WCS structure, from FITSHEAD2WCS.
FILENAME = The name of the FITS file.
Opt. Inputs : None.
Outputs : The output is the structure LOOKUP_TABLE, which will contain
the following parameters:
COORDNAME = String array of names pointing to structure
tags containing coordinate arrays, one for
each dimension. For example, if the value
is "coord1", then lookup_table.coord1 will
contain the coordinate array for that
dimensions. The name will be blank for
non-tabular dimensions.
INDEXNAME = String array of names pointing to tags
containing index arrays, if applicable.
AXISNUM = The axis number, starting with 0.
COORDn = The coordinate array(s)
INDEXn = The index array(s), if any
Opt. Outputs: None.
Keywords : None.
Calls : ***
ADD_TAG [1], ADD_TAG [2], FXBCLOSE [1], FXBCLOSE [2], FXBOPEN [1], FXBOPEN [2]
FXBOPEN [3], FXBREAD [1], FXBREAD [2], FXBREAD [3], NTRIM, REM_TAG [1], REM_TAG [2]
TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Currently, only one FITS header, and one WCS, can be examined
at a time.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 06-Jun-2005, William Thompson, GSFC
Version 2, 23-Jun-2005, William Thompson, GSFC
Removed unnecessary paramters from call
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_FIND_TIME
Purpose : Find time information in FITS header
Category : FITS, Coordinates, WCS
Explanation : This procedure extracts observation time information from a
FITS index structure, and adds it to a World Coordinate System
structure in a separate TIME substructure.
This routine is normally called from FITSHEAD2WCS.
Syntax : WCS_FIND_TIME, INDEX, TAGS, SYSTEM, WCS
CALLED BY:
FITSHEAD2WCS
Examples : See fitshead2wcs.pro
Inputs : INDEX = Index structure from FITSHEAD2STRUCT.
TAGS = The tag names of INDEX
SYSTEM = A one letter code "A" to "Z", or the null string
(see wcs_find_system.pro).
WCS = A WCS structure, from FITSHEAD2WCS.
Opt. Inputs : None.
Outputs : The output is the structure TIME, which will contain one or
more of the following parameters, depending on the contents of
the FITS header:
Variable FITS Keyword
FITS_DATE DATE
OBSERV_DATE DATE-OBS
OBSERV_END DATE-END
OBSERV_MID DATE-MID
OBSERV_AVG DATE-AVG
CORRECTED_DATE DATE_OBS
CORRECTED_END DATE_END
CORRECTED_MID DATE_MID
CORRECTED_AVG DATE_AVG
EXPTIME EXPTIME
MJD_OBS MJD-OBS
MJD_AVG MJD-AVG
EQUINOX EQUINOXa
EPOCH EPOCH
RADESYS RADESYSa
The DATE_xxx keywords are expected to be the same as DATE-xxx,
but corrected for the difference in light travel time between
the spacecraft and Earth. If only DATE_xxx keywords are found,
they're treated as the DATE-xxx equivalents. If both DATE_xxx
and DATE-xxx keywords are in the header, and have the same
value, the DATE_xxx keywords are ignored.
The meaning of the various xxx suffices are:
OBS Observation date, usually the start of the
observation.
END End time of the observation
MID Midpoint of the observation.
AVG No exact definition, but supposed to be
representative of the observation as a whole
(from WCS spectral paper).
The EQUINOX, EPOCH and RADESYS keywords relate to the time
basis used for the celestial coordinate system.
If successful, the TIME structure is added to the WCS
structure.
Opt. Outputs: None.
Keywords : COLUMN = String containing binary table column number, or
the null string.
LUNFXB = The logical unit number returned by FXBOPEN,
pointing to the binary table that the header
refers to. Usage of this keyword allows
implementation of the "Greenbank Convention",
where keywords can be replaced with columns of
the same name.
ROWFXB = Used in conjunction with LUNFXB, to give the
row number in the table. Default is 1.
Calls : ***
ADD_TAG [1], ADD_TAG [2], ANYTIM2UTC [1], ANYTIM2UTC [2], REM_TAG [1], REM_TAG [2]
TAG_EXIST [1], TAG_EXIST [2], UTC2STR, WCS_FIND_KEYWORD
Common : None.
Restrictions: Currently, only one FITS header, and one WCS, can be examined
at a time.
Because this routine is intended to be called only from
FITSHEAD2WCS, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 15-Apr-2005, William Thompson, GSFC
Version 2, 01-Jun-2005, William Thompson, GSFC
Handle alternate format for RADESYS keyword
Version 3, 22-Jun-2005, William Thompson, GSFC
Handle binary tables, correct error with MJD-AVG, allow
DATE-AVG as one of the substitutes for DATE-OBS
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_FIT_GRISM
Purpose : Fit GRISM parameters to spectral dispersion
Category : FITS, Coordinates, WCS
Explanation : This procedure takes a series of pixel vs. spectral coordinate
measurements, and fits the World Coordinate GRISM function,
which combines grating and prism parameters to characterize
spectral dispersion. Besides the usual FITS keywords CRPIX,
CRVAL, and CDELT, the GRISM projection uses the following
parameters:
PVk_0a G Grating ruling density [m^-1]
PVk_1a m Grating order
PVk_2a alpha Angle of incidence [deg]
PVk_3a nr Zeroth order refractive term
PVk_4a nrprime First order refractive term [m^-1]
PVk_5a epsilon Out-of-plane angle [deg]
PVk_6a theta Angle to camera axis [deg]
However, these terms are not completely independent of each
other. The fitted array PARAM contains the following elements:
CRVAL Reference value
CDELT Pixel spacing
GME G * m / cos(epsilon)
NRA nr * sin(alpha)
NRAPRIME nrprime * sin(alpha)
THETA theta
Once these parameters have been fitted, it's left up to the
user to decompose them into the seven GRISM parameters above,
in whatever manner seems most suitable.
Syntax : WCS_FIT_GRISM, PIXREL, COORD, [... keywords ...]
Examples : If PIXEL contains the array of pixel locations, and WAVE
contains the array of measured wavelengths, in Angstroms, and
CRPIX is the desired value of the FITS keyword, then
PIXREL = PIXEL - (CRPIX - 1)
WCS_FIT_GRISM, PIXREL, WAVE, PARAM, COORD='WAVE', $
CUNIT='Angstrom', /INIT, MAX_ITER=1000
will do an initial fit of up to 1000 iterations, and
OPLOT, PIXEL, WAVE-WCS_FIT_GRISM_FUNCT(PIXREL, PARAM)
will display the residuals.
Inputs : PIXREL = Array of pixel locations, relative to the reference
pixel. The FITS keyword CRPIXia must be consistent
with the reference pixel used in calculating PIXREL.
Note that FITS pixels start with 1, while IDL pixels
start with 0--that distinction must be taken into
account.
COORD = Array of spectral coordinate positions associated
with PIXREL. The type of coordinate is given by the
keyword COORD_TYPE, and the units are given by the
keyword CUNIT. Both are needed to properly evaluate
the GRISM function.
Opt. Inputs : PARAM = The array of first guesses for the fitted parameters,
as described above. If not passed, then the software
generates a first guess.
Outputs : PARAM = The array of fitted parameters, as described above.
One should always examine the result of the fit, to
see if additional iterations are required. It may
take several calls before converging to a solution.
Setting MAX_ITER=1000 will also help.
Opt. Outputs: None.
Keywords : COORD_TYPE = String containing the four-letter codes used in
the CTYPE keyword. For example, if the spectral
axis is wavelength, the FITS header would contain
a line like "CTYPE1 = 'WAVE-GRI'. Can be one of
the following:
WAVE Vacuum wavelength (default)
AWAV Air wavelength (def. if /AIR_GRISM)
FREQ Frequency
ENER Energy
WAVN Wave number
VELO Velocity
VRAD Radio velocity
VOPT Optical velocity
ZOPT Redshift
BETA Beta factor (v/c)
CUNIT = The units string to be stored in the FITS header,
e.g. 'Angstrom', 'Hz', 'm/s', etc. The default
depends on COORD_TYPE, and the units must be
consistent with COORD_TYPE. See WCS_PARSE_UNITS
for more information on the types of strings
allowed. It's very important to get the units
correct, because the GRISM parameters are in MKS
units, as are the constants used to support the
non-wavelength coordinate types.
RESTWAV = The rest wavelength.
RESTFRQ = The rest frequency. One or the other of these
keywords is needed for calculations involving
velocity. Only one needs to be passed--the other
will be calculated automatically.
AIR_GRISM = If set, then the grism-in-air (GRA) projection is
fitted, instead of the normal GRI projection.
NORESET = If set, then the information stored in the common
block, based on the above keywords, is not reset.
This simplifies the process of recalling the
procedure to reiterate the solution.
INITIALIZE = If set, then the parameter array is initialized to
a first guess, based on answers to questions posed
by the program.
LAMBDA = Step sizes to use in fitting the parameters. The
default is 1% of the values, which means that any
value set to 0 is not fitted. Ignored if doesn't
have six elements.
FIT_GRATING= If FIT_GRATING=0 is passed, then the GME parameter
is held constant. The default is to fit GME.
FIT_ALPHA = If FIT_ALPHA=0 is passed, then the two parameters
involving the angle alpha, i.e. NRA and NRAPRIME,
are held constant. The default is to fit NRA, and
to fit NRAPRIME unless the initial guess is 0.
FIT_THETA = If set, then fit the THETA parameter, even if the
initial guess is zero.
FIT_ONLY_THETA = Equivalent to the combination of /FIT_THETA,
FIT_GRATING=0, and FIT_ALPHA=0. This is
probably a good starting point if all the
other parameters are known.
NOFIT = Don't actually fit the data. Useful for
setting up the common block shared with
WCS_FIT_GRISM_FUNCT.
NOPRINT = If set, then information about the fit is not
printed to the screen.
In addition, any keyword to the AMOEBA_C procedure can be
passed, such as MAX_ITER or ERROR.
Calls : ***
AMOEBA_C, POLY, POLY_FIT, READ_DEFAULT, WCS_PARSE_UNITS
Common : The common block wcs_fit_grism is used to pass information to
the associated routine WCS_FIT_GRISM_FUNCT.
Restrictions: Not all combinations of the grism parameters are valid.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 28 June 2005, William Thompson, GSFC
Version 2, 29 June 2005, William Thompson, GSFC
Added keywords FIT_ALPHA, FIT_ONLY_THETA
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_FIT_GRISM_FUNCT()
Purpose : Function used by WCS_FIT_GRISM
Category : FITS, Coordinates, WCS
Explanation : This function is used by the WCS_FIT_GRISM procedure to fit
grism parameters to spectral coordinates. See WCS_FIT_GRISM
for more information.
Syntax : Result = WCS_FIT_GRISM( PIXREL, PARAM )
Examples : If PIXEL contains the array of pixel locations, and WAVE
contains the array of measured wavelengths, in Angstroms, and
CRPIX is the desired value of the FITS keyword, then
PIXREL = PIXEL - (CRPIX - 1)
WCS_FIT_GRISM, PIXREL, WAVE, PARAM, COORD='WAVE', $
CUNIT='Angstrom', /INIT, MAX_ITER=1000
will do an initial fit of up to 1000 iterations, and
OPLOT, PIXEL, WAVE-WCS_FIT_GRISM_FUNCT(PIXREL, PARAM)
will display the residuals.
Inputs : PIXREL = Array of pixel locations, relative to the reference
pixel. The FITS keyword CRPIXia must be consistent
with the reference pixel used in calculating PIXREL.
Note that FITS pixels start with 1, while IDL pixels
start with 0--that distinction must be taken into
account.
PARAM = The parameter array, with the following elements:
CRVAL Reference value
CDELT Pixel spacing
GME G * m / cos(epsilon)
NRA nr * sin(alpha)
NRAPRIME nrprime * sin(alpha)
THETA theta
See WCS_FIT_GRISM for more information.
Opt. Inputs : None.
Outputs : The result of the function is the spectral coordinate, as a
function of pixel position.
Opt. Outputs: None.
Keywords : None.
Calls : Only native IDL statements.
Common : The common block wcs_fit_grism is used to pass information from
the calling routine WCS_FIT_GRISM.
Restrictions: Not all combinations of the grism parameters are valid.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 28 June 2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_GET_COORD()
Purpose : Get coordinate values for WCS structures
Category : FITS, Coordinates, WCS
Explanation : This procedure takes a WCS structure, and calculates the data
coordinates at each IDL pixel position.
Syntax : Coordinates = WCS_GET_COORD( WCS [, PIXELS] )
CALLED BY:
WCS2FITSHEAD, WCS2MAP, WCS_FIND_PIXEL_LIST, WCS_RECTIFY
Examples : Suppose that WCS.NAXIS = [10,20]. The result of the command
COORD = WCS_GET_COORD(WCS)
would be an array with dimensions [2,10,20], where
X=COORD[0,*,*] and Y=COORD[1,*,*].
To get the coordinates of a specific pixel, use e.g.
COORD = WCS_GET_COORD(WCS, [5,5])
If IX and IY contain N pixel coordinates along the X and Y
directions respectively, use
IXY = LONARR(2, N_ELEMENTS(IX))
IXY[0,*] = IX
IXY[1,*] = IY
COORD = WCS_GET_COORD(WCS, IXY)
Inputs : WCS = Structure from FITSHEAD2WCS
Opt. Inputs : PIXELS = If passed, then contains an array of IDL pixel
locations to return coordinates from. Otherwise,
coordinates are returned for all the pixels in the
array.
The first dimension must be the number of axes
(except for pixel lists).
Note that IDL pixel locations differ by 1 from FITS
pixels, e.g. IDL pixel 0 is FITS pixel 1, etc.
However, pixel lists are an exception. For pixel
lists, the PIXELS array contains row numbers in the
FITS binary table, ranging from 1 to N to match the
calling sequence of FXBREAD. Normally, PIXELS is a
one dimensional array when used with pixel lists.
The output array will have an additional axis
prepended for the coordinate axes.
Outputs : The result of the function is the array of coordinates, where
the first dimension steps through each coordinate axis.
Opt. Outputs: None.
Keywords : RELATIVE = If set, then only intermediate positions
relative to the reference value are returned,
i.e. CRVALi is not added. This is mainly for
internal use by some of the routines.
QUICK = Depending on the projection, using /QUICK selects
a quick approximation, rather than the full
computationally expensive spherical projection.
FORCE_PROJ = Some projection routines, such as WCS_PROJ_TAN,
contain logic which automatically selects the
/QUICK option under certain conditions. Using
/FORCE_PROJ forces the full spherical coordinate
transformation to be calculated.
MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values. This is for
coordinate systems, such as heliographic, that
might not be defined for all pixels.
TOLERANCE = Convergence tolerance for reiterative technique
used by some projections.
MAX_ITER = Maximum number of iterations. Default is 1000.
Calls : ***
VALID_WCS, WCS_PROJ_A2F, WCS_PROJ_A2V, WCS_PROJ_A2W, WCS_PROJ_AIR, WCS_PROJ_AIT
WCS_PROJ_ARC, WCS_PROJ_AZP, WCS_PROJ_BON, WCS_PROJ_CAR, WCS_PROJ_CEA, WCS_PROJ_COD
WCS_PROJ_COE, WCS_PROJ_COO, WCS_PROJ_COP, WCS_PROJ_CSC, WCS_PROJ_CYP, WCS_PROJ_F2A
WCS_PROJ_F2V, WCS_PROJ_F2W, WCS_PROJ_GRA, WCS_PROJ_GRI, WCS_PROJ_LOG, WCS_PROJ_MER
WCS_PROJ_MOL, WCS_PROJ_PAR, WCS_PROJ_PCO, WCS_PROJ_QSC, WCS_PROJ_SFL, WCS_PROJ_SIN
WCS_PROJ_STG, WCS_PROJ_SZP, WCS_PROJ_TAB, WCS_PROJ_TAN, WCS_PROJ_TSC, WCS_PROJ_V2A
WCS_PROJ_V2F, WCS_PROJ_V2W, WCS_PROJ_W2A, WCS_PROJ_W2F, WCS_PROJ_W2V, WCS_PROJ_ZEA
WCS_PROJ_ZPN
Common : None.
Restrictions: None.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 19-Apr-2005, William Thompson, GSFC
Version 2, 26-Apr-2005, William Thompson, GSFC
Added AZP and SIN projections, MISSING keyword
Version 3, 29-Apr-2005, William Thompson, GSFC
Added projections AIT,CAR,CEA,CYP,MER,MOL,PAR,SFL
Version 4, 03-Jun-2005, William Thompson, GSFC
Added projections ARC,BON,COD,COE,COO,COP,STG,SZP,ZEA
Version 5, 08-Jun-2005, William Thompson, GSFC
Add support for spectral projections
Version 6, 21-Dec-2005, William Thompson, GSFC
Added projections AIR, CSC, PCO, QSC, TSC, ZPN
Added keywords TOLERANCE, MAX_ITER
Version 7, 12-Oct-2006, William Thompson, GSFC
Added support for pixel lists.
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_GET_PIXEL()
Purpose : Inverse of WCS_GET_COORD()
Category : FITS, Coordinates, WCS
Explanation : This procedure takes a WCS structure, and converts coordinates
back into IDL pixel positions.
Syntax : Pixels = WCS_GET_PIXEL( WCS, COORD )
Examples : Pixels = WCS_GET_PIXEL( WCS, [0,0] )
Returns the pixel coordinate of Sun-center for a 2D image in
helioprojective-cartesian coordinates.
Inputs : WCS = Structure from FITSHEAD2WCS
COORD = An array of coordinates to return pixel locations for.
The first dimension must be the number of axes.
Opt. Inputs : None.
Outputs : The result of the function is the array of IDL pixel locations,
where the first dimension steps through each coordinate axis.
Note that IDL pixel locations differ by 1 from FITS pixels,
e.g. IDL pixel 0 is FITS pixel 1, etc.
Opt. Outputs: None.
Keywords : QUICK = Depending on the projection, using /QUICK selects
a quick approximation, rather than the full
computationally expensive spherical projection.
FORCE_PROJ = Some projection routines, such as WCS_PROJ_TAN,
contain logic which automatically selects the
/QUICK option under certain conditions. Using
/FORCE_PROJ forces the full spherical coordinate
transformation to be calculated.
MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
TOLERANCE = Convergence tolerance for reiterative technique
used by the MOL projection.
MAX_ITER = Maximum number of iterations. Default is 1000.
Calls : ***
VALID_WCS, WCS_INV_PROJ_A2F, WCS_INV_PROJ_A2V, WCS_INV_PROJ_A2W
WCS_INV_PROJ_AIR, WCS_INV_PROJ_AIT, WCS_INV_PROJ_ARC, WCS_INV_PROJ_AZP
WCS_INV_PROJ_BON, WCS_INV_PROJ_CAR, WCS_INV_PROJ_CEA, WCS_INV_PROJ_COD
WCS_INV_PROJ_COE, WCS_INV_PROJ_COO, WCS_INV_PROJ_COP, WCS_INV_PROJ_CSC
WCS_INV_PROJ_CYP, WCS_INV_PROJ_F2A, WCS_INV_PROJ_F2V, WCS_INV_PROJ_F2W
WCS_INV_PROJ_GRA, WCS_INV_PROJ_GRI, WCS_INV_PROJ_LOG, WCS_INV_PROJ_MER
WCS_INV_PROJ_MOL, WCS_INV_PROJ_PAR, WCS_INV_PROJ_PCO, WCS_INV_PROJ_QSC
WCS_INV_PROJ_SFL, WCS_INV_PROJ_SIN, WCS_INV_PROJ_STG, WCS_INV_PROJ_SZP
WCS_INV_PROJ_TAB, WCS_INV_PROJ_TAN, WCS_INV_PROJ_TSC, WCS_INV_PROJ_V2A
WCS_INV_PROJ_V2F, WCS_INV_PROJ_V2W, WCS_INV_PROJ_W2A, WCS_INV_PROJ_W2F
WCS_INV_PROJ_W2V, WCS_INV_PROJ_ZEA, WCS_INV_PROJ_ZPN
Common : None.
Restrictions: None.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 03-Jun-2005, William Thompson, GSFC
Version 2, 08-Jun-2005, William Thompson, GSFC
Add support for spectral projections
Version 3, 21-Dec-2005, William Thompson, GSFC
Added projections AIR,CSC,MOL,PCO,QSC,TSC,ZPN
Added keywords TOLERANCE, MAX_ITER
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_GET_TIME()
Purpose : Get date/time strings from WCS structures
Category : FITS, Coordinates, WCS
Explanation : This procedure extracts date/time strings from WCS.TIME
substructures. Depending on the keywords passed, the routine
will look for specific elements within the structure. If not
found, it will fall back to look for similar elements.
Syntax : Time = WCS_GET_TIME( WCS [, TAG_USED, keywords ...] )
Examples : Time = WCS_GET_TIME(WCS) ;Returns OBSERV_DATE
Time = WCS_GET_TIME(WCS,/END) ;Returns OBSERV_END
Time = WCS_GET_TIME(WCS,/MID,/CORRECTED)
;Returns CORRECTED_MID
Inputs : WCS = Structure from FITSHEAD2WCS
Opt. Inputs : None.
Outputs : The result of the function is the date/time found, or the null
string if nothing is found.
Opt. Outputs: TAG_USED = String containing the tag or expression used to
calculate the time returned.
Keywords : START = If set, look for the start time (OBSERV_DATE).
This is the default. Fails over to MJD_OBS
ENDTIME = Look for the end time (OBSERV_END). Fails over to
START+EXPTIME.
AVG = Look for the average time (OBSERV_AVG). Fails over
to MJD_AVG, the midpoint time, or (START+END)/2, or
START+EXPTIME/2.
MID = Look for the midpoint time (OBSERV_MID). Fails
over to (START+END)/2, or START+EXPTIME/2.
CORRECTED = Look for the corrected version of the time. Fails
over to the uncorrected version.
FITS = Look for the FITS creation date (FITS_DATE).
Although the average and midpoint times are generally treated
as synonyms of each other, they aren't necessarily the same.
The midpoint time is defined specifically as (START+END)/2,
while the average time is defined as "a representative time for
the whole observation", with the exact definition being left up
to the data provider.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], TAI2UTC, UTC2STR, UTC2TAI, VALID_WCS
Common : None.
Restrictions: Only one of the /START, /ENDTIME, /AVG, or /MID keywords can be
passed.
Side effects: If the MJD_OBS or MJD_AVG keywords are passed, then they will
serve as failover values for either corrected or uncorrected
times.
No attempt is made to apply a time correction algorithm if the
corrected date/time values are not found. If only one time is
found in the FITS header, there is a possibily that this time
has already been corrected.
Prev. Hist. : None.
History : Version 1, 10-Jan-2006, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
NAME:
WCS_GETPOLE
PURPOSE:
Compute the coordinates of the native pole for a non-polar projection
EXPLANATION:
For non-polar (cylindrical or conic) projections, the native pole is
not at the reference point, and WCS_GETPOLE is used to determine the
position of the native pole. See section 2.4 of the paper
"Representation of Celestial Coordinates in FITS" by Calabretta
Greisen (2002, A&A, 395, 1077, also available at
http://www.aoc.nrao.edu/~egreisen Called by WCS_ROTATE
CALLING SEQUENCE:
WCS_GETPOLE, crval, lonpole, theta0, alpha_p, delta_p, LATPOLE= ]
INPUT PARAMETERS:
crval - 2 element vector containing standard system coordinates (the
longitude and latitude) of the reference point in degrees
lonpole - native longitude of the celestial North Pole (degrees)
theta0 - native latitude of the fiducial point
OUTPUT PARAMETERS:
alpha_p, delta_p - celestial longitude and latitude of the native pole
(degrees)
OPTIONAL KEYWORD INPUT PARAMETERS:
LATPOLE - native latitude of the celestial North Pole (degrees)
REVISION HISTORY:
Written W. Landsman June, 2003
Fix calculation when theta0 is not 0 or 90 February 2004
CALLED BY
WCS_ROTATE
[Previous]
[Next]
Project : STEREO
Name : WCS_HCLEAN
Purpose : Clean FITS header of WCS keywords.
Category : FITS, Coordinates, WCS
Explanation : Removes any keywords relevant to array structure or WCS
coordinates from a FITS header, preparatory to recreating it
with the proper values. The objective is to leave only
annotative keywords.
Syntax : WCS_HCLEAN, HEADER
CALLED BY:
WCS2FITSHEAD
Examples : See WCS2FITSHEAD
Inputs : HEADER = FITS header to be cleaned.
Opt. Inputs : None.
Outputs : The cleaned FITS header is returned in place of the input
array.
Opt. Outputs: None.
Keywords : ERRMSG = If defined and passed, 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. In order to use this feature, ERRMSG must
be defined first, e.g.
ERRMSG = ''
WCS_HCLEAN, ERRMSG=ERRMSG, ...
IF ERRMSG NE '' THEN ...
Calls : ***
FXPAR [1], FXPAR [2], NTRIM, SXDELPAR [1], SXDELPAR [2], SXDELPAR [3], UNIQ [1]
UNIQ [2], UNIQ [3], VALID_NUM [1], VALID_NUM [2], VALID_NUM [3]
Common : None.
Restrictions: HEADER must be a string array containing a properly formatted
FITS header.
Side effects: Some coordinate-related keywords may leak through, especially
the non-standard ones.
Prev. Hist. : Based on FXHCLEAN.
History : Version 1, 19-Sep-2006, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_A2F
Purpose : Inverse of WCS_PROJ_A2F
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
air-wavelength-to-frequency (A2F) projection to convert from
spectral coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_A2F, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 08-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_A2V
Purpose : Inverse of WCS_PROJ_A2V
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
air-wavelength-to-velocity (A2V) projection to convert from
spectral coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_A2V, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 08-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_A2W
Purpose : Inverse of WCS_PROJ_A2W
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
air-to-vacuum wavelength (A2W) projection to convert from
spectral coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_A2W, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 08-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_AIR
Purpose : Inverse of WCS_PROJ_AIR
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the inverse
Airy (AIR) projection to convert from celestial coordinates to
intermediate relative coordinates.
Syntax : WCS_INV_PROJ_AIR, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 19-Dec-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_AIT
Purpose : Inverse of WCS_PROJ_AIT
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
Hammer-Aitoff pseudocylindrical (AIT) projection to convert
from celestial coordinates to intermediate relative
coordinates.
Syntax : WCS_INV_PROJ_AIT, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 20-May-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_ARC
Purpose : Inverse of WCS_PROJ_ARC
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
zenithal equidistant (ARC) projection to convert from celestial
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_ARC, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 19-May-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_AZP
Purpose : Inverse of WCS_PROJ_AZP
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
zenithal perspective (AZP) projection to convert from celestial
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_AZP, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 19-May-2005, William Thompson, GSFC
Version 2, 21-May-2005, William Thompson, GSFC
Fixed bug when gamma NE 0.
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_BON
Purpose : Inverse of WCS_PROJ_BON
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
Bonne's equal area (BON) projection to convert from celestial
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_BON, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 02-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_CAR
Purpose : Inverse of WCS_PROJ_CAR
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
plate carree (CAR) projection to convert from celestial
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_CAR, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : QUICK = If set, do a quick approximate calculation rather
than a full-blown spherical projection.
The projection is equivalent to the
approximate calculation when the reference value
is on the equator, unless overridden by projection
values in the WCS structure. Setting the
reference pixel at the equator satisfies the usual
expectations. However, the speed-up realized by
the /QUICK keyword is relatively minor.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 20-May-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_CEA
Purpose : Inverse of WCS_PROJ_CEA
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
cylindrical equal area (CEA) projection to convert from
celestial coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_CEA, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 20-May-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_COD
Purpose : Inverse of WCS_PROJ_COD
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
conic equidistant (COD) projection to convert from celestial
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_COD, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 02-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_COE
Purpose : Inverse of WCS_PROJ_COE
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
conic equal area (COE) projection to convert from celestial
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_COE, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 02-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_COO
Purpose : Inverse of WCS_PROJ_COO
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
conic orthomorphic (COO) projection to convert from celestial
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_COO, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 02-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_COP
Purpose : Inverse of WCS_PROJ_COP
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
conic perspective (COP) projection to convert from celestial
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_COP, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 02-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_CSC
Purpose : Inverse of WCS_PROJ_CSC
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
COBE quadrilateralized spherical cube (CSC) projection to
convert from celestial coordinates to intermediate relative
coordinates.
Syntax : WCS_INV_PROJ_CSC, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, POLY, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 20-Dec-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_CYP
Purpose : Inverse of WCS_PROJ_CYP
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
cylindrical perspective (CYP) projection to convert from
celestial coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_CYP, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 20-May-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_F2A
Purpose : Inverse of WCS_PROJ_F2A
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
frequency-to-air-wavelength (F2A) projection to convert from
spectral coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_F2A, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 08-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_F2V
Purpose : Inverse of WCS_PROJ_F2V
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
frequency-to-velocity (F2V) projection to convert from
spectral coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_F2V, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_F2W
Purpose : Inverse of WCS_PROJ_F2W
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
frequency-to-wavelength (F2W) projection to convert from
spectral coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_F2W, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_GRA
Purpose : Inverse of WCS_PROJ_GRA
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
grism-in-air (GRA) projection to convert from spectral
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_GRA, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_GRI
Purpose : Inverse of WCS_PROJ_GRI
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
grism (GRI) projection to convert from spectral coordinates to
intermediate relative coordinates.
Syntax : WCS_INV_PROJ_GRI, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_LOG
Purpose : Inverse of WCS_PROJ_LOG
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
logarithmic (LOG) projection to convert from real-world
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_LOG, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the de-projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : None.
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 06-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_MER
Purpose : Inverse of WCS_PROJ_MER
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
Mercator (MER) projection to convert from celestial coordinates
to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_MER, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 20-May-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_MOL
Purpose : Inverse of WCS_PROJ_MOL
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
Mollweide pseudocylindrical (MOL) projection to convert
from celestial coordinates to intermediate relative
coordinates.
Syntax : WCS_INV_PROJ_MOL, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : TOLERANCE = Convergence tolerance for gamma, relative to
sin(theta). The default is 1E-8.
MAX_ITER = Maximum number of iterations. Default is 1000.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 16-Dec-2005, William Thompson, GSFC
Used Newton method from wcssph2xy.pro
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_PAR
Purpose : Inverse of WCS_PROJ_PAR
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
parabolic (PAR) or Craster pseudocylindrical projection to
convert from celestial coordinates to intermediate relative
coordinates.
Syntax : WCS_INV_PROJ_PAR, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 20-May-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_PCO
Purpose : Inverse of WCS_PROJ_PCO
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
polyconic (PCO) projection to convert from celestial
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_PCO, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 19-Dec-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_QSC
Purpose : Inverse of WCS_PROJ_QSC
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
quadrilateralized spherical cube (QSC) projection to convert
from celestial coordinates to intermediate relative
coordinates.
Syntax : WCS_INV_PROJ_QSC, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 21-Dec-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_SFL
Purpose : Inverse of WCS_PROJ_SFL
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
Sanson-Flamsteed (SFL) projection to convert from celestial
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_SFL, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 20-May-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_SIN
Purpose : Inverse of WCS_PROJ_SIN
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
slant orthographic (SIN) projection to convert from celestial
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_SIN, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 19-May-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_STG
Purpose : Inverse of WCS_PROJ_STG
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
stereographic (STG) projection to convert from celestial
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_STG, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 20-May-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_SZP
Purpose : Inverse of WCS_PROJ_SZP
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
slant zenithal perspective (SZP) projection to convert from
celestial coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_SZP, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 03-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_TAB
Purpose : Inverse of WCS_PROJ_TAB
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
lookup table (TAB) projection to convert from real-world
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_TAB, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
INTERPOL, NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Currently, the projection is not applied when more than three
axes are linked through the same coordinate table array.
The EXTVER and EXTLEVEL parameters are not yet enforced.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 06-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_TAN
Purpose : Inverse of WCS_PROJ_TAN
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
gnomonic (TAN) projection to convert from celestial coordinates
to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_TAN, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : QUICK = If set, do a quick approximate calculation rather
than a full-blown spherical projection. Different
approximations are used for helioprojective-
cartesian and -radial coordinates.
FORCE_PROJ = This routine has logic which skips the
calculation of the spherical projection when the
pixels are within 3 degrees of the Sun. Using
/FORCE_PROJ forces the full spherical coordinate
transformation to be calculated.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 19-May-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_TSC
Purpose : Inverse of WCS_PROJ_TSC
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
tangential spherical cube (TSC) projection to convert from
celestial coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_TSC, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 20-Dec-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_V2A
Purpose : Inverse of WCS_PROJ_V2A
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
velocity-to-air-wavelength (V2A) projection to convert from
spectral coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_V2A, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 08-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_V2F
Purpose : Inverse of WCS_PROJ_V2F
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
velocity-to-frequency (V2F) projection to convert from
spectral coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_V2F, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_V2W
Purpose : Inverse of WCS_PROJ_V2W
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
velocity-to-wavelength (V2W) projection to convert from
spectral coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_V2W, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_W2A
Purpose : Inverse of WCS_PROJ_W2A
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
vacuum-to-air wavelength (W2A) projection to convert from
spectral coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_W2A, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 08-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_W2F
Purpose : Inverse of WCS_PROJ_W2F
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
wavelength-to-frequency (W2F) projection to convert from
spectral coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_W2F, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_W2V
Purpose : Inverse of WCS_PROJ_W2V
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
wavelength-to-velocity (W2V) projection to convert from
spectral coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_W2V, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_ZEA
Purpose : Inverse of WCS_PROJ_ZEA
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_PIXEL to apply the inverse
zenithal equal-area (ZEA) projection to convert from celestial
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_ZEA, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 20-May-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_INV_PROJ_ZPN
Purpose : Inverse of WCS_PROJ_ZPN
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the inverse
zenithal polynomial (ZPN) projection to convert from celestial
coordinates to intermediate relative coordinates.
Syntax : WCS_INV_PROJ_ZPN, WCS, COORD
CALLED BY:
WCS_GET_PIXEL
Examples : See WCS_GET_PIXEL
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The coordinates, e.g. from WCS_GET_COORD.
Opt. Inputs : None.
Outputs : The de-projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, POLY, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_PIXEL, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 19-Dec-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PARSE_UNITS
Purpose : Parse FITS/WCS units specification strings
Category : FITS, Coordinates, WCS
Explanation : Parses a FITS/WCS units specification string, as described in
Greisen and Calabretta, 2002, "Representations of world
coordinates in FITS", A&A, 395, 1061-1075. Coordinates are
decomposed into their base MKS units, together with an
appropriate multiplication factor.
Syntax : WCS_PARSE_UNITS, UNITS_STRING, BASE_UNITS, FACTOR
CALLED BY:
WCS_FIT_GRISM, WCS_INV_PROJ_A2F, WCS_INV_PROJ_A2V, WCS_INV_PROJ_A2W
WCS_INV_PROJ_F2A, WCS_INV_PROJ_F2V, WCS_INV_PROJ_F2W, WCS_INV_PROJ_GRA
WCS_INV_PROJ_GRI, WCS_INV_PROJ_V2A, WCS_INV_PROJ_V2F, WCS_INV_PROJ_V2W
WCS_INV_PROJ_W2A, WCS_INV_PROJ_W2F, WCS_INV_PROJ_W2V, WCS_PROJ_A2F, WCS_PROJ_A2V
WCS_PROJ_A2W, WCS_PROJ_F2A, WCS_PROJ_F2V, WCS_PROJ_F2W, WCS_PROJ_GRA, WCS_PROJ_GRI
WCS_PROJ_V2A, WCS_PROJ_V2F, WCS_PROJ_V2W, WCS_PROJ_W2A, WCS_PROJ_W2F, WCS_PROJ_W2V
Examples : WCS_PARSE_UNITS, 'Angstrom', BASE_UNITS, FACTOR
Would give as output: BASE_UNITS = 'm'
FACTOR = 1E-10
Inputs : UNITS_STRING = String containing the units specification.
Opt. Inputs : None.
Outputs : BASE_UNITS = String containing the derived base units, made up
of "m", "kg", "s", "rad", "sr", "K", "A", "mol",
and "cd" (candela). For example, velocity would
be expressed as "m.s^-1".
FACTOR = The conversion factor from the input units into the
base units.
Opt. Outputs: None.
Keywords : None.
Calls : ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], NTRIM, WCS_PARSE_UNITS_BASE
Common : None.
Restrictions: Functions log(), ln(), and exp() are not supported.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 06-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PARSE_UNITS_BASE
Purpose : Internal subroutine of WCS_PARSE_UNITS
Category : FITS, Coordinates, WCS
Explanation : Called from WCS_PARSE_UNITS
Syntax : WCS_PARSE_UNITS_BASE,UNITS_STRING,FACTOR,METERS,KILOGRAMS,$
SECONDS,RADIANS,STERADIANS,KELVINS,AMPERES,MOLES, $
CANDELAS
Inputs : UNITS_STRING = String containing the units specification.
Opt. Inputs : None.
Outputs : FACTOR = The conversion factor from the input units into the
base units.
The remaining output parameters contain the power applied to
each basic unit.
Opt. Outputs: None.
Keywords : None.
Calls : ***
WCS_PARSE_UNITS_POWER
CALLED BY:
WCS_PARSE_UNITS
Common : None.
Restrictions: Functions log(), ln(), and exp() are not supported.
Because this routine is intended to be called only from
WCS_PARSE_UNITS, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 06-Jun-2005, William Thompson, GSFC
Version 2, 13-Jun-2005, William Thompson, GSFC
Support sqrt(), and many non-standard unit strings
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_A2F
Purpose : Convert intermediate coordinates in A2F projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
air-wavelength-to-frequency (A2F) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_A2F, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 08-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_A2V
Purpose : Convert intermediate coordinates in A2V projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
air-wavelength-to-velocity (A2V) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_A2V, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 08-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_A2W
Purpose : Convert intermediate coordinates in A2W projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
air-to-vacuum wavelength (A2W) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_A2W, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 08-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_AIR
Purpose : Convert intermediate coordinates in AIR projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the Airy
(AIR) projection to intermediate relative coordinates.
Syntax : WCS_PROJ_AIR, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : TOLERANCE = Convergence tolerance for zeta, in terms of
R_theta. The default is 1E-8.
MAX_ITER = Maximum number of iterations. Default is 1000.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 16-Dec-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_AIT
Purpose : Convert intermediate coordinates in AIT projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
Hammer-Aitoff pseudocylindrical (AIT) projection to
intermediate relative coordinates.
Syntax : WCS_PROJ_AIT, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 29-Apr-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_ARC
Purpose : Convert intermediate coordinates in ARC projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the zenithal
equidistant (ARC) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_ARC, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 10-May-2005, William Thompson, GSFC
Version 2, 22-Dec-2005, William Thompson, GSFC
Added keyword MISSING. Filter out beyond S pole.
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_AZP
Purpose : Convert intermediate coordinates in AZP projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the zenithal
perspective (AZP) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_AZP, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 25-Apr-2005, William Thompson, GSFC
Version 2, 19-May-2005, William Thompson, GSFC
Made more efficient when gamma=0
Version 3, 21-Jun-2005, William Thompson, GSFC
Improved test for theta selection
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_BON
Purpose : Convert intermediate coordinates in BON projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the Bonne's
equal area (BON) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_BON, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 02-Jun-2005, William Thompson, GSFC
Version 2, 22-Dec-2005, William Thompson, GSFC
Filter out pixels beyond boundary
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_CAR
Purpose : Convert intermediate coordinates in CAR projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the plate
carree (CAR) projection to intermediate relative coordinates.
Syntax : WCS_PROJ_CAR, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : QUICK = If set, do a quick approximate calculation rather
than a full-blown spherical projection.
The projection is equivalent to the
approximate calculation when the reference value
is on the equator, unless overridden by projection
values in the WCS structure. Setting the
reference pixel at the equator satisfies the usual
expectations. However, the speed-up realized by
the /QUICK keyword is relatively minor.
MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values. Ignored if /QUICK is
used.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 27-Apr-2005, William Thompson, GSFC
Version 2, 29-Apr-2005, William Thompson, GSFC
Added keyword MISSING
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_CEA
Purpose : Convert intermediate coordinates in CEA projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
cylindrical equal area (CEA) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_CEA, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 29-Apr-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_COD
Purpose : Convert intermediate coordinates in COD projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the conic
equidistant (COD) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_COD, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 29-Apr-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_COE
Purpose : Convert intermediate coordinates in COE projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the conic
equal area (COE) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_COE, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 29-Apr-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_COO
Purpose : Convert intermediate coordinates in COO projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the conic
orthomorphic (COO) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_COO, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 29-Apr-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_COP
Purpose : Convert intermediate coordinates in COP projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the conic
perspective (COP) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_COP, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 29-Apr-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_CSC
Purpose : Convert intermediate coordinates in CSC projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the COBE
quadrilateral spherical cube (CSC) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_CSC, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 20-Dec-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_CYP
Purpose : Convert intermediate coordinates in CYP projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
cylindrical perspective (CYP) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_CYP, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 29-Apr-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_F2A
Purpose : Convert intermediate coordinates in F2A projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
frequency-to-air-wavelength (F2A) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_F2A, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 08-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_F2V
Purpose : Convert intermediate coordinates in F2V projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
frequency-to-velocity (F2V) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_F2V, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_F2W
Purpose : Convert intermediate coordinates in F2W projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
frequency-to-wavelength (F2W) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_F2W, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_GRA
Purpose : Convert intermediate coordinates in GRA projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
grism-in-air (GRA) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_GRA, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_GRI
Purpose : Convert intermediate coordinates in GRI projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
grism (GRI) projection to intermediate relative coordinates.
Syntax : WCS_PROJ_GRI, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_LOG
Purpose : Convert intermediate coordinates in LOG projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
logarithmic (LOG) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_LOG, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : TAG_EXIST, NTRIM
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 06-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_MER
Purpose : Convert intermediate coordinates in MER projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the Mercator
(MER) projection to intermediate relative coordinates.
Syntax : WCS_PROJ_MER, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 28-Apr-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_MOL
Purpose : Convert intermediate coordinates in MOL projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
Mollweide pseudocylindrical (MOL) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_MOL, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 29-Apr-2005, William Thompson, GSFC
Version 2, 31-May-2005, William Thompson, GSFC
Corrected bug when test condition never met
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_PAR
Purpose : Convert intermediate coordinates in PAR projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
parabolic (PAR) or Craster pseudocylindrical projection to
intermediate relative coordinates.
Syntax : WCS_PROJ_PAR, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 29-Apr-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_PCO
Purpose : Convert intermediate coordinates in PCO projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
polyconic (PCO) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_PCO, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
TOLERANCE = Convergence tolerance for zeta, in terms of
R_theta. The default is 1E-8.
MAX_ITER = Maximum number of iterations. Default is 1000.
Calls : ***
NTRIM, SIGN, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 19-Dec-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_QSC
Purpose : Convert intermediate coordinates in QSC projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
quadrilateralized spherical cube (QSC) projection to
intermediate relative coordinates.
Syntax : WCS_PROJ_QSC, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, SIGN, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 21-Dec-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_SFL
Purpose : Convert intermediate coordinates in SFL projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
Sanson-Flamsteed (SFL) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_SFL, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 29-Apr-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_SIN
Purpose : Convert intermediate coordinates in SIN projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the slant
orthographic (SIN) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_SIN, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 26-Apr-2005, William Thompson, GSFC
Version 2, 03-Jun-2005, William Thompson, GSFC
Support non-zero slant values.
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_STG
Purpose : Convert intermediate coordinates in STG projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
stereographic (STG) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_STG, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 10-May-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_SZP
Purpose : Convert intermediate coordinates in SZP projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the slant
zenithal perspective (SZP) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_SZP, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 03-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_TAB
Purpose : Convert intermediate coordinates in TAB projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
lookup table (TAB) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_TAB, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
INTERPOL, NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Currently, the projection is not applied when more than three
axes are linked through the same coordinate table array.
The EXTVER and EXTLEVEL parameters are not yet enforced.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 06-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_TAN
Purpose : Convert intermediate coordinates in TAN projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the gnomonic
(TAN) projection to intermediate relative coordinates.
Syntax : WCS_PROJ_TAN, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : QUICK = If set, do a quick approximate calculation rather
than a full-blown spherical projection. Different
approximations are used for helioprojective-
cartesian and -radial coordinates.
FORCE_PROJ = This routine has logic which skips the
calculation of the spherical projection when the
pixels are within 3 degrees of the Sun. Using
/FORCE_PROJ forces the full spherical coordinate
transformation to be calculated.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 19-Apr-2005, William Thompson, GSFC
Version 2, 19-May-2005, William Thompson, GSFC
Corrected bug when single pixel passed.
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_TSC
Purpose : Convert intermediate coordinates in TSC projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
tangential spherical cube (TSC) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_TSC, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 20-Dec-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_V2A
Purpose : Convert intermediate coordinates in V2A projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
velocity-to-air-wavelength (V2A) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_V2A, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 08-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_V2F
Purpose : Convert intermediate coordinates in V2F projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
velocity-to-frequency (V2F) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_V2F, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_V2W
Purpose : Convert intermediate coordinates in V2W projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
velocity-to-wavelength (V2W) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_V2W, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_W2A
Purpose : Convert intermediate coordinates in W2A projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
vacuum-to-air wavelength (W2A) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_W2A, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 08-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_W2F
Purpose : Convert intermediate coordinates in W2F projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
wavelength-to-frequency (W2F) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_W2F, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_W2V
Purpose : Convert intermediate coordinates in W2V projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the
wavelength-to-velocity (W2V) projection to intermediate
relative coordinates.
Syntax : WCS_PROJ_W2V, WCS, COORD, I_AXIS
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
I_AXIS= The axis to apply the projection to.
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], WCS_PARSE_UNITS
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 07-Jun-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_ZEA
Purpose : Convert intermediate coordinates in ZEA projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the zenithal
equal-area (ZEA) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_ZEA, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
Calls : ***
NTRIM, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 10-May-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_PROJ_ZPN
Purpose : Convert intermediate coordinates in ZPN projection.
Category : FITS, Coordinates, WCS
Explanation : This routine is called from WCS_GET_COORD to apply the zenithal
polynomial (ZPN) projection to intermediate relative
coordinates.
Syntax : WCS_PROJ_ZPN, WCS, COORD
CALLED BY:
WCS_GET_COORD
Examples : See WCS_GET_COORD
Inputs : WCS = A World Coordinate System structure, from FITSHEAD2WCS.
COORD = The intermediate coordinates, relative to the reference
pixel (i.e. CRVAL hasn't been applied yet).
Opt. Inputs : None.
Outputs : The projected coordinates are returned in the COORD array.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing values with. If not passed,
then missing values are filled with IEEE
Not-A-Number (NaN) values.
TOLERANCE = Convergence tolerance for zeta, in terms of
R_theta. The default is 1E-8.
MAX_ITER = Maximum number of iterations. Default is 1000.
Calls : ***
NTRIM, POLY, TAG_EXIST [1], TAG_EXIST [2]
Common : None.
Restrictions: Because this routine is intended to be called only from
WCS_GET_COORD, no error checking is performed.
This routine is not guaranteed to work correctly if the
projection parameters are non-standard.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 19-Dec-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_RECTIFY
Purpose : Resample WCS images to rectify the axes.
Category : FITS, Coordinates, WCS
Explanation : This procedure takes a data array and associated World
Coordinate System structure, and resamples the array to remove
all the cross terms in the PC or CD matrix. This is the
N-dimensional equivalent of rotating a 2D axis to set the
CROTAn values to zero.
Syntax : WCS_RECTIFY, DATA, WCS
Inputs : DATA = Data array associated with the WCS structure
WCS = World Coordinate System structure from FITSHEAD2WCS
Opt. Inputs : None.
Outputs : DATA and WCS are modified.
Opt. Outputs: None.
Keywords : MISSING = Value to fill missing pixels with. If not passed,
then the program first looks to see if SET_FLAG has
been called to set a default value. Otherwise,
missing pixels are filled with IEEE Not-A-Number
(NaN) values.
CUBIC = Keyword passed to the INTERPOLATE routine--see that
routine for more information. Ignored if the array
has more than two dimensions.
ERRMSG = If defined and passed, 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. In order to use this feature, ERRMSG must
be defined first, e.g.
ERRMSG = ''
WCS_RECTIFY, DATA, WCS, ERRMSG=ERRMSG, ...
IF ERRMSG NE '' THEN ...
Calls : ***
ADD_TAG [1], ADD_TAG [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_IM_KEYWORD
NTRIM, REM_TAG [1], REM_TAG [2], TAG_EXIST [1], TAG_EXIST [2], VALID_WCS
WCS_GET_COORD, WCS_SIMPLE
CALLED BY:
WCS_SIMPLIFY
Common : None.
Restrictions: If the data array has more than three dimensions, then the
routine defaults to nearest-neighbor interpolation.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 19-Apr-2005, William Thompson, GSFC
Version 2, 25-Apr-2005, William Thompson, GSFC
Added call to INTERPOLATE
Version 3, 12-May-2005, William Thompson, GSFC
Handle missing complex and dcomplex values
Contact : WTHOMPSON
[Previous]
[Next]
NAME:
WCS_ROTATE
PURPOSE:
Rotate between standard (e.g. celestial) and native coordinates
EXPLANATION:
Computes a spherical coordinate rotation between native coordinates
and standard celestial coordinate system (celestial, Galactic, or
ecliptic). Applies the equations in Appendix A of the paper
"Representation of Celestial Coordinates in FITS" by Calabretta
Greisen (2002, A&A, 395, 1077). Also see
http://www.aoc.nrao.edu/~egreisen
CATEGORY:
Mapping and Auxiliary FITS Routine
CALLING SEQUENCE:
WCS_ROTATE, longitude, latitude, phi, theta, crval,
[LONGPOLE = , LATPOLE = , /REVERSE, /ORIGIN ]
INPUT PARAMETERS:
crval - 2 element vector containing standard system coordinates (the
longitude and latitude) of the reference point
INPUT OR OUTPUT PARAMETERS
longitude - longitude of data, scalar or vector, in degrees, in the
standard celestial coordinate system
latitude - latitude of data, same number of elements as longitude,
in degrees
phi - longitude of data in the native system, in degrees, scalar or
vector
theta - latitude of data in the native system, in degrees, scalar or
vector
If the keyword(REVERSE) is set then phi and theta are input parameters
and longitude and latitude are computed. Otherwise, longitude and
latitude are input parameters and phi and theta are computed.
OPTIONAL KEYWORD INPUT PARAMETERS:
ORIGIN - If this keyword is set and non-zero, then the reference point
given by CRVAL in the native system is assumed to be at the
origin of the coordinates, rather than at the North Pole.
ORIGIN should be set for cylindrical projections (Cylindrical
perspective-CYP, Cartesian - CAR, Mercator - MER, Cylindrical
Equal area - CEA) and conventional projections (Bonne's equal
area - BON, Polyconic - PCO, Sinusoidal - GLS, Parabolic - PAR,
Aitoff - AIT, Mollweide - MOL, COBE quadrilateralized sphere -
CSC, Quadrilateralized Spherical Cube - QSC, and Tangential
Spherical Cube - TSC)
LONGPOLE - native longitude of standard system's North Pole, default
for a Zenithal system is 180 degrees
LATPOLE - native latitude of the standard system's North Pole
/REVERSE - if set then phi and theta are input parameters and longitude
and latitude are computed. By default, longitude and
latitude are input parameters and phi and theta are computed.
REVISION HISTORY:
Written W. Landsman December, 1994
Fixed error in finding North Pole if /ORIGIN and LONGPOLE NE 180
Xiaoyi Wu and W. Landsman, March, 1996
Fixed implementation of March 96 error, J. Thieler, April 1996
Updated to IDL V5.0 W. Landsman December 1997
Fixed determination of alpha_p if /ORIGIN and LONGPOLE EQ 180
W. Landsman May 1998
Ensure argument of ASIN() is -1<x<-1 after roundoff
W. Landsman/R. Arendt June 2002
Call WCS_GETPOLE, accept LATPOLE keyword, update cylindrical coords
W. Landsman June 2003
Don't attempt to rotate NaN values W. Landsman May 2004
CALLS:
CALLED BY
HEULER, WCSSPH2XY, WCSXY2SPH, WCSXY2SPH_SMEI
[Previous]
[Next]
Project : STEREO
Name : WCS_SIMPLE()
Purpose : Determines if a WCS structure is simple.
Category : FITS, Coordinates, WCS
Explanation : This procedure examines the FITS World Coordinate System
structure from FITSHEAD2WCS, and determines whether or not the
structure can be described as "simple". A simple WCS has the
following properties:
* The first dimension is longitude (X)
* The second dimension is latitude (Y)
* The coordinate system is Helioprojective-Cartesian
or Heliocentric-Cartesian
* The projection is either "TAN" or blank.
* The CDELT and ROLL_ANGLE tags are present, e.g. from
WCS_DECOMP_ANGLE.
Syntax : Result = WCS_SIMPLE( WCS )
CALLED BY:
FITSHEAD2WCS, WCS_RECTIFY, WCS_SIMPLIFY
Examples : IF WCS_SIMPLE( WCS) THEN ...
Inputs : WCS = Structure from FITSHEAD2WCS
Opt. Inputs : None.
Outputs : The result of the function is 1 if the input is recognized as a
simple WCS structure, 0 otherwise.
Opt. Outputs: None.
Keywords : ADD_TAG = If set, then the tag SIMPLE is added to the
structure, containing the result.
Calls : ***
ADD_TAG [1], ADD_TAG [2], TAG_EXIST [1], TAG_EXIST [2], VALID_WCS
Common : None.
Restrictions: Currently, only one WCS can be examined at a time.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 15-Apr-2005, William Thompson, GSFC
Version 2, 25-Apr-2005, William Thompson, GSFC
Fixed problem with recompiling
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO
Name : WCS_SIMPLIFY
Purpose : Simplifies a WCS data array and structure.
Category : FITS, Coordinates, WCS
Explanation : This procedure rearranges a WCS structure and associated data
array so that it satisfies the WCS_SIMPLE() function. If
necessary, WCS_RECTIFY is called so that the WCS can be
decomposed into CDELT and ROLL_ANGLE values. Also, the
dimensions are rearranged so that the longitude (X) dimension
is first, and the latitude (Y) dimension is second.
Syntax : WCS_SIMPLIFY, DATA, WCS
Inputs : DATA = Data array associated with the WCS structure
WCS = World Coordinate System structure from FITSHEAD2WCS
Opt. Inputs : None.
Outputs : DATA and WCS are modified.
Opt. Outputs: None.
Keywords : Accepts keywords for WCS_DECOMP_ANGLE and WCS_RECTIFY
Calls : ***
NTRIM, REARRANGE, TAG_EXIST [1], TAG_EXIST [2], VALID_WCS, WCS_DECOMP_ANGLE
WCS_RECTIFY, WCS_SIMPLE
Common : None.
Restrictions: Currently only works for WCS structures in either the
Helioprojective-Cartesion, or Heliocentric-Cartesian coordinate
systems. The only supported projection is TAN.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 15-April-2005, William Thompson, GSFC
Version 2, 05-Jul-2005, William Thompson, GSFC
Handle PSi_m, SPEC_INDEX, table projection
Contact : WTHOMPSON
[Previous]
[Next]
NAME:
WCSSPH2XY
PURPOSE:
Convert spherical coordinates to x and y (map) angular coordinates
EXPLANATION:
Convert spherical (longitude and latitude -- sky) coordinates to x
and y (map) angular coordinates. This procedure is the inverse of
WCSXY2SPH. See WCS_DEMO for example of use.
This is a lower level procedure -- given a FITS header, the user will
usually use ADXY which will then call WCSSPH2XY with the appropriate
parameters.
CATEGORY:
Mapping and Auxiliary FITS Routine
CALLING SEQUENCE:
wcssph2xy, longitude, latitude, x, y, [ map_type , CTYPE = ,
FACE =,PV2= , CRVAL = , CRXY = , LONGPOLE = ,
LATPOLE = , NORTH_OFFSET =, SOUTH_OFFSET =, BADINDEX =]
INPUT PARAMETERS:
longitude - longitude of data, scalar or vector, in degrees
latitude - latitude of data, same number of elements as longitude,
in degrees
map_type - optional positional parameter, numeric scalar (0-26)
corresponding to a particular map projection. This is not a
FITS standard, it is simply put in to allow function similar
to that of less general map projection procedures (eg AITOFF).
The following list gives the map projection types and their
respective numbers.
FITS Number Name Comments
code code
---- ------ ----------------------- -----------------------------------
DEF 0 Default = Cartesian
AZP 1 Zenithal perspective PV2_1 required
TAN 2 Gnomic AZP w/ mu = 0
SIN 3 Orthographic PV2_1,PV2_2 optional
STG 4 Stereographic AZP w/ mu = 1
ARC 5 Zenithal Equidistant
ZPN 6 Zenithal polynomial PV2_0, PV2_1....PV2_20 possible
ZEA 7 Zenithal equal area
AIR 8 Airy PV2_1 required
CYP 9 Cylindrical perspective PV2_1 and PV2_2 required
CAR 10 Cartesian
MER 11 Mercator
CEA 12 Cylindrical equal area PV2_1 required
COP 13 Conical perspective PV2_1 and PV2_2 required
COD 14 Conical equidistant PV2_1 and PV2_2 required
COE 15 Conical equal area PV2_1 and PV2_2 required
COO 16 Conical orthomorphic PV2_1 and PV2_2 required
BON 17 Bonne's equal area PV2_1 required
PCO 18 Polyconic
SFL 19 Sanson-Flamsteed
PAR 20 Parabolic
AIT 21 Hammer-Aitoff
MOL 22 Mollweide
CSC 23 Cobe Quadrilateralized convergence of inverse is poor
Spherical Cube
QSC 24 Quadrilateralized
Spherical Cube
TSC 25 Tangential Spherical Cube
SZP 26 Slant Zenithal Projection PV2_1,PV2_2, PV2_3 optional
OPTIONAL INPUT KEYWORD PARAMETERS:
CTYPE - One, two, or three element vector containing 8 character
strings corresponding to the CTYPE1, CTYPE2, and CTYPE3
FITS keywords:
CTYPE[0] - first four characters specify standard system
('RA--','GLON' or 'ELON' for right ascension, Galactic
longitude or ecliptic longitude respectively), second four
letters specify the type of map projection (eg '-AIT' for
Aitoff projection)
CTYPE[1] - first four characters specify standard system
('DEC-','GLAT' or 'ELAT' for declination, galactic latitude
or ecliptic latitude respectively; these must match
the appropriate system of ctype1), second four letters of
ctype2 must match second four letters of ctype1.
CTYPE[2] - if present must be the 8 character string,'CUBEFACE',
only used for spherical cube projections to identify an axis
as containing the face on which each x and y pair of
coordinates lie.
PV2_1 - scalar with first projection parameter, this may
or may not be necessary depending on the map projection used
PV2_2 - scalar with second projection parameter, this may
or may not be necessary depending on the map projection used
CRVAL - 2 element vector containing standard system coordinates (the
longitude and latitude) of the reference point
CRXY - 2 element vector giving the x and y coordinates of the
reference point, if this is not set the offset is [0,0]
This is not a FITS standard -- it is similar to CRPIX but in
angular X,Y coordinates (degrees) rather than pixel coordinates
LATPOLE - native latitude of the standard system's North Pole
LONGPOLE - native longitude of standard system's North Pole, default
is 180 degrees for Zenithal systems
NORTH_OFFSET - offset (radians) added to input points near north pole.
SOUTH_OFFSET - offset (radians) added to input points near south pole.
BADINDEX - vector, list of transformed points too close to poles.
OUTPUT PARAMETERS:
x - x coordinate of data, same number of elements as longitude, in
degrees; if CRXY is set, then x will be returned offset by
crxy(0). NOTE: x in all map projections increases to the
left, not the right.
y - y coordinate of data, same number of elements as longitude, in
degrees; if CRXY is set, y will be returned offset by crxy[1]
bad - vector returning index to transformed points close to pole.
OPTIONAL OUTPUT KEYWORD PARAMETERS:
FACE - a output variable used for spherical cube projections to
designate the face of the cube on which the x and y
coordinates lie. Will contain the same number of elements as
X and Y. Must contain at least 1 arbitrary element on input
If FACE is NOT defined on input, it is assumed that the
spherical cube projection is laid out over the whole sky
in the "sideways T" configuration.
NOTES:
The conventions followed here are described in more detail in
"Representations of Celestial Coordinates in FITS" by Mark Calabretta
and Eric Greisen (2002, A&A, 395, 1077; also see
http://www.aoc.nrao.edu/~egreisen) .The general
scheme outlined in that article is to first use WCS_ROTATE to convert
coordinates in one of three standard systems (celestial, galactic,
or ecliptic) into a "native system" of latitude and longitude. The
latitude and longitude are then converted into x and y coordinates
which depend on the map projection which is performed. The rotation
from standard to native coordinates can be skipped if one so desires.
This procedure necessitates two basic sections. The first converts
"standard" coordinates to "native" coordinates while the second converts
"native" coordinates to x and y coordinates. The first section is
simply a call to WCS_ROTATE, while the second contains the guts of
the code in which all of the map projection is done. This procedure
can be called in a form similar to AITOFF, EQPOLE, or QDCB by calling
wcssph2xy with a fifth parameter specifying the map projection by
number and by not using any of the keywords related to the map
projection type (e.g. CTYPE).
CALLED BY:
AD2XY, FLL_GRID, QDCB_GRID, STARAST
PROCEDURE:
The first task of the procedure is to do general error-checking to
make sure the procedure was called correctly and none of the
parameters or keywords conflict. This is particularly important
because the procedure can be called in two ways (either using
FITS-type keywords or using a number corresponding to a map projection
type). All variables are converted into double precision values and
angular measurements are converted from degrees into radians.
If necessary, longitude values are converted into the range -pi to pi.
Any latitude points close to the of the poles are mapped to a specific
latitude of from the pole so that the map transformations become
completely invertible. The magnitude of this correction is given by
the keywords NORTH_OFFSET and SOUTH_OFFSET and a list of affected
points is optionally returned in the "badindex" output parameter.
The next task of the procedure is to convert the "standard"
coordinates to "native" coordinates by rotating the coordinate system.
This rotation is performed by the procedure WCS_ROTATE and is governed
by the keywords CRVAL and LONGPOLE. The final task of the WCSSPH2XY
is to take "native" latitude and longitude coordinates and convert
them into x and y coordinates. Any map specific error-checking is
done at this time. All of the equations were obtained from
"Representations of Celestial Coordinates in FITS" and cases needing
special attention are handled appropriately (see the comments with
individual map projections for more information on special cases).
Note that a further transformation (using the CD matrix) is required
to convert the (x,y) coordinates to pixel coordinates.
CALLS: ***
POLY, WCS_ROTATE
COMMON BLOCKS:
none
PROCEDURES CALLED:
WCS_ROTATE
COPYRIGHT NOTICE:
Copyright 1993, The Regents of the University of California. This
software was produced under U.S. Government contract (W-7405-ENG-36)
by Los Alamos National Laboratory, which is operated by the
University of California for the U.S. Department of Energy.
The U.S. Government is licensed to use, reproduce, and distribute
this software. Neither the Government nor the University makes
any warranty, express or implied, or assumes any liability or
responsibility for the use of this software.
AUTHOR:
Rick Balsano
MODIFICATIONS/REVISION LEVEL:
1.1 8/31/93
2.3 9/15/93 W. Landsman (HSTX) Update quad cube coords, vectorize
keywords
2.4 12/29/93 I. Freedman (HSTX) Eliminated LU decomposition
2.5 1/5/93 I. Freedman (HSTX) Offset keywords / bad point index
2.6 Dec 94 Compute pole for transformations where the reference
pixel is at the native origin W. Landsman (HSTX)
2.7 May 95 Change internal variable BETA for V4.0 compatibility
2.8 June 95 Change loop indices from integer to long
2.9 3/18/96 Change FACE usage for cube projections to match WCSLIB
C/FORTRAN software library.
Converted to IDL V5.0 W. Landsman September 1997
2.10 02/18/99 Fixed implementation of ARC algorithm
2.11 June 2003 Update conic projections, add LATPOLE keyword
2.12 Aug 2003, N.Rich - Fix pre-V5.5 bug from previous update
2.13 Sep 2003, W. Landsman CTYPE keywords need not be 8 characters
2.14 Jan 2004, W. Landsman don't modify scalars, fix PARabolic code
2.15 Feb 2004, W. Landsman Fix AZP and AIR algorithms
3.0 May 2004 W. Landsman Support extended SIN (=NCP), slant zenithal
(SZP), and zenithal polynomail (ZPN) projections, use
PV2 keyword vector instead of PROJP1, PROJP2
3.1 Jul 2005 W.Landsman/C. Markwardt Set unprojectable points in
tangent projection to NaN
3.1.1 Jul 2005 Fixed 3.1 mod to work for scalars
3.2 Dec 2005 Fixed Airy projection for latitude centered at 90 deg
[Previous]
[Next]
NAME:
WCSXY2SPH
PURPOSE:
Convert x and y (map) coordinates to spherical coordinates
EXPLANATION:
To convert x and y (map) coordinates to spherical (longitude and
latitude or sky) coordinates. This procedure is the inverse of
WCSSPH2XY.
This is a lower level procedure -- given a FITS header, the user will
usually use XYAD which will then call WCSXY2SPH with the appropriate
parameters.
CATEGORY:
Mapping and Auxilary FITS Routine
CALLING SEQUENCE:
wcsxy2sph, x, y, longitude, latitude, [map_type], [ CTYPE = ,$
FACE = ,PV2 = ,CRVAL =, CRXY =, LONGPOLE=, LATPOLE=]
INPUT PARAMETERS:
x - x coordinate of data, scalar or vector, in degrees, NOTE: x
increases to the left, not the right
y - y coordinate of data, same number of elements as x, in degrees
map_type - optional positional parameter, scalar corresponding to a
particular map projection. This is not a FITS standard, it is
simply put in to allow function similar to that of less general
map projection procedures (eg AITOFF). The following list gives
the map projection types and their respective numbers.
FITS Number Name Comments
code code
---- ------ ----------------------- -----------------------------------
DEF 0 Default = Cartesian
AZP 1 Zenithal perspective pv2_1 required
TAN 2 Gnomic AZP w/ pv2_1 = 0
SIN 3 Orthographic pv2_1, pv2_2 optional
STG 4 Stereographic AZP w/ pv2_1 = 1
ARC 5 Zenithal Equidistant
ZPN 6 Zenithal polynomial PV2_0, PV2_1....PV2_20 possible
ZEA 7 Zenithal equal area
AIR 8 Airy pv2_1 required
CYP 9 Cylindrical perspective pv2_1 and pv2_2 required
CAR 10 Cartesian
MER 11 Mercator
CEA 12 Cylindrical equal area pv2_1 required
xy 13 Conical perspective pv2_1 and pv2_2 required
COD 14 Conical equidistant pv2_1 and pv2_2 required
COE 15 Conical equal area pv2_1 and pv2_2 required
COO 16 Conical orthomorphic pv2_1 and pv2_2 required
BON 17 Bonne's equal area pv2_1 required
PCO 18 Polyconic
SFL 19 Sanson-Flamsteed
PAR 20 Parabolic
AIT 21 Hammer-Aitoff
MOL 22 Mollweide
CSC 23 Cobe Quadrilateralized inverse converges poorly
Spherical Cube
QCS 24 Quadrilateralized
Spherical Cube
TSC 25 Tangential Spherical Cube
SZP 26 Slant Zenithal perspective PV2_1,PV2_2, PV2_3 optional
OPTIONAL KEYWORD PARAMETERS:
CTYPE - One, two, or three element vector containing 8 character
strings corresponding to the CTYPE1, CTYPE2, and CTYPE3
FITS keywords:
CTYPE[0] - first four characters specify standard system
('RA--','GLON' or 'ELON' for right ascension, galactic
longitude or ecliptic longitude respectively), second four
letters specify the type of map projection (eg '-AIT' for
Aitoff projection)
CTYPE[1] - first four characters specify standard system
('DEC-','GLAT' or 'ELAT' for declination, galactic latitude
or ecliptic latitude respectively; these must match
the appropriate system of ctype1), second four letters of
ctype2 must match second four letters of ctype1.
CTYPE[2] - if present must be the 8 character string,'CUBEFACE',
only used for spherical cube projections to identify an axis
as containing the face on which each x and y pair of
coordinates lie.
FACE - a input variable used for spherical cube projections to
designate the face of the cube on which the x and y
coordinates lie. Must contain the same number of elements
as X and Y.
CRVAL - 2 element vector containing standard system coordinates (the
longitude and latitude) of the reference point
CRXY - 2 element vector giving the x and y coordinates of the
reference point, if this is not set the offset of the x
coordinate is assumed to be 0.
LATPOLE - native latitude of the standard system's North Pole
LONGPOLE - native longitude of standard system's North Pole, default
is 180 degrees, numeric scalar
PV2 - Vector of projection parameter associated with latitude axis
PV2 will have up to 21 elements for the ZPN projection, up to 3
for the SIN projection and no more than 2 for any other
projection. The first element corresponds to PV2_1, the
second to PV2_2, etc.
OUTPUT PARAMETERS:
longitude - longitude of data, same number of elements as x, in degrees
latitude - latitude of data, same number of elements as x, in degrees
Longitude and latitude will be set to NaN, wherever elements of X,Y
have no corresponding longitude, latitude values.
NOTES:
The conventions followed here are described in more detail in the paper
"Representations of Celestial Coordinates in FITS" by Calabretta &
Greisen (2002, A&A, 395, 1077, also see
http://www.aoc.nrao.edu/~egreisen) .The general scheme
outlined in that article is to convert x and y coordinates into a
"native" longitude and latitude and then rotate the system into one of
three generally recognized systems (celestial, galactic or ecliptic).
This procedure necessitates two basic sections. The first converts
x and y coordinates to "native" coordinates while the second converts
"native" to "standard" coordinates. The first section contains the
guts of the code in which all of the map projection is done. The
second step is performed by WCS_ROTATE and only involves rotation of
coordinate systems. WCSXY2SPH can be called in a form similar to
AITOFF, EQPOLE, or QDCB by calling wcsxy2sph with a fifth parameter
specifying the map projection by number and by not using any of the
keywords related to the map projection type (eg ctype1 and ctyp2).
CALLED BY:
XY2AD
PROCEDURE:
The first task of the procedure is to do general error-checking to
make sure the procedure was called correctly and none of the
parameters or keywords conflict. This is particularly important
because the procedure can be called in two ways (either using
FITS-type keywords or using a number corresponding a map projection
type). All variables are converted into double precision values.
The second task of the procedure is to take x and y coordinates and
convert them into "native" latitude and longitude coordinates.
Map-specific error-checking is done at this time. All of the
equations were obtained from "Representations of Celestial
Coordinates in FITS" and cases needing special attention are handled
appropriately (see the comments with individual map projections for
more information on special cases). WCS_ROTATE is then called to
convert the "native" coordinates to "standard" coordinates by rotating
the coordinate system. This rotation is governed by the keywords
CRVAL, and LONGPOLE. The transformation is a straightforward
application of euler angles. Finally, longitude values are converted
into the range from 0 to 360 degrees.
CALLS: ***
WCS_ROTATE
COMMON BLOCKS:
none
PROCEDURES CALLED:
WCS_ROTATE
AUTHOR:
Rick Balsano
MODIFICATIONS/REVISION LEVEL:
1.1 8/31/93
1.2 9/12/93 W. Landsman Vectorized CRXY, CRVAL, CTYPE
1.3 29/12/93 I. Freedman Eliminated LU decomposition
1.4 22/09/94 W. Landsman If scalar input, then scalar output
1.5 02/03/05 W. Landsman Change variable name BETA for V4.0 compatibility
1.6 06/07/05 W. Landsman Change loop index from integer to long
1.7 02/18/99 W. Landsman Fixed implementation of ARC algorithm
1.8 June 2003 W. Landsman Update conic projections, add LATPOLE keyword
1.81 Sep 2003 W. Landsman Avoid divide by zero
1.82 Sep 2003 W. Landsman CTYPE keywords need not be 8 characters
1.83 Sep 2003 W. Landsman Preserve input array sizes
1.9 Jan 2004 W. Landsman don't modify scalars, fix PARabolic code
2.0 Feb 2004 W. Landsman Fix AIR and AZP projections
2.1 Feb 2004 W. Landsman Fix tangent projection for matrix input
3.0 May 2004 W. Landsman Support extended SIN (=NCP), slant zenithal
(SZP), and zenithal polynomial (ZPN) projections, use
PV2 keyword vector instead of PROJP1, PROJP2
3.1 May 2004 W. Landsman/J. Ballet Handle NaN values, flag invalid output
for AITOFF projection
3.1.1 Dec 2005 W. Landsman/W. Thompson Fixed problem with Airy projection
centered on 90 degree latitude
3.1.2 May 2006 W. Landsman/Y.Sato Fix problem selecting the correct root
for the ZPN projection
[Previous]
[Next]
NAME:
WDEF
PURPOSE:
Makes a window quick and easy.
Allocate free window# if not specified to avoid window collisions
CALLING SEQUENCE:
wdef [,ws,xs,ys,retain=retain]
wdef, ws [,/uleft,/uright,/lleft,lright] ; specify quadrant postion
; ws is allocated and
; OUTPUT if not defined
wdef,dummy,xs,ys,/zbuffer ; zbuffer, not x-windows
wdef,dummy,image=image ; size window to fit image
INPUTS:
ws = window number, default=0 (ws is output if not defined on input)
(if defined, ws must be in range (0-31)
xs = xsize, defaults to 512
ys = ysize, defaults to xs
OUTPUTS:
ws - returns window number allocated if not defined on input
KEYWORD PARAMETERS:
umid - if set, position windown in upper middle
uright - if set, position window in upper right
uleft - if set, position window in upper left
lright - if set, position window in lower right
lleft - if set, position window in lower left
zbuffer - if set, set device to z buffer first
xwindow - if set, set device to x first
already - If set, see if the active window is the proper size
and if so, do not call "window" again
image - if set, determine xsize and ysize from image dimensions
CALLED BY:
AUTO_ALIGN_IMAGES, CH_BOUNDARY [2], DIFF_SCALE, DRLB Version 30
ECLIPSE_PLOTTER, FAXABLE_SFD, FIRST_LIGHT [1], FIRST_LIGHT [2], HXT_4CHPLOT
LATEST_SFDS_GIF, MK_SOHO_MAP_EARTH, NAME [3], NAR2COORD, NORH_GRID [1]
NORH_GRID [2], ORB_EXTRAP, PLOT_CLON, PLOT_HELIO [1], PLOT_HELIO [2]
PLOT_RESULTS [2], POLAR_GRID, QUICKATT [1], QUICKATT [2], QUICKDARK [2]
QUICKDRIFT [1], QUICKDRIFT [2], QUICKSTRAY [2], READ_TRACE_FOV, Ruler
SXT_EXPOSURE_MAP, SXT_GRID [1], SXT_GRID [2], SXT_GRID [3], SXT_QLOOK
SYNOP_3_ROTS, TERM_QUICK, TERM_REVIEW, TERM_REVIEW_GIF, TV_SYNOP, Z2GIF, align_label
azi_calc, azimuth_avg, boundary, chk_pointing, cube_edit, daily_forecast [2]
data2files, disp1focus [2], disp1focus_flt, disp_focus, disp_sci5k, eit_fulldisk
eit_getobs, eit_proton_summary, eitoversxt, event_movie [1], event_movie [2]
exp_scale min_exp max_exp [1], first_bcs, fit_bsc_plot, fl_goesplot [1]
fl_goesplot [2], fl_goesplot [3], fl_summary [1], fl_summary [2], fl_summary [3]
fl_suntoday [1], fl_suntoday [2], fl_suntoday [3], font_size [1], font_size [2]
fudge_scale, gbo_obs_coord, get_linearity sig e_min e_max, get_utevent [1]
get_utevent [2], go_teem [1], go_teem [2], go_teem_nn, go_teem_plots, go_teem_t
goes_plot [1], goes_plot [2], goes_plot [3], goes_plot [4], goes_plot [5]
help_coal, help_offsets, help_roll, histscale [1], histscale [2], image2movie
lasteit, lastsfd [1], lastsfd [2], lastspd, lcur_image, linecolors [1]
linecolors [2], lsplot, ltc, lwa_plot_arc, map_bsc, mdidust, merc_lwa, merc_pix
mk_sun_mosaic, mkthumb, mplot_nar, mtv pro, new_win, plot2offset [1]
plot2offset [2], plot_ace, plot_ar_pfi, plot_arc [1], plot_arc [2], plot_arc [3]
plot_door_open, plot_goesp, plot_gsn, plot_nar [1], plot_nar [2], plot_sxg
quick_plottrav, radial_avg, read_ltc file, res_freq, rest_low8_cube [1]
rest_low8_cube [2], rest_low8_ffi, sacpeak_image, scat_avg, sector_avg
show_contacts, show_pix [1], show_pix [2], show_pix_event [1]
show_pix_event [2], show_pix_event [3], soon_cadence, soon_catstat
sooncat_cadence, ssc_scan2, ssw_build_trace, ssw_find_transit
ssw_findstuff2html, ssw_fov_context, ssw_limit_colors, ssw_unspike_cube
sun_today [1], sun_today [2], sun_today [3], sxt_composite [1]
sxt_composite [2], sxt_composite [3], sxt_defroi, sxt_dstreek
sxt_mk3 mk3 index data [1], sxt_mk3 mk3 index data [2], sxt_summary, sxt_xsaa
term_score2, trace_cosmic2hist_accum, trace_euv_resp [1], trace_movie_context
trace_unspike_time, tv2 [1], tv2 [2], tv2_msu, video_test, video_title, wconroi
wdefroi [1], wdefroi [2], write_trace, xanal_emi, xcheckip, xdisp_fits, xdisp_sci5k
xdisp_trace [1], xdisp_trace2, xdisp_trace3, xgen_widget, xhkplot, xsxt_prep_event
yopos [1], yopos [2]
MODIFICATION HISTORY:
First ever program written by LWA with Jim Lemen's help.
Made public April 1992
23-Sep-92 (MDM) - Modified to not use RETAIN=2 for NCD X-terminals
16-feb-93 (slf) - allocate from free window pools to avoid window
collisions from multiple routines. Add retain
keywrd. Added quadrant position keywords
7-apr-93 (slf) - add pixmap keyword, check range of ws if defined
24-May-93 (MDM) - Patch so that it would work with SUN-View
3-sep-93 (slf) - inhibit device if batch mode
4-sep-93 (slf) - Added Z-buffer support
8-sep-93 (slf) - add title keyword
5-Apr-94 (MDM) - added /already switch
14-Jul-94 (SLF) - added IMAGE keyword (size to image), quiet zbuff
6-Dec-94 (SLF) - documentation
14-sep-95 (SLF) - allow /FREE and no window number-> free window
9-Jun-98 (SLF) - move quadrant code to X logic block
18-May-05 (LWA) - commented out Z buffer message
30-Nov-05 (LWA) - added keyword /umid
[Previous]
[Next]
Project : SOHO - CDS
Name : WDEL
Purpose : Close a window
Category : utility
Explanation : WDELETE doesn't provide an ALL option to close all
open windows. WDEL does.
Syntax : IDL> wdel,id
CALLED BY:
ALLOW_FONT
Examples :
Inputs : ID = window to close,
as comma-delimited list, 0,1,2,3,4.. up to 10 elements
or array [1,2,3,...]
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords : ALL = delete all
CALLS: ***
EXIST, TRIM
Common : None
Restrictions: Delete up to 10 windows individually
Side effects: Windows are closed
History : Version 1, 26-Jan-1998, Zarro (SAC/GSFC)
Similar to WDELETES
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Name: wdeletes
Purpose: delete multiple (or all) windows
Input Parameters:
nwindows - number of windows to delete (default is all)
Calling Sequence
IDL> wdeletes ; delete all window
IDL> wdeletes, nn ; delete most recent NN windows
IDL> wdeletes,/setx ; force X first (if in non-X mode, like
; PS or Z, default is return w/nocation)
History:
Circa 1993 - S.L.Freeland - wrote the one liner utility
4-mar-1997 - S.L.Freeland - document, add Nwindows parameter, X check
11-jun-1997 - S.L.Freeland - add SETX keyword (set plot to X - overrides
default to return w/no action if PS, Z etc.)
12-jul-2001 - S.L.Freeland - work on WINdows also
CALLS: ***
is_member [1], is_member [2]
Side Effects:
If /SETX is set, plot device is set to X
[Previous]
[Next]
Project : SOHO - CDS
Name :
WDISPLAY
Purpose :
Displays images in a window all their own, sized to fit.
Explanation :
A window is created with the same size as the image to be displayed.
The image is then displayed with EXPAND_TV, and the default window is
reset to the previous window.
Will plot true color images if the device has enough colors and if
IMAGE is a 3D Array with the third dimension color (red, green, blue).
(See also the TRUE keyword.)
Use :
WDISPLAY, IMAGE
Inputs :
IMAGE = Two dimensional image array to be displayed, or 3 images in
an array [Nx,Ny,3] to be displayed as a true color image.
(See also the TRUE keyword.)
Opt. Inputs :
None.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
NOSCALE = If set, then the command TV is used instead of TVSCL to
display the image.
WINDOW = Window to use to display the image. The action that this
program takes depends on the value of this parameter.
Value Action
Undefined An arbitrary free window is created.
Negative An arbitrary free window is created.
0 - 31 The specified window number is used.
32 or above The window specified is deleted, and
another arbitrary free window is
created.
The window used is also returned as an output value in this
parameter.
RESIZE = If set, then the image will be resized up or down by integer
factors to best fit within the display. Unless RESIZE or
one of the other size related keywords are set, then the
image is displayed at its true pixel size.
NOEXACT = If set, then non-integer factors are allowed.
SIZE = If passed and positive, then used to determine the scale of
the image. Returned as the value of the image scale.
SMOOTH = If set, then the image is expanded with bilinear
interpolation.
MISSING = Value flagging missing pixels. These points are scaled to
zero. Ignored if NOSCALE is set.
MAX = The maximum value of ARRAY to be considered in scaling the
image, as used by BYTSCL. The default is the maximum value
of ARRAY.
MIN = The minimum value of ARRAY to be considered in scaling the
image, as used by BYTSCL. The default is the minimum value
of ARRAY.
TOP = The maximum value of the scaled image array, as used by
BYTSCL. The default is !D.N_COLORS-1.
BOTTOM = The minimum value of the scaled image array, as used by
BYTSCL. The default is 0.
VELOCITY = If set, then the image is scaled using FORM_VEL as a
velocity image. Can be used in conjunction with COMBINED
keyword. Ignored if NOSCALE is set.
COMBINED = Signals that the image is to be displayed in one of two
combined color tables. Can be used by itself, or in
conjunction with the VELOCITY or LOWER keywords.
LOWER = If set, then the image is placed in the lower part of the
color table, rather than the upper. Used in conjunction
with COMBINED keyword.
RELATIVE = Size of area to be used for displaying the image, relative
to the total size available. Must be between 0 and 1.
Default is 1. Ignored unless RESIZE or NOEXACT is set.
ORIGIN = Two-element array containing the coordinate value in
physical units of the center of the first pixel in the
image. If not passed, then [0,0] is assumed.
SCALE = Pixel scale in physical units. Can have either one or two
elements. If not passed, then 1 is assumed in both
directions.
DATA = If set, then immediately activate the data coordinates for
the displayed image.
TITLE = Window title.
TRUE = If passed, then contains the dimension containing the color
dimension. For example, if the input array has the
dimensions (3,Nx,Ny), then one would set TRUE=1. If not
passed, then TRUE=3 is assumed. Ignored if the image only
has two dimensions.
BSCALED = Returns the bytescaled image passed to the TV command.
Calls : ***
EXPAND_TV, GET_IM_KEYWORD, HAVE_WINDOWS [1], HAVE_WINDOWS [2], IM_KEYWORD_SET
SETIMAGE, SETWINDOW [1], SETWINDOW [2]
CALLED BY:
EIT_MKMOVIE
Common :
None.
Restrictions:
On SunView displays, the image must be small enough to fit within the
display size available.
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. :
William Thompson, Nov. 1992, integrated with SERTS image display
package.
Written :
William Thompson, GSFC, 1992.
Modified :
Version 1, William Thompson, GSFC, 4 May 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 2 September 1993.
Added ORIGIN, SCALE and DATA keywords.
Version 3, William Thompson, GSFC, 22 December 1993.
Added TITLE keyword.
Version 4, William Thompson, GSFC, 1 March 1993.
Added support for DOS.
Version 5, William Thompson, GSFC, 13 November 2001
Added capability for true-color images.
Version 6, William Thompson, GSFC, 3-Jan-2006
Added keyword BOTTOM
Version 7, William Thompson, GSFC, 26-Sep-2006
Added keyword BSCALED
Version :
Version 7, 26-Sep-2006
[Previous]
[Next]
NAME:
WEBGET()
PURPOSE:
Use the IDL SOCKET procedure to get data from http servers
EXPLANATION:
WEBGET() can access http servers - even from behind a firewall -
and perform simple downloads. Currently, text and FITS files can be
accessed. Requires IDL V5.4 or later on Unix or Windows, V5.6 on
Macintosh
CALLING SEQUENCE:
a=webget(URL)
INPUTS:
URL - scalar string giving a fully qualified url of the form
'http://server.eso.org/path/file.html' .WEBGET() can
also use other valid URLs that contain 'GET'-codes.
OPTIONAL INPUT KEYWORD PARAMETERS:
COPYFILE - if set to a valid filename (file must have write permission),
the data contents of the web server's answer is copied to that
file.
/SILENT - If set, the information error messages are suppressed
OUTPUTS: A structure with the following fields:
.Header - the HTTP header sent by the server
.Text - The text part of the downloaded file. If the
content type of the file was not of class
'text', this will be an empty string.
.ImageHeader - Header file of a FITS-image. FITS images
are read when the content type is
'image/fits' or 'application/octet-stream'
(for dss-access). If the file is not a FITS
image, this will be an empty string.
.Image - The FITS image read from the server. If the file
did not contain a FITS image, this will be zero.
CALLS: ***
MIMETYPE, READFITS [1], READFITS [2], READFITS [3], strsplit
CALLED BY:
QUERYGSC, QUERYSIMBAD, QUERYUSNO, QUERYVIZIER, QueryDSS
RESTRICTIONS:
The mime-type recognition is extremely limited. Only the content-type is
determined. Any text-file will be stored in out.Text. The only other
category which can be fetched is FITS files, which will be stored in
out.Image and out.ImageHeader.
PROXY: If you are behind a firewall and have to access the net through a
Web proxy, set the environment variable 'http_proxy' to point to
your proxy server and port, e.g.
'setenv http_proxy=http://web-proxy.mpia-hd.mpg.de:3128 '
The URL *MUST* begin with "http://" .
PROCEDURE:
Open a socket to the webserver and download the header. After deciding
whether it is text or binary, either store the text or try to read a
FITS file.
EXAMPLE:
IDL> a=webget('http://www.mpia.de/index.html' )
IDL> print,a.Text
or
> PointingRA=0.0
> PointingDE=30.0
> QueryURL = strcompress("http://archive.eso.org/dss/dss/image?ra="+$
> string(PointingRA)+$
> "&dec="+$
> string(PointingDE)+$
> "&x=10&y=10&Sky-Survey=DSS1&mime-type=download-fits", $
> /remove)
> a=webget(QueryURL)
> tvscl,a.Image
> print,a.ImageHead
MINIMUM IDL VERSION:
V5.4 (uses SOCKET)
MODIFICATION HISTORY:
Written by M. Feldt, Heidelberg, Oct 2001 <mfeldt@mpia.de>
Use /swap_if_little_endian keyword to SOCKET W. Landsman August 2002
Less restrictive search on Content-Type W. Landsman April 2003
Modified to work with FIRST image server- A. Barth, Nov 2006
[Previous]
[Next]
NAME:
week2ex
PURPOSE:
Given a year and a week #, return the date of the first
day in that week.
CALLING SEQUENCE:
result = week2ex(year,week)
INPUT:
year scalar or vector
week scalar or vector
OUTPUT:
tarr - time in notation [hh,mm,ss,msec,dd,mm,yy]
CALLS: ***
anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2], ex2week [1]
ex2week [2]
CALLED BY:
DSN_FINAL, MK_ORB_WEEK, anytim2weekid [1], anytim2weekid [2], anytim2weekinfo
fmt_rasm, mk_evn [1], mk_evn [2], mk_fem_aoslos [1], mk_fem_aoslos [2], mk_gx
mk_sdmi, mk_week_file [1], mk_week_file [2], rd_gxd [1], rd_gxd [2], rd_gxd [3]
term_times, weekid2ex [1], weekid2ex [2], weekid2ex [3]
HISTORY:
Written 1-Mar-92 by M.Morrison
Modified 14-may-92, J. Lemen, Extended to allow vector input
7-Jun-92 (MDM) - Removed call to make_str - added call to anytim2ints
[Previous]
[Next]
Project : SOHO / STEREO
Name : WEEK2UTC
Purpose : Returns the begin date of an ISO-8601 week number
Category : Time
Explanation : Returns the date associated with the beginning of a year and
ISO-8601 week number. ISO-8601 defines week 1 as the week
containing the first Thursday of the year. In the Gregorian
calendar, this is equivalent to the week which includes January
4th. Weeks are defined to start on Monday.
Syntax : UTC = WEEK2UTC( YEAR, WEEK [, keywords ... ] )
CALLED BY:
ANYTIM2WEEK
Examples : PRINT, WEEK2UTC( 2006, 1, /CCSDS, /DATE_ONLY )
2006-01-02
Inputs : YEAR = The year, e.g. 2006
WEEK = The week number, from 1 to 52 or 53
Opt. Inputs : None.
Outputs : The result of the function is the date of the start
(i.e. Monday) of that week.
Opt. Outputs: None.
Keywords : Any keyword accepted by ANYTIM2UTC is supported.
Calls : ***
ANYTIM2UTC [1], ANYTIM2UTC [2], NTRIM, UTC2DOW
Common : None.
Restrictions: None.
Side effects: None.
Prev. Hist. : Unrecorded.
History : Version 1, 24-Jan-2006, S.V. Haugan, ESA
Contact : SVHAUGAN
[Previous]
[Next]
NAME:
week_loop
PURPOSE:
Given a start and end time, return a structure listing the
year number and week number for all weeks between the times
INPUT:
sttim - start time in any format
entim - end time in any format
KEYWORD PARAMETERS:
weekstr (output) - string of form YY_WW or YYYY_WW
year4digit (switch) - if set, out.year and weekstr are 4 digit
CALLS: ***
anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], ex2dow [1], ex2dow [2]
ex2week [1], ex2week [2], weeks_in_year [1], weeks_in_year [2]
CALLED BY:
BCS_24HR_PLOT [1], BCS_24HR_PLOT [3], BUILD_SSX, GET_SUBARR2, mk_orbit [1]
mk_orbit [2], mk_sdcs, rd_sdl, rd_sld, rd_sls, rd_sot, rd_ssl, rd_sxa, rd_sxc, rd_sxl
rd_week_file [2], sxl_analysis, weekid [2], ydb_exist [1], ydb_exist [2]
ydb_exist [3], ydb_exist [4], yo_mkos1_dbase
HISTORY:
Written 16-Apr-92 by M.Morrison
08-Feb-1992 (MDM) Added code to back up a week if the start time
is within 90 minutes of the first day of a week
06-Apr-1999 (SLF) Made it Y2K able via /year4digit
Added WEEKSTR output
09-May-2000 (PGS) Standardized year format in four places.
06-Mar-2001 (GLS) Completely re-written with new logic.
TODO:
- Check with Sam about whether Mon's logic could be improved
to only include a previus week where actually necessary
(now it ALWAYS adds a week at the beginning if the start
time is within 100 minutes of the startof the week)
- Vectorize the for loop, if possible
- Make weeks_in_year work on times in any format and not only
years
- Make year4digit the default, and use wid_vec as output string
name (removing weekstr)?
[Previous]
[Next]
NAME:
WEEKDAY
PURPOSE:
Compute weekday given year, month, day.
CATEGORY:
CALLING SEQUENCE:
wd = weekday(y,m,d,[nwd])
INPUTS:
y, m, d = Year, month, day (Like 1988, 10, 31). in
KEYWORD PARAMETERS:
OUTPUTS:
wd = Returned name of weekday. out
nwd = optional Weekday number. out
CALLS: ***
YMD2JD [1], YMD2JD [2], YMD2JD [3]
CALLED BY:
DT_TM_MAK [1], DT_TM_MAK [2], DT_TM_MAK [3]
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 31 Oct, 1988.
Johns Hopkins University Applied Physics Laboratory.
RES 18 Sep, 1989 --- converted to SUN
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
[Previous]
[Next]
Name: weekid
Purpose: return expanded file ids for weekly files in common area
(provide single point maint for weekly prefix definitions)
Input Parameters:
fileid = xxxyy_wwn (string) - standard weekly file name
if xxx is included, only that prefix is checked
Output:
function returns string scaler or array
default is latest version only (scaler)
Optional Keyword Parameters:
all - if set, all prefixes are checked
xbd,xad,pnt,fem,obs - prefixes to check (mutally exclusive)
indir - if set, look at that directory instead of the
"standard" directory.
gt_pre - if set, returns weekid prefixes only
gt_distpre - if set, returns weekid prefixes for distributed
(tar sets) only
vnum - version number (limit search to only these versions)
Output Parameters:
ver - highest existing version (integer) - 00 if no such file
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], break_file [4], concat_dir [4], str_replace [1], str_replace [2]
CALLED BY:
cktapdir, def_save, gen_file_id [1], gen_file_id [2], gen_fn [1], gen_fn [2]
get_afile_size [1], get_afile_size [2], rd_week_file [1], rd_week_file [2]
rd_week_file [3], rd_week_file [4], weekfiles, ydb_exist [2], yo_arch_size
Modification History:
Written: slf, 19-feb-92
slf, 8-mar-92 added gt_pre for single pt maint
mdm, 20-May-92 Added "indir" option
mdm, 9-Jun-92 Removed unix specific "/" code
Used wildcard "*.*" instead of "*"
slf, 22-Jun-92 Added nar,evn,gev
slf, 20-Oct-92 Added gxt
slf, 24-Nov-92 Added ssl, sot
slf, 6-apr-93 Added prefix and vnum keywords
slf, 19-aug-93 replaced recursive segment
[Previous]
[Next]
Name: weekid
Purpose: return expanded file ids for weekly files in common area
(provide single point maint for weekly prefix definitions)
Input Parameters:
fileid = xxxyy_wwn (string) - standard weekly file name
if xxx is included, only that prefix is checked
Output:
function returns string scaler or array
default is latest version only (scaler)
Optional Keyword Parameters:
all - if set, all prefixes are checked
xbd,xad,pnt,fem,obs - prefixes to check (mutally exclusive)
indir - if set, look at that directory instead of the
"standard" directory.
gt_pre - if set, returns weekid prefixes only
gt_distpre - if set, returns weekid prefixes for distributed
(tar sets) only
vnum - version number (limit search to only these versions)
Output Parameters:
ver - highest existing version (integer) - 00 if no such file
CALLS: ***
ATT_STRUCT [1], ATT_STRUCT [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
CHMOD, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DPRINT, EVN_STRUCT
Ex2Int [1], Ex2Int [2], FEM_OLD_STRUCT, FEM_STRUCT, FILE_EXIST [2]
FIND_COMPRESSED, GBO_STRUCT [1], GBO_STRUCT [2], GET_NBYTES, GOES_SERVER
GOES_TEMP_DIR, IS_DIR, Int2Ex [1], Int2Ex [2], LOCAL_NAME, LOC_FILE [1]
LOC_FILE [2], LOC_FILE [3], MK_DIR, OBS_STRUCT [1], OBS_STRUCT [2], ORB_STRUCT
PNT_STRUCT, Rd_NewOrb_p [1], Rd_NewOrb_p [2], Rd_Pointer [1], Rd_Pointer [2]
Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SOCK_COPY, SOCK_FIND, SOCK_GOES
SXT_STRUCT, UNIQ [1], UNIQ [2], UNIQ [3], YDB_PATH, anytim2ex [1], anytim2ex [2]
anytim2ints [1], anytim2ints [2], anytim2weeks [1], anytim2weeks [2]
break_file [4], concat_dir [4], data_type [1], data_type [2], ex2fid [1]
ex2fid [2], file_exist [1], file_exist [3], file_list [1], file_list [2]
fmt_tim [1], fmt_tim [2], gt_day [1], gt_day [2], int2secarr [1], int2secarr [2]
is_member [1], is_member [2], rd_week_file [1], rd_week_file [2]
rd_week_file [3], rd_week_file [4], rdwrt [1], rdwrt [2], rdwrt [3]
sel_timrange [1], sel_timrange [2], str_copy_tags [1], str_copy_tags [2]
str_copy_tags [3], str_copy_tags [4], str_replace [1], str_replace [2]
tim2orbit [1], tim2orbit [2], wc_where [1], wc_where [2], week_loop [1]
week_loop [2], week_loop [3], ydb_exist [1], ydb_exist [2], ydb_exist [3]
ydb_exist [4]
CALLED BY:
cktapdir, def_save, gen_file_id [1], gen_file_id [2], gen_fn [1], gen_fn [2]
get_afile_size [1], get_afile_size [2], rd_week_file [1], rd_week_file [2]
rd_week_file [3], rd_week_file [4], weekfiles, ydb_exist [2], yo_arch_size
Modification History:
Written: slf, 19-feb-92
slf, 8-mar-92 added gt_pre for single pt maint
mdm, 20-May-92 Added "indir" option
mdm, 9-Jun-92 Removed unix specific "/" code
Used wildcard "*.*" instead of "*"
slf, 22-Jun-92 Added nar,evn,gev
slf, 20-Oct-92 Added gxt
slf, 24-Nov-92 Added ssl, sot
slf, 6-apr-93 Added prefix and vnum keywords
slf, 19-aug-93 replaced recursive segment
[Previous]
[Next]
NAME:
weekid2ex
PURPOSE:
Convert Week number to external time
CALLING SEQUENCE:
Time_ex = weekid2ex('94_04a') ; Time range of week 4 of 1994
Time_ex = weekid2ex(4) ; Week 4 of current year
Time_ex = weekid2ex(4,year=93) ; Week 4 of 1993
Time_ex = weekid2ex('94_04a', t1, t2 ) ; t1/t2 = first/last day of week
Time_ex = weekid2ex('94_04a', t1, t2, ndays )
INPUT:
week_id = Yohkoh Week ID (string) - may be a vector
= or week number (integer)
OPTIONAL OUTPUTS:
t1, t2 = First/Last day of specified week(s) (string-type)
ndays = Number of days in the week
OPTIONAL KEYWORD INPUTS:
year = Year number in case week_id is an integer
OPTIONAL KEYWORD OUTPUTS:
week_id_fmt = String version of week ID
CALLS: ***
anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2]
anytim2weekid [1], anytim2weekid [2], week2ex [1], week2ex [2]
CALLED BY:
mk_sdm, pr_week2tim [1], pr_week2tim [2]
PROCEDURE:
Calls anytime2ex, ex2week, week2ex
Short weeks (first and last week of the year) are flagged with a "*".
MODIFICATION HISTORY:
22-jan-94, J. R. Lemen, Written
[Previous]
[Next]
NAME:
weeks_in_year
PURPOSE:
Return the weeks in the calendar year or years corresponding to
to an input time or times.
INPUT:
input - may be:
- scalar or vector of years in any numerical format
- scalar or vector of times in any format
CALLS: ***
UTC2DOW, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], data_chk [1]
data_chk [2]
CALLED BY:
week_loop [1], week_loop [2], week_loop [3]
HISTORY:
06-Mar-2001 - GLS
28-Dec-2002 - Zarro (EER/GSFC), changed SIZE to DATA_CHK for backwards
compatibility
[Previous]
[Next]
Project : SOHO - CDS
Name : WEOF
Purpose : Emulates the VMS WEOF routine on UNIX machines.
Explanation : Emulates the VMS WEOF routine on UNIX machines.
*** Unix only ***
Use : WEOF, UNIT
Inputs : UNIT = Tape unit number. Tape drives are selected via the UNIX
environment variables "MT1", "MT2", etc. The desired
tape drive is thus specified by numbers, as in VMS.
Must be from 0 to 9.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : None.
Calls : ***
CHECK_TAPE_DRV [1], CHECK_TAPE_DRV [2]
CALLED BY:
FITSTAPE, TCOPY, vmscopytape
Common : None.
Restrictions: The environment variable "MTn", where n corresponds to the
variable UNIT, must be defined. E.g.,
setenv MT0 /dev/nrst0
Requires IDL v3.1 or later.
Side effects: The device file is opened.
Category : Utilities, I/O, Tape.
Prev. Hist. : VERSION 1, R. W. Thompson 11/30/89
William Thompson, Apr 1991, rewrote to better emulate VMS
version.
Written : R. W. Thompson, GSFC/IUE, 30 November 1989.
Modified : Version 1, William Thompson, GSFC, 21 December 1993.
Rewrote to use IOCTL.
Version : Version 1, 21 December 1993.
[Previous]
[Next]
NAME:
WFPC2_METRIC
PURPOSE:
Compute the distortion in a WFPC2 image and optionally return coordinates
EPLANATION:
Uses the distortion solution of Anderson & King (2003, PASP, 115, 113)
Pixel 424, 424 on each chip remains fixed, and other pixel positions are
mapped to remove nonlinearities. If /GLOBAL is set, then all chips are
put on the same reference frame where pixel 424, 424 in the WF3 chip
remains fixed.
CALLING SEQUENCE:
WFPC2_METRIC, xin, yin, xout, yout, [ChipNum, HEADER=, /GLOBAL
YEAR =, FILTER=
or
WFPC2_METRIC, xin, yin, a, d, HEADER=, /RAdec, /GLOBAL ]
INPUTS:
XIN, YIN - X,Y positions (0-799) on a WFPC2 chip in
IDL convention (first pixel is 0,0), scalar or vectors
OUTPUTS:
XOUT, YOUT - X,Y positions in the distorted frame, same number of
elements as XIN, YIN
or if /RADEC is set
AA, DD - Right ascension and declination (in degrees) corresponding
to the input coordinates after distortion correction.
OPTIONAL INPUT:
ChipNum - Integer 1, 2, 3, or 4 specifying the WFPC2 chip number
1-PC, 2-WF2, 3-WF3, 4-WF4. If not supplied, then WFPC2_METRIC
will try to read the value from the DETECTOR in the FITS header.
OPTIONAL INPUTS:
/GLOBAL - If set, then positions are returned in a master reference
frame with pixel 424,424 of WF3 remaining fixed. Thus,
information concerning the interchip separation and
orientation (with a weak dependence on time and filter) is
incorporated.
Header - FITS header with astrometry for a particular chip.
If both /RADec and /Global are set, then the header must be
from the WF3 chip.
/RADec - If set, then astrometry information in the FITS header (which
must be supplied as a keyword) is used to convert the output
to Right Ascension and declination (both in degrees).
FILTER - Filter name needed if /GLOBAL is set, must be either 'F300W'
'F336W', 'F439W', 'F555W' or 'F814W'; otherwise the plate scale
for F555W is assumed. WFPC2_METRIC will try to read this
value from the FITS header if not supplied as a keyword.
YEAR - Observation year including fraction (e.g. 1998.56) needed if
/GLOBAL is set. WFPC2_METRIC will try to read this value from
the FITS header if not supplied as a keyword. The time
correction is currently applied through the year 2002; later
dates will use the year 2002 correction.
CALLS: ***
CALDAT, LINTERP, SXPAR [1], SXPAR [2], SXPAR [3], XYAD, YMD2DN
EXAMPLES:
(1) Find the undistorted X,Y coordinates of position 682.3,234.2 on chip 1
(the PC chip).
IDL> WFPC2_METRIC, 682.3, 234.2, xout, yout, 1
==> xout = 681.13 yout = 235.05
(2) Determine the RA and Dec of position 682.3, 234.2 on chip 1 on the
WFPC2 image U2Z30201T
IDL> WFPC2_READ, 'u2z30201t.c0h', im,h ;Get header for chip 1
IDL> WFPC2_METRIC, 682.3, 234.2, aa, dd, header= h,/RADec
IDL> print, adstring(aa,dd,2)
05 20 53.572 -69 35 18.17
Note that a chip number did not need to be specified since its value
is in the FITS header
(3) As above, but now compute coordinates in the global frame, needed
for example, to compute the distance between stars on two different
chips.
First get headers for chips 1 and 3
IDL> WFPC2_READ, 'u2z30201t.c0h', im1,h1, im3,h3,num=[1,3]
IDL> WFPC2_METRIC, 682.3, 234.2, aa, dd, 1, header=h3,/RADec,/GLOBAL
IDL> print, adstring(aa,dd,2)
05 20 53.513 -69 35 17.98
Note that with /GLOBAL set, that the header must be for WF3, even
though coordinates are being computed for chip 1. Also note that
the time and filter will be read from the FITS header. Finally,
note that the coordinates given in examples (2) and (3) differ
slightly, because the chip separations incorporated in the FITS
headers differ slightly from those in the Anderson & King solution.
PROCEDURES USED:
LINTERP, SXPAR(), XYAD, YMD2DN()
REVISION HISTORY:
Written W. Landsman March 2003
[Previous]
[Next]
NAME:
WFPC2_READ
PURPOSE:
Read WFPC2 images in either FITS or STSDAS format into IDL variables.
EXPLANATION:
This a versatile procedure for reading Wide Field Planetary Camera 2
(WFPC2) images. One can read either FITS or STSDAS format, and specific
chip or chips. One can also read all four chips into a "batwing" mosaic--
so-called because the PC chip (chip 1) has a plate scale of 0.045", while
the other three WF chips have a plate scale of 0.1"
CALLING SEQUENCE:
WFPC2_READ,filename,chip1,hdr1,chip2,hdr2,chip3,hdr3,chip4,hdr4
or
WFPC2_READ,filename,chip,hdr, NUM_CHIP = [1,2,3,4], [/TRIM, PATH = ]
or
WFPC2_READ,filename,image,hdr,/BATWING
INPUTS:
filename - Name of FITS or STSDAS file with a stack of images from
the four WF/PC-2 chips, followed by a FITS ASCII
table with header parameters for each chip. If the file
name extension ends in 'h' then it is assumed to be an
STSDAS file. If no extension is supplied, and the file is
is not found, then WFPC2_READ first tries appending a '.fits'
extension, and then tries appending a '.c0h' extension.
The file may als be gzip compressed (with a .gz extension)
INPUT KEYWORD PARAMETERS:
NUM_CHIP - Integer scalar or vector, subset of 1, 2, 3, 4, specifying
particular chip numbers to read. Outputs will be in same
order as specification of subset. (See Example 2.)
/TRIM - If set, trim off areas with no image and re-orient so that
all the chips have a common orientation suitable for insertion
into "bat-wing" mosaic (no image distortion removal, however).
PATH - scalar string specifying a !PATH-like list of directories
in which to search for the file. Default is to look only
in the current directory.
/BATWING - Return a 1600 x 1600 array containing all four chips in a
"bat wing" mosaic formation. This image is mainly for
display purposes, since the PC chip is compressed to match the plate
scale of the WF chips. In addition, a small astrometry error
is introduced since chips do not have the same rotation, nor
are they aligned at the integer pixel level.
OUTPUTS:
chipN - 800 X 800 image from chip N. If /TRIM is set then the output
size is somewhat smaller (e.g. 756 x 757)
headerN - Individual FITS header for chip N with correct astrometry.
PROCEDURES USED:
For FITS I/O: FITS_CLOSE, FITS_OPEN, FITS_READ
For STSDAS I/O: EXTGRP, FTGET(), SXOPEN, SXREAD()
Other procedures: CHECK_FITS, FDECOMP, FIND_WITH_DEF(), FREBIN, HEXTRACT,
HROTATE, SXADDHIST, SXADDPAR, SXPAR()
CALLS: ***
CHECK_FITS [1], CHECK_FITS [2], EXTGRP, FDECOMP [1], FDECOMP [2], FDECOMP [3]
FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3], FITS_CLOSE, FITS_OPEN
FITS_READ, FREBIN, FTGET, FTINFO, HEXTRACT, HROTATE, SXADDHIST [1], SXADDHIST [2]
SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], SXOPEN, SXPAR [1], SXPAR [2], SXPAR [3]
SXREAD
CALLED BY:
ATV
EXAMPLE:
(1) Read all four chips of the FITS file u2ou0201t_c0f.fits
IDL> wfpc2_read,'u2ou0201t_c0f',c1,h1,c2,h2,c3,h3,c4,h4
(2) Note that supplying the .fits extension is optional. Now read only
chips 1 (the PC chip) and 3. Trim off portions of the arrays where
there is no image.
IDL> wfpc2_read,'u2ou0201t_c0f',c1,h1,c3,h3,num=[1,3],/trim
(3) Note that with the /TRIM option the output chip sizes are no longer
800 x 800 but odd sizes such as 770 by 753. Now read all 4 chips
into a 1600 x 1600 "batwing" mosaic
IDL> wfpc2_read,'u2ou0201t_c0f',im,h,/batwing
MODIFICATION HISTORY:
Written by W. Landsman, Raytheon STX, for IDL V5.0 June 1998
Based on code by Robert Hill, Raytheon STX
Better astrometry of PC image in "batwing" configuration, W. Landsman
August 1999
Use vector call to SXADDHIST W. Landsman March 2003
Don't use EXECUTE() for V6.1 or later W. Landsman Dec 2006
[Previous]
[Next]
Name: wgrid
Purpose: draw grid on current graphics display
Input Parameters:
sx - size of x grid ("columns")
sy - size of y grid ("rows") (default = sx)
nx - number of "columns" (default is fill up window)
ny - number of "rows" (default is fill up window)
Calling Sequence:
wgrid, sx [,sy, nx, ny, color=color, linestyle=linestyle, thick=thick]
History:
1-feb-1996 (S.L.Freeland) - vectorized grid.pro
[Previous]
[Next]
Project : HESSI
Name : WHERE2
Purpose : wrapper around WHERE that returns COMPLEMENT for IDL versions lt 5.4
Category : utility
Syntax : IDL> check=where2(array,count,complement=complement,ncomplement=ncomplement)
Inputs : ARRAY = array expression to check
Outputs : CHECK = expression matching indicies
COUNT = # of matching indicies
Keywords : COMPLEMENT = expression non-matching indicies
NCOMPLEMENT = # of non-matching indicies
CALLS: ***
SINCE_VERSION [1], SINCE_VERSION [2]
CALLED BY:
LIST_DIR, LIST_FILE, SYNOP_DEFINE, UTPLOT__DEFINE, XYPLOT__DEFINE
History : Written, 16-April-2004, Zarro (L-3Com/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
where_arr
PURPOSE:
Return the subscripts where a given set of values equal the values
in the input array. It is basically an expansion of IDL where in
which the condition to match can be an array.
CALLING SEQUENCE:
ss = where(full_arr, sub_arr)
ss = where(a, b)
ss = where(a, b, count)
ss = where(a, b, count, /notequal) - invert sense
ss = where(a, b, count, /map_ss)
INPUT:
full_arr- The complete array which is to be searched
sub_arr - The subset array of the values to search "full_arr" of
KEYWORD PARAMETERS:
notequal - if set, return indices where values are NOTEQUAL
map_ss - If set, then return the index in the "sub_arr" where
first occurance of the element exists in the "full_arr"
The length of the output is the same as "full_arr"
OUTPUT:
returns the subscripts where "sub_arr" occurrs in "full_arr". If
there are no matches, return a -1.
OPTIONAL OUTPUT:
count - The number of matches
CALLS: ***
rem_elem [1], rem_elem [2]
CALLED BY:
BSC_FIELD, CLEAN_GOES, EIT_CATRD [1], FLARE_XRAY_MODEL, GE_WINDOW [1], GFITS_R
HESSI CALIBRATED EVENTLIST CLASS DEFINITION [3], HESSI_ID2INDEX
HSI_EVENTLIST_SELECT_BY_TIME [1], HSI_EVENTLIST_TO_SPECTROGRAM [2]
HSI_FILEDB_COMBINE, HSI_LIVETIME_SIM, HSI_SPECTROGRAMCHAN_OVERLAP_FIX
HSI_SPECTROGRAM_DECIM_CORRECT, HSI_SPECTROGRAM_DECIM_TABLE
HSI_SPECTRUM__DEFINE, HSI_SRM__DEFINE, HSI_TIME_RESET, KILL_INDEX [1]
KILL_INDEX [2], MERGE_BATSE, PRINT_GEV, PRINT_NAR, PULSE_SPREAD, RM_FEATURE, SEL_AR
SPECTROGRAM CLASS DEFINITION, SPECTRUM CLASS DEFINITION, SPEX_FIT__DEFINE
SPEX_GEN__DEFINE, SXT_QLOOK, ch_ss, check_oldprocess [1], check_oldprocess [2]
check_oldprocess [3], check_oldprocess [4], check_ql_after_lz, db_gbo
get1hk_info [1], get1hk_info [2], get_fits_extno, get_info [1], get_info [2]
hsi_format_flare, hsi_get_flare_flags, hsi_mult_flare_list_inp
hsi_pak2decimation_settings, hsi_qlook_image, hsi_qlook_spectrum
hsi_sctime_type, hsi_spectrogramACCBIN [2], hsi_spectrogram__define [1]
hsi_spectrogram__define [2], hsi_spectrogram__define [3]
hsi_spectrogram__get_obs [1], hsi_spectrogram__livetime [1], hsi_ui_qlimage
ihy_db, mk_gx, mk_pnt, mk_trace_i1, mk_week_file [1], mk_week_file [2], mk_ydbtab
mreadfits, nts_copy [1], nts_copy [2], plotman, pr_visible, quick_hkplot [1]
quick_hkplot [2], rd_hist_dbase [1], rd_hist_dbase [2], rd_rdb [1], rd_rdb [2]
rd_selsisi_dir, rd_ydbtap, read_trace, split_colortab, ssw_addmm_gen
ssw_upgrade [1], ssw_upgrade [2], ssw_upgrade_backup, sswdb_upgrade, str_subset
struct_subset, temp_atten_correct, therm_plot, timeline, topsdb [1], topsdb [2]
tr_decode_head [1], tr_decode_head [2], tr_lut_conv, track_proc [1]
track_proc [2], ucon_path, wc_where_arr, web_seq, xcheckip, xdisp_fits, xlinflx
xset_chain [1], xset_chain [2], ydb_install [1], ydb_install [2]
HISTORY:
Written 30-Apr-91 by M.Morrison
1-Jul-94 (SLF) - add NOTEQUAL keyword
14-Nov-97 (MDM) - Added /MAP_SS keyword
09-Mar-98 (JSN) - change loop from integer to long
[Previous]
[Next]
NAME:
WHERE_ARRAY
PURPOSE:
Return the indices where vector B exists in vector A.
Basically a WHERE(B EQ A) where B and A are 1 dimensional arrays.
CATEGORY:
Array
CALLING SEQUENCE:
result = WHERE_ARRAY(A,B)
INPUTS:
A vector that might contains elements of vector B
B vector that we would like to know which of its
elements exist in A
OPTIONAL INPUTS:
KEYWORD PARAMETERS:
iA_in_B return instead the indices of A that are in
(exist) in B
OUTPUTS:
Index into B of elements found in vector A. If no
matches are found -1 is returned. If the function is called
with incorrect arguments, a warning is displayed, and -2 is
returned (see SIDE EFFECTS for more info)
OPTIONAL OUTPUTS:
COMMON BLOCKS:
None
SIDE EFFECTS:
If the function is called incorrectly, a message is displayed
to the screen, and the !ERR_STRING is set to the warning
message. No error code is set, because the program returns
-2 already
RESTRICTIONS:
This should be used with only Vectors. Matrices other then
vectors will result in -2 being returned. Also, A and B must
be defined, and must not be strings!
PROCEDURE:
EXAMPLE:
IDL> A=[2,1,3,5,3,8,2,5]
IDL> B=[3,4,2,8,7,8]
IDL> result = where_array(a,b)
IDL> print,result
0 0 2 2 3 5
SEE ALSO:
where
MODIFICATION HISTORY:
Written by: Dan Carr at RSI (command line version) 2/6/94
Stephen Strebel 3/6/94
made into a function, but really DAN did all
the thinking on this one!
Stephen Strebel 6/6/94
Changed method, because died with Strings (etc)
Used ideas from Dave Landers. Fast TOO!
Strebel 30/7/94
fixed checking structure check
[Previous]
[Next]
Project : HESSI
Name : WHERE_MAP
Purpose : find nearest map in time to a set of maps
Category : imaging maps
Syntax : index=where_map(map,map_set)
Inputs : MAP = image map
MAP_SET = array of maps to check
Outputs : INDEX = index of nearest map
Keywords : None
CALLS: ***
ANYTIM2TAI, VALID_MAP
History : Written 22 March 2000, D. Zarro (SM&A/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO - CDS
Name : WHERE_MISSING()
Purpose : Returns the position of all missing pixels in an array.
Explanation : Returns a vector array containing the position of missing
pixels, i.e. those pixels with a non-finite value (e.g. NaN),
or equal to a missing pixel flag value.
Use : Result = WHERE_MISSING( ARRAY, <keywords> )
Inputs : ARRAY = Array to examine for missing pixels.
Opt. Inputs : None.
Outputs : Result of function is a linear array containing the positions
of all missing pixels.
Opt. Outputs: COUNT = The number of missing pixels found.
Keywords : MISSING = Value flagging missing pixels.
COMPLEMENT, NCOMPLEMENT = Returns the position and number of
non-missing pixels. (IDL 5.4 and higher)
Calls : None.
CALLED BY:
AVERAGE, BSCALE, COLOR_BAR, FILL_MISSING, FORM_INT, FORM_VEL, HISCAL, LAPLACIAN, REDUCE
Common : None.
Restrictions: None.
Side effects: None.
Category : Utilities
Prev. Hist. : None.
Written : William Thompson, GSFC, 29 April 2005
Modified : Version 1, William Thompson, GSFC, 29 April 2005
Version 2, William Thompson, GSFC, 01-Jun-2005
Use EXECUTE for pre-5.4 compatibility
Version : Version 2, 01-Jun-2005
[Previous]
[Next]
Project : Solar-B/EIS
Name : WHERE_NEAR
Purpose : find indicies of source target with values nearest target
Category : utility
Syntax : IDL> index=where_near(source,target)
Inputs : source = source values to check
target = values to check against
Outputs : INDEX = indicies of source
Keywords : COUNT = number of indicies
CALLED BY:
EIT_COPY, TRACE_COPY
History : 2-Sep-2006 D.M. Zarro (ADNET/GSFC) Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : SOHO - CDS
Name : WHERE_NEGZERO()
Purpose : Finds positions of IEEE -0.0 values.
Category : Class4, OS
Explanation : Finds the positions of all values within an array that
correspond to the IEEE value -0.0, as determined from the bit
pattern. The VMS operating system has trouble coping with
these values. If using any other operating system, then no
action is performed.
Syntax : Result = WHERE_NEGZERO( ARRAY [, COUNT ] )
CALLED BY:
FXBREAD [1], FXBREAD [2], FXBREAD [3]
Examples :
Inputs : ARRAY = Array to test against the IEEE -0.0 value. Must be
of either floating point or double-precision.
Opt. Inputs : None.
Outputs : The result of the function is the indices of all values of
ARRAY corresponding to the IEEE -0.0 value, similar to the IDL
WHERE function.
Opt. Outputs: COUNT = Number of values found corresponding to IEEE -0.0.
Keywords : QUIET = If set, then warning messages are not printed out.
Calls : ***
OS_FAMILY
Common : None.
Restrictions: ARRAY must be of type float or double-precision.
Side effects: If no -0.0 values are found, or if ARRAY is not of type float,
or double precision, or if the operating system is something
other than VMS, then -1 is returned, and COUNT is set to 0.
Prev. Hist. : None.
History : Version 1, 31-Jan-1997, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : SOHO - CDS
Name : WHERE_NOT_MISSING()
Purpose : Returns the position of all non-missing pixels in an array.
Explanation : Returns a vector array containing the position of non-missing
pixels, i.e. those pixels with a finite value (i.e. not NaN),
and not equal to a missing pixel flag value.
Use : Result = WHERE_NOT_MISSING( ARRAY, <keywords> )
Inputs : ARRAY = Array to examine for missing pixels.
Opt. Inputs : None.
Outputs : Result of function is a linear array containing the positions
of all non-missing pixels.
Opt. Outputs: COUNT = The number of non-missing pixels found.
Keywords : MISSING = Value flagging missing pixels.
COMPLEMENT, NCOMPLEMENT = Returns the position and number of
missing pixels. (IDL 5.4 and higher)
Calls : None.
CALLED BY:
AVERAGE, BASELINE, FORM_HISTO, FORM_HISTO_2D
Common : None.
Restrictions: None.
Side effects: None.
Category : Utilities
Prev. Hist. : None.
Written : William Thompson, GSFC, 29 April 2005
Modified : Version 1, William Thompson, GSFC, 29 April 2005
Version 2, William Thompson, GSFC, 01-Jun-2005
Use EXECUTE for pre-5.4 compatibility
Version : Version 2, 01-Jun-2005
[Previous]
[Next]
Project : SOHO-CDS
Name : WHERE_OFF_LIMB
Purpose : find indicies of points off solar limb
Category : imaging
Syntax : off_limb=where_off_limb(xr,yr,date)
Inputs : XR, YR = arcsec coordinates
DATE = observation date
Outputs : OFF_LIMB = indices of off_limb points
Keywords : COUNT = # of off limb points
VIEW = use L1 view
CALLS: ***
ANYTIM2UTC [1], ANYTIM2UTC [2], DPRINT, EXIST, GET_UTC, NUM2STR, PB0R, PR_SYNTAX
CALLED BY:
DROT_XY, PLOT_MAP
PLOT_MAP2 WARNINGTEMPORARY FIX ONLY FOR 16 bit ZBuffer support
History : Written 4 March 1999, D. Zarro, SM&A/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Name: where_pattern
Purpose: find byte pattern in byte array
(ex: find repeated pattern in unformatted files)
Input Parameters:
inarray - byte or string array to search
inpattern - byte or string array to match
Output Parameters:
function returns indicies of match (-1 if no match)
sscnt - number of matches
Keyword Parameters:
print - if set, print WHERE statement used in execute
CALLED BY:
extract_val, ftp_list_since, ip_que_dmpver, mk_orbit [1], mk_orbit [2]
rd_pkt_head [1], rd_pkt_head [2], url_decode
History:
5-Nov-1994 (SLF) - to search for byte pattern in unformatted files
23-Jan-1995 (SLF) - allow non-printing characters (linefeed) in inpattern
CALLS: ***
ARR2STR [1], Arr2Str [2], STR2ARR [1], STR2ARR [2], prstr [1], prstr [2], tbeep [1]
tbeep [2], tbeep [3]
Restrictions:
Size of pattern limited by execute statement length limits
(Length <= 13 in IDL V3.5)
[Previous]
[Next]
Project : SOHO - CDS
Name : WHERE_STRUCT
Purpose : WHERE function for structures
Category : Utility
Explanation :
Syntax : IDL> ok=where(entry,struct,count)
Inputs : ENTRY = scalar structure to search for
STRUCT = array of structures to search in
Opt. Inputs : None
Outputs : subscripts of elements in STRUCT that match ENTRY
Opt. Outputs: COUNT = # of matches found
Keywords : None
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], MATCH_STRUCT
Common : None
Restrictions: Inputs must be structures
Side effects: None
History : Version 1, 25-Dec-1995, D.M. Zarro. Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Name: where_table
Purpose: identify tables within a text array
CALLS: ***
remtab [1], remtab [2]
CALLED BY:
str2html [1], str2html [2], str2html [3]
History:
29-mar-1995 (S.L.Freeland) - for text formatting (ex: text->html)
5-mar-1997 (SLF) - made quiet the default
[Previous]
[Next]
Name: where_table
Purpose: identify tables within a text array
CALLS: ***
remtab [1], remtab [2]
CALLED BY:
str2html [1], str2html [2], str2html [3]
History:
29-mar-1995 (slf) - for text formatting
(** old idl version pre keyword inherit **)
[Previous]
[Next]
NAME:
WHERE_TAG
PURPOSE:
Like WHERE but works on structure tag names
EXPLANATION:
Obtain subscripts of elements in structure array for which
a particular Tag has values in a range or matching specified values.
Like the WHERE function but for use with structures
CATEGORY:
Structures
CALLING SEQUENCE:
w = where_tag( struct, [ Nfound, TAG_NAME=, TAG_NUMBER = , RANGE =,
VALUES =, RANGE =, ISELECT =, /NOPRINT ]
INPUTS:
Struct = structure array to search.
INPUT KEYWORDS:
User *must* specify (1) TAG_NAME or TAG_NUMBER to search, and (2)
the VALUES or RANGE to search on
TAG_NAME = Scalar string specifying Tag Name
TAG_NUMBER = otherwise give the Tag Number,
RANGE = [min,max] range to search for in Struct,
VALUES = one or array of numbers to match for in Struct,
ISELECT= specifies indices to select only part of structure array,
(use it to recycle subscripts from previous searches).
/NOPRINT = suppress informational messages about nothing found.
OUTPUTS:
Nfound = # of occurences found.
RESULT:
Function returns subscripts (indices) to desired elements.
EXAMPLES:
Suppose STR is a structure with tags CAT_NO:indgen(10), and
NAME:strarr(10). Find the indices where STR.CAT_NO is
between 3 and 5.
IDL> print, WHERE_TAG( str, TAG_NAME = 'CAT_NO', VALUE = [3,4,5] ) ;or
IDL> print, WHERE_TAG( str, TAG_NUM = 0, RANGE = [3,5])
PROCEDURE:
Get tag number and apply the WHERE function appropriately.
MODIFICATION HISTORY:
written 1990 Frank Varosi STX @ NASA/GSFC
Stop printing "Tag <xxx> not found" with /NOPRINT, CD Pike 8-Jun-93
[Previous]
[Next]
Project : HESSI
Name : WHERE_TIMES
Purpose : check where times fall within input time limits
Category : HESSI, GBO, utility, time
Syntax : IDL> check=where_times(times,tstart=tstart,tend=tend,count)
Inputs : TIMES = time array to check (TAI format)
Outputs : CHECK = index of matching times
Keywords : TSTART = lower time limit (TIMES >= TSTART)
TEND = upper time limit (TIMES <= TEND)
COUNT = number of matches
CALLS: ***
ANYTIM2TAI, DATATYPE [1], DATATYPE [2], DATATYPE [3], PR_SYNTAX, VALID_TIME
CALLED BY:
EIT_COPY, RD_RSTN, TRACE_COPY
History : 9-Apr-1999, D.M. Zarro (SM&A/GSFC), Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Name: where_title
Purpose: identify titles/headers in text array
Calling Sequence:
ss=where_title(text)
CALLS:
CALLED BY
str2html [1], str2html [2], str2html [3]
[Previous]
[Next]
Project : HESSI
Name : WHERE_VAL
Purpose : Wrapper around WHERE that applies checks to data
Category : Utility
Syntax : IDL> chk=where_val(data,','< 10',count)
Inputs : DATA = data array to check
CHECK = check string (e.g. '< 10')
Outputs : COUNT = # of matches found
CHK = matching indicies
CALLS: ***
EXIST, IS_BLANK, str_replace [1], str_replace [2]
History : Written, 3-Feb-2004, Zarro (L-3Com/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO - CDS
Name : WHERE_VECTOR
Purpose : WHERE function for vectors
Category : Utility
Explanation :
Syntax : IDL> ok=where_vector(vector,array,count)
Inputs : VECTOR = vector with with search elements
ARRAY = array to search for each element
Opt. Inputs : None
Outputs : OK = subscripts of elements in ARRAY that match elements in vector
Opt. Outputs: COUNT = total # of matches found
Keywords : TRIM = trim inputs if string inputs
CASE = make case sensitive if string inputs
REST = indicies in ARRAY that don't match VECTOR
RCOUNT = # of non-matching elements
NOSORT = skip sorting input search vector
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST, UNIQ [1], UNIQ [2], UNIQ [3]
CALLED BY:
DB_CHECK, FIND_ZDBASE, GET_LATEST_IAP, GET_ZDBASE, GRID_XY, GT_CDS_WINDOW
LIST_ANOMALY, MATCH_STRUCT, MK_CDS_PLAN, MK_PLAN_EXIST, MK_PLAN_FIND [1]
MK_PLAN_FIND [2], MK_PLAN_READ, MK_SOHO_TARGET, RD_GOES, READ_KAP, REM_TAG [2]
SYNOP_DB__DEFINE, SYNOP_DEFINE, UPDATE_KAP, UPD_SCI_PLAN, WTITLE, XCAT, XLIST
Common : None
Restrictions: None
Side effects: None
History : Version 1, 25-Dec-1995, D.M. Zarro. Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : WHERE_WITHIN
Purpose : WHERE function for intervals
Category : Utility
Explanation :
Syntax : IDL> ok=where_within(range, valid_range [, bad_count=bad_count, bad_ind=bad_ind] )
Inputs : range - 2xn array of interval start/end values
valid_range - 2-element array of start/end values to check range against
Opt. Inputs : None
Outputs : Returns indices of input range array that are contained within valid_range
count - number of values of range that are within valid_range
Opt. Output Keywords:
bad_count - Number of elements of range that don't fall within valid_range
bad_ind - Indices of range that don't fall within valid_range
CALLS: ***
rem_elem [1], rem_elem [2]
CALLED BY:
hsi_show_flags [2]
Common : None
Restrictions: Input range must be [2xn], valid_range must be 2-element array.
Side effects: None
History : 25-Aug-2001, Kim Tolbert
20-Mar-2006, Richard.Schwartz@gsfc.nasa.gov
allow range to be dimensioned 2xN or Nx2
1-Nov-2006, richard.schwartz@gsfc.nasa.gov
make dimrange (dimensions of inrange) more robust by
forcing two dimensions. Use dimrange for the
n_elements(inrange[...]), replace bindgen with lindgen
1-Nov-2006, Kim. Added count argument
Contact : kim.tolbert@gsfc.nasa.gov
[Previous]
[Next]
NAME:
WHERENAN
PURPOSE:
Find the indices of all IEEE NaN values in an array.
EXPLANATION:
Find the positions of all values within an array that correspond to the
IEEE NaN (not-a-number) special values.
This routine is designed to be used on data which is in external data
representation, not host representation. Its purpose is to catch all
NaN special values before converting (IEEE_TO_HOST) from external to
host format, e.g. when reading a FITS file.
To identify IEEE values in the *host* representation, one can use
result = where(array NE array)
If this notation seems too bizarre, then since V5.2 one can use the /NAN
keyword to the FINITE function
result = where( finite(array,/NAN) )
CALLING SEQUENCE:
Result = WHERENAN( ARRAY [, COUNT ] )
INPUT PARAMETERS:
ARRAY = Array to test against the IEEE NaN special values. Must be
of either floating point, double-precision, or complex type.
OUTPUTS:
The result of the function is the indices of all values of ARRAY
corresponding to the IEEE NaN specification, similar to the IDL WHERE
function.
OPTIONAL OUTPUT PARAMETERS:
COUNT = Number of values found corresponding to IEEE NaN.
CALLED BY:
FXBREAD [1], FXBREAD [2], FXBREAD [3], FXBREADM, FXREAD [1], FXREAD [2]
READFITS [1], READFITS [2], READFITS [3], READFITSL
SIDE EFFECTS:
If no NaN values are found, or if ARRAY is not of type float, double
precision, or complex, then -1 is returned, and COUNT is set to 0.
RESTRICTIONS:
ARRAY must be of type float, double-precision, or complex.
PROCEDURE:
The bit patterns of the numbers being tested are compared against the
IEEE NaN standard.
MODIFICATION HISTORY:
William Thompson, Feb. 1992.
William Thompson, Oct. 1992, fixed bug regarding order of bytes on VAX
machines.
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
NAME:
WHERENAN
PURPOSE:
Find the indices of all IEEE NaN values in an array.
EXPLANATION:
Find the positions of all values within an array that correspond to the
IEEE NaN (not-a-number) special values.
This routine is designed to be used on data which is in external data
representation, not host representation. Its purpose is to catch all
NaN special values before converting (IEEE_TO_HOST) from external to
host format, e.g. when reading a FITS file.
To identify IEEE values in the *host* representation, one can use
result = where(array NE array)
If this notation seems too bizarre, then since V5.2 one can use the /NAN
keyword to the FINITE function
result = where( finite(array,/NAN) )
CALLING SEQUENCE:
Result = WHERENAN( ARRAY [, COUNT ] )
INPUT PARAMETERS:
ARRAY = Array to test against the IEEE NaN special values. Must be
of either floating point, double-precision, or complex type.
OUTPUTS:
The result of the function is the indices of all values of ARRAY
corresponding to the IEEE NaN specification, similar to the IDL WHERE
function.
OPTIONAL OUTPUT PARAMETERS:
COUNT = Number of values found corresponding to IEEE NaN.
CALLED BY:
FXBREAD [1], FXBREAD [2], FXBREAD [3], FXBREADM, FXREAD [1], FXREAD [2]
READFITS [1], READFITS [2], READFITS [3], READFITSL
SIDE EFFECTS:
If no NaN values are found, or if ARRAY is not of type float, double
precision, or complex, then -1 is returned, and COUNT is set to 0.
RESTRICTIONS:
ARRAY must be of type float, double-precision, or complex.
PROCEDURE:
The bit patterns of the numbers being tested are compared against the
IEEE NaN standard.
MODIFICATION HISTORY:
William Thompson, Feb. 1992.
William Thompson, Oct. 1992, fixed bug regarding order of bytes on VAX
machines.
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
PROJECT:
SOHO - CDS
NAME:
WHICH
PURPOSE:
Search for and print file or routine in IDL !path
EXPLANATION:
Use to find where IDL finds a program file, and, if
multiple definitions exist, which is loaded (the first
one). Splits path into all different directories,
searches for a file with the given NAME + '.PRO'.
CALLING SEQUENCE:
WHICH, NAME
INPUTS:
NAME - Name of the routine to search for (string scalar).
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
outfile - return file name found
KEYWORD PARAMETERS:
ALL - Report all occurrences if set. Usually WHICH reports the
first occurrence of a found routine (which is to be
executed by IDL). WHICH can take a while, especially on
VMS system, to search through all directories (and text
libraries on VMS system) if ALL is set. ALL is
automatically set if SEARCH is set.
SEARCH - Turn on the search mode, if set, that would match any
given string pattern found in the path.
CALLS: ***
ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GET_MOD
GREP, OS_FAMILY, STR_CHOP, STR_SEP, concat_dir [4]
CALLED BY:
HAVE_PROC, obj_restore, which_hessi_version
COMMON BLOCKS:
WHICH -- Mainly for speeding things up
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
General utility
PREVIOUS HISTORY:
Written Stein Vidar Haugan, 1993
MODIFICATION HISTORY:
19 May, 1994, SVHH, Doc. added
21 May, 1994, SVHH, Version 2, with on_error,2 and 'Use:'
Liyun Wang, GSFC/ARC, September 20, 1994
Added IDL internal routine checkings.
Liyun Wang, GSFC/ARC, October 5, 1994
Current directory also gets searched now
Version 3, Liyun Wang, GSFC/ARC, December 16, 1994
Made it capable of finding files in text libraries on VMS system
Added the ALL keyword
Version 4, Liyun Wang, GSFC/ARC, January 23, 1995
Added the SEARCH keyword
Version 5, Liyun Wang, GSFC/ARC, January 24, 1995
Used an undocumented IDL function routine ROUTINE_NAMES to get IDL
intrinsic routine names.
Version 6, Liyun Wang, NASA/GSFC, October 1, 1996
Added Windows support
Version 7 Add output variable. CDP, RAL 14-Mar-97
Version 8, 23-Oct-1997, William Thompson, GSFC
Use OS_FAMILY() instead of !VERSION.OS
Version 9, 4-July-1998, Zarro (SAC/GSFC)
Returned scalar out variable for single element value
Version 10, 28-Jun-1999, Zarro (SM&A/GSFC)
Added /quiet
VERSION:
Version 9
[Previous]
[Next]
Project : SOHO - CDS
Name : WHICH_ZDBASE()
Purpose : Returns which database is selected
Explanation : Returns which database was selected by the FIX_ZDBASE routine.
Use : Result = WHICH_ZDBASE
Inputs : None.
Opt. Inputs : None.
Outputs : The result of the function is one the four possible strings:
'User' = FIX_ZDBASE was last called with /USER
'CDS' = FIX_ZDBASE was last called with /CDS
'Original' = FIX_ZDBASE was last called with /ORIGINAL,
or else FIX_ZDBASE has not yet been
called.
Opt. Outputs: None.
Keywords : None.
Calls : None.
CALLED BY:
FIND_ZDBASE, MK_CDS_PLAN, MK_RASTER, XSTUDY
Common : ZDBASE_DEF from FIX_ZDBASE()
Restrictions: Only meaningful if only FIX_ZDBASE is used to switch between
databases.
Side effects: None.
Category : CDS, Planning, Databases
Prev. Hist. : None.
Written : William Thompson, GSFC, 16 May 1995
Modified : Version 1, William Thompson, GSFC, 16 May 1995
Version 2, William Thompson, GSFC, 17 May 1995
Modified so that there are only three possibilities.
Version 3, William Thompson, GSFC, 15 January 1996
Modified to use string values of ZDB_USED instead of
numerical ones.
Version : Version 3, 15 January 1996
[Previous]
[Next]
Project : SOHO - CDS
Name : WIDG_HELP
Purpose : Widget to select help topics.
Explanation : Create a widget that lists and displays the help topic from
which the user may select.
This program searches for a file with this name first in the
current directory, and then in !PATH, and searches for the
name by itself, and with '.hlp' appended after it.
The file consists of a series of topic headers followed by a
text message about that topic. The topic headers are
differentiated by starting with the "!" character in the first
column, e.g.
!Overview
This is the overview for the
topic at hand.
!Button1
This is the help explanation
for button 1
etc.
The program assumes that the first line in the file contains
the first topic. Also, there must be at least one line
between any two *different* topics. Thus,
!Button2
!Button3
This is the help text for buttons 2 and 3
means that the topics "Button2" and "Button3" are really the
same, and both correspond to the text following !Button3. It's
possible to have any number of topics in a row that leads to
the same help text. On the other hand:
!Button2
!Button3
means that the two topics have different help texts. The last
topic in the file must have at least one non-topic line after
it.
When the HIERARCHY keyword is set, multiple separation
characters (!) indicate the level of a help topic.
Initially, only first-level help topics are displayed in
the list of topics. When a topic is selected,
the corresponding next level topics are displayed.
The SUBTOPIC keyword can be supplied to specify what topic
should be looked up.
It is possible to have keywords that are only accessible
through the keyword SUBTOPIC, e.g.:
!!!!!!!!!!!!!!!!XYZZYZYAA ; The user wouldn't want to see this
!!!!!!!!!!!!!!!!XYZZYZYBB ; Nor would he want to see this.
!SPECIAL TOPICS ; But this is OK.
Specifying subtopic='XYZZYZYAA' would drop the user off
looking at 'SPECIAL TOPICS'.
Use : WIDG_HELP, FILENAME
Inputs : FILENAME = The name of a file that contains the help
information to display.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : GROUP_LEADER = The widget ID of a calling widget. Destroying
that widget will kill this widget.
TITLE = The text to be displayed on the widget title
bar. If not passed, then "Widget Help" is used.
FONT = Font name for the help text widget. If
not passed, the text font is determined
by GET_DFONT
TFONT = Font name for the topic list widget. If
not passed, the topic list font is determined
by GET_DFONT
SEP_CHAR = Character used to differentiate topic
headers. The default SEP_CHAR is '!'
MODAL = To make this widget program a "blocking one"
SUBTOPIC = The initial topic selection to be displayed
as the widget pops up.
XTEXTSIZE = Size of the text widget. Default is 60.
XTOPICSIZE = X size of the topic list.
HIERARCHY = If set, then multiple SEP_CHARs indicate the
level of the section. The levels are indented
uniformly and only the sublevels within the
current top-level topic are displayed in the
list.
Calls : ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], FIND_WITH_DEF [1], FIND_WITH_DEF [2]
FIND_WITH_DEF [3], GET_DFONT [1], GET_DFONT [2], RD_ASCII [1], RD_ASCII [2]
REVERSE, UNIQ [1], UNIQ [2], UNIQ [3], WIDG_HELP_EVENT, WIDG_HELP_SELECT, XMANAGER
XREGISTERED
CALLED BY:
CD_SUMER, CHIANTI_NE, CHIANTI_TE, DSPEXP, DSPWAV, DSP_WAV, EIS_IMAGE_TOOL_EVENT [1]
EIS_IMAGE_TOOL_EVENT [2], FIND_CDS_STUDIES, GDSPSPEC, IMAGE_TOOL_EVENT
MK_CDS_PLAN, MK_RASTER, MK_SOHO, MK_STUDY, NDSPSPEC, PQLPROFILE, PQLZOOM, ST_SUMER, XCPT
XPL_STRUCT, XSTUDY, XTKI, dsp_menu, eis_mk_plan_gui [1], eis_mk_plan_gui [2]
eis_mk_raster_gui__define [1], eis_mk_raster_gui__define [2]
eis_mk_study_gui [1], eis_mk_study_gui [2]
Common : WIDG_HELP_COMMON. Used to enable picking new subtopics
or killing the previous copy of widg_help.
Restrictions: None.
Side effects: None.
Category : Utilities, Widget
Prev. Hist. : Based on PLANHELP by Elaine Einfalt, GSFC (HSTX), April 1994
Written : William Thompson, GSFC, 2 September 1994
Modified : Version 1, William Thompson, GSFC, 2 September 1994
P. Brekke, GSFC, 21 September 1994
Text widget width = 60 (was 50)
Version 2, Liyun Wang, GSFC/ARC, April 3, 1995
Added keywords FONT and SEP_CHAR
Allowed commentary lines (starting with a ';'
in the first column) in help text file
Version 3, Liyun Wang, GSFC/ARC, May 17, 1995
Added keyword MODAL
Version 4, S.V.H. Haugan, 18-May-1995
Added keyword SUBTOPIC (second time around)
Version 5, Liyun Wang, GSFC/ARC, June 22, 1995
Added TFONT keyword
Version 6, Richard Schwartz, GSFC/SDAC, Aug. 28, 1995
added, XTEXTSIZE, HIERARCHY, using RD_ASCII to
read the help file. Also, the SUBTOPIC
is matched by finding the first matching string
amongst the topics instead of requiring an exact
match, where leading and trailing blanks have
been discarded, and the search is case insensitive.
Additionally, the selected topic remains highlighted
while the text is displayed.
Version 7, Stein Vidar H. Haugan, UiO, 28 February 1996
Two or more topic lines with no text lines inbetween
causes both topics to have a common help text,
i.e., the text following the last of the series
of topics.
If a copy of widg_help is running then it's either
killed and a new one is started, or a new subtopic
is displayed if we're looking at the same file.
Version 8, SVHH, UiO, 1 March 1996
Only topics at one level below the current topic
are displayed when using HIERARCHY. Moved the
file format description to sect. "Explanation".
Added XTOPICSIZE.
Version 9, SVHH, UiO, 4 March 1996
Fixed problem with unrecognized subtopic causing
crash.
Version 10, Zarro (EIT/GSFC), 22 August 2000
Added check for undefined !debug
[Previous]
[Next]
NAME:
WIDG_TYPE
PURPOSE:
Returns the type (TEXT, BUTTON, etc.) of the widget ID.
CATEGORY:
Widgets
CALLING SEQUENCE:
result = widg_type(widget_id)
CALLED BY:
CALLS TO:
none
INPUTS:
WIDGET_ID : the ID number of the widget to be identified.
OPTIONAL INPUTS:
none
OUTPUTS:
Returns the type of widget (BASE, BUTTON, SLIDER, TEXT, DRAW, LABEL
LIST, DROPLIST, ERROR)
OPTIONAL OUTPUTS:
none
CALLED BY:
BCS, CHOOSE_FL, EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], FCS, HFLARE
HXRBS, IMAGE_TOOL_EVENT, MK_CDS_PLAN, MK_STUDY, XCALENDAR, XCAT, XTEXT_RESET_ID
get_bsc_wtype, get_wtype [1], get_wtype [2], spex_evnt [1], spex_evnt [2]
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
Widgets must be available
PROCEDURE:
Input a widget ID to return the type of widget it is.
MODIFICATION HISTORY:
Nov 93 - Elaine Einfalt (HSTX)
Oct 95 - Add DROPLIST type. RCJ
[Previous]
[Next]
Project : SOLAR-B/EIS
Name : WIDGET_CONTROL2
Purpose : wrapper around WIDGET_CONTROL that check for valid ID
Category : utility widgets
Syntax : IDL> widget_control2,id
Inputs : ID = widget id
Outputs : None
Keywords : all those of WIDGET_CONTROL
CALLS: ***
widget_valid
CALLED BY:
EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2], EIS_IMAGE_TOOL_EVENT [1]
EIS_IMAGE_TOOL_EVENT [2], EIS_ITOOL_PTOOL [1], EIS_ITOOL_PTOOL [2]
EIS_LOAD_IMAGE [1], EIS_LOAD_IMAGE [2], ITOOL_BUTTON_REFRESH, ITOOL_DRAW
ITOOL_PTOOL, ITOOL_ZOOMMER
History : 12-Jan-2006, Zarro (L-3Com/GSFC) - written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
NAME:
WIDGET_FLASH
PURPOSE:
routine to create an eye-catching flashing widget
CATEGORY:
widgets
CALLING SEQUENCE:
widget_flash,mess,label
INPUTS:
mess=string message to be flashed
label=ID of widget to be flashed
OPTIONAL INPUTS:
delay=secs between flashing
CALLS: ***
FLASH_BCK
CALLED BY:
spex_evnt [1], spex_evnt [2]
COMMON BLOCKS:
COMMON fsign,fmess,flabel,fdelay
This is the only way I know of communicating information
(such as the flash delay time) to the flashing background event.
PROCEDURE:
Flashes a message by toggling between printing the message
and a blank string.
RESTRICTIONS:
Background flasher routine must be registered first by:
XMANAGER,'NAME',BACKGROUND='FLASH_BCK'
where NAME is the main widget application.
Flashing widget should preferably be a label type or else
strange things will occur!
EXAMPLE:
The flashing widget can be initiated by:
WIDGET_FLASH,'YOUR FLASHING MESSAGE HERE', FLABEL
where FLABEL is the id of the widget that you wish to flash.
After initiating the flashing widget, you can change the
message by:
WIDGET_CONTROL,FLABEL,SET_VALUE='YOUR NEW FLASHING MESSAGE HERE'
MODIFICATION HISTORY:
written Jan'92 by: Dominic Zarro
(Applied Research Corp. Landover MD)
[Previous]
[Next]
Name: widget_kill
Purpose: Widget interface to allow user to select which widgets to destroy. Useful if
widgets are hung.
Calling sequence: widget_kill [,group=group]
Input arguments:
group - widget id of parent widget (used only for positioning widget)
Method: Uses xmanager_com to determine the widgets that are currently being managed. Calls
xsel_list_multi to present the list of widget names to the user. User can select a single or
multiple widgets to destroy. If user clicks cancel, nothing happens.
CALLS: ***
EXIST, XMANAGER_COM, xsel_list_multi
CALLED BY:
plotman_reset
Restrictions: xmanager_com assumes the RSI xmanager common has certain variables. RSI
can change this any time they say.
Output:
Selected widgets are destroyed.
Written: Kim Tolbert, 1-Aug-2002
Modifications:
[Previous]
[Next]
Project : HESSI
Name : WIDGET_MBASE
Purpose : same as WIDGET_BASE, but allows GROUP to be undefined when
using /MODAL
Category : utility widgets
Syntax : IDL> base=widget_mbase(parent,_extra=extra)
Inputs : PARENT = optional parent widget
Keywords : Same as WIDGET_BASE
CALLS: ***
EXIST, SINCE_VERSION [1], SINCE_VERSION [2], XALIVE
CALLED BY:
CHAN_DEFINE, EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2], LOCATE_FFCAL
OVSA_LTC_DEFINE, RESPOND_WIDG, SHOW_SYNOP__DEFINE, SYNOP_DEFINE, XACK, XPOPUP
xpickfile
History : Written 7 May 2000, D. Zarro, SM&A/GSFC
Modified, 17 Jan 2006, Zarro (L-3Com/GSFC)
- added _REF_EXTRA
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Name: widget_offset
Purpose: Determine position of a child widget so that it is near, but doesn't block
its parent.
Calling sequence: widget_offset, parent, xoffset, yoffset, newbase=newbase, $
newsize=newsize, vertical=vertical
Input:
parent - widget id of parent
newbase - widget id of new widget that hasn't been realized yet (need this for size)
newsize - size of new widget. NOTE: pass newbase OR newsize, not both
vertical - if set positions new widget above or below parent instead of beside
Output:
xoffset, yoffset - offset from corner of screen of new widget.
Method:
Call widget creation routines, but before realizing widget, call widget_offset,
then call widget_control, newbase, xoffset=xoffset, yoffset=yoffset, then realize it.
Written: Kim Tolbert, Mar 18, 2000
CALLS:
CALLED BY
hsi_clean_options, hsi_coll_widget, hsi_corr_widget, hsi_energy_widget
hsi_forwardfit_options, hsi_imagemisc_widget, hsi_imagesize_widget
hsi_memsato_options, hsi_memvis_options, hsi_pix_options, hsi_range_widget
hsi_show_flags [2], hsi_spectrum_filewrite_widget, hsi_time_widget
hsi_ui_flarecat, hsi_ui_img, hsi_ui_lc, hsi_ui_mon, hsi_ui_obs, hsi_ui_ql
hsi_ui_qlimage, hsi_ui_spec, plotman_conf_panels, plotman_imageoptions
plotman_widget, xdroplist, xedit_table, xsel_list_multi
[Previous]
[Next]
Project : HESSI
Name : WIDGET_SELECTED
Purpose : get currently highlighted selections from list widget
Category : utility widgets
Syntax : IDL> selected=widget_selected(list)
Inputs : LIST = list widget ID
Outputs : SELECTED = selected uvalues
Keywords : INDEX = set to return index of selection instead of UVALUEs
CALLS: ***
EXIST
CALLED BY:
SHOW_SYNOP__DEFINE, hsi_ui_qlimage, plotman_conf_panels, xsel_list_multi
History : Written 23 May 2000, D. Zarro, SM&A/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : Solar-B
Name : widget_valid
Purpose : check if variable is a valid widget id
Category : utility widgets
Syntax : IDL> s=widget_valid(id)
Inputs : ID = id to check
Outputs : 1/0 if it is or isn't
Keywords : None
CALLS: ***
EXIST
CALLED BY:
EIS_ITOOL_PTOOL [1], EIS_ITOOL_PTOOL [2], ITOOL_PTOOL, ITOOL_SWITCHER
RDWRT_BUFF, WIDGET_CONTROL2
History : 12-Jan-2006, Zarro (L-3Com/GSFC) - written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : SOHO - CDS
Name : WIN
Purpose : Switch to Microsoft Windows mode.
Explanation : SETPLOT is called to save and set the system variables.
Use : WIN
Inputs : None.
Opt. Inputs : None.
Outputs : A message is printed to the screen.
Opt. Outputs: None.
Keywords : None.
Calls : ***
SETPLOT [1], SETPLOT [2]
CALLED BY:
angles, azicalc, pr_teem
Common : None. But calls SETPLOT, which uses common block PLOTFILE.
Restrictions: It is best if the routines TEK, REGIS, etc. (i.e. those
routines that use SETPLOT) are used to change the plotting
device.
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: If not the first time this routine is called, then system
variables that affect plotting are reset to previous values.
Category : Utilities, Devices.
Prev. Hist. : None.
Written : William Thompson, GSFC, 15 June 1993.
Modified : Version 1, William Thompson, GSFC, 15 June 1993.
Version : Version 1, 15 June 1993.
[Previous]
[Next]
PROJECT:
SOHO - CDS/SUMER
NAME:
WIN_DUMP
PURPOSE:
Use xwd program to dump the contents of whole widget window
CATEGORY:
Utility
SYNTAX:
win_dump, parent, title [, /ps]
INPUTS:
PARENT - ID of top level widget which will be dumped
TITLE - Name of top-level widget window
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORDS:
FILE - Name of output GIF file; if FILE is missing, the
output will be send to a printer directly
PS - Set this keyword to get PS output; if missing, GIF
format is assumed
CALLS: ***
FILE_EXIST [2], POPUP_MSG, PS [1], PS [2], PSCLOSE [1], PSCLOSE [2], PSPLOT [1]
PSPLOT [2], READ_XWD, XACK, XPS_SETUP, file_exist [1], file_exist [3]
COMMON:
None.
RESTRICTIONS:
Only works for UNIX systems that have the "xwd" program
Only works for top level widget windows
SIDE EFFECTS:
None.
HISTORY:
Version 1, April 17, 1996, Liyun Wang, GSFC/ARC. Written
Version 2, William Thompson, GSFC, 8 April 1998
Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays
CONTACT:
Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)
[Previous]
[Next]
PROJECT:
SDAC
NAME:
WIN_SPAWN
PURPOSE:
This procedure allows SPAWN to return results under WINdows.
CATEGORY:
SYSTEM, WINDOWS
CALLING SEQUENCE:
WIN_SPAWN, Command, Result
;
INPUTS:
Command- Set of DOS commands.
KEYWORDS INPUTS:
TEMP_FILE - file to overwrite with text output of command.
The default location is c:/windows/temp/spawn_results.txt
DELETE = set to delete temporary file when done
NOSHELL = skip using command shell
BACKGROUND/NOWAIT = spawn in background
KEYWORD OUTPUTS:
COUNT - number of lines in result
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1], DATATYPE [2]
DATATYPE [3], GET_RID, GET_TEMP_DIR, IDL_RELEASE, MK_TEMP_FILE, OS_FAMILY
RD_ASCII [1], RD_ASCII [2], RM_FILE, TRIM, concat_dir [4], file_append [1]
file_append [2]
CALLED BY:
FIND_WIND_DIR, hsi_make_hessi_ct
PROCEDURE:
This procedure spawns and saves the results to a local file which
is subsequently read back to make the results available in the same
way spawn can return results under Unix and VMS.
MODIFICATION HISTORY:
Version 1. richard.schwartz@gsfc.nasa.gov, 8-Jun-1998
Version 2. Kim Tolbert, 18-Aug-1998 - Use TMP env. variable
Version 3. Zarro (SM&A/GSFC), 12-Nov-1999 - added /DELETE and a
CONCAT_DIR
Version 4. Zarro (SM&A/GSFC), 17-March-2000 - added some input
error checking as well as check if return result requested.
Also, added a random number to TEMP_FILE to avoid collisions
if more than one copy of program runs simultaneously, or TEMP_FILE
already exists
Version 5. Zarro (SM&A/GSFC), 23-March-2000
added spawning a batch file using START /min /b /high.
On some systems, these switches "may" inhibit the annoying shell window
20-May-00, Zarro (EIT/GSFC) - removed START
20-Jan-01, Zarro (EITI/GSFC) - added IDL 5.4 capability
29-Nov-06, Zarro (ADNET/GSFC) - added background capability
[Previous]
[Next]
Project : HESSI
Name : WINCOPY
Purpose : copy contents of one window into another
Category : display graphics utility
Explanation : uses DEVICE,/COPY
Syntax : IDL> wincopy,w1,w2
Examples :
Inputs : W1 = source window ID
W2 = target window ID
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords : FREE = if target doesn't exist, create it
PIXMAP = if creating via /FREE, make it a PIXMAP
VERBOSE = informational messages
ERR = error string
Restrictions: Probably works in Windows
CALLS: ***
EXIST, NUM2STR
Side effects: Nome
History : Version 1, 26-May-1999, Zarro (SM&A/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
WINDOW_ANACUBE
PURPOSE:
Read ANA image cube opened with OPEN_ANACUBE;
windowed region selectable by cursors.
CATEGORY:
CALLING SEQUENCE:
cube = window_anacube(ref_no)
or
cube = window_anacube(ref_no,/read)
cube = window_anacube(ref_no,/read,/reuse,ss=ss)
INPUTS:
ref_no No. of frame to be used for windowing
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
ss ss vector if only selection to be read
read read images - default is to show reference image
reuse_window use window that was previously selected with cursors.
(default is to have user select one)
display Show each frame as it is read (cut into selection frame)
max max value to be used when displaying reference image
OUTPUTS:
cube 3d image cube of selected window
OPTIONAL OUTPUT PARAMETERS:
COMMON BLOCKS:
anacube,anacube_window
SIDE EFFECTS:
RESTRICTIONS:
MUST be called after OPEN_ANACUBE
Images only make sense if ANA has not done any "subtle" rotations...
PROCEDURE:
Allows user to select region on a reference image using the cursors.
Reads in selected region as a data cube. The ss vector allows
selected frames to be read.
MODIFICATION HISTORY:
Mar-99 RDB Written
08-Dec-99 RDB Added /display keyword to show data as being read
Flip images N-S; ANA reads the other way
[Previous]
[Next]
NAME: WINDOW_TEST
PURPOSE:
This procedure is used to test whether X windows are available if
requested. If not available, device might be wrong or in batch, then
the device is switched to the default, PS, or NULL
CATEGORY:
CALLING SEQUENCE:
WINDOW_TEST
CALLS:
none
INPUTS:
none explicit, only through commons;
OPTIONAL INPUTS:
none
OUTPUTS:
none explicit, only through commons;
OPTIONAL OUTPUTS:
none
KEYWORDS:
NULL - Switched to 'NULL' is 'X' not available.
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
none
MODIFICATION HISTORY:
Version 1, ras, 3-oct-1996
[Previous]
[Next]
File WINUP.PRO
routines: GET_MY_WINDOWS, REMOVE_MY_SAVED, WINUP_EV, WINUP
CALLS:
CALLED BY
CP [2], CPCOMPOSITE, CPDIFF, CPDISPLAY, CPMOVIE, CPMOVIE_DO, CPMOVIE_EV, CPTV, CP_EVENT
HXISGETWINDOW, HXISWIDGET, HXISWIDG_EV, WCHECK_SET [1], cp [1], setup_spex [1]
setup_spex [2], uvsp, uvspwin, wcheck_set [2]
[Previous]
[Next]
FUNCTION GET_MY_WINDOWS
Creates and returns a string array containing all active IDL window,
and if any windows were saved to the window_array common with WINUP.PRO
then a description will also be present.
Calling sequence: x = GET_MY_WINDOW
INPUT: none
OUTPUT: string array of alll active window
CALLS: ***
GET_MY_WINDOWS, REMOVE_MY_SAVED, WINUP_EV, XMANAGER, XREGISTERED
CALLED BY:
CP [2], CPCOMPOSITE, CPDIFF, CPDISPLAY, CPMOVIE, CPMOVIE_DO, CPMOVIE_EV, CPTV, CP_EVENT
HXISGETWINDOW, HXISWIDGET, HXISWIDG_EV, WCHECK_SET [1], cp [1], setup_spex [1]
setup_spex [2], uvsp, uvspwin, wcheck_set [2]
COMMON: window_array
[Previous]
[Next]
PRO REMOVE_MY_SAVED, [INDEX=INDEX]
If the provided index number has been saved to the common window_array
then remove it and it's associated description from the commaon arrays.
This reduces the arrays' size by one
input:
INDEX :
CALLS:
CALLED BY
CP [2], CPCOMPOSITE, CPDIFF, CPDISPLAY, CPMOVIE, CPMOVIE_DO, CPMOVIE_EV, CPTV, CP_EVENT
HXISGETWINDOW, HXISWIDGET, HXISWIDG_EV, WCHECK_SET [1], cp [1], setup_spex [1]
setup_spex [2], uvsp, uvspwin, wcheck_set [2]
[Previous]
[Next]
PRO WINUP_EV, EVENT
Event handler for WINUP.PRO
CALLS:
CALLED BY
CP [2], CPCOMPOSITE, CPDIFF, CPDISPLAY, CPMOVIE, CPMOVIE_DO, CPMOVIE_EV, CPTV, CP_EVENT
HXISGETWINDOW, HXISWIDGET, HXISWIDG_EV, WCHECK_SET [1], cp [1], setup_spex [1]
setup_spex [2], uvsp, uvspwin, wcheck_set [2]
[Previous]
[Next]
PROJECT:
SDAC
NAME:
WINUP
USE:
WINUP, [/ALL, MESSAGE=MESSAGE, group_leader=group]
WINUP, index, /ADD, [TITLE=TITLE, MESSAGE=MESSAGE]
ADDS window indentifing information to the window_array common
WINUP, [index], [TITLE=TITLE, MESSAGE=MESSAGE, COLORS, PIXMAP RETAIN,
XPOS, YPOS, XSIZE, YSIZE]
PURPOSE:
CREATES a new window as with the WINDOW command but also adds the
indentifing information to the window_array common or provides
a widget dialog for deleting existing windows.
Description:
Depending on calling sequence this program either:
Deletes an existing window via widget list selections
or Adds window information about an existing window
Creates a window for scratch
DELETES: puts up a widget from which the user will select windows to
be deleted. Values in the widget are obtained from the window_array
common. If keyword all is present and non-zero then
ALL active windows will be deleted.
;
INPUTS:
index : The window index number of a window to be created or added
to the window_array common block. Not needed when the
keyword FREE is used in the case of window creating.
KEYWORDS:
ALL : indicates that all window will be summarily deleted
ADD : indicates that the window already exists and is just being
added to the common WINDOW_ARRAY.
TITLE : When adding an already created window TITLE is any string
When creating a window TITLE is what appears in the banner
it was input to the window's banner
COLORS, FREE, PIXMAP RETAIN, XPOS, YPOS, XSIZE, YSIZE:
are the same a if WINDOW was being used
GROUP : The widget id of a calling widget, so that when the calling
widget is kill the deletion widget will be killed too.
OUTPUT:
MESSAGE : a string is return with possible status information
COMMON WINDOW_ARRAY, WINDOWS_INDEX contains the index number
WINDOWS_TITLE contains the title
CALLS: ***
GET_MY_WINDOWS, REMOVE_MY_SAVED, WINUP_EV, XMANAGER, XREGISTERED
CALLED BY:
CP [2], CPCOMPOSITE, CPDIFF, CPDISPLAY, CPMOVIE, CPMOVIE_DO, CPMOVIE_EV, CPTV, CP_EVENT
HXISGETWINDOW, HXISWIDGET, HXISWIDG_EV, WCHECK_SET [1], cp [1], setup_spex [1]
setup_spex [2], uvsp, uvspwin, wcheck_set [2]
History:
Extracted by Richard Schwartz from an Elaine Einfalt procedure, ~1993
[Previous]
[Next]
file winup_common.pro - common block for WINUP.PRO
[Previous]
[Next]
NAME:
wmenu_sel
PURPOSE:
To allow a user to select a series of array elements
using the WMENU option. Options exist to select many
elements.
CALLING SEQUENCE:
subs = wmenu_sel(array)
subs = wmenu_sel(files, /one)
INPUT:
array - a string array of any length
OPTIONAL INPUT KEYWORDS:
one - if set, return after one element is selected
OUTPUT:
Returns the indicies of the array elements selected
CALLS: ***
input [1], input [2], prstr [1], prstr [2], wmenu_sel_set [1], wmenu_sel_set [2]
CALLED BY:
DATAGET3_GRS, DATAGET3_HXS, GRS_SPEFF, MK_HXTDATA, PICK_CAN_PRELIM, PLOT_GRSPCH
PLOT_GRSPCL, PLOT_GRSPHH, PLOT_GRSPHL, PLOT_HXSPC, PLOT_HXSPH, RD_TAR, RdTap [1]
RdTap [2], RdTap [3], SXSPC, TEST_OUTG, TEST_OUTH, XLOADCT [2], XLOADCT [3]
cancel_dsn_pick, color2rgb, daily_forecast [2], dataget_grs, dbase2disk
do_demo [1], do_demo [2], ffi_prep, file_menu [1], file_menu [2], flares2disk
ftp_copy2sites, get_daily [1], get_daily [2], get_selsis, go_lasdisk golaserdisk
go_lasdisk2 golaserdisk, go_nvs4, go_nvs5, go_rdtap [1], go_rdtap [2], grs_plot
hxt_hs_bgd, hxt_hs_task, jitter_gif_xyimg, merc_lwa, merc_pix, mk_mo_disk
mk_mo_disk2, mk_pix [1], mk_pix [2], mo2wks, mo_prep, newfiles [1], newfiles [2]
newfiles [3], newsfd, pc_tplot_grs, pc_tplot_rbm, ph_eff_grs1, ph_eff_grs2
ph_pow_grs1, ph_pow_grs2, prep_gendat, rd_modb, rd_ydbtap, rmosaic [1], rmosaic [2]
rmosaic [3], sel_img, set_printer [1], set_printer [2], set_printer [5]
show_contacts, show_pixf, sw2tree [1], sw2tree [2], video_menu, window_select
wmenu_sel_set [1], wmenu_sel_set [2], xset_chain [1], xset_chain [2]
xso_butevents [1], xso_butevents [2], ydb_install [1], ydb_install [2]
HISTORY:
Written Dec '91 by M.Morrison
18-Mar-92 (MDM) - Added option to select all elements on
the current page.
- Also added the keyword option "one"
- Also adjusted page size to look at the length
of the string array
18-Mar-92 (MDM) - Added case statement to get screen size
4-Aug-92 (MDM) - Added common block storage of number of lines and
columns that are used for a given display.
8-Apr-93 (MDM) - Added code to recognize when the display device
is the NCD x-terminal.
23-apr-93 (JRL) - Moved the code that sets nchar and nlin to wmenu_sel_set
13-may-93 (SLF) - force scaler return if only one element
25-Apr-94 (MDM) - Modified to print options to the screen if the device is
not an X terminal.
[Previous]
[Next]
NAME:
wmenu_sel_set
PURPOSE:
To allow a user to manually set the number of characters and lines
are used in the WMENU_SEL routine
CALLING SEQUENCE:
wmenu_set_set,/reset ; Reset to values given below
wmenu_sel_set,nchar,nlin ; Set to nchar and nlin
wmenu_sel_set,nchar,nlin,/get ; Get current values
INPUT:
nchar - Number of characters
nlin - Number of line
CALLS: ***
input [1], input [2], wmenu_sel [1], wmenu_sel [2]
CALLED BY:
cancel_dsn_pick, mdi_idl_startup, wmenu_sel [1], wmenu_sel [2]
EXAMPLES:
nchar nlin
ULTRIX Workstations: 210 61
SUN Workstations 190 54
VMS Workstations (?) 170 50
X-Terminals (small ver) 132 46
X-Terminals (large ver) 150 43
X-Terminals (large ver) 124 43 (large font)
INDY 100 54
HISTORY:
Written by M.Morrison 4-Aug-92
8-Apr-93 (MDM) - Updated header information
21-apr-93 (JRL) - Added reset and get options
28-Jun-94 (MDM) - Added interactive setting option
11-Jan-95 (MDM) - Changed Xterminal nchar from 132 to 110
23-Jan-95 (MDM) - Added option to enter values manually
8-Feb-95 (MDM) - Added INDY option
- Added some instructions/comments
[Previous]
[Next]
NAME:
WOBJECT
PURPOSE:
create template widget window with buttons
CALLING SEQUENCE:
wobject,popts,pvalues,topts,doneb,plotb,base,draw,label,$
xsize=xsize,ysize=ysize
INPUTS:
popts = string array of button names (e.g. ['CAT', 'MOUSE','DOG'])
pvalues = string array of button values
topts = array of tool options (e.g, ['LOG', 'CONTOUR'])
OUTPUTS
doneb = widget id of done button
plotb = widget id of plot buttons
base = widget id of main base
draw = id of draw widget
label = id of draw label
tbase = widget id of base holding tool buttons
KEYWORDS:
xsize,ysize = usual widget sizing parameters
CALLS: ***
XMENU [1], XMENU [2], XPDMENU
CALLED BY:
BCS, FCS
RESTRICTIONS:
This is a simple object that must be realized as part of a main
application. No error checking is performed, so you have to know
what you are doing.
MODIFICATION HISTORY:
DMZ (ARC) Jun'92
[Previous]
[Next]
NAME:
WR_ASC
PURPOSE:
To write arrays into columns of ASCII numbers
CATEGORY:
I/O
CALLING SEQUENCE:
WR_ASC, append=APPEND, F,H,X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11
INPUTS:
F = If it is a string, interpreted as output file name
H = If it is a string, interpreted as header
X'i = i'th vector input
CALLS: ***
BOOST_ARRAY [1], BOOST_ARRAY [2], BOOST_ARRAY [3], TEST_OPEN
CALLED BY:
BCS, FCS, WBDA [1], WBDA [2], WBSC [1], WBSC [2]
RESTRICTIONS:
Limited to 10 input vectors. Cannot handle 3-D vectors
PROCEDURE:
Use array concatenation
MODIFICATION HISTORY:
Written DMZ (ARC), July 1990
Converted to version 2, Paul Hick (ARC), Feb 1991
[Previous]
[Next]
Project : SOHO - CDS
Name : WR_MOVIE
Purpose : Convert an array of frames to a JAVASCRIPT or MPEG movie.
Explanation : This procedure takes a three dimensional array of images
in the form (X-dim, Y-dim, Frames) and generates a movie out of
it in various formats.
In the older (default) mode of operation, an intermediate
series of GIF files is written out, where each GIF contains one
image frame. The procedure then will convert the GIF files to
a GIF movie (viewable with Netscape >2.0) and/or an MPEG movie.
The procedure uses the program mpeg_encode to create the MPEG
movie and the program whirlgif to create the GIF movie. For
IDL v5.4 and above, pict files are used as the intermediate
format for MPEG movies, since there was a period where GIF
files were no longer supported by IDL. (However, this routine
uses SSW_WRITE_GIF which can allow the writing of GIF images on
some computers.)
Alternatively, this procedure can create MPEG movies using
IDL's internal MPEG encoder, without use of any intermediate
GIF files.
A third type of output which can be produced is a JAVASCRIPT
movie suitable for viewing in a web browser like Netscape or
Microsoft Internet Explorer. This can be produced with either
GIF, PNG, or JPEG frame files. For versions of IDL earlier
than 5.4 the default is GIF; after that it is JPEG. If no
keywords are passed, then JAVASCRIPT movies are the default.
This procedure creates a subdirectory /mpegframes to store the
individual (e.g. GIF) image frames. If the procedure is called
with the /DELETE keyword, then this directory and its contents
will be removed before the procedure exits. Otherwise it will
be left intact.
An alternative way to use this routine is to pass it one frame
at a time. This is useful when the total amount of data is too
large to have in memory at the same time.
Use : IDL> WR_MOVIE, FILENAME, MOVIE_ARRAY, /MPEG, /GIF, /DELETE
IDL> WR_MOVIE, FILENAME, MOVIE_FRAME, IFRAME, NFRAME, ...
Inputs : FILENAME: Base filename to use when creating MPEG and
GIF movies (no extension). If a GIF movie is
created, then it will be named filename.gif.
If an MPEG movie is created, then it will be
called filename.mpg. JAVASCRIPT movies will
have a file called filename.html, and a
subdirectory simply called filename to hold the
individual frames.
IMAGE_ARRAY: Three dimensional array of images in the form
(X-dim, Y-dim, Frames) to be converted to
a movie. This is the same form of input that
is used by XMOVIE.
Opt. Inputs : An alternative way of calling this routine is one frame at a
time. When using this option, two additional parameters are
required:
IFRAME: The frame number, from 0 to N-1.
NFRAMES: The total number of frames.
Also, in this case IMAGE_ARRAY would be a two-dimensional frame
rather than a three-dimensional array of frames.
When using this approach, the following restrictions apply:
* All the frames must be exactly the same size.
* All the calls to WR_MOVIE must be with the same value of
NFRAMES.
* The frames must be passed in order, from 0 to NFRAMES-1. No
frames can be omitted.
* If the /PICT option is desired, then it must be passed in
each call to WR_MOVIE.
* If the /GIF or /MPEG option is desired, then the appropriate
keywords must be present in the last call to WR_MOVIE. (In
the preceeding calls, these keywords are ignored--the safest
thing to do is to use the same format for all the calls.)
Outputs : None.
Opt. Outputs: None.
Keywords : The following keywords are used to determine what kind of movie
is produced. If none are passed, then the default format is
a JAVASCRIPT movie. If more than one are passed, then multiple
formats are created.
MPEG: If set, then an MPEG movie is created.
GIF: If set, then a GIF movie is created.
JAVASCRIPT: If set, then an Java Script HTML file is
written out. There are two parts to the
Java Script movie package: the file
filename.html which contains the Java Script
commands, and the subdirectory filename which
contains the images.
Additional keywords are:
JPEG: When used with /JAVASCRIPT, the files written
out are in JPEG format, rather than GIF. This
is the default for IDL versions 5.4 and above,
which no longer support writing GIF images.
PNG: When used with /JAVASCRIPT, the files written
out are in PNG format, rather than GIF or JPEG.
PICT: If set, then a series of PICT frames are
written out. This is suitable for converting
to a VHS tape. The filenames will be written
such that the extensions are the frame number,
e.g. "filename.00", "filename.01", etc.
ALT_MPEG: Uses an alternate set of parameters for
mpeg_encode, courtesy of Stein Vidar Haugan and
Bernhard Fleck, which may make a better movie,
at the expense of a slightly larger file.
INTERNAL_MPEG: If set, then the internal MPEG writer is used
instead of spawning mpeg_encode. This is the
default for IDL versions 5.4 and above, which
no longer support writing the intermediate GIF
images.
DELETE: If set, then the temporary directory
/mpegframes will be deleted before this
procedure exits.
FRAMEDELAY: The delay time between frames, in 1/100 of a
second. The default value of 10 gives a movie
rate of approximately 10 frames/second. The
bigger the number, the slower the movie will
run. Not applicable to MPEG movies.
LOOPCNT: The number of times to loop through the GIF
movie. The default value is 0, which
represents an infinite number of loops.
NOSCALE: If set, then the routine BYTSCL will not be
called. Use this keyword when the movie frames
have already been scaled into the color table.
INCREMENT: Percent increment for speed control for Java
Script movies. [def= 10]
URL: Optional URL path to GIF images for Java Script
movies. The default is that the GIF frames
will be in the subdirectory FILENAME.
TITLE: Optional HTML title for Java Script movies.
TOP The maximum value of the scaled image array, as
used by BYTSCL. The default value is
!D.TABLE_SIZE-1.
RED,GREEN,BLUE: Color tables to apply to the movie. If not
passed, then TVLCT,/GET is called.
Calls : ***
ALLOW_GIF, DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST, FILE_EXIST [2], JSMOVIE
MK_DIR, MPEG_CLOSE, MPEG_OPEN, MPEG_PUT, MPEG_SAVE, REARRANGE, SSW_WRITE_GIF
WRITE_GIF, WRITE_PICT, file_exist [1], file_exist [3], ssw_bin
CALLED BY:
SNAP_MOVIE
Common : The internal common block WR_MOVIE is used to keep information
between calls.
Restrictions: This process that is running IDL when this procedure
executes must have write priveleges to the working directory
or this procedure will fail.
For versions of IDL prior to 5.1, if an MPEG movie is being
created, then the following programs must be in the current
path:
mpeg_encode
giftoppm (or picttoppm for v5.4 and above)
For IDL v5.1 and above, MPEGs can be created without the above
programs. However, for IDL v5.4 and above, a special license
is required from RSI.
If a GIF movie is being created, then the following program
must be in the current path:
whirlgif
Note that IDL versions 5.4 to 6.0 don't support writing GIF
files.
Side effects: Files and subdirectory are created in the working directory.
When called with the single frame option, the temporary file
giflist is left open between calls, and is only closed on the
final call.
Category : Display
Prev. Hist. : This procedure is based on WRITE_MPEG by
A. Scott Denning scott@abyss.Atmos.ColoState.edu
Dept. of Atmospheric Science Phone (970)491-2134
Colorado State University
Written : Ron Yurow, GSFC
Modified : Version 1, 19 September 1996
Version 2, 6 December 1996, William Thompson, GSFC
Made slight modifications--better error handling.
Version 3, 9 December 1996, William Thompson, GSFC
Corrected bug writing GIF movies with LE 10 frames.
Corrected bug writing GIF movies with LE 10 frames.
Version 4, 30 December 1996, Zarro, GSFC
Added FRAMEDELAY and LOOPCNT keywords
Added '-f' to spawn,'rm '
Version 5, 8 January 1997, William Thompson, GSFC
Added single frame option.
Added keywords PICT and NOSCALE.
Version 6, 10 January 1997, William Thompson, GSFC
Changed file naming convention for PICT files
Version 7, 16 July 1997, William Thompson, GSFC
Added keywords JAVASCRIPT, INCREMENT, URL, AND TITLE
Version 8, 23 July 1997, William Thompson, GSFC
Create directory for GIF files when /JAVASCRIPT keyword
is used.
Version 9, 08-Dec-1997, William Thompson, GSFC
Scale image to top color. Added keyword TOP
Version 10, 04-Jun-1998, William Thompson, GSFC
Check for existence of whirl_gif and mpeg_encode
Allow FILENAME to contain periods.
Won't automatically create GIF movie if /JAVA passed.
Version 11, 23-Oct-2000, William Thompson
Added keywords INTERNAL_MPEG, JPEG, and PNG.
Don't write GIF files if IDL v5.4 or above.
Version 12, 26-Oct-2000, William Thompson
Added keyword ALT_MPEG.
Allow use of PICT temporary files for MPEG movies.
Version 13, 18-Dec-2000, William Thompson
Make JPEG the default, rather than PNG
Version 14, William Thompson, GSFC, 16 April 2003
Added support for TrueColor displays.
Added keywords RED, GREEN, BLUE
Version 15, 13-Aug-2003, William Thompson
Use SSW_WRITE_GIF instead of WRITE_GIF
Version 16, 04-Jan-2005, William Thompson
Reworked spawning to be more OS-tolerant for versions
5.6 and above
Version 17, 10-Nov-2005, William Thompson
Reworked to use WRITE_GIF,/MULTIPLE, when appropriate.
Version : Version 16, 04-Jan-2005
[Previous]
[Next]
PROJECT:
HESSI
NAME:
WRAP_TXT()
PURPOSE:
Convert a string (or string array) into a series of lines of given length, with
'$' appended to each line that was wrapped (suitable for a .pro script)
CATEGORY:
string
SYNTAX:
Result = wrap_txt(str)
INPUTS:
STR - String scalar or array to be wrapped
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORDS:
LENGTH - Maximum length of output string array elements
(default is 90)
DELIM - Delimiter indicating acceptable places to break string (default is ',')
WARNING - Contains warning message (if any returned line is
longer than LENGTH)
NO_DOLLAR - If set, don't put '$' on end of continued line
CALLS: ***
APPEND_ARR, CHECKVAR [1], checkvar [2]
CALLED BY:
SPEX__DEFINE, hsi_params2script
COMMON:
None.
RESTRICTIONS:
None.
HISTORY:
Written: Kim Tolbert, 10-Jan-2004, Based heavily on Liyun Wang's str2lines.
Differences from str2lines:
wrap_txt accepts an array of input strings
wrap_txt allows specification of delimiter to wrap on
str2lines compressed all white space, wrap_txt doesn't
wrap_txt appends lines that were wrapped with continuation character ('$')
MODIFICATIONS:
4-Apr-2005, Kim. added no_dollar keyword
[Previous]
[Next]
Name: write_access
Purpose: check directory for write access
Input Parameters:
directory - directory to check (default is current directory)
Calling Sequnce:
writable=dir_write_access(directory)
Calling Example:
if write_access('directory') then begin ....
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], concat_dir [4]
curdir [1], curdir [2], file_append [1], file_append [2], file_exist [1]
file_exist [3], get_user [1], get_user [2]
CALLED BY:
data_compress [1], data_compress [2], data_compress [3], go_yo_prod_batch
mk_ssc_batch [1], mk_ssc_batch [2], trace_make_vignette
Restrictions:
scaler directories for now
8-Mar-1995 (SLF)
[Previous]
[Next]
Project : HINODE/EIS
Name : WRITE_DIR
Purpose : Test if directory is writeable
Inputs : DIR = directory name to test
Keywords : See WRITE_DIR2
Version : Written, 12-Nov-2006, Zarro (ADNET/GSFC)
- uses better FILE_TEST
Contact : dzarro@solar.stanford.edu
CALLS:
CALLED BY
EIT_GBO, EIT__DEFINE, FIND_COMPRESSED, FITS2TIFF, FTP_BBSO, FTP_KISF
FTP_MLSO_IMAGES, FTP_MWSO, FTP_NOBE, FTP__DEFINE, GET_TEMP_DIR, HTTP__DEFINE
MAP__DEFINE, MK_TEMP_DIR, MK_TEMP_FILE, RD_GOES_SDAC, SHOW_SYNOP__DEFINE
SITE__DEFINE, SOCK_DOWNLOAD, SYNOP_DEFINE, TEST_DIR, TIFF2GIF, TRACE_GBO, obj_save
read_ftp, synop_link, uncompress
[Previous]
[Next]
Project : HESSI
Name : WRITE_DIR2
Purpose : platform/OS independent check if directory as write permission
Category : system utility
Explanation : uses 'openw'
Syntax : IDL> a=write_dir(name)
Inputs : NAME = directory name to check
Outputs : 1/0 if success/failure
Keywords : OUT = translated name of input directory
VALID_DIR = 1/0 if NAME is valid/invalid directort
CALLS: ***
IS_DIR2, TEST_OPEN2
CALLED BY:
TEST_DIR2, WRITE_DIR
Restrictions: Probably works in Windows
History : Written, 6-June-1999, Zarro (SM&A/GSFC)
Modified, 29-Nov-1999, Zarro - added call to TEST_OPEN
Modified, 13-Mar-2000, Zarro - vectorized
Modified, 17-Sep-2005, Zarro (L-3Com/GSFC) - added VALID_DIR
Modified, 15-Nov-2006, Zarro (ADNET/GSFC) - renamed to WRITE_DIR2
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Purpose: write one 'catlog' in genx/geny format (read by read_genxcat)
Input Parameters:
structures - structures to write to catalog
Keyword Parameters:
topdir - optional parent diretory for output (catalog) files
text - optional string or string array text descriptor to include
weeksub - if set, prepend weekly subdirectory to output path
prefix - if supplied, optional prefix (prepend to first struct. GMT)
catname - optional fully defined name for output (.genx added)
day_round - round output file name to : ...yyyymmdd.0000
hour_round - round output file name to: ...yyyymmdd.hh00
nelements=nelements - if set, include number structures in name
fomat= ...yyyymmdd_hhmm_NExxxx'
no_delete_time - if /nelements is set and there are already files
with identical time stamps, the default is to
remove them before writing the new file - this
keyword overrides that behavior
geny - if set, use 'savegenx' instead of 'savgen' (.geny instead of .genx)
_extra - passed to savse routine via inheritance
CALLS: ***
ARR2STR [1], Arr2Str [2], BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], TIME2FILE, anytim [1], anytim [2], anytim [3], anytim [4]
anytim [5], anytim2weekinfo, concat_dir [4], curdir [1], curdir [2], data_chk [1]
data_chk [2], gt_tagval [1], gt_tagval [2], required_tags, savegen [1]
savegen [2], savegenx
CALLED BY:
mdi_write_genxcat, merge_genxcat, trace_write_genxcat, yo_mkos1_dbase
Restrictions:
input structures must include an SSW standard time field
History:
10-March-1998 - S.L.Freeland
10-Sep-1998 - S.L.Freeland - add /DAY_ROUND, /HOUR_ROUND, /NELEMENTS
15-sep-1998 - S.L.Freeland - add /DELETE_TIME
15-Jan-2002 - S.L.FReeland - add /GENY keyword and function
[Previous]
[Next]
Project : SOHO - CDS
Name : WRITE_IN_BOX
Purpose : Writes a text message within a box in a graphics window.
Explanation : This procedure writes a short text message within a box-shaped
area in a graphics window. The message may be split at word
boundaries into several lines, and the character size and
orientation may be adjusted for the text to fit within the box.
Use : WRITE_IN_BOX, X1, X2, Y1, Y2, TEXT
Inputs : X1, X2 = X coordinates of the box limits.
Y1, Y2 = Y coordinates of the box limits.
TEXT = ASCII text string containing the message.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : DATA = If set, then the coordinates are in data units.
This is the default.
DEVICE = If set, then the coordinates are in device units.
NORMAL = If set, then the coordinates are in normalized
units.
MAXCHARSIZE = The maximum character size to use in displaying
the message. If not passed, then determined from
!P.CHARSIZE.
COLOR = Color to use to display the text. The default is
!P.COLOR.
ALIGNMENT = Controls the alignment of the text in the box. A
value of 0 means to left justify the text, 0.5
means center it (default), and 1 stands for right
justification.
Calls : ***
STR_SEP
CALLED BY:
PLOT_ITEM
Common : None.
Restrictions: X2 must be greater than X1, and Y2 must be greater than Y1.
Side effects: The appearance of the displayed message may not be optimal if
any words are separated by multiple blanks, or by tab
characters.
Category : Planning, Science.
Prev. Hist. : None.
Written : William Thompson, GSFC, 7 July 1993.
Modified : Version 1, William Thompson, GSFC, 7 July 1993.
Version 2, William Thompson, GSFC, 24 September 1993.
Added ALIGNMENT keyword based on code provided by Jim
Pendleton, GRO/OSSE NU.
Version 3, William Thompson, GSFC, 21 September 1994
Added STRTRIM call.
Version 4, William Thompson, GSFC, 18 December 2002
Changed !COLOR to !P.COLOR
Version : Version 4, 18 December 2002
[Previous]
[Next]
NAME:
WRITEFITS
PURPOSE:
Write IDL array and header variables to a disk FITS file.
EXPLANATION:
A minimal FITS header is created if not supplied.
WRITEFITS works for all types of FITS files except random groups
CALLING SEQUENCE:
WRITEFITS, filename, data [, header, /APPEND, /COMPRESS, /CHECKSUM]
INPUTS:
FILENAME = String containing the name of the file to be written.
DATA = Image array to be written to FITS file. If DATA is
undefined or a scalar, then only the FITS header (which
must have NAXIS = 0) will be written to disk
OPTIONAL INPUT:
HEADER = String array containing the header for the FITS file.
If variable HEADER is not given, the program will generate
a minimal FITS header.
OPTIONAL INPUT KEYWORD:
/APPEND - If this keyword is set then the supplied header and data
array are assumed to be an extension and are appended onto
the end of an existing FITS file. If the file does not
exist, then WRITEFITS will create one with a minimal primary
header (and /EXTEND keyword) and then append the supplied
extension header and array. Note that the primary
header in an existing file must already have an EXTEND
keyword to indicate the presence of an FITS extension.
/COMPRESS - If this keyword is set, then the FITS file is written as
a gzip compressed file. An extension '.gz' is appended to
to the file name if it does not already exist. The /COMPRESS
option is incompatible with the /APPEND option.
/Checksum - If set, then the CHECKSUM keywords to monitor data integrity
will be included in the FITS header. For more info, see
http://heasarc.gsfc.nasa.gov/docs/heasarc/fits/checksum.html
NaNvalue - Value in the data array which represents missing pixels.
This keyword is only used when missing pixels are not
represented by NaN values in the input array.
OUTPUTS:
None
CALLS: ***
CHECK_FITS [1], CHECK_FITS [2], FITS_ADD_CHECKSUM, MKHDR [1], MKHDR [2]
MRD_HREAD [1], MRD_HREAD [2], SXADDPAR [1], SXADDPAR [2], SXADDPAR [3]
SXDELPAR [1], SXDELPAR [2], SXDELPAR [3], SXPAR [1], SXPAR [2], SXPAR [3]
CALLED BY:
C3_MASSIMG, COMB_FULL_EQ, CREATE_NRH_CFILE, CREATE_NRH_PFILE, EIT_PREP
FIX_OBESUMERROR, GETPSF, HXR_DC2FITS, INTGCOMP_NRH2, MAKE_DAILY_IMAGE, MAP__DEFINE
MKDI_C1, MK_ALL_MIN, MK_DAILY_C1_MED, MK_DAILY_MED, MK_DAILY_MIN, MK_IMAGE
MK_MONTHLY_MIN, MLO_MASSIMG, MODEL_to_SCORE [2], MVI2FRAMES, NRH_HSI_FITS
REDUCE_LEVEL_05, REDUCE_LEVEL_1, STARFIELD, SUMER_RASTER_SAVE
SUMER_SPECTROGRAM_SAVE, SXIG12_PREP, SYNSCAN, T_APER, T_FIND, T_GETPSF, T_GROUP
T_NSTAR, WIMG_INFO1, WIMG_INFO4, WINFO_ACTIV, WLOADC, WREBIN, WRITE_SUMMARIES [1]
WRITE_SUMMARIES [2], ZDEGR, ZPICK, data_sum2fits, fixinate_eit, imagr [1], mk_minim
mk_stdim, mk_stdim_list, model_to_score [1], msok_poi_copy [1]
msok_poi_copy [2], mwritefits, smei_frm_write, smei_mkglare, smei_mksidereal
smei_mkstdstar, smei_star_remove, smei_zodiac_remove, spartan_pb2fits
spartan_roll2fits [1], write_trace, wsave1, wsave2, wso_write, zwritefits
RESTRICTIONS:
(1) It recommended that BSCALE and BZERO not be used (or set equal
to 1. and 0) with REAL*4 or REAL*8 data.
(2) WRITEFITS will remove any group parameters from the FITS header
EXAMPLE:
Write a randomn 50 x 50 array as a FITS file creating a minimal header.
IDL> im = randomn(seed, 50, 50) ;Create array
IDL> writefits, 'test', im ;Write to a FITS file "test"
PROCEDURES USED:
CHECK_FITS, FITS_ADD_CHECKSUM, MKHDR, MRD_HREAD, SXDELPAR, SXADDPAR,
SXPAR()
MODIFICATION HISTORY:
WRITTEN, Jim Wofford, January, 29 1989
Added call to IS_IEEE_BIG() W. Landsman Apr 96
Make sure SIMPLE is written in first line of header W. Landsman Jun 97
Use SYSTIME() instead of !STIME W. Landsman July 97
Create a default image extension header if needed W. Landsman June 98
Converted to IDL V5.0 W. Landsman June 98
Write unsigned data types W. Landsman December 1999
Update for IDL V5.3, add /COMPRESS keyword W. Landsman February 2000
Correct BZERO value for unsigned data W. Landsman July 2000
Eliminate duplication of input array if possible W. Landsman April 2001
Use FILE_SEARCH for V5.5 or later W. Landsman April 2002
Create the file if not already present and /APPEND is set
W. Landsman September 2002
Proper call to MRD_HREAD if /APPEND is set W. Landsman December 2002
Added /CHECKSUM keyword W. Landsman December 2002
Restored NANvalue keyword, William Thompson, October 2003
Write BZERO in beginning of header for unsigned integers WL April 2004
[Previous]
[Next]
NAME:
WRITEFITS
PURPOSE:
Write IDL array and header variables to a disk FITS file.
EXPLANATION:
A minimal FITS header is created if not supplied.
WRITEFITS works for all types of FITS files except random groups
CALLING SEQUENCE:
WRITEFITS, filename, data [, header, /APPEND, /COMPRESS, /CHECKSUM]
INPUTS:
FILENAME = String containing the name of the file to be written.
DATA = Image array to be written to FITS file. If DATA is
undefined or a scalar, then only the FITS header (which
must have NAXIS = 0) will be written to disk
OPTIONAL INPUT:
HEADER = String array containing the header for the FITS file.
If variable HEADER is not given, the program will generate
a minimal FITS header.
HEAP - A byte array giving the heap area following, e.g. a variable
length binary table
OPTIONAL INPUT KEYWORD:
/APPEND - If this keyword is set then the supplied header and data
array are assumed to be an extension and are appended onto
the end of an existing FITS file. If the file does not
exist, then WRITEFITS will create one with a minimal primary
header (and /EXTEND keyword) and then append the supplied
extension header and array. Note that the primary
header in an existing file must already have an EXTEND
keyword to indicate the presence of an FITS extension.
/COMPRESS - If this keyword is set, then the FITS file is written as
a gzip compressed file. An extension '.gz' is appended to
to the file name if it does not already exist. The /COMPRESS
option is incompatible with the /APPEND option.
/Checksum - If set, then the CHECKSUM keywords to monitor data integrity
will be included in the FITS header. For more info, see
http://heasarc.gsfc.nasa.gov/docs/heasarc/fits/checksum.html
NaNvalue - Value in the data array which represents missing pixels.
This keyword is only used when missing pixels are not
represented by NaN values in the input array.
OUTPUTS:
None
CALLS: ***
CHECK_FITS [1], CHECK_FITS [2], FITS_ADD_CHECKSUM, MKHDR [1], MKHDR [2]
MRD_HREAD [1], MRD_HREAD [2], SXADDPAR [1], SXADDPAR [2], SXADDPAR [3]
SXDELPAR [1], SXDELPAR [2], SXDELPAR [3], SXPAR [1], SXPAR [2], SXPAR [3]
CALLED BY:
C3_MASSIMG, COMB_FULL_EQ, CREATE_NRH_CFILE, CREATE_NRH_PFILE, EIT_PREP
FIX_OBESUMERROR, GETPSF, HXR_DC2FITS, INTGCOMP_NRH2, MAKE_DAILY_IMAGE, MAP__DEFINE
MKDI_C1, MK_ALL_MIN, MK_DAILY_C1_MED, MK_DAILY_MED, MK_DAILY_MIN, MK_IMAGE
MK_MONTHLY_MIN, MLO_MASSIMG, MODEL_to_SCORE [2], MVI2FRAMES, NRH_HSI_FITS
REDUCE_LEVEL_05, REDUCE_LEVEL_1, STARFIELD, SUMER_RASTER_SAVE
SUMER_SPECTROGRAM_SAVE, SXIG12_PREP, SYNSCAN, T_APER, T_FIND, T_GETPSF, T_GROUP
T_NSTAR, WIMG_INFO1, WIMG_INFO4, WINFO_ACTIV, WLOADC, WREBIN, WRITE_SUMMARIES [1]
WRITE_SUMMARIES [2], ZDEGR, ZPICK, data_sum2fits, fixinate_eit, imagr [1], mk_minim
mk_stdim, mk_stdim_list, model_to_score [1], msok_poi_copy [1]
msok_poi_copy [2], mwritefits, smei_frm_write, smei_mkglare, smei_mksidereal
smei_mkstdstar, smei_star_remove, smei_zodiac_remove, spartan_pb2fits
spartan_roll2fits [1], write_trace, wsave1, wsave2, wso_write, zwritefits
RESTRICTIONS:
(1) It recommended that BSCALE and BZERO not be used (or set equal
to 1. and 0) with REAL*4 or REAL*8 data.
(2) WRITEFITS will remove any group parameters from the FITS header
EXAMPLE:
Write a randomn 50 x 50 array as a FITS file creating a minimal header.
IDL> im = randomn(seed, 50, 50) ;Create array
IDL> writefits, 'test', im ;Write to a FITS file "test"
PROCEDURES USED:
CHECK_FITS, FITS_ADD_CHECKSUM, MKHDR, MRD_HREAD, SXDELPAR, SXADDPAR,
SXPAR()
MODIFICATION HISTORY:
WRITTEN, Jim Wofford, January, 29 1989
Added call to IS_IEEE_BIG() W. Landsman Apr 96
Make sure SIMPLE is written in first line of header W. Landsman Jun 97
Use SYSTIME() instead of !STIME W. Landsman July 97
Create a default image extension header if needed W. Landsman June 98
Converted to IDL V5.0 W. Landsman June 98
Write unsigned data types W. Landsman December 1999
Update for IDL V5.3, add /COMPRESS keyword W. Landsman February 2000
Correct BZERO value for unsigned data W. Landsman July 2000
Eliminate duplication of input array if possible W. Landsman April 2001
Use FILE_SEARCH for V5.5 or later W. Landsman April 2002
Create the file if not already present and /APPEND is set
W. Landsman September 2002
Proper call to MRD_HREAD if /APPEND is set W. Landsman December 2002
Added /CHECKSUM keyword W. Landsman December 2002
Restored NANvalue keyword, William Thompson, October 2003
Write BZERO in beginning of header for unsigned integers WL April 2004
Added ability to write heap array WL October 2004
Correct checksum if writing heap array WL November 2004
Assume since V5.5, no VMS support, use file_search() WL September 2006
[Previous]
[Next]
Project : SOHO - CDS
Name : WRT_ASCII
Purpose : Writes a string array to an ascii file
Explanation : Uses simple PRINTF to write named string (array) to named
file.
Use : IDL> wrt_ascii, array, file
Inputs : array - string (array) to write
file - name of file to write. Written to current directory
unless path given also.
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords : None
Calls : ***
STRPAD
CALLED BY:
CF_GIS1A, CF_GIS1B, CF_GIS1C, CF_GIS2A [1], CF_GIS4A, CF_GIS4B, CF_GIS4C, COMPILE_SFIT
GIS_HV_CAL, SPEX__DEFINE, hsi_params2script, strip_crt, text_output
Common : None
Restrictions: None
Side effects: None
Category : Data, i/o
Prev. Hist. : None
Written : C D Pike, RAL, 4-Oct-96
Modified : Added format spec to printf. CDP, 17-Jan-97
Modified: 31-Jul-2000, Kim Tolbert, added err_msg keyword
Version : Version 2, 17-Jan-97
[Previous]
[Next]
Project : HESSI
Name : wrt_buff
Purpose : write unformatted data buffer
Category : utility system
Syntax : IDL> wrt_buff,lun,data,chunk
Inputs : LUN = logical unit number
DATA = data array to write
Opt. Inputs : CHUNK = chunk factor to break buffer into [def=10]
CALLS: ***
is_number [1], is_number [2]
History : Written, 3 April 2002, D. Zarro (L-3Com/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
wrt_ebc2asc
PURPOSE:
Given an EBCDIC input file, create
an ASCII output file. The input file must
have fixed record lengths.
INPUT:
infil - The name of the input file
outfil - The name of the output file
recsiz - The number of characters per line
CALLS: ***
str_ebc2asc [1], str_ebc2asc [2]
HISTORY:
Written Oct-91 by M.Morrison to convert the
Solar-A "AOSLOS" mainframe orbital prediction
files to ASCII (their records are 137 characters)
Updated, 18-Oct-91, J. Lemen to allow for independent input
and output record sizes.
Updated, 11-nov-91, J. Lemen: Force output record size if the
output string contains null bytes.
[Previous]
[Next]
Name: wrt_ebounds_ext
Category: HESSI, UTIL
Purpose: Write an EBOUNDS binary extension to a FITS file.
Calling sequence: wrt_ebounds_ext, 'file.fits', header=hdr, rate=rate, error
Inputs:
file - name of FITS file to write to.
channels - index of detector channels
edges - energy edges of channels
hdr - header for this extension
Input keywords:
_EXTRA - any keywords in _extra will be integrated into the header for this
extension.
Output keywords:
ERR_MSG = error message. Null if no error occurred.
ERR_CODE - 0/1 if [ no error / an error ] occurred during execution.
Calls: ***
FXBADDCOL [1], FXBADDCOL [2], FXBHMAKE [1], FXBHMAKE [2], MWRFITS, add_kw2hdr
merge_fits_hdrs
CALLED BY:
rm2fits
Modification History:
7-December-2001, Paul Bilodeau - changed definition of e_min and e_max
such that vectors are returned from the file, not 1 x n matrices.
18-non-2002, Paul.Bilodeau@gsfc.nasa.gov - changed error handling.
Use CATCH for mwrfits call only, otherwise use GOTO's to handle display
and format of any error messages.
13-Sep-2004, Sandhia Bansal - write channels as LONG integers. Also
write channels, emin and emax one element per bin rather than as a
vector array in one bin.
[Previous]
[Next]
Name: wrt_eneband_ext
Category: HESSI, UTIL
Purpose: Write an ENEBAND extension to a FITS file.
Calling sequence:
wrt_eneband_ext, 'file.fits', NUMBAND=numband, MINCHAN=minchan,
MAXCHAN=maxchan, E_MIN=e_min, E_MAX=e_max
Inputs:
filename - name of FITS file to append to.
Outputs:
Input keywords:
NUMBAND - number of energy bands to be stored in the extension.
MINCHAN - Array numband in length, containing minimum detector channel
numbers for each band.
MAXCHAN - Array numband in length, containing maximum detector channel
numbers for each band.
E_MIN - Array numband in length, containing minimum energies for each band.
E_MAX - Array numband in length, containing maximum energies for each band.
E_UNIT - energy units for e_min and e_max.
HEADER - extension header. Should contain any comments, history, and
non-mandatory keywords that be in the extension header.
Output keywords:
ERR_MSG = error message. Null if no error occurred.
ERR_CODE - 0/1 if [ no error / an error ] occurred during execution.
Calls: ***
FXADDPAR [1], FXADDPAR [2], FXBHMAKE [1], FXBHMAKE [2], MWRFITS, merge_fits_hdrs
CALLED BY:
spectrum2fits
Modification History:
18-nov-2002, Paul.Bilodeau@gsfc.nasa.gov - changed error handling to
use GOTO's for simplification, removed CATCH staement.
01-sep-2004, Sandhia Bansal - modified code to write energy bounds as
one element per bin rather than as a vector array in a row.
13-sep-2004, Sandhia Bansal - replace min/max channels with only CHANNELS and write this
column as a vector of long integers.
[Previous]
[Next]
NAME:
wrt_fits
PURPOSE:
Write a FITS file given an image and a FITS header
CALLING SEQUENCE:
wrt_fits, outfil, head, image
INPUT:
outfil - The output file name
head - A string array with FITS format header
The routine will make sure each line is 80
characters and that there are 36 (or 36*n) entries
image - The data to save
FUTURE OPTIONS:
If "head" is not defined, created a basic header to save
the data
CALLS: ***
GET_NBYTES, data_type [1], data_type [2], dec2sun [1], dec2sun [2]
mk_fits_head [1], mk_fits_head [2]
CALLED BY:
DISPLOI_MON5K, cal_pol, mk_gsn_obs_s1, mk_limb_pixmap, mk_mdi_fits, nob_name_fix
norik_name_fix, raw_list2pixmap, rd_hirsaiso, sda2fits, selsisi2fits, soon2fits
HISTORY:
Written 1-Jul-92 by M.Morrison
11-Sep-92 (MDM) - Fixed bug with checking that header was 36
elements long
19-Oct-92 (MDM) - Modification to swap bytes when running on
DEC machines. The FITS byte convention is the
"non-DEC" byte order.
27-Oct-92 (MDM) - Modified to write zeros to the end of the
last data record to make it end on a 2880 byte
logical record boundary.
- Corrected error in byte swapping fix of 19-Oct
- Added capability to build header if it is not
passed.
1-Dec-93 (JBG) - added openw compatability for vms
2-Feb-94 (MDM) - Modified to save floating points properly
6-Apr-94 (DMZ) - added check for DEC/OSF
15-Jun-94 (MDM) - Modified to check header for blank lines and
remove them off the back end. (done by looking
for "END" and dropping all else behind it)
28-Jun-94 (MDM) - Corrected for saving floating points properly
and expanded to work on double point images
10-Aug-94 (MDM) - Corrected the figuring of whether the END was there
- Got back in sync by adding DMZ 6-Apr-94 mod
02-Feb-01 (LS) - call 'is_lendian' (single point 'swap_os' function)
[Previous]
[Next]
NAME:
wrt_fits_bin_exten
PURPOSE:
To write FITS binary extension table using the structure
passed in. The column names match the tag names of the
structure
SAMPLE CALLING SEQUENCE:
wrt_fits_bin_exten, struct, outfil
wrt_fits_bin_exten, ver, /get_ver
wrt_fits_bin_exten, struct, outfil, /append
INPUTS:
struct - The structure to save to FITS file
outfil - The name of the output file
OPTIONAL INPUTS:
main_prog- The name of the main program (calling WRT_FITS_BIN_EXTEN)
main_progver- The program version number of the main program
CALLS: ***
FXADDPAR [1], FXADDPAR [2], FXBCREATE [1], FXBCREATE [2], FXBFINISH [1]
FXBFINISH [2], FXBHMAKE [1], FXBHMAKE [2], FXHMAKE [1], FXHMAKE [2], FXWRITE [1]
FXWRITE [2], GET_NBYTES, RFITS [1], RFITS [2], RFITS [3], data_type [1]
data_type [2]
CALLED BY:
tr_wrt_fits_i1 [1], tr_wrt_fits_i1 [2]
OPTIONAL KEYWORD INPUT:
append - If set, append the binary extension structure
to an existing file
get_ver - If set, return the program version number in the
first argument
RESTRICTIONS:
Currently the /APPEND option only works if the FITS
file was opened with the /extend option (when calling
fxhmake)
HISTORY:
Written 18-Nov-97 by M.Morrison
V1.01 1-Dec-97 (MDM) - Added /APPEND option
- Added /GET_VER option
[Previous]
[Next]
NAME:
WRT_GENX
PURPOSE:
Write SXT generic file - XDR format - see savegen.pro front end
CALLING SEQUENCE:
WRT_GEN, filename, data [,TEXT=TEXT, SUCCESS, /REPLACE]
INPUTS:
DATA - data to save (simple structure, n-dimen array, or scaler)
FILENAME - string containing generic file name
OPTIONAL KEYWORD PARAMETERS:
TEXT - (Input) Generic file text description
REPLACE - (Input) If set , forces overwriting of existing file
XDR - (Input) If set, file is XDR format
HEADER - (Output) Returns ystem imposed header (version/creattion date)
SUCCESS - (Output) Returns success code
FILE I/O:
If succesful, named file is created or updated (overwritten)
COMMON BLOCKS;
NONE
CALLS: ***
ARR2STR [1], Arr2Str [2], genx_head [1], genx_head [2], wrt_str [1], wrt_str [2]
CALLED BY:
savegen [1], savegen [2]
RESTRICTIONS:
Version 00 does not support nested structures for DATA
MODIFICATION HISTORY:
Version 0 - SLF, 3/5/91
Version 1 - SLF, 10/29/91 ; handle nested structures and
; XDR (simplifies string saves)
slf, 21-dec-93 ; force text to be scaler if array
Version 2 - slf, 28-jan-93 ; call genx_head for header struct.
; include idl !version in genx head
slf, 19-mar-93 ; dont clobber input text
rdb, 25-Apr-95 ; explicit write of !version fields (v4 compatibility)
[Previous]
[Next]
Name: wrt_rate_ext
Category: HESSI, UTIL
Purpose: Write a RATE binary extension to a FITS file.
Calling sequence: wrt_rate_ext, 'file.fits', header=hdr, rate=rate, error
Inputs:
filename - name of FITS file to write.
Outputs:
Input keywords:
DATA - a [n_channel x n_input spectra / n_channel x n_detector x $
n_input_spectra] array containing the the counts/s or counts
for each spectrum in each channel
ERROR - an array containing the uncertainties on DATA. Deafults to the
square root of DATA.
COUNTS - set if the column name for the data entry should be COUNT,
instead of the default RATE.
UNITS - units for DATA
KW_LIST - list of keywords to search for as fields(tags) in _extra.
ST_LIST - names fields set in _extra will be given in the structure
given to mwrfits.
Keywords searched for in _EXTRA:
These are set in the keyword KW_LIST. Their names in the structure fed to
mwrfits are set in the keyword ST_LIST.
LIVETIME - a [ n_channel x n_input spectra / n_input spectra ] array
containing the livetime for each [ spectrum channel / spectrum ]
TIMEZERO - the reference time for each bin in each spectrum. This
should be a n_input spectra vector. Defaults to 0. TIMEZERO
can also be specified as a keyword in the rate extension header.
TSTART - the start time for each accumulation. A n_input spectra vector.
TSTOP - the stop time for each accumulation. A n_input spectra vector.
TIMECEN - Full time or time from TIMEZERO for each input spectrum or event.
Stored as TIME column within file.
TIMEDEL - The integration time for each channel of each spectrum or each
spectrum.
Either TIMEZERO, TSTART, or TIMEDEL are required
DEADC - Dead Time Correction for each channel of each spectra, each
spectrum, or each channel. Only one of DEADC / LIVETIME should be set.
If n_chan elements, this will be set in the header for this
extension.
BACKV - background counts for each channel of each spectrum - OPTIONAL.
BACKE - error on background counts for each channel of each spectrum.
OPTIONAL. Defaults to the square root of the BACKV if BACKV is set.
_EXTRA - Any keywords set in _EXTRA will be integrated into the extension
structure array if they are listed in kw_list and have a
corresponding st_lst entry.
NOTES on the TIMECEN, etc. keywords:
For event lists, the TIMECEN keyword is required. Any other
event-specific information is stored in _extra.
For rates, there are two possibilities: equispaced binned data and non-
equispaced binned data. For equispaced binned data, TIMEDEL can be a
keyword in the rate header, and TIMECEN is not needed. For
non-equispaced binned data, TIMECEN and TIMEDEL are required for
every event/spectrum.
Output keywords:
ERR_MSG = error message. Null if no error occurred.
ERR_CODE - 0/1 if [ no error / an error ] occurred during execution.
Calls: ***
ADD_TAG [1], ADD_TAG [2], ARR2STR [1], Arr2Str [2], FCHECK, FITSWRITE, FXADDPAR [1]
FXADDPAR [2], TRIM, default_rate_header, mk_rate_hdr
CALLED BY:
spectrum2fits
Modification History:
28-June-2001 Paul Bilodeau - documentation updates. Added RATE and DATA
keywords. Data of interest in passed in via DATA, and the column name
defaults to COUNT unless RATE is set.
11-mar-2002, richard.schwartz@gsfc, simplified structure building
15-nov-2002, richard.schwartz@gsfc.nasa.gov, fixes the case for a single row
in the spectrum.
17-nov-2002, richard.schwartz@gsfc.nasa.gov, fix the fixes of 15-nov-2002
18-nov-2002, Paul.Bilodeau@gsfc.nasa.gov, changed error handling to
use GOTO's for simplification, removed CATCH statement.
25-feb-2003, Paul.Bilodeau@gsfc.nasa.gov, fixed crash when scalars
are added to rate extension row structure.
03-Sep-2004, Sandhia Bansal, Added NCHAN and ESPOSURE to the argument list.
Use RATE_STRUCT to set up values for some of the
required keywords for RATE extension. Pass this structure to
mk_rate_hdr that will actually add these keywords to the table.
Write STAT_ERR instead of ERROR to the new fits files.
Use fitswrite object to write the header and data.
24-Sep-2004, Sandhia Bansal, Filled origin and chantype fields of rate_struct.
18-Nov-2004, Sandhia Bansal, Change CHANTYPE value from PHA to PI for HESSI data.
Deleted code to retrieve and set response matrix name,
and DATE_OBS, DATE_END fields.
07-Dec-2004, Sandhia Bansal, Deleted code that created and initialized rate_struct.
This structure will be passed to this
procedure.
16-aug-2005 - Andre, added create = 0 to the fitswrite object to adapt to
the new writer. Also, commented out the stuff with the
extensions which is not needed any more in the newer version
fo the fits writer. (see acs comment below)
[Previous]
[Next]
Name: wrt_str
Purpose: write data structure size information for SXT generic files
Input Parameters:
structure: input idl structure type
unit: logical unit for write - assumed alread open
Method: recursive for nested structures
CALLS: ***
data_chk [1], data_chk [2]
CALLED BY:
WRT_GENX [1], WRT_GENX [2], wrt_sumer
History: slf, 10/25/91
[Previous]
[Next]
Project : HESSI
Name : WSHOW2
Purpose : windows friendly version of WSHOW
Category : display
Syntax : IDL> wshow2
Inputs : INDEX = windows index
CALLS: ***
OS_FAMILY, is_number [1], is_number [2]
CALLED BY:
GET_XWIN [1], IS_WOPEN, SMART_WINDOW, XYPLOT__DEFINE, get_xwin [2]
History : Written, 4-Oct-2002, Zarro (LAC/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO - CDS
Name : WTITLE
Purpose : Add a title to a window AFTER it has been created
Category : utility
Explanation : IDL doesn't seem to provide a utility to change the title
of a regular plot window after it has been created.
This program does the job by creating a new window and
using DEVICE,/COPY to copy the contents of the old window to
the new window.
Syntax : IDL> wtitle,title,id or wtitle,id,title
Examples :
Inputs : TITLE = new title
Opt. Inputs : ID = window ID to affect [def = current window]
Outputs : None
Opt. Outputs: None
Keywords : None
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3]
DELVARX [4], EXIST, REM_TAG [1], REM_TAG [2], TRIM, WHERE_VECTOR, delvarx [5]
Common : None
Restrictions: Some window properties such as RETAIN may not be preserved
Side effects: Window label is changed
History : Version 1, 26-Jan-1998, Zarro (SAC/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Name: wwwidl_server_check
Purpose: perform watchdog check an idlwww server - restart on error
Input Parameters:
server ip - IP of rpc server (default is current host)
host - hostname (def=current host)
loud - if set, be verbose
restart - if set, restart server on watchdog failure
force_restart - restart independent of watchdog status
server_start - optional server start script (CSH assumed)
[default uses ssw "standard" scripts]
History:
7-May-1999 - S.L.Freeland - from trace_wwwidl_watchdog - "generic"
Calls: ***
ARR2STR [1], Arr2Str [2], BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], FILE_EXIST [2], STR2ARR [1], STR2ARR [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], mail [1], mail [2], rd_tfile [1]
rd_tfile [2], ssw_bin, wwwidl_watchdog [1], wwwidl_watchdog [2]
[Previous]
[Next]
Name: wwwidl_watchdog
Purpose: perform a watchdog check (update or read/compare)
Input Parameter:
watch_file - file to update
; default=$SSW_SITE_LOGS/wwwidl_watchdog_<host>_0X2010CAFE
value - (update or readback check)
CALLS: ***
ARR2STR [1], Arr2Str [2], BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], FILE_EXIST [2], concat_dir [4], file_append [1], file_append [2]
file_exist [1], file_exist [3], get_host [1], get_host [2], get_logenv [1]
get_logenv [2], rd_tfile [1], rd_tfile [2]
CALLED BY:
wwwidl_server_check
History:
7-May-1999 - S.L.Freeland - for IDL/WWW server health check