|
ERIS Pipeline Reference Manual 1.9.2
|
Header for plotting library. More...
#include <sc_basic.h>Go to the source code of this file.
Functions | |
| cpl_error_code | sc_plot_single_spec (const cpl_table *spec, cpl_parameterlist *plottags) |
| cpl_error_code | sc_plot_double_spec (const cpl_table *spec1, const cpl_table *spec2, cpl_parameterlist *plottags) |
| cpl_error_code | sc_overplot_spec (const cpl_table *spec, cpl_parameterlist *plottags) |
| cpl_error_code | sc_plot_hist (const cpl_table *histdat, cpl_parameterlist *plottags) |
| cpl_error_code | sc_plot_single_spec_with_lines (const cpl_table *spec, cpl_parameterlist *plottags) |
| void | sc_setplottags_single_spec (cpl_parameterlist *plottags, const char *x_column, const char *y_column, const char *title, const char *x_label, const char *y_label, const cpl_parameterlist *parlist) |
| void | sc_setplottags_double_spec (cpl_parameterlist *plottags, const char *x_column1, const char *y_column1, const char *title1, const char *x_label1, const char *y_label1, const char *x_column2, const char *y_column2, const char *title2, const char *x_label2, const char *y_label2, const cpl_parameterlist *parlist) |
| void | sc_setplottags_overplot_spec (cpl_parameterlist *plottags, const char *x_column, const char *y_column1, const char *y_column2, const char *specname1, const char *specname2, const char *title, const char *x_label, const char *y_label, const cpl_parameterlist *parlist) |
| void | sc_setplottags_hist (cpl_parameterlist *plottags, const char *title, const char *x_label, const char *y_label, const cpl_parameterlist *parlist) |
| void | sc_setplottags_single_spec_lines (cpl_parameterlist *plottags, const char *title, const char *x_label, const char *y_label, const cpl_parameterlist *parlist) |
| cpl_error_code sc_overplot_spec | ( | const cpl_table * | spec, |
| cpl_parameterlist * | plottags | ||
| ) |
This program is dedicated to produce plots for a direct comparison of spectra. The input must be a CPL table containing ONE column used as abscissa ('x_column' in plot tags), but TWO individual columns must be present to be used as individual ordinates ('y_column1' and 'y_column2', see plottags). This is necessary, as it must be ensured that both spectra are defined on the same wavelength grid.
The comparison is made with two plot panels lying above each other. The upper panel of the plot is a direct overplot of the two spectra, whereas in the lower panel the Residual plot (Spectrum #1 - Spectrum #2) is given.
INPUT:
| spec | Table containing both spectra (output of molecfit) |
| plottags | parameter list containing tags |
ERRORS:
Definition at line 893 of file sc_plot.c.
References sc_basic_initstring(), and SC_MAXLEN.
| cpl_error_code sc_plot_double_spec | ( | const cpl_table * | spec1, |
| const cpl_table * | spec2, | ||
| cpl_parameterlist * | plottags | ||
| ) |
This program plots two spectra, e.g. object and sky spectra. Input parameters must be CPL tables. The two spectra are plotted on two different panels, lying upon another. Spectrum 1 is plotted in the upper Spectrum 2 in the lower panel. Hence, required tags for the individual data sets have to be set using sc_setplottags_double_spec().
INPUT:
| spec1 | Spectrum 1 |
| spec2 | Spectrum 2 |
| plottags | parameter list containing tags |
ERRORS:
Definition at line 464 of file sc_plot.c.
References sc_basic_initstring(), and SC_MAXLEN.
| cpl_error_code sc_plot_hist | ( | const cpl_table * | histdat, |
| cpl_parameterlist * | plottags | ||
| ) |
This program creates a histogram from a 2-column CPL table. This table must have two columns labelled as "bins" and "counts" (see create_hist() ).
INPUT:
| histdat | 2 column cpl table |
| plottags | parameter list containing info from parameter file |
ERRORS:
Definition at line 1430 of file sc_plot.c.
References sc_basic_initstring(), and SC_MAXLEN.
| cpl_error_code sc_plot_single_spec | ( | const cpl_table * | spec, |
| cpl_parameterlist * | plottags | ||
| ) |
This program creates a plot from two choosable columns of a CPL table. It expects the following plot tags:
- column name used for the x-axis - column name used for the y-axis - plot title - label for x-axis - label for y-axis
These plot tags have to be set via sc_setplottags_single_spec() routine. Additionally, the gnuplot terminal type, and the directory structure given in the parameter file are added automatically.
INPUT:
| spec | 2 column cpl table containing spectrum (wavelength [micron], radiance flux/transmission) |
| plottags | CPL parameterlist containing plot tags |
ERRORS:
Definition at line 139 of file sc_plot.c.
References sc_basic_initstring(), and SC_MAXLEN.
| cpl_error_code sc_plot_single_spec_with_lines | ( | const cpl_table * | spec, |
| cpl_parameterlist * | plottags | ||
| ) |
This program plots a single spectrum with detected lines from a CPL table. One column (labelled "lambda") must contain wavelength information, another one ("flux") gives the flux, and a the third column labelled "class" must contain information whether the corresponding pixel belongs to the continuum (value=0), a line (=1), a line peak (=2) or is the line peak of an isolated line (=3). Line peaks are marked by a marker, i.e. a black line, isolated peaks by a blue line. In addition, the wavelength of the corresponding line peak pixel is added.
INPUT:
| spec | Cpl table containing spectrum |
| plottags | parameter list containing tags |
ERRORS:
Definition at line 1731 of file sc_plot.c.
References sc_basic_initstring(), and SC_MAXLEN.
| void sc_setplottags_double_spec | ( | cpl_parameterlist * | plottags, |
| const char * | x_column1, | ||
| const char * | y_column1, | ||
| const char * | title1, | ||
| const char * | x_label1, | ||
| const char * | y_label1, | ||
| const char * | x_column2, | ||
| const char * | y_column2, | ||
| const char * | title2, | ||
| const char * | x_label2, | ||
| const char * | y_label2, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Routine to set plot tags for double spectrum plot. The two spectra are plotted on two different panels, lying upon another. Hence, tags for the individual data sets have to be given. Spectrum 1 is plotted in the upper Spectrum 2 in the lower panel.
The following input tags are required:
INPUT:
| plottags | Parameter list to be filled with tags |
| x_column1 | CPL table column name used for the abscissa (Spectrum 1) |
| y_column1 | CPL table column name used for the ordinate (Spectrum 1) |
| title1 | Plot title (Spectrum 1) |
| x_label1 | Label string for x-axis (Spectrum 1) |
| y_label1 | Label string for y-axis (Spectrum 1) |
| x_column2 | CPL table column name used for the abscissa (Spectrum 2) |
| y_column2 | CPL table column name used for the ordinate (Spectrum 2) |
| title2 | Plot title (Spectrum 2) |
| x_label2 | Label string for x-axis (Spectrum 2) |
| y_label2 | Label string for y-axis (Spectrum 2) |
| parlist | Parameter list containing information from the parameter file OUTPUT: |
| plottags | Filled parameter list containing tags |
Base directory, output directory, output name, and gnuplot terminal type are added automatically from parameter list. NOTE: NULL is not accepted, use " " instead!
Definition at line 366 of file sc_plot.c.
References SC_MAXLEN.
| void sc_setplottags_hist | ( | cpl_parameterlist * | plottags, |
| const char * | title, | ||
| const char * | x_label, | ||
| const char * | y_label, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Routine to set plot tags for histogram plots.
The following input tags are required:
INPUT:
| plottags | Parameter list to be filled with tags |
| title | Plot title |
| x_label | Label string for x-axis |
| y_label | Label string for y-axis |
| parlist | Parameter list containing information from the parameter file OUTPUT: |
| plottags | Filled parameter list containing tags |
Base directory, output directory, output name, and gnuplot terminal type are added automatically from parameter list. NOTE: NULL is not accepted, use " " instead!
Definition at line 1366 of file sc_plot.c.
References SC_MAXLEN.
| void sc_setplottags_overplot_spec | ( | cpl_parameterlist * | plottags, |
| const char * | x_column, | ||
| const char * | y_column1, | ||
| const char * | y_column2, | ||
| const char * | specname1, | ||
| const char * | specname2, | ||
| const char * | title, | ||
| const char * | x_label, | ||
| const char * | y_label, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Routine to set plot tags for spectra overplot routine. The two spectra are plotted in one panel (upper), the residual of the two input spectra (Spectrum #1 - Spectrum #2) is plotted in the lower panel.
The following input tags are required:
INPUT:
| plottags | Parameter list to be filled with tags |
| x_column | CPL table column name used for the abscissa |
| y_column1 | CPL table column name used for the ordinate (Spectrum 1) |
| y_column2 | CPL table column name used for the ordinate (Spectrum 2) |
| specname1 | Designator of spectrum 1 (used in legend) |
| specname2 | Designator of spectrum 2 (used in legend) |
| title | Plot title |
| x_label | Label string for x-axis |
| y_label | Label string for y-axis |
| parlist | Parameter list containing information from the parameter file OUTPUT: |
| plottags | Filled parameter list containing tags |
Base directory, output directory, output name, and gnuplot terminal type are added automatically from parameter list. NOTE: NULL is not accepted, use " " instead!
Definition at line 802 of file sc_plot.c.
References SC_MAXLEN.
| void sc_setplottags_single_spec | ( | cpl_parameterlist * | plottags, |
| const char * | x_column, | ||
| const char * | y_column, | ||
| const char * | title, | ||
| const char * | x_label, | ||
| const char * | y_label, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Routine to set plot tags for single spectrum plot. The following input tags are required:
INPUT:
| plottags | Parameter list to be filled with tags |
| x_column | CPL table column name used for the abscissa |
| y_column | CPL table column name used for the ordinate |
| title | Plot title |
| x_label | Label string for x-axis |
| y_label | Label string for y-axis |
| parlist | Parameter list containing information from the parameter file OUTPUT: |
| plottags | Filled parameter list containing tags |
Base directory, output directory, output name, and gnuplot terminal type are added automatically from parameter list. NOTE: NULL is not accepted, use " " instead!
Definition at line 66 of file sc_plot.c.
References SC_MAXLEN.
| void sc_setplottags_single_spec_lines | ( | cpl_parameterlist * | plottags, |
| const char * | title, | ||
| const char * | x_label, | ||
| const char * | y_label, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Routine to set plot tags for single spectrum plot with detected lines. Required input parameters are:
INPUT:
| plottags | Parameter list to be filled with tags |
| title | Plot title |
| x_label | Label string for x-axis |
| y_label | Label string for y-axis |
| parlist | Parameter list containing information from the parameter file OUTPUT: |
| plottags | Filled parameter list containing tags |
Base directory, output directory, output name, and gnuplot terminal type are added automatically from parameter list. NOTE: NULL is not accepted, use " " instead!
Definition at line 1664 of file sc_plot.c.
References SC_MAXLEN.