Pipeline processing
This page introduces the syntax of the pipeline processing that can be applied on any FITS file, and describes
the implemented commands.
Introduction
The first version of the pipeline processing has been implemented
during the period 1999 January to June. The procedures currently
publicly available allow to apply the basic steps of data reduction
to the files archived in the Fits archive. In the future, new procedures
will be implemented and they will be applicable to other material through
data-mining over the network.
The pipeline processing is divided in three parts:
- Basic pipeline (pipe0). It consists in the basic calibrating
operations (flat-fielding, wavelength and flux calibrations). By default,
these operations are
applied when extracting the data but the user can desable some of them.
- Data processing and analysis pipeline.
Different data processing functions are implemented on the pipeline:
- Extract a region of the image (for example around the object).
- Remove the spikes due to cosmic rays.
- Subtract the sky (for long slit spectroscopy).
- Resampling
- Red-shift and broadens a spectra
- Data evaluation
In addition these functions affecting the data, visualisation and data
evaluation
function are available and can be inserted at any place along the pipeline.
(the data evaluation function have no effect if the output of the pipeline
is not an HTML page).
z=d
Display entry from the HFA index catalogue (n=11), no
data processing
z=p
Input an image into the pipeline and close the pipeline
(output). This is used to download data as archived.
z=s
Statistics
z=vg
Gray scale display of an image
z=vp
View the profile along the slit (long slit spectra)
z=vs
View a spectrum
The output of the pipeline can be directed to an Hypertext page, in such
case the effect of the pipeline processing can only be evaluated through
the visualisation and data evaluation functions. It can also be downloaded
as a FITS file, either to a file or to a fits viewer.
The pipeline functions may be selected from the HTML editor displayed when
opening a file form the fits archive. They can also be easily accessed
with a utility program like wget. The parameters to the HyperLeda request are
normally passed with the GET method, and you simply have to learn the
syntax and the meaning of the arguments to make requests more elaborated
than what permet the
editor. We are trying to keep the editor simple enough to allow an easy and
fast evaluation of the content of the archive.
The evolution of the system has been very rapid in the recent months and
in many places the documentation is out of date. We are currently working
to remedy this point.
We do not foresee important change in the pipeline software before the end
of this year (1999).
A typical request involving a data processing pipeline is:
fG.cgi?c=i&fa:L93111HP1/00147&z=ffc|wrs[1,-1,-1,-2]|sks|ext[o,a,10]|prj[a,1]&a=html
You see that the request langage is compact and quite obscur, let us explain
what does this request.
The request is composed by the name of the request, here fG, and the command
located after the "?". The command consists in different parameters separated
by the character "&". The first parameter c=i says the "type" of
request.
The second parameter fa:L93111HP1/00147,
a shortcut for o=fa:..., identifiy the file in the archive to
enter in the pipeline. The third parameter, z=..., is the pipeline.
The last parameter a=html says that the output is an html page.
The general rules are that (1) the order of the parameters is unsensitive
(2) each parameter should appear only once (3) most
of the parameters have default value, eg. the default for c is
c=o.
The pipeline z=... described above apply the flat-fielding
correction (ffc), resample into wavelength with a linear
wavelength scale, default wavelength range and oversampling by a factor 2
(wrs[1,-1,-1,-2]), then the sky is subtracted, a 10 arcsec
region around the obhject's center is extracted and then averaged.
Belong to the basic pipeline
code: ffc
The Flat-field correction subtracts the bias and divides by the flat-field.
The bias may be a file in the archive indicated by the keyword
H_ASP001. If this keyword is not defined, the bias is assumed to
be a constant value taken from the keywords H_BIAS.
The Flat-field is a file in the archive indicated by the keyword
H_ASP002.
Belong to the basic pipeline
code: wrs
arguments: Lstep,Wstart:Wend,Wstep
The wavelength resampling uses the wavelength calibration relation
pointed to by the keyword H_WCALIB.
The program allows to resample in wavelength or logarithm of wavelength
and to choose the sampling limits and the step.
The pipeline editor, however, provides only a wavelength resampling with
a resampling factor of 1.
The resampling is based on a cubic spline interpolation.
Lsetp
: Type of resampling: Lsetp=1
: Linear;
Lsetp=2
: Logarithmic
Wstart
: Wavelength of first pixel in output spectra (in Angstrom). If Wstart=-1
the first pixel in output spectrum will
corresponds to the firts pixel in input spectrum.
Wend
: Wavelength of last pixel in output spectra (in Angstrom). If Wend=-1
the last pixel in output spectrum will
corresponds to the last pixel in input spectrum
Wstep
: Step in Angstrom between two pixels in the output
spectrum. If Wstep < 0
, it is the resampling factor.
Belong to the basic pipeline
code: fca
arguments: Scaling,Type
Only for spectroscopy.
The flux calibration consists in dividing each scan of the spectrum
by the flux calibration relation stored in a FITS HDU pointed to by a
keyword H_FCAPHY, H_FCANOR, ....
Scaling
: The flux scale: Scaling=1
, linear;
Scaling=2
, decimal logarithm; Scaling=2
, magnitude.
Type
: Nature of the resulting flux. Type=ins
,
instrumental flux. Output of instrument, ie. detected flux corrected for
detector effects (bias subtraction, flatfielding...);
Type=obs
, Observed flux, below the earth atmosphere (corrected
for instrumental response)
Type=obs
: Normalized to continuum (spectrum) or background (image).
Belong to the basic pipeline
code: fno
arguments: Lfc,Syst,W1,W2
Only for spectroscopy.
The flux normalisation consists in dividing each scan of the spectrum by
a constant determined by averaging the concerned scan between two
wavelengths.
The flux can be returned in a linear scale (this is the default: Lfc=1)
or in decimal logarithm Lfc=2.
The second argument Syst indicates the coordinate system used for the
last two arguments. The value can be m (default) n or
w meaning respectively: maximum range, world coordinates or
natural coordinates. W1 and W2 are these coordinates.
The vector used to normalize the flux is stored in an HDU appended to the
current FITS file.
Belong to the data processing and analysis pipeline
code: ext
arguments: method,arguments
The extraction has two methods. c for an extraction
specified by the coordinates of the region, or o for and extraction
around the current object. arguments are passed respectively
to xtc or xto
Belong to the data processing and analysis pipeline
code: xtc
arguments: e1,e2,e3,e4
e1 to e4 are the coordinates of the first pixel, first line,
last pixel and last line. Each coordinate has the form Si where
i is a number and Sspecily the coordinate system:
- ncoordinate in pixels (natural coordinate)
- wworld coordinate
- mthe coordinate takes the extremum value allowed on the image
Belong to the data processing and analysis pipeline
code: xto
arguments: system,e1,e2
Extract a region around the object currently selected.
The extraction region is determined using the keywords:
H_OBJP1, H_OBJP2 and H_RADIUS, and possibly
uses also the keywords defining the scale.
e1 and e2 are the extraction sizes along each axes,
if there is only one spatial axis, e2 may be omitted and otherwyse
it is ignored.
system stand for n,w,w or a,
with the meaning:
- n: e1 and e2 are in pixels (natural coorditates)
- w: e1 and e2 are in world coordinates
- o: e1 and e2 are fractions of H_RADIUS
- w: e1 and e2 are in arcsec
Belong to the data processing and analysis pipeline
code: prj
arguments: method,axis
Combine the lines or columns of a 2D image to produce a 1D image.
method can be a, m or o corresponding
to average, median or optimum extraction. axis is the number of the
axis onto which data are projected.
Belong to the data processing and analysis pipeline
code: sks
LSS context only
The sky is computed on both side of the object and is subtracted
to the whole image.
The sky regions are detemined using the keywords:
H_CENT2 and H_RADIUS.
In each sky region the sky is computed in each wavelength bin as the median
of the pixel values in the sky region.
The sky spectrum is stored in the fits extension named: SKY.
Present limitations:
The subtracted sky is the average betwwen the two sky region. It will
probably be upgraded to a linear interpolation between these two
regions.
Belong to the data processing and analysis pipeline
code: spk
arguments: fwhm,signi,iter
The algorihm detects spikes, ie. features narrower than fwhm
which are above a threshold of signi times the noise. The
process may be iterated up to iter times in order to remove
elongated events.
It is advised to insert this function on the pipeline before any
resampling since spikes contain information at the cut-off
spatial frequency (by definition) and hence are poorly interpolated.
Interpolation usually result in a smearing (making their afterward detection
harder) or worse in oscilations (eg. with splines interpolator) producing
some "replicas" of the spike in its wings.
Belong to the data processing and analysis pipeline
code: vsg
arguments: cz,sigma,g
Shift a spectra by the amount cz (in km/sec), broaden it
by a gaussian of standard deviation sigma and multiply it
by g.
The convolution proceeds in the Fourier space from spectra sampled in
log-wavelength. Hence, if necessary (ie. if the spectra is calibrated in
wavelength), this function calls wrs before the convolution
to resample in logarithm
(oversampling by a factor 2) and calls it again after the convolution
to restore the sampling. This is time consuming and resampling is a source of
degradation, so, try to minimize the number of resampling.
vsg cannot be performed if the spectrum has not been calibrated in
wavelength.
Belong to the data processing and analysis pipeline
code: msk
arguments: e1,e2,e3,e4,repval
e1 to e4 are the coordinates of the first pixel, first line,
last pixel and last line. Each coordinate has the form Si where
i is a number and Sspecily the coordinate system:
- ncoordinate in pixels (natural coordinate)
- wworld coordinate
- mthe coordinate takes the extremum value allowed on the image
repval is the replacement value . If it is not given the pixels will
be set to the usual "not a number" value.
This procedure may be used, for example, to mask the regions of telluric
lines in a spectrum.
Belong to the data processing and analysis pipeline
code: fil
arguments: filter,p1,p2,...
filter is the name of the filter
p1, p2 ... are the parameters of the filter.
Available filters are (i) gaussian convolution and (ii) gaussian unsharp masking.
gaussian convolution: The image is convolved by a gaussian of standard deviation
p1 (in pixels) along both axes.
gaussian unsharp masking: The image is convolved by a gaussian of standard deviation
p1 (in pixels) along both axes and the function returns the difference between the
original image and the convolved image.
Data evaluation
code: vg
arguments: low-cut,highcut
Ommit the arguments, or set them to blank to have an automatic determination
of the cuts.