This page is a listing of the entire contents of this library for IDL. This listing is the long version. Viewing the much more compact listing may be handier.
FMEDIAN : variant of Gmedian
*NAME:
GMEDIAN (General IDL Library 01) May 20, 1980
*CLASS:
Smoothing
*CATEGORY:
*PURPOSE:
To perform a median filter on an one-dimensional array. The type of the
array is not converted to BYTE (as in the IDL MEDIAN), but is left the
same as the input type.
*CALLING SEQUENCE:
out=GMEDIAN(IN,M)
*PARAMETERS:
IN (REQ) (I) (1) (I L F D)
Required input vector containing the data which are to be filtered.
If OUT is omitted from the calling sequence, the filtered data are
returned in IN.
M (REQ) (I) (0) (I)
Length of the median filter
OUT (OPT) (O) (1) (I L F D)
Output median-filtered vector.
*EXAMPLE:
To median filter a data vector BKG:
GMEDIAN,BKG,63,FBKG ;63 point filter
*SYSTEM VARIABLES USED:
None.
*INTERACTIVE INPUT:
None.
*SUBROUTINES CALLED:
PARCHECK
*FILES USED:
IUER_USERDATA:GMEDIAN.TMP -temporary scratch data set
*SIDE EFFECTS:
You may not execute this procedure from two or more simultaneous
sessions in your account. There will be conflicts over the .TMP
file.
*RESTRICTIONS:
None
*NOTES:
Fortran Task IUER_SOFTDISK:[IUERDAF.PRODUCTION]GMEDIAN.EXE is
called to do the median filter.
The fortran task forces the filter with to be odd.
Widths less than 2 result in no filtering.
The data array is truncated to 4096 points in length.
The first and last M/2 points are copied from the
input to the output arrays with no filtering.
*PROCEDURE:
The length of the filter and the input array are copied
to a temporary file GMEDIAN.TMP and the task GMEDIAN.EXE
called.
For I = M/2 to N - M/2 - 1 where N is the length
of IN the median is computed by:
OUT(I) = Median value of (IN(J),J=I-M/2 to I+M/2)
Points for I=0, M/2 - 1 and I=N-M/2,N OUT(I) = IN(I)
The fortran task writes the sizes and the filtered results
to the file GMEDIAN.TMP and exits with a stop.
The procedure reads the lengths and the filtered results.
If errors arose, a message is output.
*MODIFICATION HISTORY:
Jul 31 1980 D. Lindler initial version
Sep 13 1982 FHS3 GSFC CR#047 increase vector sizes to 4096 points.
Apr 15 1985 RWT GSFC name changed to GMEDIAN to make routine
compatible with XIDL.
Jun 8 1987 RWT GSFC add PARCHECK, use N_ELEMENTS, and make OUT
optional.
Jun 22 1987 RWT GSFC fix error with N not being defined
Mar 10 1988 CAG GSFC add VAX RDAF-style prolog, and print
statement if the procedure is executed
without parameters.
(See /host/bluemoon/usr2/idllib/contrib/icur/addheliocor.pro)
*NAME:
GMEDIAN (General IDL Library 01) May 20, 1980
*CLASS:
Smoothing
*CATEGORY:
*PURPOSE:
To perform a median filter on an one-dimensional array. The type of the
array is not converted to BYTE (as in the IDL MEDIAN), but is left the
same as the input type.
*CALLING SEQUENCE:
GMEDIAN,IN,M,OUT
*PARAMETERS:
IN (REQ) (I) (1) (I L F D)
Required input vector containing the data which are to be filtered.
If OUT is omitted from the calling sequence, the filtered data are
returned in IN.
M (REQ) (I) (0) (I)
Length of the median filter
OUT (OPT) (O) (1) (I L F D)
Output median-filtered vector.
*EXAMPLE:
To median filter a data vector BKG:
GMEDIAN,BKG,63,FBKG ;63 point filter
*SYSTEM VARIABLES USED:
None.
*INTERACTIVE INPUT:
None.
*SUBROUTINES CALLED:
PARCHECK
*FILES USED:
IUER_USERDATA:GMEDIAN.TMP -temporary scratch data set
*SIDE EFFECTS:
You may not execute this procedure from two or more simultaneous
sessions in your account. There will be conflicts over the .TMP
file.
*RESTRICTIONS:
None
*NOTES:
Fortran Task IUER_SOFTDISK:[IUERDAF.PRODUCTION]GMEDIAN.EXE is
called to do the median filter.
The fortran task forces the filter with to be odd.
Widths less than 2 result in no filtering.
The data array is truncated to 4096 points in length.
The first and last M/2 points are copied from the
input to the output arrays with no filtering.
*PROCEDURE:
The length of the filter and the input array are copied
to a temporary file GMEDIAN.TMP and the task GMEDIAN.EXE
called.
For I = M/2 to N - M/2 - 1 where N is the length
of IN the median is computed by:
OUT(I) = Median value of (IN(J),J=I-M/2 to I+M/2)
Points for I=0, M/2 - 1 and I=N-M/2,N OUT(I) = IN(I)
The fortran task writes the sizes and the filtered results
to the file GMEDIAN.TMP and exits with a stop.
The procedure reads the lengths and the filtered results.
If errors arose, a message is output.
*MODIFICATION HISTORY:
Jul 31 1980 D. Lindler initial version
Sep 13 1982 FHS3 GSFC CR#047 increase vector sizes to 4096 points.
Apr 15 1985 RWT GSFC name changed to GMEDIAN to make routine
compatible with XIDL.
Jun 8 1987 RWT GSFC add PARCHECK, use N_ELEMENTS, and make OUT
optional.
Jun 22 1987 RWT GSFC fix error with N not being defined
Mar 10 1988 CAG GSFC add VAX RDAF-style prolog, and print
statement if the procedure is executed
without parameters.
(See /host/bluemoon/usr2/idllib/contrib/icur/addheliocor.pro)
NAME: NIUEG2
Modified 7/5/88 from IUELOW to be called by NIUELO
now passes gross and background vectors ala NIUELO
PURPOSE:
procedure for getting final output from SDPS' MELO array
(analogous to iuelo.pro)
CATEGORY:
CALLING SEQUENCE:
INPUTS:
MELO - melo array
OUTPUTS:
H,WAVE, FLUX, EPS arrays
where FLUX = net flux if exp_time is not given
= absolute flux if exp_time is given
OPTIONAL OUTPUT PARAMETERS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
VERSION 1 by Sally Heap, August 1987
2 SEP 1987 - put in LWR degradation correction
VERSION 3 by jkf/acc - renamed IUELOW...originally FROMMELO and removed
calibration.
(See /host/bluemoon/usr2/idllib/contrib/icur/addheliocor.pro)
***** NIUEGET
*NAME:
IUEGET 8 JANUARY 1981
*PURPOSE:
To acquire spectral data for a given order
from an IUE diskfile
*EXECUTION:
IUEGET,LUN,M,H,WAVE,FNET,EPS
*INPUT:
LUN - logical unit of opened file (MEHI or
MELO) containing IUE spectral data
M - spectral order for which data are to
be acquired (1 for low-dispersion spectra,
60-125 for high-dispersion spectra)
*OUTPUT:
H - header record
WAVE - vector of wavelengths
FNET - vector of net fluxes (GROSS-smoothed
BACKGROUND) in IUE units
EPS - error vector
*DISK DATA SETS:
The disk data file containing the IUE spectrum
must be opened for reading before execution of
IUEGET and closed after execution.
*METHOD:
The header record is acquired and examined
to determine which records contain the data for
the specified spectral order. The wavelength,
gross-flux, background-flux, and error vectors
are then acquired. The wavelength vector is
converted to angstroms, while the fluxes are
converted to IUE units. The background is first
smoothed by a median filter followed by two
running averages. The net flux is determined
as the difference between the gross flux
and the smoothed background flux. All the
vectors are stripped of padded zeros.
*OPERATIONAL NOTES:
Care should be taken when using this routine. IUEGET
uses the system variable !ERR to determine the record
length in the data file. !ERR is set when the file is
first opened. If the user does anything to change
!ERR before calling IUEGET (eg. any input/output from
tape or disk), the value of !ERR should be restored.
Example:
OPENR,1,'S6541L'
SAVE=!ERR
... other work that might change !ERR
!ERR=SAVE
IUEGET,1,1,H,WAVE,FNET,EPS
*EXAMPLES;
In this example, spectral data for orders
93 and 94 of the high-dispersion spectrum,
SWP 3323, are acquired and plotted:
OPENR,1,'IUER_USERDATA:S3323H'
IUEGET,1,93,H,W93,NET93,E93
IUEGET,1,94,H.W94,NET94,E94
CLOSE,1
!XMIN=W94(0) & !XMAX=MAX(W93)
PLOT,W94,F94
OPLOT,W93,F93
*SUBROUTINES CALLED:
GMEDIAN
PARCHECK
*MODIFICATION HISTORY:
VERSION 1 BY SALLY HEAP 2-16-81
22-OCT-85 KF modified for DIDL (i.e. /ERROR added & change
MEDIAN to GMEDIAN
19-NOV-85 RWT use intrinsic DIDL MEDIAN instead of GMEDIAN
4-13-87 RWT VAX mods: use GMEDIAN, add PARCHECK & remove EXTRACT commands
(See /host/bluemoon/usr2/idllib/contrib/icur/addheliocor.pro)
*NAME:
NIUELO 8 JANUARY 1981
mod of IUELO for ICUR I/O
*PURPOSE:
To acquire and calibrate low dispersion spectral
data from IUE with optional corrections for THDA
sensitivity variation and LWR sensitivity variation.
*EXECUTION:
IUELO,IMAGET,H,WAVE,FLUX,EPS
*INPUT:
IMAGET - disk file name for eslo or melo file
containing low-dispersion spectral data
(character string)
e.g. MELO file for IMAGET
SWP 7954 'SWP7954L'
LWR 9422 'LWR9422L'
*OUTPUT:
H - header record amended for exposure
time input by user, and flags for THDA
and LWR degradation corrections.
WAVE - wavelength vector (Angstroms)
FLUX - absolute flux vector (ergs/sec/cm2/A)
EPS - error vector
*INTERACTIVE INPUT:
1) Exposure time (in minutes,sec,ms), if the header
record does not already contain these quantities.
If the user types in zeros, then the net flux
in IUE units is returned. Values may be integer or real
but the total time must be less than 32767 minutes.
2) Correction for THDA sensitivity variation, if entry 68
in the header record equals 0 (see description below).
3) Correction for LWR sensitivity degradation, if entry 69
in the header records equals 0 (see description below).
*OUTPUT PLOTS:
wavelength vs net flux
wavelength vs. absolute flux
In both plots, those data-points with negative values of
epsilon are marked with asterisks.
*DISK DATA SETS:
1) The MELO (eslo) data file must be resident on
disk.
2) the files, 'IUER_PRODROOT:[DAT]IUECAL.DAT' and IUECAL2.DAT,
containing the calibration tables used to convert
fluxes from IUE units to absolute units, must be
available for CALIB. See IUER_PRODROOT:[INF]IUECAL.INF and
IUECAL2.INF for more documentation.
3) If the THDA correction is requested with a user-specified
THDA value, the label portion of the MELO file must be
resident on the system disk.
4) If the LWR sensitivity degradation correction is requested,
the file IUER_PRODROOT:[DAT]DEGRAD.TAB must exist. (See
documentation in IUER_PRODROOT:[INF]DEGRAD.INF.)
*OPERATIONAL NOTES:
- HFIX can be run prior to IUELO to set all the flags in
record 0 necessary to allow IUELO to run non-interactively.
- CALIB, which is called by IUELO requires that H(580) contains
the number of the ITF file used by IUESIPS. This is set either
with the new IUECOPY, or using ITFFLAG.
- Specifying 0 for the exposure time will result in net fluxes
being output rather than absolutely calibrated fluxes.
*METHOD:
IUEGET is used to acquire the header record
and the wavelength, net flux, and error
vectors. The header record is then examined
to see if the exposure time was recorded (i.e.
non-zero)
H(39) - minutes
H(40) - seconds
H(41) - ms
If the exposure time is not recorded, then
the user is asked to supply the exposure time
(in min, sec, ms) and these data are inserted
into the header record. Note that the user may
enter these values as either integer or real
numbers although real values for ms will be
truncated. The net fluxes are then converted
to absolute units with the use of IUECAL or IUECAL2
by CALIB (if the exposure time is not zero). CALIB
uses H(580) to decide which file is opened (see ITFFLAG).
If H(68) = 0, the user is asked if a correction for
THDA sensitivity variations is desired. The possible
options include no correction, correction using the
IUESIPS determined THDA stored in H(61), or correction
using a user-specified THDA with the temperature data
stored in the label displayed to assist the user.
If H(68) < 0, then the correction will be applied
automatically using -H(68) / 10.0 for the THDA.
If H(68) > 0, then the correction is not applied
and no user input is required. Note that the default
value for H(68) is 0.
If an LWR image is specified, and H(69) = 0, the user
is asked if a correction for the LWR sensitivity
degradation is desired. If H(69) < 0, then the
correction is applied automatically. If H(69) > 0,
then the correction is not applied and no user input
is required. Note the default for H(69) is 0.
*EXAMPLES:
spectral data for SWP 3373 are acquired via the command:
IUELO,'SWP3373L',HEAD,WAVE,ABSFLUX,EPS
*SUBROUTINES CALLED:
IUEPLOT
CALIB
SDC
TEMPCOR
LTI
INTIME
IUEGET
LABEL
*MODIFICATION HISTORY:
VERSION 1 BY SALLY HEAP 13-FEB-81
- June 11, 1981 change by Sally Heap per change
request #18. Uses COMPOSE before trying to open
files, and prints out the first 9 lines of the
label before it asks for the exposure time.
- July 20, 1981 by D. Lindler per change request # 73.
Corrected to work when the exposure time is already in
the header record.
- May 30, 1984 by RWT per URP #177. Corrected to allow either
integer or real exposure times.
- December 13, 1984 RWT use new versions of IUEPLOT & CALIB.
- 4-28-86 RWT includes LWR sensitivity degradation correction
(SDC & new CALIB), a correction for temperature-dependent
sensitivity variations (TEMPCOR), corrects problem with
exposure time error, and uses new DIDL IUEGET
- 8-27-86 RWT allow exp. times > 32767 sec or >32767 millisec.
using new subroutine INTIME
- 8-12-87 RWT VAX mods: eliminate subroutines, add PARCHECK,
add listing of procedure call, change UIC references, add
pause before plot, use vector subscript notation in
print statements and use GET_LUN & SET_XY.
- 12-31-87 RWT use label information rather than file name for
error checking and modify for new LWP absolute calibration
(See /host/bluemoon/usr2/idllib/contrib/icur/addheliocor.pro)
*NAME:
PARCHECK (GENERAL IDL LIBRARY 01) 30-MAR-1987
*CLASS:
Error checking
*CATEGORY:
*PURPOSE:
To check that a procedure has been called with the minimum of allowed
number of parameters.
*CALLING SEQUENCE:
PARCHECK,NPARM,MINPARMS,CALLINGPRO
*PARAMETERS:
NPARM (REQ) (I) (0) (I)
required input scalar giving the number of parameters
in the procedure call (i.e. n_params(0)).
MINPARMS (REQ) (I) (0 1) (I)
If scalar, the minimum number of parameters needed for the
procedure to execute properly.
If an array, it represents the allowed numbers of
parameters (e.g. if 3,4 or 6 parameters are allowed,
then set minparms([0,1,2]) = [3,4,6] ).
CALLINGPRO (REQ) (I) (0) (S)
Required string giving the name of the calling procedure.
*EXAMPLES:
To determine if procedure pro, which contains a
call to parcheck has the minimum number of parameters
(i.e. 4):
PARCHECK,N_PARAMS(),4,'PRO'
If the same procedure can have 4,5,7, or 8 parameters
then use:
PARCHECK,N_PARAMS(),[4,5,7,8],'PRO'
*SYSTEM VARIABLES USED:
*INTERACTIVE INPUT:
*SUBROUTINES CALLED:
PCHECK
*FILES USED:
*SIDE EFFECTS:
*RESTRICTIONS:
*NOTES:
tested with IDL Version 2.1.0 (sunos sparc) 28 Jun 91
tested with IDL Version 2.1.0 (ultrix mipsel) N/A
tested with IDL Version 2.1.0 (vax vms) 28 Jun 91
*PROCEDURE:
The input parameters to PARCHECK are first checked themselves
using PCHECK. If MINPARMS is a scalar it is compared to NPARM.
If NPARM < MINPARMS, then an error message is printed and the
procedure returns to the main level. If MINPARMS is a vector,
then NPARM is subtracted from each value of MINPARMS and the
resulting vector is checked for zeroes. If no values are zero,
then error messages are printed and the program returns to the
main level.
*MODIFICATION HISTORY :
Mar 30 1987 cag gsfc initial program
Apr 1987 rwt gsfc add vector input for parameters
Mar 15 1988 cag gsfc add vax rdaf-style prolog
Jul 12 1989 jtb gsfc converted to sun/unix idl
Nov 2 1989 rwt gsfc correct print format syntax
May 10 1991 PJL GSFC corrected prolog format
Jun 21 1991 gra casa cleaned up; tested SUN, DEC, VAX;
updated prolog.
Jun 28 1991 PJL GSFC added npar test; tested on SUN and VAX;
updated prolog
(See /host/bluemoon/usr2/idllib/contrib/icur/addheliocor.pro)
*NAME:
PCHECK
*CLASS:
*CATEGORY:
*PURPOSE:
This procedure is used to check the parameters of
a procedure for correct type and dimensions
*CALLING SEQUENCE:
PCHECK,VARIABLE,POSITION,DIMENSION,TYPE
*PARAMETERS:
VARIABLE - Variable to be checked
POSITION - Parameter position of the variable
DIMENSION - Valid dimensions (3 digit integer).
Each digit must be 0 or 1.
1 specifies that the dimension is valid.
1st digit - scalar
2nd - one dimensional array
3rd - two dimensional array
TYPE - Valid types ( 4 digit integer).
Each digit must be 0 or 1.
1 specifies a valid type.
1st digit - string
2nd - byte
3rd - integer, or longword integer
4th - floating point, double precision or complex
*EXAMPLES:
*SYSTEM VARIABLES USED:
*INTERACTIVE INPUT:
*SUBROUTINES CALLED:
*FILES USED:
*SIDE EFFECTS:
*RESTRICTIONS:
*NOTES:
tested with IDL Version 2.1.0 (sunos sparc) 28 Jun 91
tested with IDL Version 2.1.0 (ultrix mipsel) N/A
tested with IDL Version 2.1.0 (vax vms) 28 Jun 91
*PROCEDURE:
*I_HELP nn:
*MODIFICATION HISTORY:
d. lindler dec. 1980
version 2 f.h.schiffer 3rd 17 nov 1981
copied into [177001] by rwt 1-17-84
10-24-85 rwt modify for new didl data types: longword integer,
double precision & complex. modified to be compatible
with existing version (i.e., no new input parameters)
21-sep-88: converted to sun idl, john hoegy.
10 May 91 PJL created a RDAF format prolog
28 Jun 91 PJL added npar test; tested on SUN and VAX; updated prolog
(See /host/bluemoon/usr2/idllib/contrib/icur/addheliocor.pro)
*NAME:
SWAP_BYTES (General IDL Library 01) 25-APR-80
*CLASS:
Conversion
*CATEGORY:
*PURPOSE:
To perform the byte reordering required for conversion of
integer, longword, floating point, or double precision
variables between various machine representations.
*CALLING SEQUENCE:
SWAP_BYTES,BVAR,PARAM
*PARAMETERS:
BVAR (REQ) (I/O) (0 1) (B)
byte representation of variable in which bytes will
be reordered
PARAM (REQ) (I/O) (0) (I)
parameter governing the byte reordering options
2: Even and Odd bytes are swapped
4: The order of each group of four bytes is reversed
8: The order of each group of eight bytes is reversed
*EXAMPLES:
*SUBROUTINES CALLED:
PARCHECK
*FILES USED:
*SIDE EFFECTS:
The byte representation of the original vector or scalar is
replaced by the reordered bytes
*RESTRICTIONS:
Input must be of byte type. All conversion operations should
be done on the byte stream BEFORE the variables are read by
IDL as integer, longword, floating point, or double precision.
Prematurely reading a byte stream as one of these data types
can cause conflicts with reserved values (NaN, infinity, and
reserved operand faults ) which will corrupt the final data.
*NOTES:
tested with IDL Version 2.0.10 (sunos sparc) 3 Oct 91
tested with IDL Version 2.1.0 (ultrix mipsel) 3 Oct 91
tested with IDL Version 2.1.0 (vms vax) 3 Oct 91
*PROCEDURE:
Three different byte reordering schemes are required for the
conversion of integer, longword, floating point, and double
precision data between the machine formats used by SunOS,
DEC ULTRIX, and VAX VMS. All conversions require the
interchange of even and odd byte elements. Longword and
floating point conversion requires an additional byte reordering
in which the order of the four bytes which represent a single
longword or floating point value are reversed. Double precision
conversion requires that the order of the eight bytes which
represent a double precision value are reversed.
*MODIFICATION HISTORY:
Apr. 25 1980 D.J. Lindler initial program
Mar. 21 1988 CAG add VAX RDAF-style prolog, add procedure
call listing, and check for parameters.
Feb. 09 1988 RWT change suggested by D. Lindler to handle
longword integers
Jun. 14 1989 RWT modify for SUN IDL, add optional parameter,
and allow swapping of bytes in a byte array
May 30 1990 RWT add changes by Gitta Domik for allowing
TYPE = 8.
Feb 11 1991 GRA Changed name to SWAP_BYTES, and rewrote to
work with byte variable types only.
Removed call to PARCHECK, and required that
PARAM be defined, rather that determined by
the IDL function SIZE. Changed the values of
PARAM to equal the number of bytes considered
as a group, i.e. 2, 4, and 8.
Mar 28 1991 PJL added PARCHECK; converted to lowercase
Jun 21 1991 GRA cleaned up; tested on SUN, DEC, VAX;
updated prolog.
Aug 15 1991 A.Veale converted to use IDL BYTEORDER calls; tested
on DEC
Oct 3 1991 GRA tested on SUN, DEC, and VAX.
(See /host/bluemoon/usr2/idllib/contrib/icur/addheliocor.pro)
*NAME:
TRANS_BYTES
*PURPOSE:
To translate the byte representation of IDL variables to
a format compatible with the host operating system as defined
by the IDL system variable !version.arch. TRANS_BYTES currently
supports SPARC (Sun-4s and SPARCStations), MIPSEL (DECstation 3100
and IBM 386 class PCs), and VAX (VAXstation and MicroVAX).
*CALLING SEQUENCE:
TRANS_BYTES, BYTE_EQ, vartyp, cpupar
*PARAMETERS:
BYTE_EQ (REQ) (IO) (B) (012)
The byte representation of the data variable to be converted.
vartyp (OPT) (I) (I) (0)
Parameter to identify the type of data which BYTE_EQ represents.
byte 1
integer 2
longword integer 3
floating point 4
double precision 5
If VARTYP is not given in the call, the user will be prompted
for it.
cpupar (OPT) (I) (I) (0)
Parameter to identify data translation mode. If not present
in the calling statement, TRANS_BYTES will prompt the user.
no conversion 0
VAX to MIPSEL 1
MIPSEL to VAX 2
VAX to SPARC 3
SPARC to VAX 4
MIPSEL to SPARC 5
SPARC to MIPSEL 6
Supported Data Types:
VAX - VAXstations, MicroVAX
MIPSEL - DECstations, IBM 386
SPARC - SparcStations, Sun 4##
No Conversion is required between like data types, such as
DECstations and IBM 386s.
If CPUPAR is not given in the call, the user will be prompted
for it.
*SIDE EFFECTS:
*SUBROUTINES CALLED:
SWAP_BYTES
PARCHECK
*SYSTEM VARIABLES USED:
*NOTES:
The internal data formats currently supported are:
SunOs data type:
SUN4's and SPARCStations
IEEE standard (Big Endian Configuration)
DECStation data type:
IEEE standard (Little Endian Configuration)
VAXStation data type:
VAX (not IEEE)
This program considers floating point to be the VMS
"f-floating", and double precision to be "d-floating".
H-floating and g-floating are not supported.
DOS data type:
IEEE standard (same as DECstation)
The IEEE standard data types differ only in the byte order.
Big Indian configuration has the most significant byte at the
lowest machine address. For the Little Endian configuration,
the least significant byte is at the lowest machine address.
Big Endian: | 0 | 1 | 2 | 3 |
Little Endian: | 3 | 2 | 1 | 0 |
The IEEE standard single precision Big Endian representation is:
| 0 | 1 | ...
31 0
S E E E E E E E E F F F F F F F ...
Here, the "S" is the sign bit, "E"'s are the exponent bits,
and the "F"'s are the normalized fraction bits.
The IEEE standard floating point data types contain on sign bit,
an eight bit exponent field biased by 127, and a 23 bit fraction.
There are two reserved values, Nan (not a number), and infinity.
The VAX single precision floating point data type contains one
sign bit, an eight bit exponent biased by 128, and a 23 bit
normalized fraction. There is only on reserved value for the VAX,
reserved operand fault. The sign bit is bit number 15, bits 7
through 14 contain the exponent, and the remaining bits contain
the normalized fraction.
The IEEE standard double precision data types contain one sign
bit, an eleven bit exponent, biased by 1023, and a 52 bit
normalized fraction. The bit ordering within the bytes is
similar to that of single precision.
The VAX d-floating double precision floating point representation
contain one sign bit, an 8 bit exponent biased by 128, and a 55
55 bit normalized fraction. Again, the sign bit is bit 15, and
the exponent is contained in bits 7 through 14.
The same reserved values occur in double precision.
tested with IDL Version 2.1.2 (sunos sparc) 14 Oct 91
tested with IDL Version 2.1.2 (ultrix mipsel) 14 Oct 91
tested with IDL Version 2.2.0 (ultrix vax) 14 Oct 91
tested with IDL Version 2.1.2 (vms vax) 14 Oct 91
*RESTRICTIONS:
Converting the byte representation of a floating point or double
precision number to floating point or double precision type on a
CPU for which the byte representation was not intended may cause
conflicts with reserved values (i.e. NaN, infinity, or reserved
operand faults), resulting in corrupted data.
*EXAMPLE:
*MODIFICATION HISTORY:
Version 1 of vtos.pro By John Hoegy 13-Jun-88
27-Oct-89 - GD: Slightly modified program vtos.pro according
to suggestions by RWT.
5/30/90 RWT merge vtos and vtod to create vtou
1/25/90 GRA Modified vtou to enable transfers between VMS, ULTRIX
and SunOs systems.
3/18/91 GRA Renamed vtou to TRANS_BYTES.
3/28/91 PJL added PARCHECK
4/24/91 RWT add support for DOS
6/24/91 GRA cleaned up
7/26/91 RWT add cpupar=0 option for no conversion
10/8/91 GRA globally changed all references to "syspar" to "cpupar",
changed cpupar to reference machine architecture as
defined by !version.arch; tested on sunos/sparc,
ultrix/mipsel, ultrix/vax, and vms/vax.
(See /host/bluemoon/usr2/idllib/contrib/icur/addheliocor.pro)
vmedian vector median filter routine CALLING SEQUENCE: vmedian,in,width,out INPUTS: in - input vector width - filter width (should be odd) OUTPUTS: out - output median filtered vector. unfiltered end points are replaced with closest filtered point. HISTORY version 1. D. Lindler Mar 89
(See /host/bluemoon/usr2/idllib/contrib/icur/addheliocor.pro)
************************************************************* RO ADDLINE,WAVE,FLUX,lam,sig,tf,helpme=helpme ; ADD LINE TO FLUX VECTOR
(See /host/bluemoon/usr2/idllib/contrib/icur/addline.pro)
***************************************************************************** RO ADDRED,IM,WAVE,FLUX,EBMV,trans ; CORRECT FOR INTERSTELLAR EXTINCTION TAKEN FROM [210,021]NUNRED.PRO 4/5/83 IM=0,-1 FOR UNRED
(See /host/bluemoon/usr2/idllib/contrib/icur/addred.pro)
************************************************************************** ro addsp,file,h0,w,f0,e0,prlog=prlog,debug=debug
(See /host/bluemoon/usr2/idllib/contrib/icur/addsp.pro)
************************************************************************** ro addspec,w,f,w1,f1,e0,w0,f0
(See /host/bluemoon/usr2/idllib/contrib/icur/addspec.pro)
**************************************************************** ro addspwl,h0,w0,lam1,lam2,dl,krange ;get wavelength limits
(See /host/bluemoon/usr2/idllib/contrib/icur/addspwl.pro)
********************************************************* RO AMOD,A,ISHAPE *********************************************************
(See /host/bluemoon/usr2/idllib/contrib/icur/amod.pro)
**************************************************************************** ro appendicd,file1,file0
(See /host/bluemoon/usr2/idllib/contrib/icur/appendicd.pro)
*********************************************************************** unction avbad,f1,e,kk,bad=bad ;expunge bad data points
(See /host/bluemoon/usr2/idllib/contrib/icur/avbad.pro)
******************************************* unction AVerageSPEC,FILE,i1,i2,w,save=save,helpme=helpme,noweight=noweight
(See /host/bluemoon/usr2/idllib/contrib/icur/averagespec.pro)
********************************************************************** unction avspt,f,e,kk,bad=bad ;find single point zeros in IUEHI file and remove
(See /host/bluemoon/usr2/idllib/contrib/icur/avspt.pro)
**************************************** ro bargraph,x,y,ynz=ynz,stp=stp
(See /host/bluemoon/usr2/idllib/contrib/icur/bargraph.pro)
*********************************************************************** RO BBODY,W,F,EPS,temp=temp ; COMPUTE AND OVERPLOT BLACK BODY SPECTRUM
(See /host/bluemoon/usr2/idllib/contrib/icur/bbody.pro)
******************************************************** RO BDATA,h,X,W,F,E,BW,BF,BDF,V ; SET BAD DATA VECTOR
(See /host/bluemoon/usr2/idllib/contrib/icur/bdata.pro)
************************************************************************** ro bell,number,nmax=nmax
(See /host/bluemoon/usr2/idllib/contrib/icur/bell.pro)
*************************************************************************** ro bigplot,id,w,f,e,bw,bf ; PLOT MULTIPLE SPECTRAL REGIONS vax version
(See /host/bluemoon/usr2/idllib/contrib/icur/bigplot.pro)
*********************************************************** ro bits,inp
(See /host/bluemoon/usr2/idllib/contrib/icur/bits.pro)
***************************************************************** RO BLOWUP,I,prt=prt,readout=readout ; PROCEDURE TO EXPAND PLOT I=-1 FOR CURSOR CALL I=0 FOR COMPLETE BLOWUP I=1 FOR X ONLY I=2 FOR Y ONLY
(See /host/bluemoon/usr2/idllib/contrib/icur/blowup.pro)
************************************************************* RO CENTRD,WAVE,FLUX,YD,I1,I2,XCEN,FD ;CENTROID input I1,I2 in bins output xcen in units of wave
(See /host/bluemoon/usr2/idllib/contrib/icur/centrd.pro)
***************************************************************** ro checklim,f,lam1,lam2,e
(See /host/bluemoon/usr2/idllib/contrib/icur/checklim.pro)
************************************************************** ro check_stdfile
(See /host/bluemoon/usr2/idllib/contrib/icur/check_stdfile.pro)
************************************************************************* unction chisq,y,dy,model return chi-square value
(See /host/bluemoon/usr2/idllib/contrib/icur/chisq.pro)
*************************************************** ro chlo,infile,outfile,r1,r2 ;change iue low dispersion format 0 to format 8
(See /host/bluemoon/usr2/idllib/contrib/icur/chlo.pro)
************************************************************************ ro chtitle,file,rec,title,helpme=helpme
(See /host/bluemoon/usr2/idllib/contrib/icur/chtitle.pro)
*********************************************** ro cleanspec,file,rec,helpme=helpme,stp=stp,autosave=autosave
(See /host/bluemoon/usr2/idllib/contrib/icur/cleanspec.pro)
***************************************************************************** ro closeall,dum
(See /host/bluemoon/usr2/idllib/contrib/icur/closeall.pro)
**********************************************************************
RO COADD,W,F,E,nbin,error=error,wave=wave,helpme=helpme
;COADD DATA INTO COARSER BINS
(See /host/bluemoon/usr2/idllib/contrib/icur/coadd.pro)
**************************************************************************** ro combine,infile,inrec,outfile,outrec,average=average,noscale=noscale, $
(See /host/bluemoon/usr2/idllib/contrib/icur/combine.pro)
************************************************************************** RO CONTFL,file,RECS,wmin,wmax,fluxes,out=out,helpme=helpme,stp=stp,plt=plt, $
(See /host/bluemoon/usr2/idllib/contrib/icur/contfl.pro)
*********************************************************************** ro corrflux,file,rec,w0def=w0def,nosave=nosave,ffx=ffx,helpme=helpme, $
(See /host/bluemoon/usr2/idllib/contrib/icur/corrflux.pro)
****************************************************************** unction corrflux1,w,f called by CORRFLUX
(See /host/bluemoon/usr2/idllib/contrib/icur/corrflux1.pro)
****************************************************************** unction corrflux2,w,f called by FUDGEFLUX
(See /host/bluemoon/usr2/idllib/contrib/icur/corrflux2.pro)
************************************************************************* ro createfile,name
(See /host/bluemoon/usr2/idllib/contrib/icur/createfile.pro)
************************************************************************** ro crosscor,w1,f10,w2,f20,dw,xc,logl,cut,a,debug=stp,excl=badlam, $
(See /host/bluemoon/usr2/idllib/contrib/icur/crosscor.pro)
************************************************************************ ro ctit,h,nch,newt ;change title (words 100-159) in header
(See /host/bluemoon/usr2/idllib/contrib/icur/ctit.pro)
********************************************************************* ro cutgaps,h,w,f,e,ngap,wgap1,wgap2
(See /host/bluemoon/usr2/idllib/contrib/icur/cutgaps.pro)
(See /host/bluemoon/usr2/idllib/contrib/icur/cwhere.pro)
****************************************************************************** ro dat_to_icd,in,recs,out=out,maxrec=maxrec,helpme=helpme,notitle=notitle
(See /host/bluemoon/usr2/idllib/contrib/icur/dat_to_icd.pro)
********************************************************************** unction deconv_ghrs,w,f,grat,psf_file=psf_file
(See /host/bluemoon/usr2/idllib/contrib/icur/deconv_ghrs.pro)
************************************************************************ RO DEGRADE,W,F,E,BW,BF ; DEGRADE IUE HI-RES DATA INTO LO-RES DATA W,F,E ARE OVERWRITTEN, AND IDAT IS SET TO 0 (LO-RES)
(See /host/bluemoon/usr2/idllib/contrib/icur/degrade.pro)
************************************************************************* ro DEGtoDMS,d,dd,dm,ds,prt=prt,nsigfig=nsigfig
(See /host/bluemoon/usr2/idllib/contrib/icur/degtodms.pro)
************************************************************************* ro DEGtoHMS,a,h,m,s,prt=prt,nsigfig=nsigfig
(See /host/bluemoon/usr2/idllib/contrib/icur/degtohms.pro)
******************************************************************* RO deltamag,file,recs,w0,dw1,dw2,prt=prt
(See /host/bluemoon/usr2/idllib/contrib/icur/deltamag.pro)
********************************************************************** unction dmstodeg,d,dm,ds
(See /host/bluemoon/usr2/idllib/contrib/icur/dmstodeg.pro)
*************************************************************** RO DND,H,WAVE,FLUX ; DIVIDE BY ND RESPONSE
(See /host/bluemoon/usr2/idllib/contrib/icur/dnd.pro)
************************************************************************ unction dqcheck,fin,eps,q ;check data quality and censor at level q
(See /host/bluemoon/usr2/idllib/contrib/icur/dqcheck.pro)
***************************************************** ro drlin,w,ls=ls,COLOR=COLOR,vertical=vertical,helpme=helpme ; PROCEDURE DRLIN TO DRAW LINE AT LEVEL W
(See /host/bluemoon/usr2/idllib/contrib/icur/drlin.pro)
**************************************************************** unction ebyte,e
(See /host/bluemoon/usr2/idllib/contrib/icur/ebyte.pro)
************************************************************************** unction eqwid,w,f,lamcen,dl,b1,b2,db1,db2,stp=stp ;estimate equivalent widths
(See /host/bluemoon/usr2/idllib/contrib/icur/eqwid.pro)
************************************************************************* RO ERBAR,IXY,a1,a2,a3,a4,a5,a6,color=color,helpme=helpme ixy=1 (X), 2 (Y), 3 (X+Y)
(See /host/bluemoon/usr2/idllib/contrib/icur/erbar.pro)
************************************************************************** unction ERRDIV,X0,DX0,Y0,DY0,print=print,unc=unc
(See /host/bluemoon/usr2/idllib/contrib/icur/errdiv.pro)
NAME:
EULER
PURPOSE:
Transform between galactic, celestial, and ecliptic coordinates.
Use the procedure ASTRO to use this routine interactively
CALLING SEQUENCE:
EULER,AI,BI,AO,BO,[SELECT]
INPUTS:
AI - Input Longitude in DEGREES, scalar or vector. If only two parameters
are supplied, then AI and BI will be modified to contain the output
longitude and latitude.
BI - Input Latitude in DEGREES
OPTIONAL INPUT:
SELECT - Integer (1-6) specifying type of coordinate transformation.
SELECT From To | SELECT From To
1 RA-DEC(1950) GAL.(ii) | 4 ECLIPTIC RA-DEC
2 GAL.(ii) RA-DEC | 5 ECLIPTIC GAL.(ii)
3 RA-DEC ECLIPTIC | 6 GAL.(ii) ECLIPTIC
If omitted, program will prompt for the value of SELECT
OUTPUTS:
AO - Output Longitude in DEGREES
BO - Output Latitude in DEGREES
REVISION HISTORY:
Written W. Landsman, February 1987
Adapted from Fortran by Daryl Yentis NRL
(See /host/bluemoon/usr2/idllib/contrib/icur/addheliocor.pro)
NAME:
EULER
PURPOSE:
Transform between galactic, celestial, and ecliptic coordinates.
Use the procedure ASTRO to use this routine interactively
CALLING SEQUENCE:
EULER,AI,BI,AO,BO,[SELECT]
INPUTS:
AI - Input Longitude in DEGREES, scalar or vector. If only two parameters
are supplied, then AI and BI will be modified to contain the output
longitude and latitude.
BI - Input Latitude in DEGREES
OPTIONAL INPUT:
SELECT - Integer (1-6) specifying type of coordinate transformation.
SELECT From To | SELECT From To
1 RA-DEC(1950) GAL.(ii) | 4 ECLIPTIC RA-DEC
2 GAL.(ii) RA-DEC | 5 ECLIPTIC GAL.(ii)
3 RA-DEC ECLIPTIC | 6 GAL.(ii) ECLIPTIC
If omitted, program will prompt for the value of SELECT
OUTPUTS:
AO - Output Longitude in DEGREES
BO - Output Latitude in DEGREES
REVISION HISTORY:
Written W. Landsman, February 1987
Adapted from Fortran by Daryl Yentis NRL
(See /host/bluemoon/usr2/idllib/contrib/icur/euler.pro)
**************************************************************************** ro euvespec,lam,d,icd=icd,helpme=helpme,stp=stp,sw=sw,mw=mw,lw=lw, $
(See /host/bluemoon/usr2/idllib/contrib/icur/euvespec.pro)
***************************************************************************** RO EWLIM,file,w1,w2,iprt=iprt,iint=iint
(See /host/bluemoon/usr2/idllib/contrib/icur/ewlim.pro)
********************************************************************** ro ews,file,r1,r2
(See /host/bluemoon/usr2/idllib/contrib/icur/ews.pro)
************************************************************************** unction factorial,nn
(See /host/bluemoon/usr2/idllib/contrib/icur/factorial.pro)
******************************************************************* UNCTION FCHISQ,nfree,y,yfit,weight called by FFIT2 returns chi-2 value
(See /host/bluemoon/usr2/idllib/contrib/icur/fchisq.pro)
************************************************************************ ro ffCFIT,NTR,Mode,chisq,iflag,cii=cii called by ffit2 C** CFIT - FORMERLY FWCFIT C** CALLED BY FFIT; CALLS FFCURFIT C** INPUTS: N=NUMBER OF POINTS C** NTR = NUMBER OF FREE PARAMETERS version of ffcfit to call fortran version of FFCURFIT
(See /host/bluemoon/usr2/idllib/contrib/icur/ffcfit.pro)
********************************************************************** ro FFCURFIT,Nfree,weight,FLAMDA,CHISQ1,IFLAG,cii=cii called by ffcfit in ffit2 C** CURFIT FROM BEVINGTON VIA FWCFIT C** TYPED IN 6/25/82 C** modified 7/2/84 to permit freezing of parameters, following C** M. Lampton's WHIZ algorithm
(See /host/bluemoon/usr2/idllib/contrib/icur/ffcurfit.pro)
*************************************************************************** ro fffitstat,chisq,iflag,bsca
(See /host/bluemoon/usr2/idllib/contrib/icur/fffitstat.pro)
*********************************************************************** ro fffixlines,ncam
(See /host/bluemoon/usr2/idllib/contrib/icur/fffixlines.pro)
************************************************************************* unction ffile,disk,direc,mfile,ext,notify=notify
(See /host/bluemoon/usr2/idllib/contrib/icur/ffile.pro)
**************************************************************************** ro FFINFLUX,igo called by FFIT2 determines integrated fluxes
(See /host/bluemoon/usr2/idllib/contrib/icur/ffinflux.pro)
**************************************************************************** ro ffit2,dtype,x1,y1,e1,A1,ifixt1,IB,NCAM,IMAGE,NSM,NIT,sigMODE,ihead, $
(See /host/bluemoon/usr2/idllib/contrib/icur/ffit2.pro)
************************************************************************ ro FFLPFW,dtype,NCAM,IGAUS,SMTH,lwid=lwid called by FFIT2 lists line parameters for gaussian lines lwid permits passing of line width in bins
(See /host/bluemoon/usr2/idllib/contrib/icur/fflpfw.pro)
*************************************************************************** ro FFSIGMA,im1,IB called by FFIT2 C** ROUTINE TO ESTIMATE ERRORS IN DATA and return variance C** MODE 1: 1 SIGMA = 1 STANDARD DEVIATION OF DATA C** MODE 2: ERROR PROPORTIONAL TO ROOT N C** MODE 3: ERROR CONSTANT AT LEVEL INPUT C** MODE 4: use E vector to estimate 1 sigma errors C** NEGATIVE MODE IGNORES ERROR FLAGS C** ERROR FLAGS TO BE DEALT WITH DEPENDING ON SEVERITY IN FUTURE C** MODIFIED 7/26 TO TAKE OUT LINEAR TREND IN DATA FOR VARIANCES C** INTERACTIVE INPUT UPDATED 11/7/85
(See /host/bluemoon/usr2/idllib/contrib/icur/ffsigma.pro)
******************************************************************* RO FFTSM,FLUX,MODE,IFSM,helpme=helpme MODE=0 IS INTERACTIVE, MODE=1 IS AUTOMATIC, WITH GAUSSIAN FILTER AND DEFAULT HALF-POWER POINT AT THE NYQUIST FREQUENCY
(See /host/bluemoon/usr2/idllib/contrib/icur/fftsm.pro)
************************************************************** ro figsym,i,fill,scale
(See /host/bluemoon/usr2/idllib/contrib/icur/figsym.pro)
************************************************************************** unction filtspec,flux,eps,smlen
(See /host/bluemoon/usr2/idllib/contrib/icur/filtspec.pro)
************************************************************************* RO FINDLIN,WAVE,disc,LEVEL=LEVEL,noid=noid,noquery=noquery,STP=STP PROCEDURE TO PRINT LINE LIST
(See /host/bluemoon/usr2/idllib/contrib/icur/findlin.pro)
******************************************************************* ro finter,w,w0,f0,e0 fast interpolation for w vectors with gaps w is vector w0 is interpolated to
(See /host/bluemoon/usr2/idllib/contrib/icur/finter.pro)
****************************************************************************** ro fits_icur,files,out=out,examine=examine,helpme=helpme,stp=stp,bins=bins, $
(See /host/bluemoon/usr2/idllib/contrib/icur/fits_icur.pro)
*********************************************************************** unction fixbadpts,vect,bad
(See /host/bluemoon/usr2/idllib/contrib/icur/fixbadpts.pro)
*********************************************************************** ro fLATflux,file,rec,w0=w0,ffx=ffx,add=add,all=all,stp=stp,helpme=helpme, $
(See /host/bluemoon/usr2/idllib/contrib/icur/flatflux.pro)
FMEDIAN : variant of Gmedian
*NAME:
GMEDIAN (General IDL Library 01) May 20, 1980
*CLASS:
Smoothing
*CATEGORY:
*PURPOSE:
To perform a median filter on an one-dimensional array. The type of the
array is not converted to BYTE (as in the IDL MEDIAN), but is left the
same as the input type.
*CALLING SEQUENCE:
out=GMEDIAN(IN,M)
*PARAMETERS:
IN (REQ) (I) (1) (I L F D)
Required input vector containing the data which are to be filtered.
If OUT is omitted from the calling sequence, the filtered data are
returned in IN.
M (REQ) (I) (0) (I)
Length of the median filter
OUT (OPT) (O) (1) (I L F D)
Output median-filtered vector.
*EXAMPLE:
To median filter a data vector BKG:
GMEDIAN,BKG,63,FBKG ;63 point filter
*SYSTEM VARIABLES USED:
None.
*INTERACTIVE INPUT:
None.
*SUBROUTINES CALLED:
PARCHECK
*FILES USED:
IUER_USERDATA:GMEDIAN.TMP -temporary scratch data set
*SIDE EFFECTS:
You may not execute this procedure from two or more simultaneous
sessions in your account. There will be conflicts over the .TMP
file.
*RESTRICTIONS:
None
*NOTES:
Fortran Task IUER_SOFTDISK:[IUERDAF.PRODUCTION]GMEDIAN.EXE is
called to do the median filter.
The fortran task forces the filter with to be odd.
Widths less than 2 result in no filtering.
The data array is truncated to 4096 points in length.
The first and last M/2 points are copied from the
input to the output arrays with no filtering.
*PROCEDURE:
The length of the filter and the input array are copied
to a temporary file GMEDIAN.TMP and the task GMEDIAN.EXE
called.
For I = M/2 to N - M/2 - 1 where N is the length
of IN the median is computed by:
OUT(I) = Median value of (IN(J),J=I-M/2 to I+M/2)
Points for I=0, M/2 - 1 and I=N-M/2,N OUT(I) = IN(I)
The fortran task writes the sizes and the filtered results
to the file GMEDIAN.TMP and exits with a stop.
The procedure reads the lengths and the filtered results.
If errors arose, a message is output.
*MODIFICATION HISTORY:
Jul 31 1980 D. Lindler initial version
Sep 13 1982 FHS3 GSFC CR#047 increase vector sizes to 4096 points.
Apr 15 1985 RWT GSFC name changed to GMEDIAN to make routine
compatible with XIDL.
Jun 8 1987 RWT GSFC add PARCHECK, use N_ELEMENTS, and make OUT
optional.
Jun 22 1987 RWT GSFC fix error with N not being defined
Mar 10 1988 CAG GSFC add VAX RDAF-style prolog, and print
statement if the procedure is executed
without parameters.
(See /host/bluemoon/usr2/idllib/contrib/icur/fmedian.pro)
************************************************************************** unction fmedn,vector
(See /host/bluemoon/usr2/idllib/contrib/icur/fmedn.pro)
***************************************************************************** RO FOLD,IP,X,W,F,F1 ; FOLD DATA ON ITSELF, PMNT SMOOTHING
(See /host/bluemoon/usr2/idllib/contrib/icur/fold.pro)
*********************************************************************8 RO FTOT,IM,WAVE,FLUX,output,nonorm=nonorm ; SUM TOTAL FLUX IM=0 FOR TOTAL FLUX IM=1 FOR MEAN IM=2 FOR CENTROID, CURSOR POSITION IM=3,4 FOR LINEAR INTERPOLATION
(See /host/bluemoon/usr2/idllib/contrib/icur/ftot.pro)
*********************************************************************** ro fudgeflux,file,rec,w0=w0,ffx=ffx,add=add,all=all,stp=stp,helpme=helpme,dw=dw
(See /host/bluemoon/usr2/idllib/contrib/icur/fudgeflux.pro)
****************************************************************** RO FUN1,WAVE,FLUX,EPS,W1,F1,E1 ; ICUR LOOP 2 VAX Version 1.0 8/29/86 CURSOR COMMANDS: A: PLOT ALL DATA a: ADD A LINE TO THE DATA B: BLOWUP PLOT b: REDEFINE BAD DATA C: COMPUTE CENTROID OF FEATURE c: COADD BINS D: INDICATE BAD DATA (SAME AS R) d: DIVIDE FLUX BY ND FUNCTION E: GET EQUIVALENT WIDTHS e: DIVIDE F1 BY ND FUNCTION F: ENTER ICFIT TO FIT LINES f: identify lines G: MANUALLY SHIFT SECOND DATA SET g: get new comparison from .STD file H: h: I: INITIALIZE SCREEN i: PERFORM LINEAR INTERPOLATION J: JUMP IN X DIRECTION j: LINEAR INTERPOLATION K: SAVE DATA ON GENERIC DISK FILES k: DIVIDE F BY ND FUNCTION L: LOCATE WAVELENGTH USING CURSOR M: PLOT MEAN BETWEEN LIMITS m: CALL FUN2 N: RESET !Y.RANGE TO 0. O: OVERPLOT SECOND DATA SET o: OVERWRITE INPUT VECTOR P: TOGGLE !P.PSYM 0<_>10 p: PRINT STATUS Q: QUIT R: REPLOT, WITH CURRENT NSM r: ROTATIONAL BROADENING (#2 only) S: SMOOTH DATA s: GAUSSIAN SMOOTHING T: SUM TOTAL FLUX t: OPLOT BLACK BODY U: SCALE F1 TO FLUX u: UNREDDEN DATA V: LOCATE AND EXPAND PLOT W: RETURN WAVELENGTH AND FLUX X: EXPAND IN X DIRECTION x: RESET EPSILON VALUE TO -1111 Y: EXPAND IN Y DIRECTION Z: PAUSE z: ZERO BAD FLUX VECTOR +: ADD DATA -: FLUX-F1 *: FLUX*F1 /: FLUX/F1 %: PLOT FRACTION &: ADD ONLY GOOD DATA 0: DRAW ZERO LINE 1: DRAW LINE AT Y=1 2: HALVE FLUX !: TOGGLE DEVICE 'X' <-> PS 5: (FLUX-F1)/F1 ?: LIST CURSOR COMMANDS
(See /host/bluemoon/usr2/idllib/contrib/icur/fun1.pro)
************************************************************************* RO FUN2,WAVE,FLUX,EPS,BADW,BADF,F1 ; ICUR LOOP 3 vax version 1.0 8/19/86 CURSOR COMMANDS: A: PLOT ALL DATA a: ADD A LINE TO THE DATA B: BLOWUP PLOT b: REDEFINE BAD DATA C: COMPUTE CENTROID OF FEATURE c: COADD BINS D: INDICATE BAD DATA (SAME AS R) E: GET EQUIVALENT WIDTHS e: RESTORE EPS VECTOR F: ENTER ICFIT TO FIT LINES f: LINE IDENTIFICATIONS G: FOLD DATA g: MULTIPLE SUM/CONCATENATION H: h: update current record I: INITIALIZE SCREEN i: LINEAR INTERPOLATION ,X ONLY J: JUMP IN X DIRECTION; j: LINEAR INTERP W BOTH X,Y GIVEN K: SAVE DATA ON GENERIC DISK FILES k: PERMANENTLY SMOOTH FLUX L: LOCATE WAVELENGTH USING CURSOR M: PLOT MEAN BETWEEN LIMITS N: RESET !Y.RANGE TO 0. O: OVERPLOT FOLDED DATA o: OVERWRITE INPUT W/CURRENT VECTORS P: TOGGLE !P.PSYM 0<->10 p: PRINT CURRENT STATUS Q: QUIT R: REPLOT, WITH CURRENT NSM r: ROTATIONAL BROADENING S: SMOOTH DATA s: GAUSSIAN SMOOTHING T: SUM TOTAL FLUX t: CHANGE TITLE U: FLUX HIGH RESOLUTION DATA u: UNREDDEN DATA V: LOCATE AND EXPAND PLOT v: CHANGE WAVE VECTOR TO VELOCITY W: RETURN WAVELENGTH AND FLUX w: RESTORE WAVE VECTOR X: EXPAND IN X DIRECTION x: RESET EPSILON VALUE TO -1111 Y: EXPAND IN Y DIRECTION y: CHANGE FLUX VECTOR UNITS Z: STOP 0: DRAW ZERO LINE 1: DRAW LINE AT UNIT VALUE 2: HALVE F VECTOR +-*/&%: AS IN FUNCTION ?: LIST CURSOR COMMANDS
(See /host/bluemoon/usr2/idllib/contrib/icur/fun2.pro)
********************************************************************* RO FUN3,IM,IND,X1,INP,OUTP ; AXIS UNIT, TITLE CHANGES
(See /host/bluemoon/usr2/idllib/contrib/icur/fun3.pro)
**************************************************************************** UNCTION FUNGUS,x,F,cii=cii returns UP TO 5 GAUSSIAN LINES + QUADRATIC BACKGROUND
(See /host/bluemoon/usr2/idllib/contrib/icur/fungus.pro)
************************************************************* ro FWHM,WAVE,FLUX,fw ; return full width at half max
(See /host/bluemoon/usr2/idllib/contrib/icur/fwhm.pro)
********************************************************************** UNCTION gauslin,X,a,nline returns shape of individual line nline runs 1 through 5
(See /host/bluemoon/usr2/idllib/contrib/icur/gauslin.pro)
********************************************************************** ro gc,k,rr,gg,bb,helpme=helpme,full=full,stp=stp
(See /host/bluemoon/usr2/idllib/contrib/icur/gc.pro)
************************************************************** RO GDAT,name,H,WAVE,FLUX,EPS,REC,linear=linear,zrec0=zrec0,stp=stp, $
(See /host/bluemoon/usr2/idllib/contrib/icur/gdat.pro)
*********************************************************************** unction GDERIV,x,a ;COMPUTES DERIVATIVE FOR FUNCTION IN FUNGUS
(See /host/bluemoon/usr2/idllib/contrib/icur/gderiv.pro)
*************************************************************** RO GETDAT,IDT0,H1,W1,F1,E1,REC,NAME ;GET DATA FROM DISK
(See /host/bluemoon/usr2/idllib/contrib/icur/getdat.pro)
******************************************************************** unction getfilelist,name,direc,noversion=noversion,noext=noext, $
(See /host/bluemoon/usr2/idllib/contrib/icur/getfilelist.pro)
**************************************************************************** ro getsun,w,f,lam=lam,bin=bin,stp=stp,plt=plt
(See /host/bluemoon/usr2/idllib/contrib/icur/getsun.pro)
******************************************************************** unction getval,l0,zh0,missing, $
(See /host/bluemoon/usr2/idllib/contrib/icur/getval.pro)
***************************************************************************** unction get_arrval,arr
(See /host/bluemoon/usr2/idllib/contrib/icur/get_arrval.pro)
**************************************************************************** unction get_ext,file
(See /host/bluemoon/usr2/idllib/contrib/icur/get_ext.pro)
********************************************************************* unction get_ffl,name,stp=stp
(See /host/bluemoon/usr2/idllib/contrib/icur/get_ffl.pro)
********************************************************************* unction get_ffx,name,w0,stp=stp
(See /host/bluemoon/usr2/idllib/contrib/icur/get_ffx.pro)
****************************************************************** unction get_idat,file
(See /host/bluemoon/usr2/idllib/contrib/icur/get_idat.pro)
***************************************************************************** unction get_nspec,file,recs,helpme=helpme
(See /host/bluemoon/usr2/idllib/contrib/icur/get_nspec.pro)
****************************************************************** unction get_scrsize,prt=prt
(See /host/bluemoon/usr2/idllib/contrib/icur/get_scrsize.pro)
*************************************************************************** unction get_spt,title
(See /host/bluemoon/usr2/idllib/contrib/icur/get_spt.pro)
************************************************************************** unction get_title,h,inm
(See /host/bluemoon/usr2/idllib/contrib/icur/get_title.pro)
************************************************************************** unction ghrsicurhead,ihf,flux,log,t0,stp=stp ;make icur-style header ihf: GHRS header vector flux: GHRS flux vector log: FITS log t0: optional title h: output vector
(See /host/bluemoon/usr2/idllib/contrib/icur/ghrsicurhead.pro)
*************************************************************************** ro ghrstoicur,file,h,nw,f,sn,rec,outfil=outfil,type=type,ddlink=ddlink, $
(See /host/bluemoon/usr2/idllib/contrib/icur/ghrstoicur.pro)
*NAME:
GMEDIAN (General IDL Library 01) May 20, 1980
*CLASS:
Smoothing
*CATEGORY:
*PURPOSE:
To perform a median filter on an one-dimensional array. The type of the
array is not converted to BYTE (as in the IDL MEDIAN), but is left the
same as the input type.
*CALLING SEQUENCE:
GMEDIAN,IN,M,OUT
*PARAMETERS:
IN (REQ) (I) (1) (I L F D)
Required input vector containing the data which are to be filtered.
If OUT is omitted from the calling sequence, the filtered data are
returned in IN.
M (REQ) (I) (0) (I)
Length of the median filter
OUT (OPT) (O) (1) (I L F D)
Output median-filtered vector.
*EXAMPLE:
To median filter a data vector BKG:
GMEDIAN,BKG,63,FBKG ;63 point filter
*SYSTEM VARIABLES USED:
None.
*INTERACTIVE INPUT:
None.
*SUBROUTINES CALLED:
PARCHECK
*FILES USED:
IUER_USERDATA:GMEDIAN.TMP -temporary scratch data set
*SIDE EFFECTS:
You may not execute this procedure from two or more simultaneous
sessions in your account. There will be conflicts over the .TMP
file.
*RESTRICTIONS:
None
*NOTES:
Fortran Task IUER_SOFTDISK:[IUERDAF.PRODUCTION]GMEDIAN.EXE is
called to do the median filter.
The fortran task forces the filter with to be odd.
Widths less than 2 result in no filtering.
The data array is truncated to 4096 points in length.
The first and last M/2 points are copied from the
input to the output arrays with no filtering.
*PROCEDURE:
The length of the filter and the input array are copied
to a temporary file GMEDIAN.TMP and the task GMEDIAN.EXE
called.
For I = M/2 to N - M/2 - 1 where N is the length
of IN the median is computed by:
OUT(I) = Median value of (IN(J),J=I-M/2 to I+M/2)
Points for I=0, M/2 - 1 and I=N-M/2,N OUT(I) = IN(I)
The fortran task writes the sizes and the filtered results
to the file GMEDIAN.TMP and exits with a stop.
The procedure reads the lengths and the filtered results.
If errors arose, a message is output.
*MODIFICATION HISTORY:
Jul 31 1980 D. Lindler initial version
Sep 13 1982 FHS3 GSFC CR#047 increase vector sizes to 4096 points.
Apr 15 1985 RWT GSFC name changed to GMEDIAN to make routine
compatible with XIDL.
Jun 8 1987 RWT GSFC add PARCHECK, use N_ELEMENTS, and make OUT
optional.
Jun 22 1987 RWT GSFC fix error with N not being defined
Mar 10 1988 CAG GSFC add VAX RDAF-style prolog, and print
statement if the procedure is executed
without parameters.
(See /host/bluemoon/usr2/idllib/contrib/icur/gmedian.pro)
************************************************************ ro gnd,h,wave,flux,eps,flag,recno,badw,badf,reset=reset
(See /host/bluemoon/usr2/idllib/contrib/icur/gnd.pro)
******************************************************************* ro goicur,dum ; IDL version 2 version of ICUR
(See /host/bluemoon/usr2/idllib/contrib/icur/goicur.pro)
************************************************************************** RO HBIN,WAVE,FLUX,EPS,F1,E1,E ; SHIFT WAVELENGTH WITH HALF BINS
(See /host/bluemoon/usr2/idllib/contrib/icur/hbin.pro)
****************************************************************** RO HDLST,IAR ;HELP LISTING OF CURSOR COMMANDS VAX VERSION 1.0 8/15/86 IAR = 0,1 FOR ICUR (1 FOR KPNO DATA, 0 FOR IUE DATA) IAR = 2 FOR FUN1 IAR = 3 FOR FUN2
(See /host/bluemoon/usr2/idllib/contrib/icur/hdlst.pro)
********************************************************************* ro heliocor,mode,vhel,vlsr,tdel,x,obslat=obslat,ra=ra,dec=dec,utdat=utdat, $
(See /host/bluemoon/usr2/idllib/contrib/icur/heliocor.pro)
************************************************************************** ro hxcor,file,hv,records=records,template=template,wavelength=wavelength, $
(See /host/bluemoon/usr2/idllib/contrib/icur/hxcor.pro)
*************************************************************************** ro iauclist,year,month,month2,stp=stp,out=out,mpec=mpec,helpme=helpme
(See /host/bluemoon/usr2/idllib/contrib/icur/iauclist.pro)
************************************************************** RO IBIT,V,N,I ; insert/toggle INDIVIDUAL BITS V IS INPUT INTEGER N is bit to insert value I into I=0,1 to insert, other to toggle
(See /host/bluemoon/usr2/idllib/contrib/icur/ibit.pro)
****************************************************************************** unction icbconv,orig
(See /host/bluemoon/usr2/idllib/contrib/icur/icbconv.pro)
************************************************************************ RO iccor,im,w0,fa,wb,fb,hb,a,NP=NP,flat=flat,delay=delay,NOSMOOTH=NOSMOOTH, $
(See /host/bluemoon/usr2/idllib/contrib/icur/iccor.pro)
************************************* unction icdcts,file,stp=stp,helpme=helpme
(See /host/bluemoon/usr2/idllib/contrib/icur/icdcts.pro)
******************************************************************** ro icdfile,file,nr,etype,nl,stp=stp
(See /host/bluemoon/usr2/idllib/contrib/icur/icdfile.pro)
*********************************************************************** unction icdtitle,file,rec,helpme=helpme
(See /host/bluemoon/usr2/idllib/contrib/icur/icdtitle.pro)
**************************************************************************** unction icd_nrec,file
(See /host/bluemoon/usr2/idllib/contrib/icur/icd_nrec.pro)
**************************************************************************** ro icd_to_ascii,file,rec,out=out,helpme=helpme
(See /host/bluemoon/usr2/idllib/contrib/icur/icd_to_ascii.pro)
*********************************************************************** ro icd_to_cat,file,catfile=catfile,stp=stp,helpme=helpme,epoch=epoch
(See /host/bluemoon/usr2/idllib/contrib/icur/icd_to_cat.pro)
****************************************************************************** ro icd_vtou,file,helpme=helpme,debug=debug,stp=stp
(See /host/bluemoon/usr2/idllib/contrib/icur/icd_vtou.pro)
*************************************************************
RO ICFIT,WAVE,F0,EPS
VAX version 2.0 7/17/87
INPUT PARAMETERS:
H=HEADER RECORD
WAVE=WAVELENGTH VECTOR
FLUX=FLUX VECTOR
EPS= ERROR VECTOR
VERSION 2 PERMITS LASER PLOTS OF FITTED OUTPUT
(See /host/bluemoon/usr2/idllib/contrib/icur/icfit.pro)
************************************************************* RO ICFIT2,WAVE,F0,EPS,params,psdel=psdel,batch=batch,iplot=iplot,cii=cii, $
(See /host/bluemoon/usr2/idllib/contrib/icur/icfit2.pro)
*************************************************************
RO ICFIT3,h,WAVE,F0,EPS,params,ihlp,hcpy=hcpy,batch=batch
VAX version 2.0 7/17/87
version 3 - runs with IDL version of ffit2
version 3: generalized input; called by analxcor
INPUT PARAMETERS:
H=HEADER RECORD
WAVE=WAVELENGTH VECTOR
FLUX=FLUX VECTOR
EPS= ERROR VECTOR
keyword batch to skip displays
VERSION 2 PERMITS LASER PLOTS OF FITTED OUTPUT
to access options at end of fit, !verbose must be >0
(See /host/bluemoon/usr2/idllib/contrib/icur/icfit3.pro)
************************************************************* RO ICFIT4,h,WAVE,F0,EPS,params,ifx,debug=debug,helpme=helpme, $
(See /host/bluemoon/usr2/idllib/contrib/icur/icfit4.pro)
************************************************************* RO ICFITauto,WAVE,F0,EPS,params,psdel=psdel,batch=batch,iplot=iplot, $
(See /host/bluemoon/usr2/idllib/contrib/icur/icfitauto.pro)
********************************************************************* ro icsave,id,file ;save/restore fit parameters
(See /host/bluemoon/usr2/idllib/contrib/icur/icsave.pro)
**********************************************************************
RO ICUR,HH,WAVE,FLUX,EPS,helpme=helpme ; ICUR.PRO - VERSION ICUR_V2
VAX VERSION 1.0 8/19/86
version 2.0 8/17/87
COPIED FROM PDP VERSION 7.3
CURSOR COMMANDS:
A: PLOT ALL DATA a: ADD A LINE TO THE DATA
B: BLOW UP PLOT b: FLAG BAD DATA ;toggle to oplot Xs
C: COMPUTE CENTROID c: COADD BINS
D: PLOT W/BAD DATA d: IUE HI->LO, /KPNO ND function, deconv GHRS
E: GET EQUIVALENT WIDTHS e: FFT smoothing
F: FIT DATA f: LIST LINES FROM LINELIST
G: RETRIEVE DATA FROM DISK g: RETRIEVE DATA FROM STANDARD FILE
H: restore saved vectors h: FFT smooth second spectrum
I: INITIALIZE SCREEN i: PERFORM LINEAR INTERPOLATION
J: JUMP X POSITION j: LINEAR INTERPOLATION WITH Y SPECIFIED
K: SAVE DATA TO DISK FILES k: AUTO CORRELATION
L: LOCATE WAVELENGTH l: LIST CONTENTS OF GENERIC FILE
M: PLOT MEAN and compute s/n m: CALL FUN2
N: RESET !Y.RANGE TO 0. n: normalize data
O: OVERPLOT SECOND spectrum o: reset NDAT=0
P: toggle !P.PSYM 0<->10 p: print current status
Q: QUIT q: quit
R: Revise name of OBJFILE r: ROTATIONALLY BROADEN DATA
S: SMOOTH DATA s: SMOOTH WITH A GAUSSIAN
T: SUM TOTAL FLUX t: OVERPLOT BLACK BODY
U: CALL FUN1 u: UNREDDEN DATA
V: LOCATE AND plot v: FWHM
W: CURSOR POSITION w: CWHERE
X: EXPAND IN X DIRECTION x: RESET EPSILON VECTOR TO -1111
Y: EXPAND IN Y DIRECTION y: Filter spectrum
Z: PAUSE z: ZERO BADF VECTOR
0: DRAW ZERO LEVEL
ESC: READ NEW DATA FROM GENERIC DISK FILE
#: smooth second vector $: call USERPRO
?: LIST CURSOR COMMANDS
[: EXPAND PLOT BY 2 times -: disable autoscaling in FUN1
;: plot next record !: toggle PLOT device 'X'<-> 'PS'
` toggle big to little TVwindow
Flag VARIABLES: VAR1 - INCREMENTED BY ICFIT
VAR2 - 1 TO LIST MEASUREMENTS
VAR3 - bit 0=1 TO FORGO AUTOSCALING
bit 1=1 to smooth only second spectrum
bit 2=1 to turn off autoscaling in FUN1
bit 3=1 to set \YNOZERO in plot
bit 4=1 to turn off all legends and captions in plot
bit 5=1 if ysing default yfit for % command
bdf - bad data flag
cursor timing problem solved 7/10/87
(See /host/bluemoon/usr2/idllib/contrib/icur/icur.pro)
********************************************************************** unction icurjd,head
(See /host/bluemoon/usr2/idllib/contrib/icur/icurjd.pro)
******************************************************************* ro icursetup,goicur=goicur ;set up commons for ICUR icur_go.pro IDL version 2 version of ICUR
(See /host/bluemoon/usr2/idllib/contrib/icur/icursetup.pro)
********************************************************************** ro icurspc,h,w,f,e read .SPC data file and create ICUR vectors
(See /host/bluemoon/usr2/idllib/contrib/icur/icurspc.pro)
****************************************************************** ro icurspfilt,inp,recs,helpme=helpme,debug=debug
(See /host/bluemoon/usr2/idllib/contrib/icur/icurspfilt.pro)
icurstartup_v2
(See /host/bluemoon/usr2/idllib/contrib/icur/icurstartup_v2.pro)
************************************* GHRS IDL (VERSION 2) STARTUP FILE IDL_V2_STARTUP.PRO ************************************* Terminal interface
(See /host/bluemoon/usr2/idllib/contrib/icur/idl_v2_startup.pro)
********************************************************************
RO IFEAT,WAVE,FINP,eps0,ftot,fnet,noprint=noprint,nonorm=nonorm
MEASURE THE EW, FLUX OF A FEATURE
VERSION 1 BY SALLY HEAP 22 APR 1981
*** PARED DOWN BY FMW 9/17/82 FOR USE IN ICUR
MODIFIED 6/18/86 TO REQUIRE ONLY 2 KEYSTROKES, BUT 3 WILL WORK
INPUT: WAVE=WAVELENTH VECTOR
FLUX=FLUX VECTOR
OUTPUT = PRINTOUT OF ATTRIBUTES OF FEATURE
(See /host/bluemoon/usr2/idllib/contrib/icur/ifeat.pro)
********************************************************************* unction ifext,file
(See /host/bluemoon/usr2/idllib/contrib/icur/ifext.pro)
***************************************************************** ro ifhcpy,hcpy=hcpy,square=square
(See /host/bluemoon/usr2/idllib/contrib/icur/ifhcpy.pro)
************************************************************* unction ifstring,var,stp=stp
(See /host/bluemoon/usr2/idllib/contrib/icur/ifstring.pro)
**************************************************************************** ro imcoadd,arr,ncoadd=ncoadd,stp=stp
(See /host/bluemoon/usr2/idllib/contrib/icur/imcoadd.pro)
**************************************************************************** ro imsmooth,arr,xsmooth=xsmooth,ysmooth=ysmooth,stp=stp
(See /host/bluemoon/usr2/idllib/contrib/icur/imsmooth.pro)
**************************************************************** RO INITARR,MODE,VAR initialize ICFIT arrays
(See /host/bluemoon/usr2/idllib/contrib/icur/initarr.pro)
********************************************************************** RO INITF1,WAVE,FLUX,EPS,W1,F1,E1,F,E,RESET,BADW,BADF,noplot=noplot, $
(See /host/bluemoon/usr2/idllib/contrib/icur/initf1.pro)
NAME:
INTERPOL
PURPOSE:
Linear interpolation for vectors.
Regular or irregular grid.
CATEGORY:
E1 - Interpolation
CALLING SEQUENCE:
Result = INTERPOL( V, X, U) ;Irregular grids
Result = INTERPOL( V, N) ;Regular grids
INPUTS:
V = input vector, should be one dimensional,
any type except string.
Regular grids:
N = Number of points of result, both input and
output grids are regular. Output grid
absicissa value = float(i)/N_elements(V),
for i=0,n-1.
Irregular grids:
X = Absicissae values for V. Must have same # of
elements as V. MUST be monotonic, either
ascending or descending.
U = Absicissae values for result. Result will
have same number of elements as U. U need
not be monotonic.
OPTIONAL INPUT PARAMETERS:
None.
OUTPUTS:
Result = Floating vector of N points determined
from linearly interpolating input vector.
If V is double or complex, result is double
or complex.
COMMON BLOCKS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
None.
PROCEDURE:
Result(i) = V(x) + (x-FIX(x))*(V(x+1)-V(x))
where x = i*(m-1)/(N-1) for regular grids.
m = # of elements in V, i=0 to N-1.
For irregular grids, x = U(i).
m = number of points of input vector.
MODIFICATION HISTORY:
Written, DMS, October, 1982.
Modified, Terry J. Armitage and Janet Ferguson, March 1989. Modified
counters ix and i to handle vectors larger than 32767.
(See /host/bluemoon/usr2/idllib/contrib/icur/addheliocor.pro)
NAME:
INTERPOL
PURPOSE:
Linear interpolation for vectors.
Regular or irregular grid.
CATEGORY:
E1 - Interpolation
CALLING SEQUENCE:
Result = INTERPOL( V, X, U) ;Irregular grids
Result = INTERPOL( V, N) ;Regular grids
INPUTS:
V = input vector, should be one dimensional,
any type except string.
Regular grids:
N = Number of points of result, both input and
output grids are regular. Output grid
absicissa value = float(i)/N_elements(V),
for i=0,n-1.
Irregular grids:
X = Absicissae values for V. Must have same # of
elements as V. MUST be monotonic, either
ascending or descending.
U = Absicissae values for result. Result will
have same number of elements as U. U need
not be monotonic.
OPTIONAL INPUT PARAMETERS:
None.
OUTPUTS:
Result = Floating vector of N points determined
from linearly interpolating input vector.
If V is double or complex, result is double
or complex.
COMMON BLOCKS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
None.
PROCEDURE:
Result(i) = V(x) + (x-FIX(x))*(V(x+1)-V(x))
where x = i*(m-1)/(N-1) for regular grids.
m = # of elements in V, i=0 to N-1.
For irregular grids, x = U(i).
m = number of points of input vector.
MODIFICATION HISTORY:
Written, DMS, October, 1982.
Modified, Terry J. Armitage and Janet Ferguson, March 1989. Modified
counters ix and i to handle vectors larger than 32767.
(See /host/bluemoon/usr2/idllib/contrib/icur/interpol.pro)
******************************************************************* RO intflux,file,recs,wl,prt=prt
(See /host/bluemoon/usr2/idllib/contrib/icur/intflux.pro)
******************************************************************* RO IPRA,NSM,H,ZZ,SIZE=SIZE ; PRINT #S ON PLOT
(See /host/bluemoon/usr2/idllib/contrib/icur/ipra.pro)
***************************************************************** RO IPRM,H,WAVE,FLUX,EPS ; IPRM
(See /host/bluemoon/usr2/idllib/contrib/icur/iprm.pro)
**************************************************************** ro irdefplt,wave,flux,xn,yn,flag,igo ;default plot if flag=0,-1
(See /host/bluemoon/usr2/idllib/contrib/icur/irdefplt.pro)
********************************************************** ro irinit,wave,out
(See /host/bluemoon/usr2/idllib/contrib/icur/irinit.pro)
**************************************************************** RO IRPLOT,WAVE,FLUX,XN,YN,FLAG,IGO,FRES,ebar,sr=sr,ieb=ieb ; PLOT LINE FITS
(See /host/bluemoon/usr2/idllib/contrib/icur/irplot.pro)
********************************************************************* unction ISM,wave,nh,file,helpme=helpme,stp=stp,r=r
(See /host/bluemoon/usr2/idllib/contrib/icur/ism.pro)
***************************************************************************** ro itcent,x,y,z,c,w,tol,xcen,flag iterate centroid
(See /host/bluemoon/usr2/idllib/contrib/icur/itcent.pro)
********************************************************************** ro iuespecmerge,w,f,e,r1,r2,f1,f2,wtype
(See /host/bluemoon/usr2/idllib/contrib/icur/iuespecmerge.pro)
************************************************************************** ro ixcor,file,hv,records=records,template=template,wavelength=wavelength, $
(See /host/bluemoon/usr2/idllib/contrib/icur/ixcor.pro)
********************************************************************** unction jd_to_date,jd0,reduced=reduced
(See /host/bluemoon/usr2/idllib/contrib/icur/jd_to_date.pro)
**********************************************************************
unction julianday,mo,da,year,helpme=helpme,mjd=mjd
updated from JULDATE
RESTRICTIONS:
Will not work for years between 0 and 99 A.D. (since these are
interpreted as years 1900 - 1999). Will not work for year 1582.
JULDATE,[1981,12,25.2673611],JD --> JD = 44963.7673611
REVISION HISTORY
Adapted from IUE RDAF (S. Parsons) 8-31-87
Algorithm from Sky and Telescope April 1981
Modified by FMW
(See /host/bluemoon/usr2/idllib/contrib/icur/julianday.pro)
********************************************************************** ro jump,nang ; MOVE ALONG X AXIS A SPECIFIED NUMBER OF ANGSTROMS
(See /host/bluemoon/usr2/idllib/contrib/icur/jump.pro)
************************************************************** RO KDAT,name,H0,WAVE0,FLUX0,EPS0,REC,nonlinear=nonlinear,linear=linear, $
(See /host/bluemoon/usr2/idllib/contrib/icur/kdat.pro)
************************************************************** ro kgap,h,w,wgap,ngap,e,eval
(See /host/bluemoon/usr2/idllib/contrib/icur/kgap.pro)
**************************************************** ro ksplice,h,w,e,k1,k2 ;mark splice points as bad
(See /host/bluemoon/usr2/idllib/contrib/icur/ksplice.pro)
(See /host/bluemoon/usr2/idllib/contrib/icur/kwhere.pro)
************************************************************** RO LDAT,name,rec1,rec2,out=out,print=print,zr0=zr0,helpme=helpme,sun=sun, $
(See /host/bluemoon/usr2/idllib/contrib/icur/ldat.pro)
********************************************************************* ro ldetect,image,radius,annrad,x,y
(See /host/bluemoon/usr2/idllib/contrib/icur/ldetect.pro)
************************************************************************** unction lfactorial,nn,nolog=nolog,helpme=helpme
(See /host/bluemoon/usr2/idllib/contrib/icur/lfactorial.pro)
*********************************************************************** ro linearwave,h,w,flux,eps,wfact=wfact
(See /host/bluemoon/usr2/idllib/contrib/icur/linearwave.pro)
************************************************************************** ro lingap,h,w,f,e linearize file with gaps
(See /host/bluemoon/usr2/idllib/contrib/icur/lingap.pro)
*************************************************************** unction lint,vect,index ;linear interpolation routine
(See /host/bluemoon/usr2/idllib/contrib/icur/lint.pro)
***************************************************************************** ro linterpl,vect,k1,k2,sz
(See /host/bluemoon/usr2/idllib/contrib/icur/linterpl.pro)
********************************************************************** RO LKDAT,IDAT0,n1,n2 ; LIST CONTENTS OF REDUCED DATA FILES
(See /host/bluemoon/usr2/idllib/contrib/icur/lkdat.pro)
***********************************************************************
RO LOCATE,IN,WAVE,FLUX,nbins=nbins,draw=draw,LAMBDA=LAMBDA,HELPME=HELPME
; PLACE CURSOR AT GIVEN POSITION
IN=0 MERELY MOVES CURSOR
IN=1 ALSO REPLOTS +/- 100 BINS CENTERED UPON POSITION
IN=2 USED BY RWAVE
in = -1 like 1, but uses xcur for center
(See /host/bluemoon/usr2/idllib/contrib/icur/locate.pro)
*************************************************************************** ro loglam,w,f,lw,lf,flag
(See /host/bluemoon/usr2/idllib/contrib/icur/loglam.pro)
*********************************************************** ro lplt,dev,nodelete=nodelete,file=file,queue=queue,noplot=noplot, $
(See /host/bluemoon/usr2/idllib/contrib/icur/lplt.pro)
*************************************************************** ro lscale,wf ;apply logarithmic scaling to image wf
(See /host/bluemoon/usr2/idllib/contrib/icur/lscale.pro)
****************************************************************** RO LSQRD,X1,Y1,dx1,dy1,type,hcpy=hcpy
(See /host/bluemoon/usr2/idllib/contrib/icur/lsqrd.pro)
****************************************************************** RO LSQRE,X,Y,SLOPE,B,DS,DB,R,helpme=helpme,prt=prt,plt=plt,weights=weights, $
(See /host/bluemoon/usr2/idllib/contrib/icur/lsqre.pro)
****************************************************************** RO LSQREP,X,Y,LU
(See /host/bluemoon/usr2/idllib/contrib/icur/lsqrep.pro)
******************************************************************* RO M6495,file,recs,iprt
(See /host/bluemoon/usr2/idllib/contrib/icur/m6495.pro)
*********************************************************************** ro m6495cor,dum
(See /host/bluemoon/usr2/idllib/contrib/icur/m6495cor.pro)
*************************************************************** unction makegkernel,s,nd ;gaussian kernel
(See /host/bluemoon/usr2/idllib/contrib/icur/makegkernel.pro)
*************************************************************** unction makekernel,s
(See /host/bluemoon/usr2/idllib/contrib/icur/makekernel.pro)
************************************************************************** ro make_hcpy,hcpy,dev,helpme=helpme,queue=queue,noprint=noprint, $
(See /host/bluemoon/usr2/idllib/contrib/icur/make_hcpy.pro)
******************************************************************* RO MANIP,FLUX,F1,F,EPS,E1,badf,TIME=TIME ; ADD,SUBTRACT,MULTIPLY,DIVIDE
(See /host/bluemoon/usr2/idllib/contrib/icur/manip.pro)
******************************************************************** unction maxfilt,f,kbad,nb kbad is index of bad data points nb is number of bins
(See /host/bluemoon/usr2/idllib/contrib/icur/maxfilt.pro)
************************************************************************ RO MDAT,INNAME,OUTNAME,r1,r2,helpme=helpme,maxrec=maxrec,ETYPE=ETYPE, $
(See /host/bluemoon/usr2/idllib/contrib/icur/mdat.pro)
************************************************************************ UNCTION MEAN,VECTOR ;COMPUTE MEAN OF VECTOR
(See /host/bluemoon/usr2/idllib/contrib/icur/mean.pro)
******************************************************************** unction minfilt,f,kbad,nb kbad vector contains indices of bad data points nb is number of bins
(See /host/bluemoon/usr2/idllib/contrib/icur/minfilt.pro)
**************************************************************************** ro mkmean,file,recs,mw,mf,me,data,helpme=helpme,stp=stp,xcor=xcor, $
(See /host/bluemoon/usr2/idllib/contrib/icur/mkmean.pro)
*********************************************************************** ro mp1,file0,recs,scale0=scale0,lambda=lambda,offset=offset,exact=exact, $
(See /host/bluemoon/usr2/idllib/contrib/icur/mp1.pro)
*********************************************************************** RO MPLT,infile,fsm,helpme=helpme,stp=stp,nxtb=nxtb,nxtr=nxtr,ynzb=ynzb, $
(See /host/bluemoon/usr2/idllib/contrib/icur/mplt.pro)
*********************************************************************** RO MULTSUM,W,F,EPS,BW,BF,r,zrec ; ADD OR CONCATENATE MULTIPLE DATA SETS
(See /host/bluemoon/usr2/idllib/contrib/icur/multsum.pro)
NAME: NIUEG2
Modified 7/5/88 from IUELOW to be called by NIUELO
now passes gross and background vectors ala NIUELO
PURPOSE:
procedure for getting final output from SDPS' MELO array
(analogous to iuelo.pro)
CATEGORY:
CALLING SEQUENCE:
INPUTS:
MELO - melo array
OUTPUTS:
H,WAVE, FLUX, EPS arrays
where FLUX = net flux if exp_time is not given
= absolute flux if exp_time is given
OPTIONAL OUTPUT PARAMETERS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
VERSION 1 by Sally Heap, August 1987
2 SEP 1987 - put in LWR degradation correction
VERSION 3 by jkf/acc - renamed IUELOW...originally FROMMELO and removed
calibration.
(See /host/bluemoon/usr2/idllib/contrib/icur/niueg2.pro)
***** NIUEGET
*NAME:
IUEGET 8 JANUARY 1981
*PURPOSE:
To acquire spectral data for a given order
from an IUE diskfile
*EXECUTION:
IUEGET,LUN,M,H,WAVE,FNET,EPS
*INPUT:
LUN - logical unit of opened file (MEHI or
MELO) containing IUE spectral data
M - spectral order for which data are to
be acquired (1 for low-dispersion spectra,
60-125 for high-dispersion spectra)
*OUTPUT:
H - header record
WAVE - vector of wavelengths
FNET - vector of net fluxes (GROSS-smoothed
BACKGROUND) in IUE units
EPS - error vector
*DISK DATA SETS:
The disk data file containing the IUE spectrum
must be opened for reading before execution of
IUEGET and closed after execution.
*METHOD:
The header record is acquired and examined
to determine which records contain the data for
the specified spectral order. The wavelength,
gross-flux, background-flux, and error vectors
are then acquired. The wavelength vector is
converted to angstroms, while the fluxes are
converted to IUE units. The background is first
smoothed by a median filter followed by two
running averages. The net flux is determined
as the difference between the gross flux
and the smoothed background flux. All the
vectors are stripped of padded zeros.
*OPERATIONAL NOTES:
Care should be taken when using this routine. IUEGET
uses the system variable !ERR to determine the record
length in the data file. !ERR is set when the file is
first opened. If the user does anything to change
!ERR before calling IUEGET (eg. any input/output from
tape or disk), the value of !ERR should be restored.
Example:
OPENR,1,'S6541L'
SAVE=!ERR
... other work that might change !ERR
!ERR=SAVE
IUEGET,1,1,H,WAVE,FNET,EPS
*EXAMPLES;
In this example, spectral data for orders
93 and 94 of the high-dispersion spectrum,
SWP 3323, are acquired and plotted:
OPENR,1,'IUER_USERDATA:S3323H'
IUEGET,1,93,H,W93,NET93,E93
IUEGET,1,94,H.W94,NET94,E94
CLOSE,1
!XMIN=W94(0) & !XMAX=MAX(W93)
PLOT,W94,F94
OPLOT,W93,F93
*SUBROUTINES CALLED:
GMEDIAN
PARCHECK
*MODIFICATION HISTORY:
VERSION 1 BY SALLY HEAP 2-16-81
22-OCT-85 KF modified for DIDL (i.e. /ERROR added & change
MEDIAN to GMEDIAN
19-NOV-85 RWT use intrinsic DIDL MEDIAN instead of GMEDIAN
4-13-87 RWT VAX mods: use GMEDIAN, add PARCHECK & remove EXTRACT commands
(See /host/bluemoon/usr2/idllib/contrib/icur/niueget.pro)
*NAME:
NIUELO 8 JANUARY 1981
mod of IUELO for ICUR I/O
*PURPOSE:
To acquire and calibrate low dispersion spectral
data from IUE with optional corrections for THDA
sensitivity variation and LWR sensitivity variation.
*EXECUTION:
IUELO,IMAGET,H,WAVE,FLUX,EPS
*INPUT:
IMAGET - disk file name for eslo or melo file
containing low-dispersion spectral data
(character string)
e.g. MELO file for IMAGET
SWP 7954 'SWP7954L'
LWR 9422 'LWR9422L'
*OUTPUT:
H - header record amended for exposure
time input by user, and flags for THDA
and LWR degradation corrections.
WAVE - wavelength vector (Angstroms)
FLUX - absolute flux vector (ergs/sec/cm2/A)
EPS - error vector
*INTERACTIVE INPUT:
1) Exposure time (in minutes,sec,ms), if the header
record does not already contain these quantities.
If the user types in zeros, then the net flux
in IUE units is returned. Values may be integer or real
but the total time must be less than 32767 minutes.
2) Correction for THDA sensitivity variation, if entry 68
in the header record equals 0 (see description below).
3) Correction for LWR sensitivity degradation, if entry 69
in the header records equals 0 (see description below).
*OUTPUT PLOTS:
wavelength vs net flux
wavelength vs. absolute flux
In both plots, those data-points with negative values of
epsilon are marked with asterisks.
*DISK DATA SETS:
1) The MELO (eslo) data file must be resident on
disk.
2) the files, 'IUER_PRODROOT:[DAT]IUECAL.DAT' and IUECAL2.DAT,
containing the calibration tables used to convert
fluxes from IUE units to absolute units, must be
available for CALIB. See IUER_PRODROOT:[INF]IUECAL.INF and
IUECAL2.INF for more documentation.
3) If the THDA correction is requested with a user-specified
THDA value, the label portion of the MELO file must be
resident on the system disk.
4) If the LWR sensitivity degradation correction is requested,
the file IUER_PRODROOT:[DAT]DEGRAD.TAB must exist. (See
documentation in IUER_PRODROOT:[INF]DEGRAD.INF.)
*OPERATIONAL NOTES:
- HFIX can be run prior to IUELO to set all the flags in
record 0 necessary to allow IUELO to run non-interactively.
- CALIB, which is called by IUELO requires that H(580) contains
the number of the ITF file used by IUESIPS. This is set either
with the new IUECOPY, or using ITFFLAG.
- Specifying 0 for the exposure time will result in net fluxes
being output rather than absolutely calibrated fluxes.
*METHOD:
IUEGET is used to acquire the header record
and the wavelength, net flux, and error
vectors. The header record is then examined
to see if the exposure time was recorded (i.e.
non-zero)
H(39) - minutes
H(40) - seconds
H(41) - ms
If the exposure time is not recorded, then
the user is asked to supply the exposure time
(in min, sec, ms) and these data are inserted
into the header record. Note that the user may
enter these values as either integer or real
numbers although real values for ms will be
truncated. The net fluxes are then converted
to absolute units with the use of IUECAL or IUECAL2
by CALIB (if the exposure time is not zero). CALIB
uses H(580) to decide which file is opened (see ITFFLAG).
If H(68) = 0, the user is asked if a correction for
THDA sensitivity variations is desired. The possible
options include no correction, correction using the
IUESIPS determined THDA stored in H(61), or correction
using a user-specified THDA with the temperature data
stored in the label displayed to assist the user.
If H(68) < 0, then the correction will be applied
automatically using -H(68) / 10.0 for the THDA.
If H(68) > 0, then the correction is not applied
and no user input is required. Note that the default
value for H(68) is 0.
If an LWR image is specified, and H(69) = 0, the user
is asked if a correction for the LWR sensitivity
degradation is desired. If H(69) < 0, then the
correction is applied automatically. If H(69) > 0,
then the correction is not applied and no user input
is required. Note the default for H(69) is 0.
*EXAMPLES:
spectral data for SWP 3373 are acquired via the command:
IUELO,'SWP3373L',HEAD,WAVE,ABSFLUX,EPS
*SUBROUTINES CALLED:
IUEPLOT
CALIB
SDC
TEMPCOR
LTI
INTIME
IUEGET
LABEL
*MODIFICATION HISTORY:
VERSION 1 BY SALLY HEAP 13-FEB-81
- June 11, 1981 change by Sally Heap per change
request #18. Uses COMPOSE before trying to open
files, and prints out the first 9 lines of the
label before it asks for the exposure time.
- July 20, 1981 by D. Lindler per change request # 73.
Corrected to work when the exposure time is already in
the header record.
- May 30, 1984 by RWT per URP #177. Corrected to allow either
integer or real exposure times.
- December 13, 1984 RWT use new versions of IUEPLOT & CALIB.
- 4-28-86 RWT includes LWR sensitivity degradation correction
(SDC & new CALIB), a correction for temperature-dependent
sensitivity variations (TEMPCOR), corrects problem with
exposure time error, and uses new DIDL IUEGET
- 8-27-86 RWT allow exp. times > 32767 sec or >32767 millisec.
using new subroutine INTIME
- 8-12-87 RWT VAX mods: eliminate subroutines, add PARCHECK,
add listing of procedure call, change UIC references, add
pause before plot, use vector subscript notation in
print statements and use GET_LUN & SET_XY.
- 12-31-87 RWT use label information rather than file name for
error checking and modify for new LWP absolute calibration
(See /host/bluemoon/usr2/idllib/contrib/icur/niuelo.pro)
********************************************************* ro ocomps,xn,yn
(See /host/bluemoon/usr2/idllib/contrib/icur/ocomps.pro)
******************************************************************* ro opdate,prog print todays date on plot at lower RH corner
(See /host/bluemoon/usr2/idllib/contrib/icur/opdate.pro)
************************************************************* ro opp,x,y,ps,psize=psize,color=color,helpme=helpme,pixels=pixels,stp=stp
(See /host/bluemoon/usr2/idllib/contrib/icur/opp.pro)
*************************************************************************** ro opstat,status
(See /host/bluemoon/usr2/idllib/contrib/icur/opstat.pro)
******************************************************************** unction optfilt,f,e,w1,w2,w3,w4,w5,w1s=w1s,w2s=w2s,w3s=w3s,w4s=w4s,w5s=w5s, $
(See /host/bluemoon/usr2/idllib/contrib/icur/optfilt.pro)
************************************************************** RO OVERWRT,IM,FLUX,EPS,WAVE,F,E,W,RESET ; OVERWRITE VECTORS
(See /host/bluemoon/usr2/idllib/contrib/icur/overwrt.pro)
*NAME:
PARCHECK (GENERAL IDL LIBRARY 01) 30-MAR-1987
*CLASS:
Error checking
*CATEGORY:
*PURPOSE:
To check that a procedure has been called with the minimum of allowed
number of parameters.
*CALLING SEQUENCE:
PARCHECK,NPARM,MINPARMS,CALLINGPRO
*PARAMETERS:
NPARM (REQ) (I) (0) (I)
required input scalar giving the number of parameters
in the procedure call (i.e. n_params(0)).
MINPARMS (REQ) (I) (0 1) (I)
If scalar, the minimum number of parameters needed for the
procedure to execute properly.
If an array, it represents the allowed numbers of
parameters (e.g. if 3,4 or 6 parameters are allowed,
then set minparms([0,1,2]) = [3,4,6] ).
CALLINGPRO (REQ) (I) (0) (S)
Required string giving the name of the calling procedure.
*EXAMPLES:
To determine if procedure pro, which contains a
call to parcheck has the minimum number of parameters
(i.e. 4):
PARCHECK,N_PARAMS(),4,'PRO'
If the same procedure can have 4,5,7, or 8 parameters
then use:
PARCHECK,N_PARAMS(),[4,5,7,8],'PRO'
*SYSTEM VARIABLES USED:
*INTERACTIVE INPUT:
*SUBROUTINES CALLED:
PCHECK
*FILES USED:
*SIDE EFFECTS:
*RESTRICTIONS:
*NOTES:
tested with IDL Version 2.1.0 (sunos sparc) 28 Jun 91
tested with IDL Version 2.1.0 (ultrix mipsel) N/A
tested with IDL Version 2.1.0 (vax vms) 28 Jun 91
*PROCEDURE:
The input parameters to PARCHECK are first checked themselves
using PCHECK. If MINPARMS is a scalar it is compared to NPARM.
If NPARM < MINPARMS, then an error message is printed and the
procedure returns to the main level. If MINPARMS is a vector,
then NPARM is subtracted from each value of MINPARMS and the
resulting vector is checked for zeroes. If no values are zero,
then error messages are printed and the program returns to the
main level.
*MODIFICATION HISTORY :
Mar 30 1987 cag gsfc initial program
Apr 1987 rwt gsfc add vector input for parameters
Mar 15 1988 cag gsfc add vax rdaf-style prolog
Jul 12 1989 jtb gsfc converted to sun/unix idl
Nov 2 1989 rwt gsfc correct print format syntax
May 10 1991 PJL GSFC corrected prolog format
Jun 21 1991 gra casa cleaned up; tested SUN, DEC, VAX;
updated prolog.
Jun 28 1991 PJL GSFC added npar test; tested on SUN and VAX;
updated prolog
(See /host/bluemoon/usr2/idllib/contrib/icur/parcheck.pro)
****************************************************************** RO PARTST,WAVE,NCAM,NFIT,X,noquery,cii=cii
(See /host/bluemoon/usr2/idllib/contrib/icur/partst.pro)
*NAME:
PCHECK
*CLASS:
*CATEGORY:
*PURPOSE:
This procedure is used to check the parameters of
a procedure for correct type and dimensions
*CALLING SEQUENCE:
PCHECK,VARIABLE,POSITION,DIMENSION,TYPE
*PARAMETERS:
VARIABLE - Variable to be checked
POSITION - Parameter position of the variable
DIMENSION - Valid dimensions (3 digit integer).
Each digit must be 0 or 1.
1 specifies that the dimension is valid.
1st digit - scalar
2nd - one dimensional array
3rd - two dimensional array
TYPE - Valid types ( 4 digit integer).
Each digit must be 0 or 1.
1 specifies a valid type.
1st digit - string
2nd - byte
3rd - integer, or longword integer
4th - floating point, double precision or complex
*EXAMPLES:
*SYSTEM VARIABLES USED:
*INTERACTIVE INPUT:
*SUBROUTINES CALLED:
*FILES USED:
*SIDE EFFECTS:
*RESTRICTIONS:
*NOTES:
tested with IDL Version 2.1.0 (sunos sparc) 28 Jun 91
tested with IDL Version 2.1.0 (ultrix mipsel) N/A
tested with IDL Version 2.1.0 (vax vms) 28 Jun 91
*PROCEDURE:
*I_HELP nn:
*MODIFICATION HISTORY:
d. lindler dec. 1980
version 2 f.h.schiffer 3rd 17 nov 1981
copied into [177001] by rwt 1-17-84
10-24-85 rwt modify for new didl data types: longword integer,
double precision & complex. modified to be compatible
with existing version (i.e., no new input parameters)
21-sep-88: converted to sun idl, john hoegy.
10 May 91 PJL created a RDAF format prolog
28 Jun 91 PJL added npar test; tested on SUN and VAX; updated prolog
(See /host/bluemoon/usr2/idllib/contrib/icur/pcheck.pro)
********************************************************************** unction pchisq,chi2,dof
(See /host/bluemoon/usr2/idllib/contrib/icur/pchisq.pro)
******************************************************************** unction percentile,image,pcts,srt=srt,hist=hist,time=time,prt=prt, $
(See /host/bluemoon/usr2/idllib/contrib/icur/percentile.pro)
(See /host/bluemoon/usr2/idllib/contrib/icur/phplot.pro)
******************************************************************** ro pl7,i1,i2,i3,i4 plot mode 7 data
(See /host/bluemoon/usr2/idllib/contrib/icur/pl7.pro)
*************************************************************** RO PLDATA,I0,W,F,BW,BF,pcol=pcol,psdel=psdel,PSM=PSM,bdata=bdata ; PLOT DATA I=-2 : INITIAL PLOT (A) I=-1 : CLEAR SCREEN (I) I= 0 : NORMAL PLOT (R) I= 1 : OVERPLOT (O) i=10 : laser plot
(See /host/bluemoon/usr2/idllib/contrib/icur/pldata.pro)
*********************************************************************** RO PLIHD,H ; PLOT HEADER INFORMATION IN ICUR MODIFIED 10/29/82 TO HANDLE DATA FROM FUN1 MODIFIED 11/11/82 AND 1/31/83 TO HANDLE KPNO HEADERS CHANGES 3/11/83 FOR NEG ISM LAST UPDATE 8/11/86 VERSION 2: WRITES !P.SUBTITLE
(See /host/bluemoon/usr2/idllib/contrib/icur/plihd.pro)
*************************************************** ro ploterb,w,y,err,ierr,psym,type ierr=1 to oplot +/- 1 sigma errors ierr=2 to oplot SNR ierr=3 to do both
(See /host/bluemoon/usr2/idllib/contrib/icur/ploterb.pro)
************************************************************************** ro plotsun,x,y,size
(See /host/bluemoon/usr2/idllib/contrib/icur/plotsun.pro)
***************************************************************** ro pltx,ilog,x,y,sy,legend,zero ilog=0,1,2,3 for plot,_io,_oi,_oo
(See /host/bluemoon/usr2/idllib/contrib/icur/pltx.pro)
***************************************************************** ro pltx2,ilog,xx,yy,sy,legend,zero ilog=0,1,2,3 for plot,_io,_oi,_oo
(See /host/bluemoon/usr2/idllib/contrib/icur/pltx2.pro)
************************************************************** unction POISS2,flux ;POISSON NOISE GENERATOR
(See /host/bluemoon/usr2/idllib/contrib/icur/poiss2.pro)
********************************************************************** RO PRTA,I,J,Z
(See /host/bluemoon/usr2/idllib/contrib/icur/prta.pro)
****************************************************************** ro psimage,array,black=black,nbits=nbits,portrait=portrait,save=save, $
(See /host/bluemoon/usr2/idllib/contrib/icur/psimage.pro)
**************************************************************************
By default IDL programs generate output in landscape mode, upside down.
Anyone using IDL programs can rotate their figures to portrait
mode using the program below and entering
IDL psopen,'p'
IDL make your plot
IDL device,/close_file
RO psopen,opt,scale=scale,file=psfile,bpp=bpp,color=color,encapsulated=encapsulated
;+
;PURPOSE: TO OPEN A POSTSCRIPT FILE
;USEFUL WHEN MAKING COMPLICATED PLOTS
;DEAFULT IS FULL PAGE LANDSCAPE
;AFTER ISSUING PLOTTING COMMANDS (INTERACTIVELY OR VIA ROUTINES) USE
; THE "PSCLOSE" ROUTINE TO CLOSE THE POST SCRIPT FILE AND SEND IT TO
; A LAZY PRINTER.
;
; All parameters are optional
;
; Inputs: SCALE Sets the scale factor for the entire output plot
; Default = 1.0
; OPT A string specifying Portrait ('p') or Landscape ('l')
; Default is landscape
; PSFILE A string naming the output file.
;
; MARTIN SIRK JULY 1989
;
; modified J. Wheatley 1/18/90
; added file keyword; specified ~/idl.ps to avoid write-protection
; problems
;
; modified D. Finley 2/24/90
; Shrank landscape size to reasonable values and added option for portrait mode
; opt == 'p' --> portrait OR opt == 'l' --> landscape
; default is landscape
;-
; dev=!d.name
(See /host/bluemoon/usr2/idllib/contrib/icur/psopen.pro)
**************************************************************** RO PSTAT,ILOOP,WAVE ; PRINT CURRENT STATUS (ICUR)
(See /host/bluemoon/usr2/idllib/contrib/icur/pstat.pro)
*********************************************************************** ro qmatch,wf
(See /host/bluemoon/usr2/idllib/contrib/icur/qmatch.pro)
**************************************************** ro qplt,nrecs,file,smth,lambda=lambda,trunc=trunc,notitle=notitle,ieb=ieb, $
(See /host/bluemoon/usr2/idllib/contrib/icur/qplt.pro)
************************************************************************** ro radvel,datfile,datrec,tmpfile,tmprec,rv,debug=stp,print=prt,ha=ha,excl=badlam
(See /host/bluemoon/usr2/idllib/contrib/icur/radvel.pro)
********************************************************************** ro rclose,dum retall and close all open files
(See /host/bluemoon/usr2/idllib/contrib/icur/rclose.pro)
********************************************************************** unction rcts,image,scale
(See /host/bluemoon/usr2/idllib/contrib/icur/rcts.pro)
************************************************************* unction RDBIT,V,N ; READ INDIVIDUAL BITS V IS INPUT INTEGER N is bit to be read
(See /host/bluemoon/usr2/idllib/contrib/icur/rdbit.pro)
*********************************************************************** ro rd_iuehi,image,h,w,flux,sigma,eps,npts=np,icd=icd,do3=do3,ord=ord, $
(See /host/bluemoon/usr2/idllib/contrib/icur/rd_iuehi.pro)
*********************************************************************** ro rd_iuelo,image,h,w,flux,sigma,eps,raw,back,plt=plt,icdfile=icdfile, $
(See /host/bluemoon/usr2/idllib/contrib/icur/rd_iuelo.pro)
-----------------------------------------------------------------------
Name: READ_MARX_FILE
Purpose: Returns the contents of a binary output file
from the MARX simulator
Inputs: inpfile -- string containing name of input file
Outputs: header -- character array containing embedded
parameter file
Comments:
Revision history:
written M. Wise 02-23-96
added BYTEORDER patch for LINUX M. Wise 01-03-97
modified to read new PHAS format M. Wise 05-13-97
added MAGIC number checking
-----------------------------------------------------------------------
Check for correct number of parameters
(See /host/bluemoon/usr2/idllib/contrib/icur/read_marx_file.pro)
*********************************************************************** RO REcalh,HU,WU,FU,EU ; FLUX HIGH RESOLUTION DATA HU,WU,FU,EU are the unfluxed input data FU will be overwritten with the fluxed data vector
(See /host/bluemoon/usr2/idllib/contrib/icur/recalh.pro)
*********************************************************************** unction relext,indx,w,ebmv
(See /host/bluemoon/usr2/idllib/contrib/icur/relext.pro)
********************************************************* RO RESIDUAL,IGO,WAVE,FLUX,XN,YN,out,sr=sr
(See /host/bluemoon/usr2/idllib/contrib/icur/residual.pro)
********************************************************************** ro restgap,h,w ;restore gaps to hi dispersion data
(See /host/bluemoon/usr2/idllib/contrib/icur/restgap.pro)
****************************************************************************** ro rotsmooth,vsini,w,f
(See /host/bluemoon/usr2/idllib/contrib/icur/rotsmooth.pro)
******************************************************************* RO ROTVEL,MODE,WAVE,value ; SMOOTHING MODE=0 FOR STANDARD SMOOTHING MODE = 1 FOR ROTATIONAL BROADENING MODE = -1 FOR GAUSSIAN SMOOTHING MODE = 2 FOR TRIANGULAR KERNEL (TRIKER)
(See /host/bluemoon/usr2/idllib/contrib/icur/rotvel.pro)
*********************************************************************** RO RREBIN,WAVE,W1,F1,E1,flag ; REBIN DATA IF DISPERSIONS DIFFER
(See /host/bluemoon/usr2/idllib/contrib/icur/rrebin.pro)
****************************************************************************** ro rw,lu
(See /host/bluemoon/usr2/idllib/contrib/icur/rw.pro)
********************************************************************** RO RWAVE,W,F ; RESET WAVELENGTH SCALE
(See /host/bluemoon/usr2/idllib/contrib/icur/rwave.pro)
************************************************************************ ro sav_ffl,fname,wl,stp=stp
(See /host/bluemoon/usr2/idllib/contrib/icur/sav_ffl.pro)
************************************************************************ ro sav_ffx,fname,h,fact,stp=stp
(See /host/bluemoon/usr2/idllib/contrib/icur/sav_ffx.pro)
***************************************************************** RO SCALE,IM,WAVE,FLUX,F1 ; SCALE FLUX VECTORS
(See /host/bluemoon/usr2/idllib/contrib/icur/scale.pro)
***************************************************************************** ro searchdir,inp,ext ;search directories for file INP
(See /host/bluemoon/usr2/idllib/contrib/icur/searchdir.pro)
*************************************************************** ro setlam,wave ;specify lambda manually for IRPLOT
(See /host/bluemoon/usr2/idllib/contrib/icur/setlam.pro)
******************************************************************** ro setps,hcpy
(See /host/bluemoon/usr2/idllib/contrib/icur/setps.pro)
*************************************************************************** ro setxy,a,b,c,d,svp=svp,exact=exact ;mimic IDL V1 SET_XY procedure
(See /host/bluemoon/usr2/idllib/contrib/icur/setxy.pro)
************************************************************************ ro shadd,nw,good,wave,flux,fluxerr,f,ferr shift and add routine
(See /host/bluemoon/usr2/idllib/contrib/icur/shadd.pro)
****************************************************************** unction shfth2,w0,f0,f1,lw,uw input=list of records
(See /host/bluemoon/usr2/idllib/contrib/icur/shfth2.pro)
************************************************************************** ro shlp,dum
(See /host/bluemoon/usr2/idllib/contrib/icur/shlp.pro)
*********************************************************************** RO SKYBAL,file,records,skyrec=skyrec,skyfile=skyfile, $
(See /host/bluemoon/usr2/idllib/contrib/icur/skybal.pro)
**************************************************************************** ro sp,dev,x,y,square=square,yscale=yscale,helpme=helpme,color=color, $
(See /host/bluemoon/usr2/idllib/contrib/icur/sp.pro)
****************************************************************************** ro spawn_print,file,delete=delete,queue=queue,form=form
(See /host/bluemoon/usr2/idllib/contrib/icur/spawn_print.pro)
***************************************************************** ro specarr,arr,w0,files,recs,dl=dl,dw=dw,w00=w00
(See /host/bluemoon/usr2/idllib/contrib/icur/specarr.pro)
********************************************************************** ro specmerge,w,f,e,r1,r2,f10,f20,wtype,stp=stp,weight=weight,head=head, $
(See /host/bluemoon/usr2/idllib/contrib/icur/specmerge.pro)
********************************************************************** ro spfilt,d,sn,nstd
(See /host/bluemoon/usr2/idllib/contrib/icur/spfilt.pro)
NAME: Spline PURPOSE: Cubic Spline Interpolation CATEGORY: Interpolation - E1 CALLING SEQUENCE: Result = Spline(X,Y,T) ... or: Result = Spline(X,Y,T,Sigma) INPUTS: X = abcissa vector. MUST be monotonically increasing. Y = vector of ordinate values corresponding to X. T = vector of abcissae values for which ordinate is desired. Elements of T MUST be monotonically increasing. OPTIONAL INPUT PARAMETERS: Sigma = optional parameter, default value is 1.0. The amount of "tension" that is applied to the curve. If sigma is close to 0, (e.g. .01), then effectively there is a cubic spline fit. If sigma is large, > 10 for example, then the fit will be like a polynomial interpolation. OUTPUTS: Result = vector of interpolated ordinates. Result(i) = value of function at T(i). COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: Abcissae values must be monotonically increasing. PROCEDURE: As below. MODIFICATION HISTORY: Author: Walter W. Jones, Naval Research Laboratory, Sept 26, 1976. Reviewer: Sidney Prahl, Texas Instruments. Adapted for IDL: DMS, Research Systems, March, 1983. Example: X = [2.,3.,4.] ;X values of original function Y = (X-3)^2 ;Make a quadratic T = FINDGEN(20)/10.+2 ;Values for interpolated points. ;twenty values from 2 to 3.9. Z = SPLINE(X,Y,T) ;Do the interpolation.
(See /host/bluemoon/usr2/idllib/contrib/icur/addheliocor.pro)
NAME: Spline PURPOSE: Cubic Spline Interpolation CATEGORY: Interpolation - E1 CALLING SEQUENCE: Result = Spline(X,Y,T) ... or: Result = Spline(X,Y,T,Sigma) INPUTS: X = abcissa vector. MUST be monotonically increasing. Y = vector of ordinate values corresponding to X. T = vector of abcissae values for which ordinate is desired. Elements of T MUST be monotonically increasing. OPTIONAL INPUT PARAMETERS: Sigma = optional parameter, default value is 1.0. The amount of "tension" that is applied to the curve. If sigma is close to 0, (e.g. .01), then effectively there is a cubic spline fit. If sigma is large, > 10 for example, then the fit will be like a polynomial interpolation. OUTPUTS: Result = vector of interpolated ordinates. Result(i) = value of function at T(i). COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: Abcissae values must be monotonically increasing. PROCEDURE: As below. MODIFICATION HISTORY: Author: Walter W. Jones, Naval Research Laboratory, Sept 26, 1976. Reviewer: Sidney Prahl, Texas Instruments. Adapted for IDL: DMS, Research Systems, March, 1983. Example: X = [2.,3.,4.] ;X values of original function Y = (X-3)^2 ;Make a quadratic T = FINDGEN(20)/10.+2 ;Values for interpolated points. ;twenty values from 2 to 3.9. Z = SPLINE(X,Y,T) ;Do the interpolation.
(See /host/bluemoon/usr2/idllib/contrib/icur/spline.pro)
**************************************************************** unction spshft,f0,f1,e0,e1,nit,debug=debug f0 is reference spectrum; F1 is presumably shifted linear shifts only
(See /host/bluemoon/usr2/idllib/contrib/icur/spshft.pro)
************************************************************************ ro spxcor,f1,f2,xc,cut
(See /host/bluemoon/usr2/idllib/contrib/icur/spxcor.pro)
*********************************************************************** ro sqplot,image,helpme=helpme
(See /host/bluemoon/usr2/idllib/contrib/icur/sqplot.pro)
************************************************************************* ro stack,dfile
(See /host/bluemoon/usr2/idllib/contrib/icur/stack.pro)
************************************************************************* unction stddev,dist
(See /host/bluemoon/usr2/idllib/contrib/icur/stddev.pro)
***************************************************************** ro stkplt,ilog,xx,yy,sy,legend,offset ilog=0,1,2,3 for plot,_io,_oi,_oo
(See /host/bluemoon/usr2/idllib/contrib/icur/stkplt.pro)
****************************************************************************** ro strip_tab,z,verbose=verbose,ltab=ltab ;replace tab characters with spaces
(See /host/bluemoon/usr2/idllib/contrib/icur/strip_tab.pro)
*********************************************************** ro svp,fact
(See /host/bluemoon/usr2/idllib/contrib/icur/svp.pro)
*NAME:
SWAP_BYTES (General IDL Library 01) 25-APR-80
*CLASS:
Conversion
*CATEGORY:
*PURPOSE:
To perform the byte reordering required for conversion of
integer, longword, floating point, or double precision
variables between various machine representations.
*CALLING SEQUENCE:
SWAP_BYTES,BVAR,PARAM
*PARAMETERS:
BVAR (REQ) (I/O) (0 1) (B)
byte representation of variable in which bytes will
be reordered
PARAM (REQ) (I/O) (0) (I)
parameter governing the byte reordering options
2: Even and Odd bytes are swapped
4: The order of each group of four bytes is reversed
8: The order of each group of eight bytes is reversed
*EXAMPLES:
*SUBROUTINES CALLED:
PARCHECK
*FILES USED:
*SIDE EFFECTS:
The byte representation of the original vector or scalar is
replaced by the reordered bytes
*RESTRICTIONS:
Input must be of byte type. All conversion operations should
be done on the byte stream BEFORE the variables are read by
IDL as integer, longword, floating point, or double precision.
Prematurely reading a byte stream as one of these data types
can cause conflicts with reserved values (NaN, infinity, and
reserved operand faults ) which will corrupt the final data.
*NOTES:
tested with IDL Version 2.0.10 (sunos sparc) 3 Oct 91
tested with IDL Version 2.1.0 (ultrix mipsel) 3 Oct 91
tested with IDL Version 2.1.0 (vms vax) 3 Oct 91
*PROCEDURE:
Three different byte reordering schemes are required for the
conversion of integer, longword, floating point, and double
precision data between the machine formats used by SunOS,
DEC ULTRIX, and VAX VMS. All conversions require the
interchange of even and odd byte elements. Longword and
floating point conversion requires an additional byte reordering
in which the order of the four bytes which represent a single
longword or floating point value are reversed. Double precision
conversion requires that the order of the eight bytes which
represent a double precision value are reversed.
*MODIFICATION HISTORY:
Apr. 25 1980 D.J. Lindler initial program
Mar. 21 1988 CAG add VAX RDAF-style prolog, add procedure
call listing, and check for parameters.
Feb. 09 1988 RWT change suggested by D. Lindler to handle
longword integers
Jun. 14 1989 RWT modify for SUN IDL, add optional parameter,
and allow swapping of bytes in a byte array
May 30 1990 RWT add changes by Gitta Domik for allowing
TYPE = 8.
Feb 11 1991 GRA Changed name to SWAP_BYTES, and rewrote to
work with byte variable types only.
Removed call to PARCHECK, and required that
PARAM be defined, rather that determined by
the IDL function SIZE. Changed the values of
PARAM to equal the number of bytes considered
as a group, i.e. 2, 4, and 8.
Mar 28 1991 PJL added PARCHECK; converted to lowercase
Jun 21 1991 GRA cleaned up; tested on SUN, DEC, VAX;
updated prolog.
Aug 15 1991 A.Veale converted to use IDL BYTEORDER calls; tested
on DEC
Oct 3 1991 GRA tested on SUN, DEC, and VAX.
(See /host/bluemoon/usr2/idllib/contrib/icur/swap_bytes.pro)
*********************************************** ro sx,dum resets plot scaling
(See /host/bluemoon/usr2/idllib/contrib/icur/sx.pro)
NAME:
TABINV
PURPOSE:
To find the effective index of a function value in
an ordered vector.
CALLING SEQUENCE:
TABINV,XARR,X,IEFF
INPUTS:
XARR - the vector array to be searched, must be monotonic
increasing or decreasing
X - the function value(s) whose effective
index is sought (scalar or vector)
OUTPUT:
IEFF - the effective index or indices of X in XARR
real or double precision, same # of elements as X
RESTRICTIONS:
TABINV will abort if XARR is not monotonic. (Equality of
neighboring values in XARR is allowed but results may not be
unique.) This requirement may mean that input vectors with padded
zeroes could cause routine to abort.
PROCEDURE:
A binary search is used to find the values XARR(I)
and XARR(I+1) where XARR(I) LE X LT XARR(I+1).
IEFF is then computed using linear interpolation
between I and I+1.
IEFF = I + (X-XARR(I)) / (XARR(I+1)-XARR(I))
Let N = number of elements in XARR
if x < XARR(0) then IEFF is set to 0
if x > XARR(N-1) then IEFF is set to N-1
EXAMPLE:
Set all flux values of a spectrum (WAVE vs FLUX) to zero
for wavelengths less than 1150 Angstroms.
TABINV,WAVE,1150.0,I
FLUX( 0:FIX(I) ) = 0.
FUNCTIONS CALLED:
ISARRAY
REVISION HISTORY:
Adapted from the IUE RDAF January, 1988
More elegant code W. Landsman August, 1989
Adapted for ICUR, ISARRAY removed FMW 8/91
(See /host/bluemoon/usr2/idllib/contrib/icur/addheliocor.pro)
NAME:
TABINV
PURPOSE:
To find the effective index of a function value in
an ordered vector.
CALLING SEQUENCE:
TABINV,XARR,X,IEFF
INPUTS:
XARR - the vector array to be searched, must be monotonic
increasing or decreasing
X - the function value(s) whose effective
index is sought (scalar or vector)
OUTPUT:
IEFF - the effective index or indices of X in XARR
real or double precision, same # of elements as X
RESTRICTIONS:
TABINV will abort if XARR is not monotonic. (Equality of
neighboring values in XARR is allowed but results may not be
unique.) This requirement may mean that input vectors with padded
zeroes could cause routine to abort.
PROCEDURE:
A binary search is used to find the values XARR(I)
and XARR(I+1) where XARR(I) LE X LT XARR(I+1).
IEFF is then computed using linear interpolation
between I and I+1.
IEFF = I + (X-XARR(I)) / (XARR(I+1)-XARR(I))
Let N = number of elements in XARR
if x < XARR(0) then IEFF is set to 0
if x > XARR(N-1) then IEFF is set to N-1
EXAMPLE:
Set all flux values of a spectrum (WAVE vs FLUX) to zero
for wavelengths less than 1150 Angstroms.
TABINV,WAVE,1150.0,I
FLUX( 0:FIX(I) ) = 0.
FUNCTIONS CALLED:
ISARRAY
REVISION HISTORY:
Adapted from the IUE RDAF January, 1988
More elegant code W. Landsman August, 1989
Adapted for ICUR, ISARRAY removed FMW 8/91
(See /host/bluemoon/usr2/idllib/contrib/icur/tabinv.pro)
****************************************************************************** ro tdradvel,ws,fs,wt,ft written by Y. Gao Summer 1991 rdascsp,'oph13',ws,fs,h,s ; get the rotating star's spectrum rdascsp,'sky13',wt,ft,h,s ; get the non-rot template's spectrum
(See /host/bluemoon/usr2/idllib/contrib/icur/tdradvel.pro)
************************************************************************* ro tdxcor,wt,ft,ws,fs,wta,c,debug=debug
(See /host/bluemoon/usr2/idllib/contrib/icur/tdxcor.pro)
****************************************************************************** unction telapsed,starttime
(See /host/bluemoon/usr2/idllib/contrib/icur/telapsed.pro)
**************************************************************************** unction timearray,file,recs,wave,nozero=nozero,expand=expand,rectify=rectify, $
(See /host/bluemoon/usr2/idllib/contrib/icur/timearray.pro)
*********************************************************************** RO TKP,CH,X,Y,color=color ; UPDATED VERSION OF TEKPLOT
(See /host/bluemoon/usr2/idllib/contrib/icur/tkp.pro)
*NAME:
TRANS_BYTES
*PURPOSE:
To translate the byte representation of IDL variables to
a format compatible with the host operating system as defined
by the IDL system variable !version.arch. TRANS_BYTES currently
supports SPARC (Sun-4s and SPARCStations), MIPSEL (DECstation 3100
and IBM 386 class PCs), and VAX (VAXstation and MicroVAX).
*CALLING SEQUENCE:
TRANS_BYTES, BYTE_EQ, vartyp, cpupar
*PARAMETERS:
BYTE_EQ (REQ) (IO) (B) (012)
The byte representation of the data variable to be converted.
vartyp (OPT) (I) (I) (0)
Parameter to identify the type of data which BYTE_EQ represents.
byte 1
integer 2
longword integer 3
floating point 4
double precision 5
If VARTYP is not given in the call, the user will be prompted
for it.
cpupar (OPT) (I) (I) (0)
Parameter to identify data translation mode. If not present
in the calling statement, TRANS_BYTES will prompt the user.
no conversion 0
VAX to MIPSEL 1
MIPSEL to VAX 2
VAX to SPARC 3
SPARC to VAX 4
MIPSEL to SPARC 5
SPARC to MIPSEL 6
Supported Data Types:
VAX - VAXstations, MicroVAX
MIPSEL - DECstations, IBM 386
SPARC - SparcStations, Sun 4##
No Conversion is required between like data types, such as
DECstations and IBM 386s.
If CPUPAR is not given in the call, the user will be prompted
for it.
*SIDE EFFECTS:
*SUBROUTINES CALLED:
SWAP_BYTES
PARCHECK
*SYSTEM VARIABLES USED:
*NOTES:
The internal data formats currently supported are:
SunOs data type:
SUN4's and SPARCStations
IEEE standard (Big Endian Configuration)
DECStation data type:
IEEE standard (Little Endian Configuration)
VAXStation data type:
VAX (not IEEE)
This program considers floating point to be the VMS
"f-floating", and double precision to be "d-floating".
H-floating and g-floating are not supported.
DOS data type:
IEEE standard (same as DECstation)
The IEEE standard data types differ only in the byte order.
Big Indian configuration has the most significant byte at the
lowest machine address. For the Little Endian configuration,
the least significant byte is at the lowest machine address.
Big Endian: | 0 | 1 | 2 | 3 |
Little Endian: | 3 | 2 | 1 | 0 |
The IEEE standard single precision Big Endian representation is:
| 0 | 1 | ...
31 0
S E E E E E E E E F F F F F F F ...
Here, the "S" is the sign bit, "E"'s are the exponent bits,
and the "F"'s are the normalized fraction bits.
The IEEE standard floating point data types contain on sign bit,
an eight bit exponent field biased by 127, and a 23 bit fraction.
There are two reserved values, Nan (not a number), and infinity.
The VAX single precision floating point data type contains one
sign bit, an eight bit exponent biased by 128, and a 23 bit
normalized fraction. There is only on reserved value for the VAX,
reserved operand fault. The sign bit is bit number 15, bits 7
through 14 contain the exponent, and the remaining bits contain
the normalized fraction.
The IEEE standard double precision data types contain one sign
bit, an eleven bit exponent, biased by 1023, and a 52 bit
normalized fraction. The bit ordering within the bytes is
similar to that of single precision.
The VAX d-floating double precision floating point representation
contain one sign bit, an 8 bit exponent biased by 128, and a 55
55 bit normalized fraction. Again, the sign bit is bit 15, and
the exponent is contained in bits 7 through 14.
The same reserved values occur in double precision.
tested with IDL Version 2.1.2 (sunos sparc) 14 Oct 91
tested with IDL Version 2.1.2 (ultrix mipsel) 14 Oct 91
tested with IDL Version 2.2.0 (ultrix vax) 14 Oct 91
tested with IDL Version 2.1.2 (vms vax) 14 Oct 91
*RESTRICTIONS:
Converting the byte representation of a floating point or double
precision number to floating point or double precision type on a
CPU for which the byte representation was not intended may cause
conflicts with reserved values (i.e. NaN, infinity, or reserved
operand faults), resulting in corrupted data.
*EXAMPLE:
*MODIFICATION HISTORY:
Version 1 of vtos.pro By John Hoegy 13-Jun-88
27-Oct-89 - GD: Slightly modified program vtos.pro according
to suggestions by RWT.
5/30/90 RWT merge vtos and vtod to create vtou
1/25/90 GRA Modified vtou to enable transfers between VMS, ULTRIX
and SunOs systems.
3/18/91 GRA Renamed vtou to TRANS_BYTES.
3/28/91 PJL added PARCHECK
4/24/91 RWT add support for DOS
6/24/91 GRA cleaned up
7/26/91 RWT add cpupar=0 option for no conversion
10/8/91 GRA globally changed all references to "syspar" to "cpupar",
changed cpupar to reference machine architecture as
defined by !version.arch; tested on sunos/sparc,
ultrix/mipsel, ultrix/vax, and vms/vax.
(See /host/bluemoon/usr2/idllib/contrib/icur/trans_bytes.pro)
*************************************************************** ro trism,v,f,helpme=helpme
(See /host/bluemoon/usr2/idllib/contrib/icur/trism.pro)
************************************************************** ro tweak_hxcor,file,record,xxc,x,arr,ids,flag,helpme=helpme,wave=wave, $
(See /host/bluemoon/usr2/idllib/contrib/icur/tweak_hxcor.pro)
*************************************************************** ro twostar,sp1,sp2,w1,f,H1,dm=dm,av=av,outfile=outfile,blue=blue,helpme=helpme, $
(See /host/bluemoon/usr2/idllib/contrib/icur/twostar.pro)
******************************************************************* RO USERPRO,W,F,E ; USER DEFINED PROCEDURE
(See /host/bluemoon/usr2/idllib/contrib/icur/userpro.pro)
*********************************************************************** ro vectstat,vect,mv,sdv
(See /host/bluemoon/usr2/idllib/contrib/icur/vectstat.pro)
vmedian vector median filter routine CALLING SEQUENCE: vmedian,in,width,out INPUTS: in - input vector width - filter width (should be odd) OUTPUTS: out - output median filtered vector. unfiltered end points are replaced with closest filtered point. HISTORY version 1. D. Lindler Mar 89
(See /host/bluemoon/usr2/idllib/contrib/icur/vmedian.pro)
************************************************************************* ro vmerge,h1,w1,f1,e1,h2,w2,f2,e2,head,w,f,e,etype=etype,weight=weight, $
(See /host/bluemoon/usr2/idllib/contrib/icur/vmerge.pro)
***************************************************************************** unction vsinitmplt,vsini,ww
(See /host/bluemoon/usr2/idllib/contrib/icur/vsinitmplt.pro)
*************************************************************** RO wavel,wl,fl,noprint=noprint ;measure screen coordinates
(See /host/bluemoon/usr2/idllib/contrib/icur/wavel.pro)
****************************************************************** ro whcur,x,y,z
(See /host/bluemoon/usr2/idllib/contrib/icur/whcur.pro)
****************************************************************** ro whereami,z,all=all,verbose=verbose,stp=stp
(See /host/bluemoon/usr2/idllib/contrib/icur/whereami.pro)
********************************************************* unction wherebad,e,ibad ;compute locations of good or bad points
(See /host/bluemoon/usr2/idllib/contrib/icur/wherebad.pro)
***************************************************************************** ro wiyn_icur,file,out=out,examine=examine,helpme=helpme,stp=stp, $
(See /host/bluemoon/usr2/idllib/contrib/icur/wiyn_icur.pro)
************************************************************************8 ro wiyn_vel_update,file,velfile,stp=stp,wave=wave,helpme=helpme,do2=do2, $
(See /host/bluemoon/usr2/idllib/contrib/icur/wiyn_vel_update.pro)
************************************************************************ ro wrect,file,r1,r2,dw=dw,mc1=mc1,mc2=mc2,save=save
(See /host/bluemoon/usr2/idllib/contrib/icur/wrect.pro)
************************************************************************* RO WSHIFT,IM,WAVE,FLUX,EPS,F1,E1,E,W1,ofb ; SHIFT WAVELENGTH SCALE
(See /host/bluemoon/usr2/idllib/contrib/icur/wshift.pro)
**************************************************************************** unction xindex,xarr,x modification of TABINV REVISION HISTORY: Adapted from the IUE RDAF January, 1988 More elegant code W. Landsman August, 1989 Adapted for ICUR, ISARRAY removed FMW 8/91 -
(See /host/bluemoon/usr2/idllib/contrib/icur/xindex.pro)
********************************************************************* unction ytit,i,helpme=helpme
(See /host/bluemoon/usr2/idllib/contrib/icur/ytit.pro)
************************************************************************* ro zrecover,dum ; solve cursor timing problem
(See /host/bluemoon/usr2/idllib/contrib/icur/zrecover.pro)