Normalises one NDF to a similar NDF by calculating a scale factor and
zero-point difference NORMALIZE
To guard against erroneous data values, which can corrupt the fit obtained, the application then performs a number of iterations. It calculates a noise estimate for each bin according to the rms deviation of data values in the bin from the straight-line fit obtained previously. It then re-bins the data, omitting values which lie more than a specified number of standard deviations from the expected value in each bin. The straight-line fit is then re-calculated. You can specify the number of standard deviations and the number of iterations used.
A plot is produced after the final iteration showing the bin centres, with error bars representing the spread of values in each bin. The best fitting straight line is overlayed on this plot.
Optionally, an output NDF can be created containing a normalised version of the data array from the first input NDF.
For the special case of two-dimensional images, if IN2 (or IN1) spans only a single row or column, it can be used to normalize each row or column of IN1 (or IN2) in turn. See Parameter LOOP.
TRUE
if labelled
and annotated axes are to be drawn around the plot. The width of the margins left for
the annotation may be controlled using Parameter MARGIN. The appearance of the axes
(colours, founts, etc.) can be controlled using the Parameter STYLE. The dynamic
default is TRUE
if CLEAR is TRUE
, and FALSE
otherwise. []
TRUE
the current picture is cleared before the plot is drawn. If CLEAR is FALSE
not
only is the existing plot retained, but also an attempt is made to align the new
picture with the existing picture. Thus you can generate a composite plot within a
single set of axes, say using different colours or modes to distinguish data from
different datasets. [TRUE]
!
) value is supplied, the values used are the auto-scaled values,
calculated according to the value of PCRANGE. Note, this parameter controls the
range of data used in the fitting algorithm. The range of data displayed in the
plot can be specified separately using Parameters XLEFT, XRIGHT, YBOT, and
YTOP. [!]
!
) is supplied no plot will be made. [
Current
graphics device
] FALSE
. [TRUE]
FALSE
. [TRUE]
TRUE
will cause every row or column in to be normalised independently of each
other. Specifically, if IN2 spans only a single row or column, then it will
be used to normalise each row or column of IN1 in turn. Any output NDF (see
Parameter OUT) will have the shape and size of IN1. If IN1 spans only a single
row or column, then it will be normalised in turn by each row or column of
IN2. Any output NDF (see Parameter OUT) will then have the shape and size of
IN2. In either case, the details of the fit for each row or column will be
displayed separately. Also see Parameters OUTSLOPE, OUTOFFSET, and OUTCORR.
[FALSE]
!
) value is supplied, the value used is 0.15
(for all
edges) if annotated axes are produced, and zero otherwise. [
current value]
0
gives a box, 1
gives a dot, 2
gives a cross, 3
gives
an asterisk, 7
gives a triangle. The value must be larger than or equal to
31.
[
current value]
[2]
[50]
[2]
[3.0]
!
) value indicates that an output
NDF is not required. See also Parameter LOOP. [!]
[!]
[!]
[2,98]
A comma-separated list of strings should be given in which each string is either an
attribute setting, or the name of a text file preceded by an up-arrow character
""
.
Such text files should contain further comma-separated lists which will be read and
interpreted in the same manner. Attribute settings are applied in the order in which
they occur within the list, with later settings overriding any earlier settings given
for the same attribute.
Each individual attribute setting should be of the form:
name=value
where name
is the name of a plotting attribute, and
value
is the value to assign to the attribute. Default values will be used for any
unspecified attributes. All attributes will be defaulted if a null value (!
)–-the
initial default–-is supplied. To apply changes of style to only the current invocation,
begin these attributes with a plus sign. A mixture of persistent and temporary style
changes is achieved by listing all the persistent attributes followed by a plus sign
then the list of temporary attributes.
See Section E for a description of the available attributes. Any unrecognised attributes are ignored (no error is reported).
The appearance of the best-fitting straight line is controlled by the attributes
Colour(Curves), Width(Curves), etc. (the synonym Line may be used in place of Curves). The
appearance of markers is controlled by Colour(Markers), Width(Markers), etc. (the synonym
Symbols may be used in place of Markers). The appearance of the error bars is controlled
using Colour(ErrBars), Width(ErrBars), etc. Note, Size(ErrBars) controls the length of the
serifs (i.e. the cross pieces at each end of the error bar), and defaults to 1.0.
[
current value]
[!]
!
) value is supplied, the value used is the minimum
data value used by the fitting algorithm from IN2 (with a small margin). The
value supplied may be greater than or less than the value supplied for XRIGHT.
[!]
!
) value is supplied, the
value used is the maximum data value used by the fitting algorithm from IN2
(with a small margin). The value supplied may be greater than or less than
the value supplied for XLEFT. [!]
!
)
value is supplied, the value used is the minimum data value used by the fitting
algorithm from IN1 (with a small margin). The value supplied may be greater
than or less than the value supplied for YTOP. []
!
) value is supplied, the value used is the maximum data value used
by the fitting algorithm from IN1 (with a small margin). The value supplied
may be greater than or less than the value supplied for YBOT. [!]
TRUE
, the offset of the linear fit is constrained to
be zero. [FALSE]
normalize.sdf
parameter file (as in the all the examples below except where noted). The
NDF cl123c is the normalised version of the input cl123a. "Gain calibration"
. The error bars are drawn with no
serifs. The application stores two pictures in the graphics database in the following order: a FRAME picture containing the annotated axes and data plot, and a DATA picture containing just the data plot. Note, the FRAME picture is only created if annotated axes have been drawn, or if non-zero margins were specified using Parameter MARGIN. The world co-ordinates in the DATA picture will correspond to data value in the two NDFs.
The routine correctly processes the AXIS, DATA, QUALITY, VARIANCE, LABEL, TITLE, UNITS, WCS, and HISTORY components of an NDF, and propagates all extensions to the output NDF. All propagated components come from the NDF to be normalised.
At the moment, variance values are not used in the fitting algorithm but are modified in the output NDF to take account of the scaling introduced by the normalisation. (A later version may take account of variances in the fitting algorithm.)
Processing of bad pixels and automatic quality masking are supported.
Only _REAL data can be processed directly. Other non-complex numeric data types will undergo a type conversion before processing occurs. _DOUBLE data cannot be processed due to a loss of precision.
The pixel bounds of the two input NDFs are matched by trimming before calculating the normalisation constants, and are mapped as vectors to allow processing of NDFs of any dimensionality. An output NDF may optionally be produced which is based on the first input NDF (IN1) by applying the calculated normalisation constants to IN1.