next up previous
Next: velmap - Builds a velocity map of an emission line from a spectral-cube NDF by line fitting.
Up: Descriptions of Individual Applications
Previous: step - Steps through the each - plane of a three-dimensional IFU NDF in the spectral direction using KAPPA:DISPLAY to


trendview - Plots multiple spectra from a cube overlaying fitted trends and mask

Description:
This displays whole or part of a spectral cube in a multiple line plot graphic of data values versus spectral co-ordinates via KAPPA:CLINPLOT. In addition to the raw data, fitted trends and masks generated by KAPPA:MFITTREND are overlaid in different colours for comparison and quality assessment. There is an option to also draw the residuals. The raw data appear in yellow, the fitted trends in darkgreen, the mask in red, and the residuals in blue.

The lower-left plot has annotated axes of data value against spectral co-ordinates.

For ease of use the baseline and mask files have defined names given by the name argument and suffix arguments. See the Notes.

Usage:
trendview [-d device] [-i filename] [-o offset] [-r] [-s suffix] [-y ytop[,ybot]]

Command-line Arguments
  • -d
    The device name. [xwindows]

  • -i filename
    The name of the raw dataset. The specified file should be a three-dimensional NDF. By default the script will prompt for the input file. A section may be defined to home in either or both spatial and spectral regions.

  • -o
    An offset to apply to the mask, whose good values are 0. In other words the data-value level at which to draw the mask. Its purpose is improve mask visibility; and to narrow the y plotting range, hence see the residuals between the raw data the fitted trends more clearly. [0]

  • -r
    If present the residuals are plotted.

  • -s
    The file suffix appended to the baseline and mask file names. [""]

  • -y ytop[,ybot]
    A comma-separated list giving the upper and lower data-value limits of every spectrum plot in either order. A positive lower limit will be ignored if the offset (-o) is not positive too or when residuals are to be plotted (-r). A single value is deemed to be the upper limit, and the lower limit is defaulted.

    If this option is not specified, the limits derive from the range given by the 1 and 99 percentiles, extending by 5% of this range below its minimum and 2% above its maximum. However, a positive lower limit may again be substituted by a default whenever the offset is not positive too, or residuals are to be plotted.

    When the lower limit requires a default, it is set to negative one twentieth of the upper limit if there is no (-o) offset applied to the mask, otherwise it is the offset level minus a twentieth of the range between the upper limit and the offset. []


Examples:
trendview -i ac9_trim -y 8

Plots the spectra in NDFs ac9_trim, ac9_trim_bsl, and ac9_trim_msk between data values $-$0.4 and 8.
trendview -i ac9_trim"(2$\sim$10,4$\sim$8,)" -y 0.5,10

As before but the plot range is $-$0.5 to 10, and display only displays a 10-by-8 spatial pixel region.
trendview -i ac9_trim"(2$\sim$10,4$\sim$8,-200:200)" -y 0.5,10

As the previous example but now only a part ($-$200 to 200) of the spectral range appears in each plot.
trendview -i ac9_trim -o _o4 -o 7

Plots the spectra in NDFs ac9_trim, ac9_trim_bsl_o4, and ac9_trim_msk_o4 between data values derived automatically percentiles in ac9_trim, with the mask line drawn at value 7.
trendview -i ac9_trim"(2$\sim$10,4$\sim$8,)" -r -y -3,8

As the second example but now the residuals are also plotted. The lower data-value limit on the plots is $-3$ to accommodate negative residuals.
Notes:
  • The raw data is given by the -i argument; the fitted trends or baselines is called $<$filename$>$_bsl$<$suffix$>$; and the mask is called $<$filename$>$_msk$<$suffix$>$, where $<$filename$>$ is value of the -i option without any section or file extension and $<$suffix$>$ is the value of option -s.

  • No key is plotted and the margins are narrow to maximise the plot region. However, these are not guaranteed to work with all aspect ratios of the graphics device and spatial pixels, and for example the title may be clipped or completely absent. This is unlikely to cause any hardship while used an exploratory tool. However, as is normal for a publication graphic, some adjustments of the style options may be required. See Descriptions of Plotting Attributes to be used with STYLE parameter in the CLINPLOT calls, and the margins can be enlarged through the MARGIN parameter.

Output
A composite CLINPLOT plot showing the raw data, and the baseline fit and mask from MFITTREND.
Prior Requirements
  • The supplied NDFs should be spectral cubes with the spectral being the third.

  • A large display area is recommended if the screen is used for display, for instance,
           xmake xwindows -width 1200 -height 900
    that mostly fills the screen. The actual width and and height in pixels will depend on your screen's dimensions.

    Also a suitable background colour is needed that will show all four loci for the hardwired colours. This should be of mid-intensity so that the light and dark curves will both be visible. For example,
           palentry 0 steelblue
    will do this for the original colour scheme.




next up previous
Next: velmap - Builds a velocity map of an emission line from a spectral-cube NDF by line fitting.
Up: Descriptions of Individual Applications
Previous: step - Steps through the each - plane of a three-dimensional IFU NDF in the spectral direction using KAPPA:DISPLAY to

DATACUBE --- An IFS datacube manipulation package
Starlink User Note 237
A. Allan & Malcolm J. Currie
2008 July 1
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council