SIG x Set ’multiple of sigma’ continuum rejection parameter to x. DEG n Set polynomial degree for continuum fit to n (1..7). ITN n Set ’number of iterations’ continuum rejection parameter to n. LIMIT Line will be delimited by the cursor positions indicated. NOLIM Line delimited by points where data becomes < continuum. WIDTH x Set wavelength range displayed to x. CONT Determine continuum, starting with subsegment selection by cursor. RECONT Repeat continuum fit, using same segments as last time. FIT Analyse a line, delimiting it using the cursor. HELP (or ?) Output this information. QUIT Exit ABLINE.
Commands may be abbreviated. Omitted numeric parameters are prompted for.
Generally, the sequence is: 1) Select center wavelength, 2) CONTinuum, 3) FIT one or more lines. To change degree of continuum fit, use DEG followed by RECONT. Similarly for other continuum parameters.
More details should be available from the printed documentation.
This routine does interactive analysis of absorption lines in spectra.
The user designates a segment of the input spectrum to be analysed in each pass. First a continuum is fitted to this region, using only wavelength subsegments selected graphically by the user (i.e. ignoring the absorption line in question and any other nearby lines or spikes). In addition to this selection, iterative rejection of discrepant points is performed. The functional form of the continuum is a polynomial of degree specified by the user (0 - 7). Alternatively, if a precomputed continuum spectrum is available, it can be used instead.
The user specifies the wavelength limits of the interval containing the line itself: the median wavelength and equivalent width of the absorption line are calculated.
The routine finishes up each segment with a hard copy plot showing the data, continuum and wavelength limits of the line, with a printout of results.
Command line parameters -
SPECTRUM Name of the file containing the spectrum with lines to be fitted CONTIN File containing precomputed continuum, if one is to be used. SIG Multiple of sigma for continuum point rejection ITN Number of iterations for continuum point rejection DEG Degree of polynomial for continuum fit WIDTH Wavelength range to display at one time CONTOUT Output continuum file name, if one is written. If CONTOUT is the same as CONTIN, the new continuum overwrites the old. Otherwise, a new file, the same as SPECTRUM except for the data, is created. CMD The command in the main menu. LINENAME The name of a line to be fitted. COMMENT A comment for a hardcopy
Command keywords -
OLDCONT Set if a precomputed continuum is to be used. LIMIT LIMIT is set if the limits of a line are to be taken as the limits indicated with the cursor. Otherwise, the program will look for the points within the indicated limits where the data drops below the continuum. NEWCONT Set if the continuum constructed during the run is to be written to a file. HARDCOPY Yes if hardcopy of soft plot to be made.
User variables - (">" input, "<" output)
(>) SOFT (Character) Device/type for soft plots (>) HARD (Character) " " " hard " (<) TVXST (Numeric) ) (<) TVXEN (Numeric) ) Used to set the soft plot (<) TVHIGH (Numeric) ) parameters so that (<) TVLOW (Numeric) ) routines such as CCUR (<) XSTART (Numeric) ) know what the display (<) XEND (Numeric) ) limits for the currently (<) HIGH (Numeric) ) displayed plot have (<) LOW (Numeric) ) been set to. (<) TVFILE (Character)) (<) TVCOLOR (Numeric) ) JGR Jan 1985
In detail, ADJOIN is a little more complex, since it produces a spectrum in which the X data increase. This may involve the sorting of the various arrays, so ADJOIN can be regarded as a program that merges two spectra into increasing X order.
If neither spectrum has any X information (i.e. no wavelength array), the sort order will be first and then second. If one or both have X data, the resulting spectrum will be in order of X value.
Each invocation of ARC produces a file arlines.lis in the working directory. This file must be renamed or deleted before re-invoking ARC.
Fit - Repeat the fit. Disp - Display the deviation of the fit from a linear fit. This shows the trend of the fit, and the errors in each line. Order - Change the order of the fit. Edit - Delete or change the wavelength of one or more of the selected lines, without returning to the cursor selection. Reselect - Return to selection using the cursor. Print - Prints a copy of the fit (what ARLINES.LIS would look like if you were to exit now). Auto - Starting from your current fit and arc line list, ARC looks for additional line in the arc at wavelengths given in the line list and adds any it finds to the identified line tables. Xauto - Deletes all the lines found by ’Auto’. Modify - Allows you some control over the Autofit parameters. Quit - Start to exit ARC. Help - (or ?) Display this information.
The first letter of each command is sufficient.
It takes each pixel in turn. If that pixel is more than CHFACT times the current sigma value from any line already found, it uses that pixel as the starting point for a line search. If anything resembling a line can be found, it calculates its wavelength and looks in the line tables for a line close to that wavelength.
A line is accepted if the discrepancy between calculated and tabulated wavelength is less than SIGFACT times the current RMS value. This means that the criterion for accepting new lines is based on how their wavelength discrepancies compare with those for the lines that have already been accepted.
SIGFACT is the more important parameter.
It takes each pixel in turn. If that pixel is more than CHFACT times the current sigma value from any line already found, it uses that pixel as the starting point for a line search. If anything resembling a line can be found, it calculates its wavelength and looks in the line tables for a line close to that wavelength.
A line is accepted if the discrepancy between calculated and tabulated wavelength is less than SIGFACT times the current RMS value. This means that the criterion for accepting new lines is based on how their wavelength discrepancies compare with those for the lines that have already been accepted.
SIGFACT is the more important parameter.
arcdisp in order
This routine works in situ and modifies the input file.
arcgendb in fdb
arcident in out fdb wrange=?
arclocat in fwhm thresh
This routine works in situ and modifies the input file.
ascin in lines colaxes=? coldata=? [start=? step=? end=?] out=?
ascout in out
This routine is available in the Specdre graphical user interface.
bbody temp in=? xstart=? xstep=? xend=? xlabel=? xunit=? out=?
This routine calculates for a given (vacuum) wavelength or frequency axis the intensity of a black body at given temperature. The intensity is the energy per unit time, per unit area, per unit solid angle, and per unit frequency (and for all polarisations):
where c is the velocity of light, and h and k are the Planck and Boltzmann constants.
WARNING - you should examine the output from BCLEAN carefully to ensure that the parameters that you have chosen are appropriate. FIX=NO and TEXTFILE are useful here.
The data may be multi-dimensional; if it is, a multi-dimensional FFT is performed. Note that the Figaro routine R2CMPLX will turn an existing real data structure into a complex one acceptable to this routine. FFT does not perform any cosine belling or other tapering of the data, nor does it reduce it to a zero mean.
jm: Jo Murray (RAL, Starlink)
jms: ??? (AAO)
hme: Horst Meyerdierks (UoE, Starlink)
OUTPUT=SPECTRUM*(BSTAR**(SSECZ/BSECZ)**BETA))
where SSECZ and BSECZ are the air masses for the spectrum and the B star respectively. BETA should be 0.5 for saturated lines, 1.0 for unsaturated lines, and the generally accepted best compromise value for all lines (determined by P.J. Young) is 0.55.
M=C*(1+alpha*C)
where M and C are the measured and corrected intensities (after bias subtraction) respectively. John Barton’s memo gives a value of alpha=3.16E-6, and this is the reset value.
The approximate positions input are obtained from environment variables. These variables should be set up prior to running CENTERS, usually by using Figaro functions IGCUR or ICUR. Alternatively, you may enter the positions into a text file and use IMPOS to read this file and copy the values into the environment variables required by CENTERS.
The computed centroids are output to a new file called center.dat.
hme: Horst Meyerdierks (UoE, Starlink)
HME: Horst Meyerdierks (UoE, Starlink)
JFL: John Lightfoot (ROE)
correl inlist out logfil
This routine correlates two or three data sets. Either pair is subjected to a linear fit and the third data set is subjected to a two-parameter linear fit (i.e. regarded as a linear function of the first and second data sets). Each data set may be an NDF section. All must have the same dimensions.
This example NDF group specification consists of
HME: Horst Meyerdierks (UoE, Starlink)
HME: Horst Meyerdierks (UoE, Starlink)
The Y value for each point is the pixel value from IMAGE and the X value is the value of the corresponding value from IMAGE2.
The images must have identical dimensions.
Continue - go to the next order to be fitted interactively. Repeat - return to working on the order just completed. Start - back to square one. Quit - quit prematurely.
Fit - Repeat the fit. O_fit - Change the order of the fit. Disp - Display the deviation of the fit from a linear fit. This shows the trend of the fit, and the errors in each line. Edit - Delete or change the wavelength of one or more of the selected lines, without returning to the cursor selection. Reselect - Return to selection using the cursor. Continue - Start to quit this order. Print - Prints a copy of the fit (what ARLINES.LIS would look like if you were to exit now). Auto - Starting from your current fit and arc line list, ECHARC looks for additional line in the arc at wavelengths given in the line list and adds any it finds to the identified line tables. Xauto - Deletes all the lines found by ’Auto’. Modify - Allows you some control over the Autofit parameters. Help - (or ?) Display this information.
The first letter of each command is sufficient.
It takes each pixel in turn. If that pixel is more than CHFACT times the current sigma value from any line already found, it uses that pixel as the starting point for a line search. If anything resembling a line can be found, it calculates its wavelength and looks in the line tables for a line close to that wavelength.
A line is accepted if the discrepancy between calculated and tabulated wavelength is less than SIGFACT times the current RMS value. This means that the criterion for accepting new lines is based on how their wavelength discrepancies compare with those for the lines that have already been accepted.
SIGFACT is the more important parameter.
It takes each pixel in turn. If that pixel is more than CHFACT times the current sigma value from any line already found, it uses that pixel as the starting point for a line search. If anything resembling a line can be found, it calculates its wavelength and looks in the line tables for a line close to that wavelength.
A line is accepted if the discrepancy between calculated and tabulated wavelength is less than SIGFACT times the current RMS value. This means that the criterion for accepting new lines is based on how their wavelength discrepancies compare with those for the lines that have already been accepted.
SIGFACT is the more important parameter.
The coefficient file will normally have been written by SDIST and if so must have been written by the version of SDIST that was modified to support ECHMASK.
The PERISCOPE keyword (see below) determines whether each order has two separate parts (corresponding to object and sky and due to the special periscope that samples object and sky at a wide spacing and brings them together on the slit) or one part corresponding simply to the slit). The data values in the mask are 10 * (true order number) + (sub-order number) where the sub-order number is 0 if there is no periscope fitted, 1 if this is the first part of an order and 2 if this is the second part of the order. The "first" and "second" parts of an order are defined so that the actual data values in the mask are monotonic along a vertical slice through it, i.e. they might go 412, 411, 402, 401 if the periscope is fitted and they might go 410, 400 if it is not fitted.
If PERISCOPE is NO then the user has the option of splitting the data in an order into object and up to two separate regions of sky. The object is assigned sub-order 1 and the sky is assigned sub-order 2. Note that this assignment may differ from when PERISCOPE is yes, since in that case there is no guarantee that sub-order 1 is object - it may be sky! There may be room for enhancement here.
It creates a 1-D output file which consists of all the orders from the input files. Where orders overlap a weighted sum of the overlapping orders is used. The formula used is:
in1weight(i) * in1(i) + in2weight(i) * in2(i) in1weight(i) + in2weight(i)
and the weights are simply the result of median smoothing the data that they weight. This means that more weight is given to stronger signal data, that data where one of the inputs is zero is set to the other of the inputs and that data where both of the inputs are equal is left unaltered. All of these are desirable qualities. There may be less desirable statistical consequences and it is not obvious that signal to noise ratio cannot be degraded although intuitively it will not be since on the assumption of Poisson statistics the weights are essentially just the inverse variances. At low signal, a cutoff applies since the major noise contribution will no longer be Poisson.
The output file can be the same as either of the two input files and the second input file can be given a blank name, in which case it is not required. Often the first run will use a single input file to create the output file and subsequent runs will add in more input files to the existing output file.
editext request in
This routine allows the user to modify the Specdre Extension. See the topic "Requests" for details. Users should also consult the description of the Specdre Extension in SUN/140.
- LIST - CREATE - CREATE RESULTS type1 type2 type3 int1 int2 - DELETE - DELETE struct - SET ndf-struct - SET SPECVALS.comp value - SET COORD1.comp value - SET COORD2.comp value - SET scalar value - SET vector element value - TYPE scalar type - TYPE ndf-struct type - TYPE RESULTS type1 type2 type3 - SHAPE RESULTS int1 int2
This routine works in situ and modifies the input file.
There may or may not follow a second word specifying the structure affected. This can be any of the scalar structures in the Specdre Extension, i.e. SPECAXIS, RESTFRAME, INDEXREFR, FREQREF, FREQUNIT. It can also be any of the NDF-type structures in the Specdre Extension, i.e. SPECVALS, SPECWIDS, COVRS, RESULTS. Finally it can be any structure which is an extension to the (NDF-)structure RESULTS. These latter structures are all HDS vectors, their names are LINENAME, LABFREQ, COMPTYPE, NPARA, MASKL, MASKR, PARATYPE. The structure specification is case-insensitive.
Further words contain parameter values, usually one word per parameter. But if the last parameter is a string, it may consist of several words. No quotes are necessary.
There is only one LIST request, namely the sole word LIST. This will cause the complete Specdre Extension - except the contents of NDF arrays - to be listed to the log file or to the screen.
There are two possible CREATE requests.
- "CREATE" on its own will create an empty Specdre Extension, or fail if a Specdre Extension already exists.
- "CREATE RESULTS type1 type2 type3 int1 int2" needs five parameters. Three parameters are case-insensitive HDS data types. These are either _DOUBLE or assumed to be _REAL. The result structure is an NDF-type structure and the different type specifications apply to (i) the data and variance structures of the NDF, (ii) the laboratory frequency extension to the result NDF, (iii) the left and right mask extensions to the result NDF. All extensions to the result NDF are HDS vectors. Some of these have one element for each spectral component, their created length is specified by the fourth (last but one) request parameter, i.e. the sixth word. This word must convert to an integer greater than zero. Other HDS vectors in the extension to the result NDF have one element for each result parameter, their created length is specified by the fifth (last) request parameter, i.e. the seventh word. This word must convert to an integer greater than zero. "CREATE RESULTS" fails if the result NDF already exists.
"DELETE" on its own will delete the whole Specdre Extension. "DELETE struct" will delete the specified structure. This can be any of the NDF-type structures SPECVALS, SPECWIDS, COORD, COVRS, RESULTS. Deleting a structure does not include deleting the whole Extension, even if it becomes empty.
All SET request will create the Specdre Extension, even if the request is not recognised as a valid one.
"SET ndf-struct", where the second word specifies an NDF-type structure, will set the values of the specified structure to the default values. This does not work for COVRS, since it defaults to non-existence. The structure is created if it does not already exist. For SPECVALS and SPECWIDS only the NDF’s data structure is affected. For RESULTS the NDF’s data and variance structures are set to bad values, but all the vectors in the result NDF’s extension remain unchanged.
- "SET SPECVALS" will set the values in the data array of spectroscopic values to the default values. These are copies of the spectroscopic axis centres in the main NDF.
- "SET SPECWIDS" will set the values in the data array of spectroscopic widths to the default values. These are copies of the spectroscopic axis widths in the main NDF.
- "SET COORD" will set the values in the data array of COORD1 and COORD2 to the default values. These are copies axis centres for the first and second non-spectroscopic axes in the main NDF.
- "SET RESULTS" will set the values in the data and variance arrays of the result NDF to bad values.
"SET SPECVALS.comp value" can be used to set the label and unit components of the spectroscopic values’ NDF.
- "SET SPECVALS.LABEL label" will set the value of the label of the spectroscopic values’ NDF.
- "SET SPECVALS.UNITS unit" will set the value of the unit of the spectroscopic values’ NDF.
- "SET COORD1.LABEL label1" will set the value of the label of the COORD1 NDF. Similarly for COORD2.
- "SET COORD1.UNITS unit1" will set the value of the units of the COORD1 NDF. Similarly for COORD2.
"SET scalar value" will convert the third word to a value and put it in the scalar structure specified by the second word.
- "SET SPECAXIS int" will try to convert the third word into an integer. It must be between 1 and the number of axes in the NDF to which this Specdre Extension is an extension. If the value is actually changed, then this command will also delete the NDF-type structures SPECVALS, COVRS and RESULTS. This is because the contents of those structures depends on the choice of spectroscopic axis and become invalid when the value is changed. This command will also create the Specdre Extension and spectroscopic axis structure if they do not yet exist.
- "SET RESTFRAME more words" will put the third and following words (case-sensitive) into the reference frame structure. This command will also create the Specdre Extension and reference frame structure if they do not yet exist.
- "SET INDEXREFR value" will try to convert the third word into a real or double value, depending on the current type of the refractive index structure. This command will also create the Specdre Extension and refractive index structure if they do not yet exist.
- "SET FREQREF value" will try to convert the third word into a real or double value, depending on the current type of the reference frequency structure. This command will also create the Specdre Extension and reference frequency structure if they do not yet exist.
- "SET FREQUNIT int" will try to convert the third word into an integer. This command will also create the Specdre Extension and frequency unit structure if they do not yet exist.
"SET vector element value" will change the value of the specified element in the specified vector. The vector must be one of the extensions of the result NDF. The result NDF must exist beforehand, which implies the existence of the vector. The vector must also be long enough to contain the element specified and the element number must be integer and greater than zero. There are two kinds of vectors, those indexed by spectral component and those indexed by result parameter.
- "SET LINENAME comp more words" will put the forth and following words (case-sensitive) into the comp-th element of the line name structure.
- "SET LABFREQ comp value" will try to convert the fourth word into a real or double value, depending on the current type of the laboratory frequency structure. It will then put the value into the comp-th element of the laboratory frequency structure.
- "SET COMPTYPE comp more words" will put the forth and following words (case-sensitive) into the comp-th element of the component type structure.
- "SET NPARA comp npara" will try to convert the fourth word into an integer greater than or equal to zero. This is the new number of parameters allocated to the comp-th component. Changing this value will affect several parts of the result structure both in their shapes and values. If the comp-th spectral component is allocated more parameters than before, then it may be necessary to provide for a higher total number of parameters, which implies increasing the size of .MORE.SPECDRE.RESULTS.DATA_ARRAY and VARIANCE and of .MORE.SPECDRE.RESULTS.MORE.PARATYPE. At any rate, the information about spectral components with indices higher than comp must be relocated within those arrays.
- "SET MASKL comp value" and "SET MASKR comp value" will try to convert the fourth word into a real or double value, depending on the current type of the mask structures. It will then put the value into the comp-th element of the relevant mask structure.
- "SET PARATYPE para more words" will put the forth and following words (case-sensitive) into the para-th element of the parameter type structure.
A TYPE request can be applied to _REAL or _DOUBLE structures, and of these to scalars and NDF-type structures. Changing the type(s) of the result NDF needs specification of three separate types.
- "TYPE scalar type" can be applied to INDEXREFR and FREQREF. The type specification is case-insensitive. If it is not _DOUBLE, then _REAL is assumed.
- "TYPE ndf-struct type", will change the type of the specified NDF. The type specification is case-insensitive. It must be _DOUBLE or is assumed to be _REAL. This command can be applied to SPECVALS, SPECWIDS, COORD, and COVRS. SPECVALS, SPECWIDS, COORD1 and COORD2 will be created if necessary, COVRS will not be created.
- "TYPE RESULTS type1 type2 type3" will change the types of (i) the NDF’s data and variance, (ii) the NDF’s laboratory frequency extension, (iii) the NDF’s mask extensions. the parameters are case-insensitive. They must be _DOUBLE or are assumed to be _REAL. This command includes creation of the result structure if necessary.
"SHAPE RESULTS int1 int2" will change the shape of the result structure. The two command parameters must convert to integers greater than zero. The first is the number of spectral components to be provided for, the second is the total number of parameters. If the result structure does not exist, then it is created. If it exists, then existing values are retained unless they were stored outside the new bounds.
evalfit in out comp=?
% hdstrace datafile full
The data may be multi-dimensional; if it is, a multi-dimensional FFT is performed. Note that the Figaro routine R2CMPLX will turn an existing real data structure into a complex one acceptable to this routine. FFT does not perform any cosine belling or other tapering of the data, nor does it reduce it to a zero mean.
jm: Jo Murray (RAL, Starlink)
jms: ??? (AAO)
hme: Horst Meyerdierks (UoE, Starlink)
- A blank response gets you one level up in the topic hierarchy.
- A question mark (?) re-displays the current topic.
- An end-of-file character exits fighelp. Note that this is Ctrl-z under VMS but usually Ctrl-d under Unix.
- Any normal text specifies (sub-) topics to look for.
- Each blank-separated word stands for one topic in the hierarchy. E.g. three blank-separated words go down three levels in the hierarchy.
- Each underscore-separated word stands for an underscore-separated word in a single topic
- Words (whether separated by blanks or underscores) that are not unique topics or include wild card characters are expanded and help is given on all matching topics. Wild card characters are % for a single character and * for any number of characters including none. In the word expansion A_G_N would match active_galactic_nuclei, which is one topic. The same is true for A*_G*_N* or active or active*.
When the help text to be printed is longer than the terminal page, then the user is asked to press the Return key before proceeding with output. At this point, too, can an end-of-file character be given to exit fighelp immediately.
fillcube in out
This routine works in situ on an existing output file.
Spectroscopic values must not exist in the Extension of either the input or the output NDF: A unique coordinate axis is required for all axes, including the spectroscopic one, in order to locate the target pixels by matching coordinates between input and output. If this is inconvenient, GROW may be a more suitable application for your purpose.
Spectroscopic widths must not exist in the Extension of the output NDF and are ignored in the input NDF: This information is likely to be present only when spectroscopic values are present as well.
Covariance row sums must not exist in the Extension of the output NDF: The validity of this information is difficult to assess when only parts of spectra might be copied from one cube to another, and when these parts are contiguous in the input but might not be in the output. Input covariance row sums are ignored.
The results in the input Extension are ignored, and results must not exist in the output Extension.
The technique of this routine is to
1 Compress the data array, 2 Follow ridges from start positions by centroiding, 3 Fit a polynomial Y(X) to the centroids, 4 Write the polynomial coefficients to a text file.
The text file can be read by the applications OVERPF and POLEXT. Those applications will also be able to read text files in version 1 format.
hme: Horst Meyerdierks (UoE, Starlink)
fitbb in device=? mask1=? mask2=? ncomp=? theta=? alpha=? lgtemp=? sf=? af=? tf=? comp=? logfil=?
mask = [MASK1(1);MASK2(1)] U [MASK1(2);MASK1(2)] U ... U [MASK1(MSKUSE);MASK2(MSKUSE)].
The elements of the MASK parameters are not checked for monotony. Thus intervals may be empty or overlapping. The number of intervals to be used is derived from the number of lower/upper bounds entered. Either MASK1 or MASK2 should be entered with not more numbers than mask intervals required.
This routine works in situ and modifies the input file.
Meyerdierks, H., 1992b, Fitting resampled spectra, in P.J. Grosbol, R.C.E. de Ruijsscher (eds), 4th ESO/ST-ECF Data Analysis Workshop, Garching, 13 - 14 May 1992, ESO Conference and Workshop Proceedings No. 41, Garching bei Muenchen, 1992
fitgauss in device=? mask1=? mask2=? ncomp=? cont=? centre=? peak=? fwhm=? cf=? pf=? wf=? comp=? logfil=?
mask = [MASK1(1);MASK2(1)] U [MASK1(2);MASK1(2)] U ... U [MASK1(MSKUSE);MASK2(MSKUSE)].
The elements of the MASK parameters are not checked for monotony. Thus intervals may be empty or overlapping. The number of intervals to be used is derived from the number of lower/upper bounds entered. Either MASK1 or MASK2 should be entered with not more numbers than mask intervals required.
This routine works in situ and modifies the input file.
Meyerdierks, H., 1992b, Fitting resampled spectra, in P.J. Grosbol, R.C.E. de Ruijsscher (eds), 4th ESO/ST-ECF Data Analysis Workshop, Garching, 13 - 14 May 1992, ESO Conference and Workshop Proceedings No. 41, Garching bei Muenchen, 1992
fitpoly in device=? mask1=? mask2=? order=? comp=? logfil=?
This routine fits a polynomial to a one-dimensional data set. This can be specified as an NDF section. The data set must extend along the spectroscopic axis.
mask = [MASK1(1);MASK2(1)] U [MASK1(2);MASK1(2)] U ... U [MASK1(MSKUSE);MASK2(MSKUSE)].
The elements of the MASK parameters are not checked for monotony. Thus intervals may be empty or overlapping. The number of intervals to be used is derived from the number of lower/upper bounds entered. Either MASK1 or MASK2 should be entered with not more numbers than mask intervals required.
This routine works in situ and modifies the input file.
fittri in device=? mask1=? mask2=? ncomp=? cont=? centre=? peak=? fwhm=? cf=? pf=? wf=? comp=? logfil=?
This routine fits up to six triangular profiles at a time to a one-dimensional data set. This can be specified as an NDF section. The data set must extend along the spectroscopic axis.
mask = [MASK1(1);MASK2(1)] U [MASK1(2);MASK1(2)] U ... U [MASK1(MSKUSE);MASK2(MSKUSE)].
The elements of the MASK parameters are not checked for monotony. Thus intervals may be empty or overlapping. The number of intervals to be used is derived from the number of lower/upper bounds entered. Either MASK1 or MASK2 should be entered with not more numbers than mask intervals required.
This routine works in situ and modifies the input file.
Meyerdierks, H., 1992b, Fitting resampled spectra, in P.J. Grosbol, R.C.E. de Ruijsscher (eds), 4th ESO/ST-ECF Data Analysis Workshop, Garching, 13 - 14 May 1992, ESO Conference and Workshop Proceedings No. 41, Garching bei Muenchen, 1992
This assumes stability (x positions of the fibres do not move), and vertical orientation of the fibres. These are satisfied by FLAIR (Parker, private communication).
This assumes stability (x positions of the fibres do not move), and vertical orientation of the fibres. These are satisfied by FLAIR (Parker, private communication).
P followed by number -100 to 100 to alter position. ( 1 unit = line extent/100 ) H followed by number -100 to 100 to alter height. ( 1 unit = line height/100 ) W followed by number -100 to 100 to increase width. ( 1 unit = line extent/100 ) S to plot modified line and return to menu.
Options are: N for no weighting V for weighting by Y value E for weighting by 1/error**2
CUR - indicate continuum regions by cursor. ORD - order of polynomial fit. SIG - factor*sigma on fit for continuum point rejection. ERR - factor*error on point for rejection from continuum fit. ITN - number of iterations for continuum point rejection. FIT - perform the polynomial fitting. GAU - proceed to Gaussian fitting (continuum set).
LIM _ delimit edges of line (default is adjacent continuum edges). SIN - fit a single Gaussian to an indicated line. NEW - introduce a Gaussian at the cursor defined position. NEX - introduce a new Gaussian at the peak. INCH - interactively alter peak position, height or width. LIS - list the Gaussians fitted. SEL - select a line to be modified. DEL - delete a selected Gaussian. OPT - optimize the fit. RECAL - read a previous fit data file and plot this fit. HARD - plot results of fit for hardcopy device. SAVE - save the Gaussian fit spectrum as a file (name prompted for on quitting). CON - move to another section of continuum for more fitting. QUIT - quit from program (spectrum analysis complete).
grow in expand stapix endpix size=? out=?
This routine increases the number of axes of a data set by duplicating pixels along some axes while retaining other axes. A simple and common example is turning a single row into a set of identical rows or a set of identical columns. This routine copies an N-dimensional cube into (part of) an (N+M)-dimensional one. The input cube is in general copied several times into the output, but need not fill the output cube. If the output file is new, its size has to be given. If it is an existing file, it cannot be reshaped, the axes of input and output have to be consistent.
This routine may work in situ on an existing output file.
When IN is given as a subset of lower actual dimensionality than its base NDF, the dimensionality will formally be the same as that of the base NDF with interspersed dimensions (axis lengths) of 1. If this is inconvenient, use the application SUBSET to create the subset in advance and without degenerate axes.
Use the cursor to select a position in the image previously displayed with the application IMAGE. Press one of the following:
D to display coordinates and pixel value, <space> to record pixel position, Q to quit the application.
Any other key is treated like ’D’, alphabetic keys are case-insensitive.
HME: Horst Meyerdierks (UoE, Starlink)
CENTERS requires a list of approximate X,Y input positions which it reads from environment variables. Usually this list is created interactively with ICUR or IGCUR. IMPOS creates the list by reading it from a text file, thus allowing CENTERS to be used non-interactively.
The input file is free-format, with one X,Y position per line. The X and Y values should be separated by one or more spaces and be expressed in pixels. Up to a hundred positions may be included.
The VARIANCE array, if present, is propagated in exactly the same way as the DATA array. This procedure it not formally correct if re-sampling occurs (that is, if either of the shifts is non-integer) and in this case the resulting variance will probably under-estimate the true error.
The VARIANCE array, if present, is propagated in exactly the same way as the DATA array. This procedure it not formally correct and the computed variance will probably under-estimate the true error.
moments in comp
This routine calculates the moments for each spectrum in a cube.
This routine works in situ and modifies the input file.
movie in axis low=? high=?
This routine takes a three-dimensional NDF and displays its two-dimensional slices sequentially on a grey or colour graphics device.
The input IMAGE array may have error and quality information. An error or variance array is required to perform true optimal extraction as the points should be weighted using the errors on each point as well as the spatial profile information. If an error array is not present (or not all the errors in a column are known) the extraction is performed assuming equal errors on every point in the column. The output spectrum has an error array only if the input image has an error array. The WEIGHT keyword may be set to NO to suppress error weighting even when errors are available.
hme: Horst Meyerdierks (UoE, Starlink)
HME: Horst Meyerdierks (UoE, Starlink)
The output data follows the input in structure, except that the data array is of type DOUBLE. A zero-filled imaginary data array is also created. Any axis structures are retained.
HME: Horst Meyerdierks (UoE, Starlink)
resamp mode inlist out start step end
(This command was called RESAMPLE in Specdre, but because of a command of the same name in Figaro, it has been renamed.)
Depending on the operation mode this routine either
- takes a list of one-dimensional NDFs as input, re-samples them to a common linear grid of axis values, and averages them into a single one-dimensional NDF, or
- takes a single N-dimensional NDF as input and re-samples each row into a new row of a similar output NDF; re-sampling is along the first axis, all further axes are retained.
- ’SPECTRA’: Average several 1-D input NDFs into a single 1-D output NDF. Re-sample before averaging.
- ’CUBE’: Accept only one - but N-D - input NDF. Re-sample each row (1-D subset extending along first axis) separately.
Note that a single spectrum could be handled by both modes; it is more effective to treat it as a 1-D cube than as an N=1 average. [’Cube’]
This NDF group specification consists of
This routine recognises the Specdre Extension v. 0.7.
x x x x
|1111111|2222222| |3333333|4444444|
|1111111| |333333333333333333333333333333333| |222222222222222222222222222222222| |4444444|
Since this routine uses the overlap between input and output pixels as weights for re-sampling, non-bad pixels next to such a gap in data will affect too many output pixels with too much weight. Users should be aware that spectra as illustrated here are somewhat pathologic and that they should be given an explicit width array.
The routine accesses one input NDF at a time and needs not hold all input NDFs at the same time. However, The routine needs temporary workspace. If KMAX is the number of pixels in an input NDF and LMAX the number of output pixels, the routine needs - one vector of length LMAX, - one matrix of size KMAX by LMAX, - two matrices of size LMAX by LMAX.
These workspaces are usually of type _REAL. All (!) are of type _DOUBLE if the first valid input NDF has type _DOUBLE for either of the following: - pixel position, - pixel width, - data value, - data variance.
In addition one integer vector of length LMAX is needed.
There is an oddity about this routine if only one input NDF is used and its variance array is used and some or all variance values are zero. In this case the output will formally still be an average of input NDFs using 1/variance as weights. Data with zero variance cannot be weighted and are regarded as bad. If this is a problem, users can set VARUSE false to ignore all the input variances. (Note that zero variances always cause that pixel to be ignored by this routine. But where it really calculates an average of two or more spectra, this is considered proper procedure.)
Meyerdierks, H., 1992b, Fitting resampled spectra, in P.J. Grosbol, R.C.E. de Ruijsscher (eds), 4th ESO/ST-ECF Data Analysis Workshop, Garching, 13 - 14 May 1992, ESO Conference and Workshop Proceedings No. 41, Garching bei Muenchen, 1992
XIN = C(1)+C(2)*XOUT+C(3)*YOUT YIN = C(4)+C(5)*XOUT+C(6)*YOUT
You can invert the transformation by using the INVERT keyword. If you don’t wish to enter TRANSFORM, respond with a <CR> and you will be prompted for XMAG, YMAG, and ROTATE instead.
1 - Nearest pixel. No interpolation is performed, the value of the nearest pixel is used. This is fast. 2 - Linear. A linear interpolation is performed using the values of the 4 nearest pixels. 3 - Constant noise. Uses the 9 nearest pixels in some mysterious way.
The principal advantages for SCUBA users of SCLEAN over CLEAN are that this application marks bad pixels by setting one of the bits (specified by the parameter BITNUM) of the quality array, rather than simply setting the data value to the magic bad value, and that an additional viewing mode is available which enables a plot of the values for a given bolometer to be seen easily.
In interactive mode, an image is displayed and operations are specified using the cursor and keyboard. In batch mode, the program will read a file of instructions and perform the operations without user intervention. SCLEAN will also optionally write a log file of the operations it has performed in the batch file format, so that a set of operations can be performed interactively, and then reperformed on the same or a different NDF by writing to the log file in the first instance and using that as a batchfile for subsequent runs.
If a line is encountered which cannot be executed (e.g. it contains an invalid command or refers to a region outside the image) the user is notified and the line is ignored. No other attempt is made to verify that the commands in the batch file are appropriate for the particular image being examined.
Normally the batchfile will have been written by a previous invocation of SCLEAN using the LOGFILE parameter, but it can in principle be modified or written by hand. The format of the file is plain text consisting of one single letter command in column one followed by zero, one or two numeric arguments. Anything after a hash (#), and blank lines, are ignored.
W - display Whole image E - Expand image around cursor position B - SCUBA type display for cursor column R - delete indicated Row (horizontal line) & fix it C - delete indicated Column (vertical line) & fix it X - delete indicated area and fix by interpolation in the x direction Y - like X, but uses vertical interpolation L - delete indicated line, but don’t fix K - delete indicated column, but don’t fix A - delete pixel at cursor, but don’t fix G - mark as Good pixel at cursor S - set stretch, ie High & low limits for display D - set degree of fit used for interpolation N - set size of deleted area for "X" and "Y" P - indicate current cursor position T - test area to see what BCLEAN might find there U - Undo last operation - replace with original image data Q - Quit program
A summary of available commands is displayed.
The whole image is displayed, stretched or compressed in both directions to fit the available plotting surface.
A section of the image around the cursor position is displayed with ZOOM * ZOOM display pixels representing each image pixel.
A special display mode is used suitable for NDFs from the SCUBA instrument. Each image pixel is at least ZOOM display pixels in X and Y directions, although it will be displayed larger if there is space. Additionally, on one half of the screen is displayed a line plot of one column (the column the cursor was on when ’B’ was selected). If the cursor is on the graph half of the screen it is considered to be on the column plotted.
The row of pixels at the cursor is replaced by interpolation.
The column of pixels at the cursor is replaced by interpolation.
The XSIZE * YSIZE region at the cursor is replaced by a horizontal interpolation using a polynomial fit of degree DEG.
The XSIZE * YSIZE region at the cursor is replaced by a vertical interpolation using a polynomial fit of degree DEG.
The user is queried for the parameters HIGH and LOW, the highest and lowest values of pixel to be represented in the colour mapping.
The row at the cursor is marked as bad.
The column at the cursor is marked as bad.
The pixel at the cursor is marked as bad.
The pixel at the cursor is marked as good (In fact the bit BITNUM in the quality byte is set to zero. If other bits in the quality byte are set, or if the data value itself is flagged bad, the pixel may still be bad.)
The user is prompted for the parameter DEG, the degree of the polynomial used for interpolation by the X and Y commands.
The user is prompted for the values of the parameters XSIZE and YSIZE, the dimensions of the box used for interpolation by the X and Y commands.
The current cursor position is printed.
The algorithm used by the BCLEAN application is run and the user is informed what spikes it would identify.
The last operation which modified the data is undone. Until the undo buffer fills up (usually it does not) all cleaning operations back to the start of the session can be undone in a Last In First Out fashion.
The program is exited following a prompt for confirmation.
G (the original option) fits a guassian to the profile of the data. This is suitable for stellar spectra taken with a wide slit, or any data that genuinely is gaussian. E (Edge) uses an algorithm that looks for the edges in data and takes the average edge position. It is suitable for data that is roughly ‘top-hat’ in shape but tends to give rather quantised results when the edges are very sharp (such edges cannot be determined to better than a pixel). This shows up clearly if the SOFTD option is used. C (COG) is a compromise option for non-gaussian data that determines the edges, then used the center of gravity of the data between them. B (Balance) is an extremely crude algorithm that determines the centre of gravity over the width specified. It is very robust, but very crude - use only in desperation.
HME: Horst Meyerdierks (UoE, Starlink)
JFL: John Lightfoot (ROE)
speccont in overlay=? world=? start=? step=? end=?
This routine displays a two-dimensional cut as a contour plot. The cut can be an ordinary image, a long-slit spectrum, or any cut through a spectroscopic data cube. The plot area is the current (AGI) picture of the graphics device.
This routine recognises and uses coordinate transformations in AGI pictures.
specgrid in overlay=? bottom=? left=? top=? right=? labspc=? cworld=? legend=? sworld=? xlegend=? ylegend=?
Left and right bound must not be equal, neither must bottom and top. [!]
Left and right bound must not be equal, neither must bottom and top. [!]
This routine recognises and uses coordinate transformations in AGI pictures.
specplot in overlay=? bottom=? left=? top=? right=? labspc=? world=?
This routine plots a spectrum (or any one-dimensional NDF section) in the current (AGI) picture of the graphics device.
This routine recognises and uses coordinate transformations in AGI pictures.
subset in out
Takes a rectangular subset of a data set. The given data set and the resulting subset may have up to seven axes. Axes that become degenerate by sub-setting - i.e. along which only one pixel is chosen - are deleted from the subset. Thus the subset may have smaller dimensionality than the original.
HME: Horst Meyerdierks (UoE, Starlink)
X data OUTPUT=ARC+(ARC2-ARC1)*FRACTION.
xtract in colaps out
This routine reduces the number of axes of a data set by averaging pixels along some axes while retaining other axes. A simple and common example is averaging all or a certain range of rows (or columns) of an image to create a single row, e.g. an averaged spectrum from a 2-D slit spectrum. Input pixels with bad or zero variance are treated as bad, i.e. disregarded in the averaging (unless NOVAR is true).