Linuxpops  3.01.04
Spectral Anaysis Package for Single Dish Data
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
LinuxPops Holders Commands

Holders

Data holders are a structure of information that describes completely the currently reduced data. These holders can be copied back and forth and is what's transmitted to the xgraphics program for plotting.

Currently, holders only work for Spectral Line data. See Object for similar functionality for Continuum.

The Linuxpops prompt shows the currently active data holder; i.e. "Linuxpops(H0) >>"

Synopsis

Linuxpops(H0) >>
Linuxpops(H0) >> image /h
Image (Holders) Sub-System
Mode: SPEC
Usage: image [Title] [Hs Hd] [Hx Hy] [H1 H2] [options]
options are:
/c Copy image Hs, source, to Hd, destination
/d Subtract image H2, from H1, place results in H0
/p Print image
/l List images
/s Summ Hx and Hy, leave results in H0
/y Divide Hx by Hy, leave results in H0
/t Set title
where: 'Title' is the title up to 256 characters
(Spaces Allowed) (Quotes Optional, but will appear if used)
/z Zero image; Add /a to zero all of them
/a zero them all
/h help
See Also:
Linuxpops(H0) >>

Other Commands

    - hx
            Set the active data holder to Hx ( x = 0 - 9)

    - hsave filename
            Save all data holders into binary file 'filename'

    - hload filename
            Load the internal data holder structures from file 'filename' ; Must be of the same vintage
Definition of binary file structure for hload & hsave
#define MAX_SAVE_IMAGE_ARRAYS 10
struct SAVE_IMAGE {
char magic[16]; /* Ascii keyword */
int ssize; /* Total size of this struct */
int hsize; /* Size of individual IMAGE structs */
};
#define SAVE_IMAGE_PREAMBLE (sizeof(save_image.magic) + sizeof(save_image.ssize) + sizeof(save_image.hsize))
Structure Definition:
#ifndef IMAGE_H
#define IMAGE_H
#define MAX_PLOT_ARRAYS 4
struct BASELINE_INFO {
char magic[32]; /* From identifiing structure in sock comm */
int doBaseLine; /* Remove baseline if true */
int baselines[MAX_BASELINES][2];/* Baseline areas */
float a; /* Lsqfit results SLOPE */
float b; /* Lsqfit results INTERCEPT */
float rms; /* RMS of baseline area */
};
/* Plotting criteria */
struct PLOT_INFO {
char magic[32];
int markers; /* If non-zero, display channel markers in the plot */
int plotStyle; /* POINTS, LINES, HISTO */
int x1mode; /* CHAN, FREQ, VEL */
int x2mode; /* CHAN, FREQ, VEL */
int gridMode; /* Plot grid mode: X, Y, Full, None */
int zline; /* Show zero line if true */
int badchshow; /* Show the removed bad channels if true */
int bmark; /* Show the baseline regions if true */
int bshow; /* Show the baseline fitting if true */
int mshow; /* Show the filter bank markers */
int bdrop; /* Number of beginning channels to drop */
int edrop; /* Number of ending channels to drop */
int dobadch; /* Remove bad channels if specified */
int yscale; /* AUTO vs. FIXED flag */
int plot_noint; /* Actual number of plotable channels after any smoothing */
int bplot; /* A baseline plot is available */
int nspline; /* Number of B-spline coeef to use */
int yplotmode; /* LINEAR vs. LOG plot */
float paperw; /* User defined Width of PDF plot in inches */
float paperh; /* User defined Height of PDF plot in inches */
float ylower; /* User specified ploting lower range */
float yupper; /* User specified ploting upper range */
float plotmin; /* Minimum Plotting Range */
float plotmax; /* Maximum Plotting Range */
};
/* Accumilator info */
struct ACCUM_INFO {
char magic[32];
int scanct; /* Total number of scans added; if accum */
float bscan; /* First scan Added */
float escan; /* Last scan Added */
float wt; /* Accumulated weight of total data */
};
char backend[8];
double scan;
double restfreq;
double stsys;
double tcal;
double freqres;
double sideband;
double refpt;
double refpt_vel;
double deltax;
};
struct LP_IMAGE_INFO {
char magic[32];
char name[32]; /* "H0", "H1", ... */
char title[256];
int mode; /* CONT, SPEC, OTF */
int peakChan; /* Channel/Velocity of peak Intensity */
int plotwin;
int narray; /* Number of yplot arrays to follow */
int nsize; /* Size, in bytes, of arrays that follow */
int satActive; /* If true, there are strings, markers or lines to plot */
/* Because xgraphics can actually outrun the gnuplot program
we need to delay xgraphics a bit to allow gnuplot to
finish plotting before moving on to the next step; otherwise
files like /tmp/SESSION/scan.dem get over-written by xgraphics
while gnuplot is in the process of reading it.
This is expecially obvious when on a remote site; not local
and it takes gnuplot a finite amount of time to perform XWindow
functions */
int xdelay; /* Delay xgraphics uses to account for slow internet In uSec */
int issmt; /* If data is from SMT */
int shifted; /* This data has beend shifted */
int pad;
float datamin; /* Minimum Intensity */
float datamax; /* Maximum Intensity */
struct ACCUM_INFO ainfo;
struct PLOT_INFO pinfo;
struct GAUSSIAN ginfo;
struct HEADER head;
struct MISC_HEADER_PARAMS mhp[MAX_PLOT_ARRAYS]; /* Contains info for quad display */
/* These arrays are not transmitted when using external viewer */
float yplot1[MAX_CHANS]; /* Up to (MAX_PLOT_ARRAYS) plots available */
float yplot2[MAX_CHANS];
float yplot3[MAX_CHANS];
float yplot4[MAX_CHANS];
float gplot[MAX_CHANS]; /* Pre-filled Gaussian Array */
float bplot[MAX_CHANS]; /* Pre-filled baseline/bshape Array */
float x1data[MAX_CHANS]; /* X-Axis values */
float x2data[MAX_CHANS]; /* Values for top X2 Lables */
};
/* Define a constant for the size without the last 8 arrays */
#define SHORT_IMAGE_SIZE (sizeof(struct LP_IMAGE_INFO) - (8 * MAX_CHANS * sizeof(float)))
#endif
Note:

When Linuxpops sends this structure to xgraphics, only the SHORT_IMAGE_SIZE is sent. The xgraphics program evaluates the IMAGE_INFO::narray & IMAGE_INFO::nsize elements to determine the number and size of the arrays to expect. This cuts down on the size of data transmitted to the bare minimum while allowing room for maximum data sizes when nessasary.