[Previous]
[Next]
NAME:
MAG2FLUX
PURPOSE:
Convert from magnitudes to flux (ergs/s/cm^2/A).
EXPLANATION:
Use FLUX2MAG() for the opposite direction.
CALLING SEQUENCE:
flux = mag2flux( mag, [ zero_pt, ABwave = ] )
INPUTS:
mag - scalar or vector of magnitudes
OPTIONAL INPUT:
zero_pt - scalar giving the zero point level of the magnitude.
If not supplied then zero_pt = 21.1 (Code et al. 1976)
Ignored if the ABwave keyword is set.
OPTIONAL KEYWORD INPUT:
ABwave - wavelength scalar or vector in Angstroms. If supplied, then
the input vector, mag, is assumed to contain Oke AB magnitudes
(Oke & Gunn 1983, ApJ, 266, 713)
OUTPUT:
flux - scalar or vector flux vector, in erg cm-2 s-1 A-1
If the ABwave keyword is set, then the flux is given by
f = 10^(-0.4*(mag +2.406 + 4*alog10(ABwave)))
Otherwise the flux is given by
f = 10^(-0.4*(mag + zero_pt))
EXAMPLE:
Suppose one is given vectors of wavelengths and AB magnitudes, w (in
Angstroms) and mag. Plot the spectrum in erg cm-2 s-1 A-1
IDL> plot, w, mag2flux(mag,ABwave = w)
REVISION HISTORY:
Written J. Hill STX Co. 1988
Converted to IDL V5.0 W. Landsman September 1997
Added ABwave keyword, W. Landsman September 1998
[Previous]
[Next]
NAME:
MAG2GEO()
PURPOSE:
Convert from geomagnetic to geographic coordinates
EXPLANATION:
Converts from GEOMAGNETIC (latitude,longitude) to GEOGRAPHIC (latitude,
longitude). (altitude remains the same)
CALLING SEQUENCE:
gcoord=mag2geo(mcoord)
INPUT:
mcoord = a 2-element array of magnetic [latitude,longitude], or an
array [2,n] of n such coordinates.
KEYWORD INPUTS:
None
OUTPUT:
a 2-element array of geographic [latitude,longitude], or an array [2,n]
of n such coordinates
COMMON BLOCKS:
None
EXAMPLES:
IDL> gcoord=mag2geo([90,0]) ; coordinates of magnetic south pole
IDL> print,gcoord
79.300000 -71.409990
MODIFICATION HISTORY:
Written by Pascal Saint-Hilaire (Saint-Hilaire@astro.phys.ethz.ch),
May 2002
[Previous]
[Next]
NAME:
mail
PURPOSE:
To send a mail message to yourself or a list of users
CALLING SEQUENCE:
mail, message
mail, message, users='lemen,freeland'
mail, message, subj="Test"
mail, file=file, users=users, /self
OPTIONAL INPUT:
message - a string array of the message that is to
be sent. Either the "message" or the "file"
parameter must be used.
CALLS: ***
ARR2STR [1], Arr2Str [2], 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_logenv [1], get_logenv [2]
CALLED BY:
ACOPY [1], ACOPY_TEST, bbso_copy [1], bbso_copy [2], check_log [1], check_log [2]
check_oldprocess [1], check_oldprocess [2], check_oldprocess [3]
check_oldprocess [4], check_process [1], check_process [2], ckdderr, cp_fns [1]
cp_fns [2], daily_forecast [2], disk_monitor [1], disk_monitor [2], do_ads, dotar
eit_genx_cat, get_ads [1], get_selsis, get_sirius [1], get_sirius [2], goes2str
killold [1], killold [2], laststat [1], laststat [2], mk_gsn_obs_s1, mk_mo
mk_mo2 [1], mk_mo2 [2], mk_mo_disk2, mk_orbit [1], mk_orbit [2], mk_orbit_files
mk_pix [1], mk_pix [2], mk_sfc [1], mk_sfc [2], mo_patch, monitor_scratch [1]
monitor_scratch [2], nob_img_copy, nts_copy [1], nts_copy [2], rd_ydbtap
ref_term [2], search_obs, selsisi_copy, sfc_check, soon_search [1]
soon_search [3], ssw_check_contrib, ssw_conflicts, ssw_strfind, tr_build_img [1]
trace_do_data_requests, trace_special_movie [2], trace_special_movie [3]
wwwidl_server_check, xsxt_prep, ycopy, ydump, ys_contrib [1], ys_contrib [2]
OPTIONAL KEYWORD INPUT:
users - a string containing the users who should receive
the message. If it is undefined, it will send the
message to yourself only (can be used as notification
that a program is finished)
subj - a string that should appear on the subject line. It
cannot have the " character in the string
file - the name of a file that should be sent to the users
Either the "message" or the "file" parameter must
be used. File can be an array of file names.
self - if set, send a copy to yourself also
no_defsubj - if set, use user supplied subject only
RESTRICTIONS:
Only works on Unix machines right now
HISTORY:
Written 21-Mar-92 by M.Morrison
24-Nov-92 (MDM) - Modified not to use the subject option when running
on the SGI machine.
14-Dec-92 (MDM) - Modified to work on MIPS machines
18-Dec-92 (MDM) - Modified to have the file name in the subject on
non-SGI machines.
17-Feb-94 (SLF) - add no_defsubj
26-feb-95 (SLF) - make sure proper mail (Mail) is selected
(seperate from .cshrc/path) - avoid pipe (very slow)
if message is string array, make temporary file,
and recurse with file option, remove file...
3-mar-95 (SLF) - use /nodefsubj when recursing
18-Apr-97 (MDM) - Replace "which" with "which -f"
3-Nov-97 (MDM) - Allow subject option on SGI machines (undo Nov-92 mod)
[Previous]
[Next]
Name: main_execute
Purpose: execute idl 'command' file (in IDL_STARTUP format)
Input Paramters:
filename - file containing idl startup commands
Keyword Parameters:
text - text array already processed by rd_tfile(/compr,nocomm=';')
CALLED BY:
setssw_windows, ssw_addmm_gen, ssw_set_chianti, ssw_setup_windows
History:
slf - 5-feb-1993 - allow chaining of multiple IDL_STARTUP files
slf - 30-mar-1993 - return to caller on error
slf - 21-apr-1993 - trap executive commands (.run, .size, etc)
ras - 8-jul-1996 - take text array instead of file
ras - 19-jul-1996 - recursively traps and uses @file[.pro]
CALLS: ***
rd_tfile [1], rd_tfile [2]
Restrictions:
filename contents must conform to IDL_STARTUP format
Cannot execute idl executive commands (TBD)
Uses execute function so no recursion allowed - multiple line block
commands are limited to total string length of 512 (execute limit)
[Previous]
[Next]
NAME:
MAKE_2D
PURPOSE:
Change from 1-d indexing to 2-d indexing
EXPLANATION:
Convert an N element X vector, and an M element Y vector, into
N x M arrays giving all possible combination of X and Y pairs.
Useful for obtaining the X and Y positions of each element of
a regular grid.
CALLING SEQUENCE:
MAKE_2D, X, Y, [ XX, YY ]
INPUTS:
X - N element vector of X positions
Y - M element vector of Y positions
OUTPUTS:
XX - N x M element array giving the X position at each pixel
YY - N x M element array giving the Y position of each pixel
If only 2 parameters are supplied then X and Y will be
updated to contain the output arrays
CALLED BY:
GETPSF, RDPSF
EXAMPLE:
To obtain the X and Y position of each element of a 30 x 15 array
IDL> x = indgen(30) & y = indgen(15)
IDL> make_2d, x, y
REVISION HISTORY:
Written, Wayne Landsman ST Systems Co. May, 1988
Added /NOZERO keyword W. Landsman Mar, 1991
Converted to IDL V5.0 W. Landsman September 1997
Improved speed P. Broos July 2000
[Previous]
[Next]
NAME:
MAKE_ASTR
PURPOSE:
Build an astrometry structure from input parameter values
EXPLANATION:
This structure can be subsequently placed in a FITS header with
PUTAST
CALLING SEQUENCE:
MAKE_ASTR, astr, CD = , DELT =, CRPIX =, CRVAL =, CTYPE =,
LATPOLE = , LONGPOLE =, PV2_1 = PV2_2 = , PV2_3 =
OUTPUT PARAMETER:
ASTR - Anonymous structure containing astrometry info. See the
documentation for EXTAST for descriptions of the individual
tags
REQUIRED INPUT KEYWORDS
CRPIX - 2 element vector giving X and Y coordinates of reference pixel
(def = NAXIS/2). VALUES MUST BE IN FITS CONVENTION (first pixel
is [1,1]) AND NOT IDL CONVENTION (first pixel is [0,0]).
CRVAL - 2 element double precision vector giving R.A. and DEC of
reference pixel in DEGREES
OPTIONAL INPUT KEYWORDS
CD - 2 x 2 array containing the astrometry parameters CD1_1 CD1_2
in DEGREES/PIXEL CD2_1 CD2_2
DELT - 2 element vector giving physical increment at reference pixel
CDELT default = [1.0D, 1.0D].
CTYPE - 2 element string vector giving projection types, default
['RA---TAN','DEC--TAN']
LATPOLE - Scalar latitude of the north pole, default = 0
LONGPOLE - scalar longitude of north pole, default = 180
Note that the default value of 180 is valid only for zenithal
projections; it should be set to PV2_1 for conic projections,
and zero for other projections.
PV2 - Vector of projection parameters. Not required for some
projections (e.g. TAN) and optional for others (e.g. SIN).
Usually a 2 element vector, but may contain up to 21 elements
for the Zenithal Polynomial (ZPN) projection. Corresponds to
the keywords PV2_1, PV2_2... Defaults to 0.0
NOTES:
(1) An anonymous structure is created to avoid structure definition
conflicts. This is needed because some projection systems
require additional dimensions (i.e. spherical cube
projections require a specification of the cube face).
(2) The name of the keyword for the CDELT parameter is DELT because
the IDL keyword CDELT would conflict with the CD keyword
(3) The astrometry structure definition was slightly modified in
July 2003; all angles are now double precision, and the
LATPOLE tag was added.
REVISION HISTORY:
Written by W. Landsman Mar. 1994
Converted to IDL V5.0 Jun 1998
Added LATPOLE, all angles double precision W. Landsman July 2003
Use PV2 keyword rather than PROJP1, PROJP2 W. Landsman May 2004
CALLED BY
STARAST
[Previous]
[Next]
PROJECT:
SOHO - CDS/SUMER
NAME:
MAKE_AUTO_FIT
PURPOSE:
Interface to procedures of auto limb fitting.
EXPLANATION:
CALLING SEQUENCE:
make_auto_fit
INPUTS:
None.
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORD PARAMETERS:
None.
CALLS: ***
CNVT_COORD [1], CNVT_COORD [2], CURSOR_INFO, CW_FIELD, DELVARX [1], DELVARX [2]
DELVARX [3], DELVARX [4], FLASH_MSG, ITOOL_COPY_TO_PIX, ITOOL_CROSS_HAIR
ITOOL_DISPLAY, ITOOL_REFRESH, LIMBFIT_EVENT, LIMB_INFO, MAKE_MANUAL_FIT
MK_LIMBFIT_BS, NL_LSQFIT, NUM2STR, PB0R, RESET_LIMBFIT, SETWINDOW [1], SETWINDOW [2]
UPDATE_FITLIMB, XSHOW_HELP, delvarx [5]
CALLED BY:
ITOOL_LIMBFITTER, MAKE_MANUAL_FIT, MK_LIMBFIT_BS, UPDATE_FITLIMB
COMMON BLOCKS:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
PREVIOUS HISTORY:
Written January 25, 1995, Liyun Wang, GSFC/ARC
MODIFICATION HISTORY:
Version 1, created, Liyun Wang, GSFC/ARC, January 25, 1995
VERSION:
Version 1, January 25, 1995
[Previous]
[Next]
PROJECT:
CHIANTI
PURPOSE:
Return CHIANTI version
CALLING SEQUENCE:
chianti_version, version
CALLS:
CALLED BY
GOES_TF, GOES_TF_COEFF
[Previous]
[Next]
PROJECT:
GOES
PURPOSE:
Generate CHIANTI spectra for calculation of GOES responses.
CATEGORY:
GOES
CALLING SEQUENCE:
generate_spectra [, /photospheric ]
INPUTS:
Set /PHOTOSPHERIC for photospheric abundances, default is coronal
OUTPUTS:
Individual SAVEGEN files containing spectra SPC for each of 62
temperatures, labelled ch<VERS>_cor_3e10_1e27_<LOGT>.genx or
ch<VERS>_pho_3e10_1e27_<LOGT>.genx
CALLS: ***
CHIANTI_VERSION, CH_SYNTHETIC, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
FCHECK, FILE_EXIST [2], FOLD_SPEC_RESP, GENERATE_SPECTRA, GET_ENVIRON, GOES_TF
GOES_TF_COEFF, INT_TABULATED, MAKE_CHIANTI_SPEC, POLY, POLY_FIT, TABLES_02_TO_PRO
TODAY, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], delvarx [5]
file_exist [1], file_exist [3], restgen [1], restgen [2], savegen [1], savegen [2]
CALLED BY:
GOES_TF, GOES_TF_COEFF
PROCEDURE:
Calls MAKE_CHIANTI_SPEC
MODIFICATION HISTORY:
SW 2005 Jan
[Previous]
[Next]
PROJECT:
GOES
PURPOSE:
Generate GOES responses by folding CHIANTI spectra with wavelength
responses of individual satellites.
CALLING SEQUENCE:
fold_spec_resp , NSAT [, /PLOTSPEC ]
INPUTS:
NSAT = number of GOES satellites
Set /PLOTSPEC if you want results plotted as they are derived
OUTPUTS:
Individual save files containing temperature responses etc in files
idlsave.fit_coeffs_.02_GOES_<SAT> for each of 12 SATs.
CALLS: ***
CHIANTI_VERSION, CH_SYNTHETIC, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
FCHECK, FILE_EXIST [2], FOLD_SPEC_RESP, GENERATE_SPECTRA, GET_ENVIRON, GOES_TF
GOES_TF_COEFF, INT_TABULATED, MAKE_CHIANTI_SPEC, POLY, POLY_FIT, TABLES_02_TO_PRO
TODAY, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], delvarx [5]
file_exist [1], file_exist [3], restgen [1], restgen [2], savegen [1], savegen [2]
CALLED BY:
GOES_TF, GOES_TF_COEFF
PROCEDURE:
Calls MAKE_CHIANTI_SPEC
MODIFICATION HISTORY:
SW 2005 Jan
[Previous]
[Next]
PROJECT:
GOES
PURPOSE:
Generate goes_get_chianti_temp.pro and goes_get_chianti_em.pro in /tmp
CATEGORY:
GOES
CALLING SEQUENCE:
tables_.02_to_pro, nsat
INPUTS:
NSAT = number of satellites
OUTPUTS:
Routines goes_get_chianti_temp.pro and goes_get_chianti_em.pro
ARE WRITTEN TO /TMP FOR SAFETY
CALLS: ***
CHIANTI_VERSION, CH_SYNTHETIC, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
FCHECK, FILE_EXIST [2], FOLD_SPEC_RESP, GENERATE_SPECTRA, GET_ENVIRON, GOES_TF
GOES_TF_COEFF, INT_TABULATED, MAKE_CHIANTI_SPEC, POLY, POLY_FIT, TABLES_02_TO_PRO
TODAY, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], delvarx [5]
file_exist [1], file_exist [3], restgen [1], restgen [2], savegen [1], savegen [2]
CALLED BY:
GOES_TF, GOES_TF_COEFF
MODIFICATION HISTORY:
SW 2005 Jan
[Previous]
[Next]
Project:
SDAC
NAME:
MAKE_GOES_RESP
PURPOSE:
This procedure integrates the GOES transfer functions over a thermal solar
spectrum for 200 temperatures to set up an interpolation table.
Calculates the response in watts/m2 of the two GOES channels to the thermal
emission from a solar plasma of emission measure 1e49 cm-3 as a function
of the temperature in units of megaKelvin (1e6).
CATEGORY:
GOES, SPECTROSCOPY, ANALYSIS
CALLING SEQUENCE:
make_goes_resp, te6, goes_resp_49 [, goes8=goes8, goes9=goes9]
CALLS: ***
AVG [1], AVG [2], GOES_TRANSFER, INTERPOL, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3]
RD_ASCII [1], RD_ASCII [2], XEDIT, edge_products, mewe_spec [1], mewe_spec [2]
prstr [1], prstr [2], restgen [1], restgen [2], savegen [1], savegen [2]
INPUTS:
none explicit, only through commons;
OPTIONAL INPUTS:
none
OUTPUTS:
te6 - Temperature vector in units of 1e6 Kelvin, 200 values
from 1e6 to 97.7e6
goes_resp_49(2,200) - GOES flux in units of Watts/m2 for emission measure of 1.e49 cm-3
Channel 0, 1-8 Angstroms
Channel 1, .5-4 Angstroms
OPTIONAL OUTPUTS:
none
KEYWORDS:
GOES6- Use transfer function for GOES6
GOES7- Use transfer function for GOES7
GOES8- Use transfer function for GOES8
GOES9- Use transfer function for GOES9
GOES10- Use transfer function for GOES10
SHORTWN - 2xN wavelength bins used with MEWE_SPEC, angstroms, short channel
LONGWN - 2XN wavelength bins for long channel (1-8 Angstrom nominal response)
GSHORT - Response for SHORTWN
GLONG - Response for LONGWN
WRITE - If set, response functions are written as an IDL save file (/xdr)
to SSWDB_GOES, intended for use on SDAC only.
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
This procedure is designed to be run to write the data file, goes_resp2.dat
only on SDAC at GSFC
PROCEDURE:
This procedure integrates the GOES transfer functions over a thermal solar
spectrum for 200 temperatures to set up an interpolation table.
Needed Files:
Stored lookup table stored in goes_resp2.dat
goes_resp2.dat will usually be in the same directory as goes_tem.pro
so will be found by loc_file.
MODIFICATION HISTORY:
written 1991, RAS
5-dec-95, jmm, changed from restoration of the file
'richard$data:mewe_spec.vms', to the use of MEWE_SPEC for the photon flux
Version 3, RAS/SDAC/GSFC/HSTX incorporate GOES8 and 9
Version 4, RAS/SDAC/GSFC/HSTX incorporate GOES6 and 7, 20-nov-1996
Version 5, RAS, use the edge integration capability of MEWE_SPEC directly
Version 6, RAS, 4-feb-1997, write the goes resp into a comprehensive structure
to increase speed when switching between responses of GOES satellites!
Concommitant changes implemented in GOES_TEM.PRO
Version 7, RAS, 5-feb-1997, using savegen and restgen for the saved response file
Concommitant changes implemented in MAKE_GOES_RESP.PRO
Version 8, added GOES10
[Previous]
[Next]
Name:
MAKE_HIST2D
Purpose:
Form a 2-D histogram from two arrays or images.
Category:
Data processing
Calling sequence:
hist_img = MAKE_HIST2D(image1,image2 [ , MISSING=missing ,
/XLOG , /YLOG ,
XHRANGE=xrange , YHRANGE=yrange ,
XBIN=xbin , YBIN=ybin ,
INFO=hist_info , IMAGES=hist_input ] )
Inputs:
image1: 1st image (or set of images) [X]
image2: 2nd image ( " ) [Y]
Keyword parameters:
MISSING = value flagging missing/bad pixels (IN)
X/YLOG = use log of X/Y? (IN)
X/YHRANGE = range of X/Y values to be used in forming the histogram (IN)
X/YBIN = X/Y binning (IN)
INFO = info. (dimension, origin, binsize) about the histogram array;
array (2 elements) of structures (OUT), tags:
dim: i-th dimension of the histogram image;
zero: origin of the i-th axis;
bin: bin factor for the i-th axis;
log: (boolean) histogram in logarithm space?
IMAGES = actual images used to form the histogram; structure (OUT), tags:
flt: float input array (log scaled, if X/YLOG is set);
int: integer-scaled input array;
Given in output only if explicitly requested by setting
hist_input to some value.
Output:
hist_img : array (image) representing the two-dimensional histogram
obtained from the two input images.
Common blocks:
None
Calls: ***
HIST_2D
Side effects:
None
Notes:
When X/YLOG is specified, X/YHRANGE and X/YBIN are assumed to give
the range of values and bin size, respectively, in logarithm space.
Restrictions:
None
Modification history:
V. Andretta, 2/Jul/1998 - Created (adapted from HIST2ROI)
V. Andretta, Oct-Nov/1998 - Revised
Contact:
VAndretta@solar.stanford.edu
[Previous]
[Next]
Name: make_into_bytarr
Purpose: convert input to byte array
Input:
in0 - input data
Output:
function returns byte version
Keyword Parameters:
swap_lendian - if litte endian and keyword set, then swap
CALLS: ***
IS_LENDIAN, dec2sun [1], dec2sun [2]
CALLED BY:
gtt_info, trace_dph2struct [1]
History:
~ 1-Jan-1998 - Mons Morrison
16-Jun-1998 - S.L.Freeland - add /SWAP_LENDIAN keyword and function
[Previous]
[Next]
PROJECT:
SOHO - CDS/SUMER
NAME:
MAKE_MANUAL_FIT
PURPOSE:
Interface to the manual limb fitting process
EXPLANATION:
CALLING SEQUENCE:
make_manual_fit
INPUTS:
None.
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORD PARAMETERS:
None.
CALLS: ***
CNVT_COORD [1], CNVT_COORD [2], CURSOR_INFO, CW_FIELD, DELVARX [1], DELVARX [2]
DELVARX [3], DELVARX [4], FLASH_MSG, ITOOL_COPY_TO_PIX, ITOOL_CROSS_HAIR
ITOOL_DISPLAY, ITOOL_REFRESH, LIMBFIT_EVENT, LIMB_INFO, MAKE_AUTO_FIT
MK_LIMBFIT_BS, NL_LSQFIT, NUM2STR, PB0R, RESET_LIMBFIT, SETWINDOW [1], SETWINDOW [2]
UPDATE_FITLIMB, XSHOW_HELP, delvarx [5]
CALLED BY:
ITOOL_LIMBFITTER, ITOOL_SWITCHER, MAKE_AUTO_FIT, MK_LIMBFIT_BS, UPDATE_FITLIMB
COMMON BLOCKS:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
PREVIOUS HISTORY:
Written January 25, 1995, Liyun Wang, GSFC/ARC
MODIFICATION HISTORY:
Version 1, created, Liyun Wang, GSFC/ARC, January 25, 1995
VERSION:
Version 1, January 25, 1995
[Previous]
[Next]
Project : SOHO-CDS
Name : MAKE_MAP
Purpose : Make an image map
Category : imaging
Syntax : map=make_map(data)
Inputs : DATA = 2d data array
Outputs :
MAP ={data:data,xc:xc,yc:yc,dx:dx,dy:dy,time:time}
where,
DATA = 2d image array
or old format (which is more memory intensive),
MAP ={data:data,xp:xp,yp:yp,time:time}
where,
XP,YP = 2d cartesian coordinate arrays (old format)
OLD_FORMAT is used if XC and YC
are 2d arrays of coordinates for the center of each pixel.
Opt. Outputs: None
Keywords : XC,YC = center of image
DX,DY = pixel spacing in X and Y directions
TIME = image time
SUB = [x1,x2,y1,y2] = indicies of sub-array to extract
DATA_UNITS = units of subarray in data units [def=pixel number]
OLD_FORMAT = use old .xp, .yp format
ROLL_ANGLE = image roll (deg clockwise from N)
ROLL_CENTER = roll center
FOV = same as SUB, but with /DATA_UNITS
NO_COPY= set to not make new copy of data
BYTE_SCALE = bytescale data
CALLS: ***
ANYTIM2UTC [1], ANYTIM2UTC [2], COMDIM2, CSCALE, DATATYPE [1], DATATYPE [2]
DATATYPE [3], DPRINT, EXIST, GET_ARR_CENTER, GET_MAP_REGION, GET_UTC, IS_BLANK
MK_MAP_XP, MK_MAP_YP, PAIR_STRUCT, PR_SYNTAX, is_number [1], is_number [2]
CALLED BY:
CDS_ASRUN_POINT, CDS_PLAN_POINT, HESSI IMAGE STRATEGY CLASS DEFINITION
HSI_FITS2MAP [1], ITOOL2MAP, MAP__DEFINE, MK_CDS_IMAP, MK_CDS_SMAP, MK_EIT_MAP
MK_HXI_MAP, MK_IVM_MAP, MK_SXT_MAP, hsi_image__getaxis [2], hsi_image_plot
plotman
History : Written 22 October 1996, D. Zarro, ARC/GSFC
Modified 3 May 1999, Zarro (SM&A/GSFC)
- fixed roll angle definition. Roll angle measures
degrees clockwise that the image is rolled from
solar North.
Modified 10 August 1999, Zarro (SM&A/GSFC)
- included ROLL and ROLL_CENTER properties, even
if roll was zero.
Modified 12 Sept 2001, Zarro (EITI/GSFC)
- added /NO_COPY and replaced call to JOIN_STRUCT
with faster call to PAIR_STRUCT
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Name: make_mirror
Purpose: build a mirror file
Input Parameters:
site - remote site / ip
remote_dir - list of remote_dirs to mirror
local_dir - list of local dirs (destination)
Keyword Parameters:
remote_user - (default = anonymous)
remote_password (default = user@local_host)
packages - if passed, strarray containing package names (one per remote dir)
comments - is passed, strarray containing comments (one per remote dir)
mirror_file - output mirror file name w/path (default= "mk_mirror" in current)
no_symbolic_links - if set, dont follow remote links
XXX=NN - anyother where XXX=anyother mirror keword
and NN=associated value
Calling Sequence:
make_mirror, siteip, remote_dir, local_dir [,mirror_file='filename', $
packages=[package_names]
Calling Example:
IDL> <run routine to define remote and local directory lists>
IDL> make_mirror,'sohoftp.nascom.nasa.gov',remotedirs, localdirs, mirror_file='SSW.mirror'
IDL> make_mirror,ip,remote,local,MAX_DAYS=10 ; recent 10 days only
; (via keyword inherit)
18-march-1996 (S.L.Freeland) - originally for remote SSW install/upgrades
21-Oct-96 RDB Added comments keyword
21-Oct-96 S.L.Freeland - change compress_pat to compress_patt
23-Oct-96 S.L.Freeland - add /MODE_COPY keyword
12-nov-96 S.L.Freeland - add USE_TIMELOCAL (default=false)
31-mar-97 S.L.Freeland - add USER and GROUP keywords
22-may-97 S.L.Freeland - add MAX_DELETE_FILES and MAX_DELETE_DIRS
4-feb-98 S.L.Freeland - init MAX_DELETE_FILES MAX_DELETE_DIRS if
undefined (set to 10%, the mirror default)
20-mar-98 S.L.Freeland - enabled the keyword inheritance part
2-Feb-98 S.L.Freeland - include symbolic link following by default
22-Feb-98 S.L.Freeland - add /NO_SYMBOLIC_LINKS (override 2-feb default)
6-Dec-98 S.L.Freeland - add UPDATE_LOG keyword and function
8-Dec-98 S.L.Freeland - add /NOUSER and /NOGRROUP key/func
made those the Windows default (local_dir)
20-Mar-2000 S.L.Freeland - some windows stuff
30-Apr-2000 S.L.Freeland - due to Windows Mirror glitch, duplicate
the last package
4-Oct-2001 S.L.Freeland - add /PASSIVE_FTP keyword and function
17-mar-2003 S.L.Freeland - added an EXCLUDE_PATT for Windows
to avoid illegal DOS/Win filename from unix
CALLS: ***
ADD_TAG [1], ADD_TAG [2], ARR2STR [1], Arr2Str [2], BOX_MESSAGE, OS_FAMILY
data_chk [1], data_chk [2], file_append [1], file_append [2], get_host [1]
get_host [2], get_user [1], get_user [2], last_nelem, str_replace [1]
str_replace [2], str_subset, strlastchar [1], strlastchar [2], strmids [1]
strmids [2], tag_index [1], tag_index [2]
CALLED BY:
make_ssw_mirror, ssw_upgrade [1], ssw_upgrade [2], ssw_upgrade_backup
sswdb_upgrade
Restrictions:
must supply siteip and remote & local dirs (minimum)
assume one-one mapping between remote and local
[Previous]
[Next]
Project : SOHO - CDS
Name : MAKE_POINTER
Purpose : to make a pointer variable
Category : Help
Explanation : creates a pointer variable.
Pointer variable can be a:
- unrealized WIDGET)
- HANDLE (version 3.6 or greater
- real POINTER (version 5 or greater)
Syntax : IDL> make_pointer,pointer
Inputs : None
Opt. Inputs : None
Outputs : POINTER = pointer variable
Opt. Outputs: CHILD = optional child of parent pointer is returned
Keywords : WIDGET = force creating unrealized widget ID
HANDLE = force creating HANDLE
DIM = pointer dimensions
STATUS = 1/0 if success/failuer
CALLS: ***
DPRINT, EXIST, GET_CALLER, VALID_POINTER
CALLED BY:
BREAK_MAP, CACHE_DATA, CDS_STACK, COPY_VAR, GET_CDS_STUDY, ITOOL_LOAD_IMAGE
MK_PLAN_CUSTOM, MK_SOHO_CUSTOM, XANSWER, XCALENDAR, XCAMP, XCAT, XCHOICE, XCLONE_PLAN
XGET_UTC, XIAP, XINPUT, XLIST, XPROGRAM, XPROGRAM_ADD, XPS_SETUP, XREPORT, XREPORT_EDIT
XSEL_ITEM, XSEL_LIST [1], XSEL_LIST [2], XSET_COLOR, XSET_VALUE, XTEXT, XZOOM_PLAN
ethz_XCHOICE
Common : None
Restrictions: See explanation
Side effects: None
History : Version 1, 1-Sep-1995, D.M. Zarro. Written
Version 2, 17-Jul-1997, D.M. Zarro. Modified
-- Updated to version 5 pointers
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : SOHO - CDS
Name : MAKE_SFIT_STC
Purpose : Make an SFIT structure from a CFIT structure.
Explanation : An SFIT structure is a "short" structure describing a
component based fit function.
Use : SFIT = MAKE_SFIT_STC(CFIT)
Inputs : CFIT : Component Fit, designed with e.g., XCFIT
Opt. Inputs : None.
Outputs : Returns the short fit.
Opt. Outputs: None.
Keywords : VALUES : Set this to use the current values instead of the
initial values when constructing the parameter
array.
DOUBLE : Set this to promote values to doubles.
KEEP_LIMITS : Set to avoid setting min and max values equal to
the current value even if the const flag is set.
Used by e.g., CFIT_BLOCK.
Calls :
CALLED BY:
APPLY_CDS_ADEF, CDS_CORR_GRADIENT, CFIT, CFIT_APATCH, CFIT_BLOCK, CFIT_ERROR
EVAL_CFIT, XCFIT, XCFIT_BLOCK
Common : None.
Restrictions: None.
Side effects: None.
Category : Analysis
Prev. Hist. : None.
Written : S.V.H.Haugan, UiO, 21 January 1997
Modified : Version 2, 6 February 1997
Added KEEP_LIMITS keyword
Version 3, 6 August 1997
Added A_NOM (nominal values) in the sfits structure.
Version : 3, 6 August 1997
[Previous]
[Next]
PROJECT:
HESSI/PHOENIX
NAME:
MAKE_SPECTROGRAM()
PURPOSE:
Constructor for the spectrogram object. This is identical to
the function spectrogram()
CATEGORY:
Generic utilities
CALLING SEQUENCE:
o = make_spectrogram( spectrogram [, time_axis, energy_axis] ) or
o = make_spectrogram( spectrogram_struct )
INPUTS:
spectrogram: a 2d array containing the time/energy values
time_axis: the time axis associated with the spectrogram.
a 1 d vector with same # of elements as the x-axis
of the spectrogram. the time is referenced to 1-jan-79
(anytim format)
spectrum_axis: the spectrum axis associated with the spectrogram.
a 1 d vector with same # of elements as the y-axis
of the spectrogram
spectrogram_struct: a spectrogram structure with tags:
{spectrogram, time_axis, spectrum_axis}
OUTPUTS:
o: a spectrogram object
CALLED BY:
SPECTROGRAM, spectrogram__define
EXAMPLES:
SEE ALSO:
http://hessi.ssl.berkeley.edu/~csillag/idl/spectrogram_howto.html
more information in spectrogram__define
HISTORY:
20-jul-2004: documentation update
Version 1, August 21, 2003,
A Csillaghy, csillag@ssl.berkeley.edu
[Previous]
[Next]
Name: make_ssw_mirror
Purpose: generate the mirror file required for SSW install/upgrades
Input Parameters:
local_env - file name containing Environmentals to include
master_env - file with remote Environmental:directory mapping
Keyword Parameters:
mirror_file - optional user supplied name of mirror file
yohkoh - switch. If set, uses Yohkoh dbase defaults
remote_user, remote_password - optional (default=ANONYMOUS ftp)
Calls: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], concat_dir [4]
file_exist [1], file_exist [3], get_logenv [1], get_logenv [2], make_mirror
prstr [1], prstr [2], rd_tfile [1], rd_tfile [2], str_replace [1], str_replace [2]
History:
18-mar-1996 (S.L.Freeland) SSW Installation and Upgrades
21-oct-1996 (S.L.Freeland) Add /YOHOKH switch (work with pubconfig)
Input from Bob Bentley
23-oct-1996 (S.L.Freeland) Document, add remote_user, remote_password
24-oct-1996 (S.L.Freeland) Add /MODE_COPY in make_mirror call
Category:
SSW , system
Restrictions:
Assumes "SSW" or Yohkoh SW environment
[Previous]
[Next]
NAME:
MAKE_STR
PURPOSE:
Control dynamic structure building - avoids collision of
names which might result if different modules used the same
structure names and had different numbber/types of tag fields
CALLING SEQUENCE:
user_value= MAKE_STR(ustr_string [,str_name=str_name, /NOEXEC]
INPUTS:
USTR_STRING - string of form '{dummy,T1:intarr(10), T2:oL...}'
OUTPUTS:
return value = structure defined by USTR_STRING
OPTIONAL KEYWORD PARAMETERS:
STR_NAME - (Output) Structure name created
NOEXEC - If set, a unique name is allocated but no structure
is created - in this case, the return value is the
allocated name (string variable), not the structure
COMMON BLOCKS;
MAKE_STR_PRIVATE - used to generate unique names (via counter)
MAKE_STR_BLK - track previously created structures
MAKE_STR_BLK1 - flag to enable/disable structure exist checks
FILE I/O:
NONE
METHOD
uses a common block to store counter which is incremented on
each call and incorporated into the structrure name. Uses the
IDL EXECUTE statement to dynamically create the structure
CALLS: ***
STR2ARR [1], STR2ARR [2], str_checks [1], str_checks [2], strstat [1], strstat [2]
CALLED BY:
CALL_TRIWARP, CkTimeNkey, DO_TEEM, GT_CDS_QL, MERGE_STRUCT, MK_BSC_STR [1]
MK_BSC_STR [2], MkFnMapMake Filename Map, Multi_draw [1], Multi_draw [2]
RD_GEN [1], RD_GEN [2], READ_SPFDGRS, READ_SPFDHXS, SMK_FULLDET, SS2DSET, SUM_GAUSSB
WRT_GEN [1], WRT_GEN [2], aRCHsCRPT, build_str [1], build_str [2], ccd_sunc [1]
ccd_sunc [2], extract_val, fidmap, file_info [1], file_info [2], filter_os1
fitshead2struct, genx_head [1], genx_head [2], get1doc [1], get1doc [2]
get1hk_info [1], get1hk_info [2], get_elemabun [1], get_elemabun [2]
get_hk_info [1], get_hk_info [2], getmenu [1], getmenu [2], go_get_sirius
input_time [1], input_time [2], mkdirst, nn_rd2_sxt_noaa, nn_rd3_sxt_noaa
nn_rd_sxt_noaa, rd_rasm, rd_rdb [1], rd_rdb [2], rd_sumer [1], rd_sumer [2]
rd_sumer_genx, save_data [1], save_data [2], sparse [1], sparse [2], sparse [3]
str_merge [1], str_merge [2], str_subset, strpair2struct, struct2ms [1]
struct2ms [2], sxt_uniq [1], table2struct, tar_size, tim2intstr [1]
tim2intstr [2], timeavg [1], timeavg [2], tr_decode_head [1], tr_decode_head [2]
trace_bin_struct, trace_dph2struct [1], url_decode, wdefroi [3], wdefroi [4]
wfilpck, wmkkey [1], wmkkey [2], xspr [1], xspr [2], xstepper [1], xstepper [2]
MODIFICATION HISTORY:
Version 1 - SLF, 3/5/91 Samuel Freeland
Version 1.1 - SLF, 10/23/91 - added call to strstat to check for
structure existance
Version 2.0 - slf, 15-jan-93 - added 2nd common block to track
defined structures
slf, 18-jan-93 - add string compress
slf, 1-feb-93 - kludge for strings large than 512
slf, 3-feb-93 add make_str_blk for
slf, 7-feb-93 improved feb 1 upgrades
slf, 26-mar-93 use systime + counter for str names
slf, 15-jan-97 Version 5 (derivation of HOME)
richard.schwartz@gsfc.nasa.gov, 9-feb-1999.
Fix path to work on Windows and Mac, too.
Zarro (SM&A/GSFC) 25-May-99, added check for
undefined HOME and/or write access
Csillaghy (SSL/UCB) 8-Dec-1999, /QUIET keyword
to str_checks.
kim, 2-sep-2003. Instead of modifying path, cd to temp dir to
compile the temporary routine. Needed for IDL 6.0
kim, 4-sep-2003. Changed /either to /is_function for older IDL
[Previous]
[Next]
Project : SOHO-CDS
Name : MAKE_STRUCT
Purpose : a new way of creating structures
Category : structures
Explanation : uses keyword inheritance to dynamically create structures
Syntax : struct=make_struct(tagname=tagvalue)
CALLED BY:
hsi_flarelistdata_ext__define, spectrogram__define
Examples : IDL> struct=make_struct(a=1,b=findgen(100),c='test')
IDL> help,/st,struct
** Structure <40557288>, 3 tags, length=424, refs=1:
A INT 1
B FLOAT Array[100]
C STRING 'test'
Inputs : TAGNAME=TAGVALUE pair
Opt. Inputs : None
Outputs : STRUCT = created structure
Opt. Outputs: None
Keywords : NAME = structure name (def=anonymous)
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], TRIM
Common : None
Restrictions: None
Side effects: None
History : Written 7 Jan 1998, D. Zarro, SMA/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO-CDS
Name : MAKE_XY
Purpose : Make a uniform 2d X-Y grid of coordinates
Category : imaging
Syntax : make_xy,nx,ny,xp,yp
Inputs : NX,NY = X,Y dimensions
Outputs : XP,YP = 2d (X,Y) coordinates
Opt. Outputs: None
Keywords : DX, DY = grid spacing [def=1,1]
XC, YC = grid center [def=0,0]
CALLS: ***
EXIST, MK_MAP_XP, MK_MAP_YP, PR_SYNTAX
CALLED BY:
GRID_XY
History : Written 22 June 1997, D. Zarro, ARC/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
MAKEX
PURPOSE:
Make an array with specified start, end and step values.
CATEGORY:
CALLING SEQUENCE:
x = makex(first, last, step)
INPUTS:
first, last = array start and end values. in
step = step size between values. in
KEYWORD PARAMETERS:
OUTPUTS:
x = resulting array. out
CALLED BY:
INRANGE [1], INRANGE [2], INRANGE [3], TIMEAXIS [1], TIMEAXIS [2], TIMEAXIS [3]
XPRINT [1], XPRINT [3]
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Ray Sterner, 7 Dec, 1984.
Johns Hopkins University Applied Physics Laboratory.
Added FIX 20 Dec, 1984 to avoid roundoff error.
changed it to LONG 8 Mar, 1985 to avoid integer overflows.
Copyright (C) 1984, 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]
Project : HESSI
Name : MAP2EARTH
Purpose : convert SOHO-view map to Earth-view
Category : imaging
Syntax : emap=map2earth(map)
Inputs : MAP = image map structure
Outputs : EMAP = remapped structure
Opt. Outputs: None
Keywords : None
CALLS: ***
MAP2L1
History : Written 18 Oct 1999, D. Zarro, SM&A/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO-CDS
Name : MAP2FITS
Purpose : write image map to FITS file
Category : imaging
Syntax : map2fits,map,file
Inputs : MAP = image map structure
FILE = FITS file name
Keywords : ERR = error string
BYTE_SCALE = byte scale data
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], BSCALE, COMP_FITS_CRPIX
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1], DATATYPE [2]
DATATYPE [3], FXADDPAR [1], FXADDPAR [2], FXHMAKE [1], FXHMAKE [2], FXWRITE [1]
FXWRITE [2], PR_SYNTAX, TAG_EXIST [1], TAG_EXIST [2], TEST_OPEN, TRIM, UNPACK_MAP
VALID_MAP, break_file [4], concat_dir [4]
History : Written 22 August 1997, D. Zarro, SAC/GSFC
Version 2, 11-Jul-2003, William Thompson, GSFC
Write both DATE_OBS and DATE-OBS
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO-CDS
Name : MAP2GIF
Purpose : make series of GIF images from series of maps
Category : imaging
Syntax : map2gif,map,names
Inputs : MAP = array of map structures
NAMES = array of output GIF names [def = framei.gif]
Keywords : DRANGE = [dmin,dmax], min and max values to scale data
SIZE = [min,max], dimensions of MPEG movie (def= [512,512])
PREFIX = If NAMES isn't provided, then gif file names will be
prefixnn.gif where nn is the image number
NOSCALE = If set, don't scale to min/max of all images (def=0)
STATUS = Returns 0/1 for failure/success
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], DPRINT, EXIST, PLOT_MAP, PR_SYNTAX
SSW_WRITE_GIF, STR_FORMAT, TEST_DIR, TRIM, VALID_MAP, curdir [1], curdir [2]
History : Written 11 Jan 2000, D. Zarro, SM&A/GSFC
Version 2, 13-Aug-2003, William Thompson
Use SSW_WRITE_GIF instead of WRITE_GIF
10-Feb-2005, Kim Tolbert. Corrected !p.colors->!p.color, added
noscale and status keywords
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Name: map2index
Purpose: convert D.M.Zarro map object(s) to "standard index,data"
Input Parameters:
map - an image map or map array
index (optional) - the original index record (will be updated)
Note: if MAP includes INDEX property, that is used preferentially
Output Parameters:
index - IDL structure(s) with "standard" tags derived from map
If map.INDEX exists, that is starting template
ELSE if INDEX is INPUT, that is starting template
ELSE ssw standard structure template is used
data - 2D or 3D MAP data array(s)
Calling Sequence:
IDL> map2index, map, index , data
IN , IN/OUT , OUT
(opt.inp)
Context Sequence Example:
IDL> mreadfits, <files> , index, data ; files->index,data
IDL> [optional data scaling/processing] ; whatever...
IDL> index2map, index, data, maps ; index,data->maps
IDL> [map manip; drot_map, sub_map...] ; mapping SW
IDL> map2indx, newmaps,(new)index,newdata ; newmaps->index,data
IDL> mwritefits, newindex, newdata ; index,data->files
Note: mreadfits may be replaced by 'read_xxx'
History:
9-April-1998 - S.L.Freeland using struct2ssw & D.M. Zarro unpack_map
3-March-2000 - S.L.Freeland - revised (made it work!)
Use XCEN/YCEN centric and call to struct2ssw
4-March-2000 - S.L.Freeland - cont. 3-mar enhancments
add CROTA and (opt CROTACEN if it exists)
18-Dec-2002 - Zarro (EER/GSFC), changed ROLL -> ROLL_ANGLE and
converted some execute statements
CALLS: ***
COMP_FITS_CRPIX, PR_SYNTAX, STR2ARR [1], STR2ARR [2], TAG_EXIST [1], TAG_EXIST [2]
UNPACK_MAP, VALID_MAP, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
data_chk [1], data_chk [2], gt_tagval [1], gt_tagval [2], sswfits_struct [1]
sswfits_struct [2], struct2ssw
Side Effects:
If INDEX is defined on INPUT , it is assumed to contain
the original INDEX - Fields associated with the input MAP
will be updated (clobbered if you want to put it that way)
to reflect rotation, pointing, time, binning map changes.
In conjunction with 'index2map.pro', this rotuine permits:
index,data(original) -> map(manipulations) -> index,data(new)
-> map via index2map -> [drot_map/sub_map...] -> via map2index
[Previous]
[Next]
Project : SOHO-CDS
Name : MAP2JPEG
Purpose : make series of JPEG images from series of maps
Category : imaging
Syntax : map2jpeg,map,names
Inputs : MAP = array of map structures
NAMES = array of output JPEG names [def = framei.jpeg]
Keywords : DRANGE = [dmin,dmax], min and max values to scale data
SIZE = [min,max], dimensions of JPEGs (def= [512,512])
PREFIX = If NAMES isn't provided, then jpeg file names will be
prefixnn.jpeg where nn is the image number
NOSCALE = If set, don't scale to min/max of all images (def=0)
STATUS = Returns 0/1 for failure/success
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1], DATATYPE [2]
DATATYPE [3], DPRINT, EXIST, FILE_BREAK, MK_24BIT, PLOT_MAP, PR_SYNTAX, STR_FORMAT
TEST_DIR, TRIM, VALID_MAP, concat_dir [4], curdir [1], curdir [2], prstr [1]
prstr [2]
CALLED BY:
HESSI IMAGE STRATEGY CLASS DEFINITION, hsi_image__getaxis [2]
History : Written 11 Jan 2000, D. Zarro, SM&A/GSFC
10-Feb-2005, Kim Tolbert. Corrected !p.colors->!p.color, added
noscale and status keywords
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO-CDS
Name : MAP2L1
Purpose : convert EARTH-view image map to L1-view
Category : imaging
Syntax : lmap=map2l1(map)
Inputs : MAP = image map structure
Outputs : LMAP = remapped structure
Keywords : INVERSE = set to map SOHO to EARTH-view
PARTIAL = set to correct offset pointing for partial frame
images
CALLS: ***
DPRINT, EXIST, GET_MAP_PROP, VALID_MAP, soho_fac
CALLED BY:
MAP2EARTH, MAP2SOHO
History : Written 17 October 1999, D. Zarro, SM&A/GSFC
Modified 23 February 2005, Zarro (L-3Com/GSFC) - added /partial
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO-CDS
Name : MAP2MPEG
Purpose : make MPEG movie from series of maps
Category : imaging
Syntax : map2mpeg,map,file
Inputs : MAP = array of map structures
FILE = MPEG file name
Keywords : DRANGE = [dmin,dmax], min and max values to scale data
SIZE = [min,max], dimensions of MPEG movie (def= [512,512])
NOSCALE = If set, don't scale to min/max of all images (def=0)
STATUS = Returns 0/1 for failure/success
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DATATYPE [1], DATATYPE [2]
DATATYPE [3], EXIST, HAVE_PROC, MK_24BIT, MPEG_CLOSE, MPEG_OPEN, MPEG_PUT, MPEG_SAVE
PLOT_MAP, PR_SYNTAX, TEST_DIR, TRIM, VALID_MAP, break_file [4], curdir [1], curdir [2]
CALLED BY:
HESSI IMAGE STRATEGY CLASS DEFINITION, hsi_image__getaxis [2]
History : Written 11 Jan 2000, D. Zarro, SM&A/GSFC
Modified 1 Dec 2004, Zarro (L-3Com/GSFC)
- made compression quality default to 100.
10-Feb-2005, Kim Tolbert. Added noscale and status keywords, and added
catch error handler to reset device and close mpeg if error.
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : HESSI
Name : MAP2SOHO
Purpose : convert Earth-view map to SOHO-view
Category : imaging
Syntax : smap=map2soho(map)
Inputs : MAP = image map structure
Outputs : SMAP = remapped structure
Opt. Outputs: None
Keywords : None
CALLS: ***
MAP2L1
History : Written 18 Oct 1999, D. Zarro, SM&A/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO - CDS
Name : MAP2WCS
Purpose : Convert a SolarSoft image map into a WCS structure.
Category : FITS, Coordinates, WCS, Image-processing
Explanation : Converts a SolarSoft image map structure to a WCS structure.
Syntax : MAP2WCS, MAP, WCS
Inputs : MAP = SolarSoft image map structure.
Opt. Inputs : None.
Outputs : WCS = World Coordinate System structure
Opt. Outputs: None.
Keywords : None.
Calls : ***
ADD_TAG [1], ADD_TAG [2], ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], PB0R, TIM2CARR
VALID_MAP
Common : None.
Restrictions: None.
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 : HESSI
Name : MAP__DEFINE
Purpose : Define a MAP object
Category : imaging objects
Syntax : IDL> new=obj_new('map')
CALLS: ***
ADD_METHOD, ADD_TAG [1], ADD_TAG [2], ANYTIM2UTC [1], ANYTIM2UTC [2]
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHMOD, COMP_FITS_CRPIX
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], CONGRID [1], CONGRID [2]
CONGRID [3], DPRINT, DROT_MAP, ESPAWN, EXIST, FILE_BREAK, FIX_EXTRA, GET_FITS_PAR
HAVE_TAG, IS_BLANK, IS_STRING, JOIN_STRUCT [1], JOIN_STRUCT [2], MAKE_MAP
MAP::CLEANUP, MAP::CLONE, MAP::CLONE, MAP::DRANGE, MAP::DROTATE, MAP::DROTATE
MAP::EARTH_CORRECT, MAP::EMPTY, MAP::EXTRACT, MAP::EXTRACT, MAP::FITSWRITE
MAP::FITS_MAP, MAP::FITS_WRITTEN, MAP::GET, MAP::GETDATA, MAP::GET_MAP_PROP
MAP::GET_SOLRAD, MAP::HAS_DATA, MAP::HAS_HISTORY, MAP::HAS_INDEX, MAP::INIT
MAP::LOAD_CT, MAP::MK_MAP, MAP::PLOT, MAP::ROLL_CORRECT, MAP::ROLL_CORRECTED
MAP::ROTATE, MAP::ROTATE, MAP::SAVE_CT, MAP::SET, MAP::SETMAP, MAP::UPDATE_HISTORY
MAP::UPDATE_INDEX, MAP::WRITE, MAP::XP, MAP::XRANGE, MAP::YP, MAP::YRANGE
MAP::ZERO_LIMB, MK_MAP_XP, MK_MAP_YP, MRD_HEAD, OBJ_COPY, PB0R, PLOT_MAP, PTR_EXIST
REP_TAG_VALUE, ROT_FITS_HEAD, ROT_MAP, SUB_MAP, TRIM, TRIM2, VALID_MAP, VALID_OMAP
WRITEFITS [1], WRITEFITS [2], WRITE_DIR, break_file [4], concat_dir [4]
curdir [1], curdir [2], get_uniq, is_number [1], is_number [2], is_struct
rem_blanks, soho_fac, struct2fitshead
History : Written 22 Nov 1999, D. Zarro, SM&A/GSFC
: Modified 18 Sept 2001, D. Zarro (EITI/GSFC) - improved
memory management
Modified 5 Oct 2002, Zarro (LAC/GSFC) - added object
to store plot properties
Modified 2 Oct 2003, Zarro (GSI/GSFC) - added correction
for 180 degree rolled images
Modified 7 Feb 2004, Zarro (L-3Com/GSFC) - fixed bug with
plotting grid/limb
Modified 17 Mar 2004, Zarro (L-3Com/GSFC) - added FOV keyword
Modified 9 May 2006, Zarro (L-3Com/GSFC) - added COLOR support
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
MAP_CARRINGTON.PRO
PURPOSE:
Project a solar image onto an area preserving longitude,SIN(latitude)
cylindrical map. The projection is referred to as a Lambert
projection in geographic literature and as a Carrington projection
in heliographic work. Meridians and latitude lines are perpendicular
the output image.
Preserves pixel scale so it returns an image that may be
substantially larger than the input image if the input image
is near the limb.
Assumes the Sun is a sphere and that image is oriented solar-north
(P angle = 0).
CATEGORY: mapping
CALLING SEQUENCE:
image = map_carrington(image,xycen,date,ps)
INPUTS:
IMAGE = image to be mapped onto a cylindrical projection
XYCEN = FLTARR(2): E/W & N/S arcsecond angle of image center from Solar
disk center. W and N are positive.
DATE = date of image in any of the accepted CDS date forms
PS = platescale: arcseconds/pixel image scale.
XYREF = LONARR[2], coordinates of a reference point in the original
image. If provided, the point is returned as the coordinates
in the remapped image. Useful for keeping track of a
sunspot, etc.
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
PHIK = latitude of unity linear scale in cylindrical equal area
projection, in degrees. See "Map Projections" by Bugayevskiy and
Snyder, Ch. 2.
OUTPUTS:
Warped image using cubic interpolation in POLY_2D. Note that the
platescale of the warped image is the same as the input image. This
means that the warped image may be substantially larger in format
than the original, especially for near-limb images.
CALLS: ***
POLYWARP, get_rb0p [1], get_rb0p [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
Assumes image is oriented with Solar North UP.
Does not remap any pixels that are off the limb of the
Sun for the date given.
PROCEDURE:
EXAMPLE:
for TRACE images:
IDL> read_trace,filename,-1,index,image
IDL> traceplate = 0.4993 ;arcsec per pixel
IDL> warp_image =
map_carrington(image,[index.xcen,index,ycen],index.date,traceplate)
MODIFICATION HISTORY:
Written by Tom Berger, LMSAL, 8.13.02
Added reference point capability, TEB 8.16.02
Doc header only (syntax due to bad comment wraparound), SLFreeland 6-feb-2006
[Previous]
[Next]
Name: map_env2dir
Purpose: make file which maps between environmentals and local pathnames
Input Parameters:
NONE:
Keyword Parameters:
filter (in/out) - environmental filter to use (ex: 'SSW*')
envfile (in) - name of environmental file
Enivironmental files may be in one of two forms:
1) - simple list of environmentals
# commments ok
DIR_GEN_SHOWPIX
DIR_GEN_G71 # partial comments ok
2) - #!/bin/csh -f
# script file (setenv or define)
setenv DIR_GEN_SHOWPIX /ydb/showpix
setenv DIR_GEN_G71 /yd2/g71 # partial comments ok
mapfile (out) - optional output file name
mapfile format (read with rd_tfile(mapfile,2,/nocomment)
# [header section /system info]
# ....
Env1 Path1
Env2 Path2
EnvN PathN
Calling Sequence:
map_env2dir, envs, dirs, filter='envfilter'
map_env2dir, outarr, envfile=envfile
USE:
On SW master - map envs to master directory - (map files are distributed)
On local machine - map local env list to local pathnames
Together - generate auto-distribution mappings - for example,
generate MIRROR packages to run on local machine.
CALLS: ***
FILE_EXIST [2], data_chk [1], data_chk [2], file_append [1], file_append [2]
file_exist [1], file_exist [3], get_logenv [1], get_logenv [2], pr_status [1]
pr_status [2], rd_tfile [1], rd_tfile [2], str2cols [1], str2cols [2]
str_replace [1], str_replace [2], strjustify, strnocomment
History:
18-march-1996 (S.L.Freeland)
[Previous]
[Next]
Project : HESSI
Name : MAP_LIST__DEFINE
Purpose : Define a map linkedlist
Category : imaging objects
Syntax : IDL> new=obj_new('map_list')
CALLS: ***
DPRINT, IPRINT, MAP_LIST::ADD_MAP, MAP_LIST::CLEANUP, MAP_LIST::EARTH_VIEW
MAP_LIST::GETDATA, MAP_LIST::HAS_DATA, MAP_LIST::INIT, MAP_LIST::PLOT
MAP_LIST::ROTATE, MAP_LIST::TIMES, MAP_LIST::WRITE, TRIM, VALID_OMAP
is_number [1], is_number [2]
History : Written 22 Apr 2000, D. Zarro, SM&A/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
PROJECT:
SDAC
Name:
MAP_MATRIX
Purpose:
This procedure creates a linear transformation matrix between two data binnings.
CALLED BY:
HXT_CAL_FIX [1], HXT_CAL_FIX [2]
Procedure:
This procedure creates a linear transformation matrix which can be used
to rebin vector data such as count rates defined on a PHA scale.
It takes a matrix with n output bins defined on energy edges EDGE1, (n+1)
and create a transform, MAP, to interpolate a detector response, MATRIX1, from
narrow channels to broader output channels defined by EDGE2. The matrix
is defined in terms of counts/channel unless the keyword FLUX is set.
This operation is sometimes called flux rebinning. Matrix2 is generally
a matrix with mostly zeroes and can be easily represented with a sparse matrix
if the matrix is square.
for a bin defined on EDGE1 which falls wholly within a bin on EDGE2
the map matrix element is 1
for a bin defined on EDGE1 which falls partially within a bin on EDGE2
the map matrix element is given by the fraction of BIN1 contained by BIN2
Category:
GEN, SPECTRUM, UTILITY,
Calling Sequence:
MAP_MATRIX, Edge1, Matrix1, Edge2, Map, Matrix2
Inputs:
Edge1: N+1 energy edges of N output bins or 2xN energy edges
Matrix1: Response matrix N output bins, M input bins
Output rows in Counts/bin (NOT Counts/keV)
Edge2: K+1 output energy edges for new matrix, or 2xK edges
Outputs:
Map: The linear transform from input response, MATRIX1, to output MATRIX2
i.e. matrix2 = map # matrix1
Matrix2: New response matrix with K output bins, M input bins
Rows in Counts/bin
Keywords:
FLUX- Map operates on vectors in flux units, i.e. scaled by the
width of the channels.
CALLS: ***
F_DIV, edge_products
Restrictions:
This is not an optimized procedure
History:
Version 1, RAS, 9 Aug 93
Version 2, RAS, 24-apr-1996, allowed 2xN energy edges
Version 3, richard.schwartz@gsfc.nasa.gov, 7-sep-1997, more documentation
[Previous]
[Next]
DUMMY PROCEDURE - ONLY EXISTS TO GET YOPOS TO COMPILE
UNDER IDL VERSIONS < 4
WRITTEN Barry LaBonte July 21, 1995
CALLED BY
yopos [1], yopos [2]
[Previous]
[Next]
PROJECT:
SSW
NAME:
MAP_XYMOMENTS
PURPOSE:
Computes the centroid and standard deviation
along x and y (rows and columns) of a map distribution.
CATEGORY:
Math, Util
CALLING SEQUENCE:
map_xymoments, map, xaxis, yaxis, centroid, stdev
CALLS:
none
INPUTS:
Map- 2d array of map intensities
Xaxis - positions of pixels along first dimension of Map
Yaxis - positions of pixels along second dimension of Map
;
OPTIONAL INPUTS:
none
OUTPUTS:
Centroid - returns 2 element array of centroid along x and y
in the coordinates of xaxis and yaxis
Stdev - returns 2 element array of standard deviation along
x and y in the coordinates of xaxis and yaxis.
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
Straighforward application of the definitions of mean and standard
deviations of the moments of a distribution
MODIFICATION HISTORY:
Version 1, richard.schwartz@gsfc.nasa.gov,
[Previous]
[Next]
Name:mapx
Purpose: hide/show map/unmap sensitize/desensitize widgets
Input Parameters:
ids - widget id(s) to map/show - longword vector or scaler
show - vector or scaler show parameter
map=map - vector or scaler map parameter
sensitive=sensitive - vector or scaler sensitive parameter
All parameters default to OFF (unmap, hide, desensitize)
CALLED BY:
get_hk_mnem, goes_widget, show_pix [1], show_pix [2], show_pix_event [1]
show_pix_event [2], show_pix_event [3], xanal_emi, xcheckip, xdisp_fits
xdisp_sci5k, xdisp_tfr, xdisp_trace [1], xdisp_trace2, xdisp_trace3, xhkplot
xread_hist, xsearch_obs, xset_chain [1], xset_chain [2], xspr [1], xspr [2]
xstep_uevent [1], xstep_uevent [2], xstepper [1], xstepper [2], xstepper_event
xsw2tree, xsw2tree_event, xswlist [2], xsxt_prep_event
History: slf, 7/91
slf, 2-8-92 - added sensitive parameter
allow vectors for parameters
slf, 31-oct-93 - added bad_id=destroyed
[Previous]
[Next]
Name: mark_intervals
Purpose: Mark events on a time plot
Calling sequence:
mark_intervals, stimes, etimes, label=label, n_bar=n_bar
Method:
For each start/end interval a thick colored bar is drawn at the top of the plot
for the duration of the interval. If start/end is -1, then the bar extends for
the entire x range. The label is placed to the right or left of the line depending
on where the line is on the plot. n_bar is both an input and output keyword.
It keeps track of how many bars are already drawn to decide how far down from
the top (or bottom) of the plot to draw the next bar.
Input arguments:
stimes,etimes - start, end times of intervals. If start[i]=-1 then the condition
applies to the entire plot interval
Input keyword arguments:
label - very short (like 1 or 2 letters) string to identify bar (like N for night)
color - color of bar
charsize - character size for label
n_bar - number of bars drawn on plot so far (also an output parameter after being
incremented)
longline - if set, draw lines the full y width of plot in addition to drawing bars
bottom - if set, draw bars at bottom of plot (top is default)
Output keyword arguments:
n_bar - (also input). n_bar is incremented and returned for potential use in
another call to mark_intervals. Total number of bars drawn on plot so far.
Modifications:
Written: 4-Mar-2002, Kim Tolbert.
15-May-2002 - Kim, for log plots, check that ycrange is OK (for GOES plots, where !y.crange is
not returned as log of limits, but the limits themselves)
27-May-2002 - Kim, show label only on first interval when multiple intervals on same level
20-Sep-2002 - Kim. Save !p.nsum, set to 1, and restore original value on exit.
19-Jan-2005 - Kim. Thick=2.6 isn't thick when drawing to the Z buffer in 6.1 (??), so
make it thicker in that case
CALLS:
CALLED BY
hsi_show_flags [2], spex_draw_bars
[Previous]
[Next]
Project : RHESSI
Name : MARK_POINT
Purpose : mark a point at a specified position on an existing plot
Category : display
Syntax : IDL> mark_point,mark_point
Inputs : MARK_POINT=[X,Y] = data coordinates at which to plot point
Outputs : None
Keywords : None
CALLS: ***
EXIST, arrow2, draw_circle [1], draw_circle [2], draw_circle [3]
CALLED BY:
PLOT_MAP
History : Written 26 December 2002, Zarro (EER/GSFC), based on Kim's earlier version
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
PROJECT: HESSI
NAME: mark_poly
PURPOSE: draw polygon
CATEGORY: display
CALLING SEQUENCE:
xy = mark_poly (widget_id, color=color, $
device=device, data=data, normal=normal, event=event)
INPUTS:
widget_id - widget id of draw widget
OPTIONAL INPUTS (KEYWORDS):
color - color index to draw with
device - if set returns vertices in device coordinates
data - if set returns vertices in data coordinates
normal - if set returns vertices in normal coordinates
event - draw window left click event that has already occurred, e.g. user
has already left clicked in draw widget, and this position should
be used as starting position for polygon
OUTPUTS:
Result of function is fltarr(2,n) where
xy(0,*) are x coordinates of vertices
xy(1,*) are y coordinates of vertices
OPTIONAL OUTPUTS: None
Calls: ***
APPEND_ARR, CHECKVAR [1], MARK_POLY_EVENT, checkvar [2]
COMMON BLOCKS: None
PROCEDURE:
RESTRICTIONS: Requires that window be a draw widget
SIDE EFFECTS: None.
EXAMPLES:
HISTORY:
Written, Kim Tolbert, April 22, 2001
[Previous]
[Next]
Project : SDAC
Name : MARK_REGION
Purpose : This procedure selects an interval from a plot window.
Category : UTIL, GEN, GRAPHICS
Explanation : The cursor is used to interactively select an x range.
Use : MARK_REGION, Start, Endr
Inputs : None
Opt. Inputs : None
Outputs : Start- Time in seconds from plot basetime
Endr - Time in seconds from plot basetime
Opt. Outputs: None
Keywords : WMESSAGE- a message to appear in a text widget as in GOES
Calls : ***
CROSSBAR [1], CROSSBAR [2], GRAPHICS_PAGE, XDEVICE
CALLED BY:
Y_AVERAGE [1], Y_AVERAGE [2]
Common : None
Restrictions:
Side effects: None.
Prev. Hist : UNKNOWN
Modified : Version 2, Documented, 29-jan-1997
Version 3, richard.schwartz 13-nov-1999. Fixed for windows and Mac.
Contact : richard.schwartz@gsfc.nasa.gov
[Previous]
[Next]
Name: markplot
Purpose: highlight features on plot (default is open crosshair)
Input Parameters:
dpix - distance from marked poition to start highlinght (def=10 pix)
(for /box, dpix=box half-width, for /circle, dpix= circle radius)
npix - length of highlight from dpix (only used for open crosshair)
Keyword Parameters:
box - if set, draw a box of diameter=2*dpix
circle - if set, draw a circle of radius=dpix
plus - if set, draw a plussign of length=2*dpix
Calling Sequence:
markplot [,dpix [,npix , /uselast , color=color, thick=thick, $
/box , /circle ]]
Calling Examples:
markplot ; open crosshair at cursor
markplot,15,/box,thick=2 ; 15x15 box at cursor.
markplot,5, /plus ; 10 pix long plussign at cursor
for i=5,55,10 do markplot,i,/uselast,/circle ; uselast & circle
for i=5,55,10 do markplot,i,/uselast,/box ; demo uselast & box
History:
10-Nov-1993 (SLF)
2-nov-1994 (SLF) add keyword inheritance - add PLUS keyword, document
Restrictions:
Uses keyword inheritance which was not introduced until IDL V3.2.
[Previous]
[Next]
PROJECT:
SOHO - CDS/SUMER
NAME:
MASK_MATRIX()
PURPOSE:
Create a mask matrix for image manipulation
CATEGORY:
EXPLANATION:
This function routine can be used for creating an interleave
(i.e., checkerboard) or an interlace mask matrix.
SYNTAX:
Result = mask_matrix()
CALLED BY:
ITOOL_COMPOSITE
EXAMPLES:
INPUTS:
M - The first dimension of the matrix
N - The second dimension of the matrix
OPTIONAL INPUTS:
None.
OUTPUTS:
RESULT - An MxN integer mask matrix
OPTIONAL OUTPUTS:
None.
KEYWORDS:
FIRST - If set, value of the first pixel is 1, otherwise 0
INTERLEAVE - Make interleave mask matrix. This is default if
there is no other keyword being set
XINTERLACE - Make X-direction interlaced mask matrix
YINTERLACE - Make Y-direction interlaced mask matrix
Note: Only one of above keywords can be set at a time.
ERROR - A named keyword variable that contains error message;
a null string is returned if no error occurs
COMMON:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
HISTORY:
Version 1, October 27, 1995, Liyun Wang, GSFC/ARC. Written
CONTACT:
Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)
[Previous]
[Next]
NAME:
MATCH
PURPOSE:
Routine to match values in two vectors.
CALLING SEQUENCE:
match, a, b, suba, subb, [ COUNT =, /SORT ]
INPUTS:
a,b - two vectors to match elements, numeric or string data types
OUTPUTS:
suba - subscripts of elements in vector a with a match
in vector b
subb - subscripts of the positions of the elements in
vector b with matchs in vector a.
suba and subb are ordered such that a[suba] equals b[subb]
OPTIONAL INPUT KEYWORD:
/SORT - By default, MATCH uses two different algorithm: (1) the
/REVERSE_INDICES keyword to HISTOGRAM is used for integer data,
while a sorting algorithm is used for non-integer data. The
histogram algorithm is usually faster, except when the input
vectors are sparse and contain very large numbers, possibly
causing memory problems. Use the /SORT keyword to always use
the sort algorithm.
OPTIONAL KEYWORD OUTPUT:
COUNT - set to the number of matches, integer scalar
CALLED BY:
COPY_STRUCT [1], COPY_STRUCT [2], COPY_STRUCT [3], COPY_STRUCT_INX
DBFIND_SORT [1], DBFIND_SORT [2], DBFIND_SORT [3], GET_BSA_ANS [1]
GET_BSA_ANS [2], GET_PLAN_FUNCT, MATCH_STRUCT, MOVIE_MAP, MRDFITS [1], MRDFITS [2]
SHOW_SYNOP__DEFINE, SMK_FULLDET, SSEL_DATCOL, hsi_getflare, hsi_ui_flarecat
plot_bda, trace_movies_prioritize [1], trace_movies_prioritize [2]
SIDE EFFECTS:
The obsolete system variable !ERR is set to the number of matches;
however, the use !ERR is deprecated in favor of the COUNT keyword
RESTRICTIONS:
The vectors a and b should not have duplicate values within them.
You can use rem_dup function to remove duplicate values
in a vector
EXAMPLE:
If a = [3,5,7,9,11] & b = [5,6,7,8,9,10]
then
IDL> match, a, b, suba, subb, COUNT = count
will give suba = [1,2,3], subb = [0,2,4], COUNT = 3
and suba[a] = subb[b] = [5,7,9]
METHOD:
For non-integer data types, the two input vectors are combined and
sorted and the consecutive equal elements are identified. For integer
data types, the /REVERSE_INDICES keyword to HISTOGRAM of each array
is used to identify where the two arrays have elements in common.
HISTORY:
D. Lindler Mar. 1986.
Fixed "indgen" call for very large arrays W. Landsman Sep 1991
Added COUNT keyword W. Landsman Sep. 1992
Fixed case where single element array supplied W. Landsman Aug 95
Converted to IDL V5.0 W. Landsman September 1997
Use a HISTOGRAM algorithm for integer vector inputs for improved
performance W. Landsman March 2000
Work again for strings W. Landsman April 2000
Use size(/type) W. Landsman December 2002
Work for scalar integer input W. Landsman June 2003
[Previous]
[Next]
NAME:
MATCH
PURPOSE:
Routine to match values in two vectors.
CALLING SEQUENCE:
match, a, b, suba, subb, [ COUNT =, /SORT ]
INPUTS:
a,b - two vectors to match elements, numeric or string data types
OUTPUTS:
suba - subscripts of elements in vector a with a match
in vector b
subb - subscripts of the positions of the elements in
vector b with matchs in vector a.
suba and subb are ordered such that a[suba] equals b[subb]
OPTIONAL INPUT KEYWORD:
/SORT - By default, MATCH uses two different algorithm: (1) the
/REVERSE_INDICES keyword to HISTOGRAM is used for integer data,
while a sorting algorithm is used for non-integer data. The
histogram algorithm is usually faster, except when the input
vectors are sparse and contain very large numbers, possibly
causing memory problems. Use the /SORT keyword to always use
the sort algorithm.
OPTIONAL KEYWORD OUTPUT:
COUNT - set to the number of matches, integer scalar
CALLED BY:
COPY_STRUCT [1], COPY_STRUCT [2], COPY_STRUCT [3], COPY_STRUCT_INX
DBFIND_SORT [1], DBFIND_SORT [2], DBFIND_SORT [3], GET_BSA_ANS [1]
GET_BSA_ANS [2], GET_PLAN_FUNCT, MATCH_STRUCT, MOVIE_MAP, MRDFITS [1], MRDFITS [2]
SHOW_SYNOP__DEFINE, SMK_FULLDET, SSEL_DATCOL, hsi_getflare, hsi_ui_flarecat
plot_bda, trace_movies_prioritize [1], trace_movies_prioritize [2]
SIDE EFFECTS:
The obsolete system variable !ERR is set to the number of matches;
however, the use !ERR is deprecated in favor of the COUNT keyword
RESTRICTIONS:
The vectors a and b should not have duplicate values within them.
You can use rem_dup function to remove duplicate values
in a vector
EXAMPLE:
If a = [3,5,7,9,11] & b = [5,6,7,8,9,10]
then
IDL> match, a, b, suba, subb, COUNT = count
will give suba = [1,2,3], subb = [0,2,4], COUNT = 3
and a[suba] = b[subb] = [5,7,9]
METHOD:
For non-integer data types, the two input vectors are combined and
sorted and the consecutive equal elements are identified. For integer
data types, the /REVERSE_INDICES keyword to HISTOGRAM of each array
is used to identify where the two arrays have elements in common.
HISTORY:
D. Lindler Mar. 1986.
Fixed "indgen" call for very large arrays W. Landsman Sep 1991
Added COUNT keyword W. Landsman Sep. 1992
Fixed case where single element array supplied W. Landsman Aug 95
Converted to IDL V5.0 W. Landsman September 1997
Use a HISTOGRAM algorithm for integer vector inputs for improved
performance W. Landsman March 2000
Work again for strings W. Landsman April 2000
Use size(/type) W. Landsman December 2002
Work for scalar integer input W. Landsman June 2003
Assume since V5.4, use COMPLEMENT to WHERE() W. Landsman Apr 2006
[Previous]
[Next]
Project : SDAC
Name : MATCH_STRUCT
Purpose : check if two structures are identical
Explanation : cross-checks type and value of each field
Use : STATUS=MATCH_STRUCT(STRUCT1,STRUCT2)
Inputs : S1, S2 = input structures
Opt. Inputs : None.
Outputs : STATUS = 1/0 is input structure are/are not identical
Opt. Outputs: None.
Keywords : TAG_ONLY = set to check if only tags are the same
FLOATING = do checks in floating point
BLANK = treat string blanks as valid characters
TYPE_ONLY = set to check if datatype of each tag
is the same (values are not checked)
EXCLUDE = tags to exclude (e.g [1,3,4] or [tag1,tag2..])
INCLUDE = tags to include
SENSITIVE = make string matches case sensitive
DTAG = tag name where first difference is found
Category : Structure handling
Prev. Hist. : None.
Written : Dominic Zarro (ARC/GSFC)
Modified : To handle arrays of strings. CDP, 27-Feb-95
Removed redundant string check. DMZ, 1-March-95
Fixed subtle array bug that lurked for 6 years
(Zarro EITI,March 2001)
CALLS:
CALLED BY
ADD_ANOMALY, COMBINE_STRUCT, CONCAT_STRUCT, EIS_IMAGE_TOOL [1]
EIS_IMAGE_TOOL [2], EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2]
HSI_SAME_DATA, IMAGE_TOOL, IMAGE_TOOL_EVENT, ITOOL_OVERLAYER, MERGE_STRUCT
MK_CDS_PLAN, MK_PLAN_COMP, MK_SOHO, REP_STRUCT_NAME, SAME_DATA [1], SAME_DATA [2]
SAME_DATA2, UPDATE_CAMPAIGN, WHERE_STRUCT, WRITE_ANOMALY, WRITE_MONTH_CAT, XCAMP
XCAT, XCFIT_BLOCK, XCPT, XPORT, XPS_SETUP, XREPORT_EDIT, db_gbo, ihy_db
spectral_ratio [1], spectral_ratio [2]
[Previous]
[Next]
NAME:
MAX_ENTROPY
PURPOSE:
Deconvolution of data by Maximum Entropy analysis, given the PSF
EXPLANATION:
Deconvolution of data by Maximum Entropy analysis, given the
instrument point spread response function (spatially invariant psf).
Data can be an observed image or spectrum, result is always positive.
Default is convolutions using FFT (faster when image size = power of 2).
CALLING SEQUENCE:
for i=1,Niter do begin
Max_Entropy, image_data, psf, image_deconv, multipliers, FT_PSF=psf_ft
INPUTS:
data = observed image or spectrum, should be mostly positive,
with mean sky (background) near zero.
psf = Point Spread Function of instrument (response to point source,
must sum to unity).
deconv = result of previous call to Max_Entropy,
multipliers = the Lagrange multipliers