Linuxpops  3.01.04
Spectral Anaysis Package for Single Dish Data
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
image.h
Go to the documentation of this file.
1 #ifndef IMAGE_H
2 #define IMAGE_H
3 
4 #define MAX_PLOT_ARRAYS 4
5 
6 struct BASELINE_INFO {
7  char magic[32]; /* From identifiing structure in sock comm */
8  int doBaseLine; /* Remove baseline if true */
9  int baselines[MAX_BASELINES][2];/* Baseline areas */
10 
11  float a; /* Lsqfit results SLOPE */
12  float b; /* Lsqfit results INTERCEPT */
13  float rms; /* RMS of baseline area */
14 };
15 
16 /* Plotting criteria */
17 struct PLOT_INFO {
18  char magic[32];
19 
20  int markers; /* If non-zero, display channel markers in the plot */
21  int plotStyle; /* POINTS, LINES, HISTO */
22  int x1mode; /* CHAN, FREQ, VEL */
23  int x2mode; /* CHAN, FREQ, VEL */
24  int gridMode; /* Plot grid mode: X, Y, Full, None */
25  int zline; /* Show zero line if true */
26  int badchshow; /* Show the removed bad channels if true */
27  int bmark; /* Show the baseline regions if true */
28  int bshow; /* Show the baseline fitting if true */
29  int mshow; /* Show the filter bank markers */
30  int bdrop; /* Number of beginning channels to drop */
31  int edrop; /* Number of ending channels to drop */
32  int dobadch; /* Remove bad channels if specified */
33  int yscale; /* AUTO vs. FIXED flag */
34  int plot_noint; /* Actual number of plotable channels after any smoothing */
35  int bplot; /* A baseline plot is available */
36  int nspline; /* Number of B-spline coeef to use */
37 
38  int yplotmode; /* LINEAR vs. LOG plot */
39 
40  float paperw; /* User defined Width of PDF plot in inches */
41  float paperh; /* User defined Height of PDF plot in inches */
42  float ylower; /* User specified ploting lower range */
43  float yupper; /* User specified ploting upper range */
44  float plotmin; /* Minimum Plotting Range */
45  float plotmax; /* Maximum Plotting Range */
46 };
47 
48 /* Accumilator info */
49 struct ACCUM_INFO {
50  char magic[32];
51  int scanct; /* Total number of scans added; if accum */
52  float bscan; /* First scan Added */
53  float escan; /* Last scan Added */
54  float wt; /* Accumulated weight of total data */
55 };
56 
57 struct MISC_HEADER_PARAMS {
58  char backend[8];
59  double scan;
60  double restfreq;
61  double stsys;
62  double tcal;
63  double freqres;
64  double sideband;
65  double refpt;
66  double refpt_vel;
67  double deltax;
68 };
69 
70 
71 struct LP_IMAGE_INFO {
72  char magic[32];
73  char name[32]; /* "H0", "H1", ... */
74  char title[256];
75 
76  int mode; /* CONT, SPEC, OTF */
77  int peakChan; /* Channel/Velocity of peak Intensity */
78  int plotwin;
79  int narray; /* Number of yplot arrays to follow */
80  int nsize; /* Size, in bytes, of arrays that follow */
81  int satActive; /* If true, there are strings, markers or lines to plot */
82 
83  /* Because xgraphics can actually outrun the gnuplot program
84  we need to delay xgraphics a bit to allow gnuplot to
85  finish plotting before moving on to the next step; otherwise
86  files like /tmp/SESSION/scan.dem get over-written by xgraphics
87  while gnuplot is in the process of reading it.
88  This is expecially obvious when on a remote site; not local
89  and it takes gnuplot a finite amount of time to perform XWindow
90  functions */
91  int xdelay; /* Delay xgraphics uses to account for slow internet In uSec */
92  int issmt; /* If data is from SMT */
93 
94  int shifted; /* This data has beend shifted */
95  int xaxisotfoff; /* If true, label X-Axis is offset: 1 = Ra, 2 = Dec */;
96 
97  float datamin; /* Minimum Intensity */
98  float datamax; /* Maximum Intensity */
99 
100  struct ACCUM_INFO ainfo;
101  struct BASELINE_INFO binfo;
102  struct PLOT_INFO pinfo;
103  struct GAUSSIAN ginfo;
104  struct HEADER head;
105  struct MISC_HEADER_PARAMS mhp[MAX_PLOT_ARRAYS]; /* Contains info for quad display */
106 
107  int badChans[MAX_BAD_CHANS];
108 
109  /* These arrays are not transmitted when using external viewer */
110  float yplot1[MAX_CHANS]; /* Up to (MAX_PLOT_ARRAYS) plots available */
111  float yplot2[MAX_CHANS];
112  float yplot3[MAX_CHANS];
113  float yplot4[MAX_CHANS];
114 
115  float gplot[MAX_CHANS]; /* Pre-filled Gaussian Array */
116  float bplot[MAX_CHANS]; /* Pre-filled baseline/bshape Array */
117  float x1data[MAX_CHANS]; /* X-Axis values */
118  float x2data[MAX_CHANS]; /* Values for top X2 Lables */
119 };
120 
121  /* Define a constant for the size without the last 8 arrays */
122 #define SHORT_IMAGE_SIZE (sizeof(struct LP_IMAGE_INFO) - (8 * MAX_CHANS * sizeof(float)))
123 
124 #endif
float yplot1[MAX_CHANS]
Definition: image.h:110
int plotwin
Definition: image.h:78
int dobadch
Definition: image.h:32
#define MAX_BAD_CHANS
Definition: defines.h:43
int plotStyle
Definition: image.h:21
int zline
Definition: image.h:25
float wt
Definition: image.h:54
float x2data[MAX_CHANS]
Definition: image.h:118
int nspline
Definition: image.h:36
int issmt
Definition: image.h:92
char magic[32]
Definition: image.h:50
float yupper
Definition: image.h:43
int bdrop
Definition: image.h:30
float paperw
Definition: image.h:40
double sideband
Definition: image.h:64
struct BASELINE_INFO binfo
Definition: image.h:101
int nsize
Definition: image.h:80
#define MAX_CHANS
Definition: defines.h:38
float escan
Definition: image.h:53
char name[32]
Definition: image.h:73
Definition: header.h:13
char magic[32]
Definition: image.h:18
int markers
Definition: image.h:20
int edrop
Definition: image.h:31
float bscan
Definition: image.h:52
float datamin
Definition: image.h:95
struct PLOT_INFO pinfo
Definition: image.h:102
int doBaseLine
Definition: image.h:8
#define MAX_BASELINES
Definition: defines.h:42
float paperh
Definition: image.h:41
int badChans[MAX_BAD_CHANS]
Definition: image.h:107
int x1mode
Definition: image.h:22
int yplotmode
Definition: image.h:38
float rms
Definition: image.h:13
double refpt
Definition: image.h:65
double deltax
Definition: image.h:67
float yplot2[MAX_CHANS]
Definition: image.h:111
float x1data[MAX_CHANS]
Definition: image.h:117
int xaxisotfoff
Definition: image.h:95
struct HEADER head
Definition: image.h:104
int x2mode
Definition: image.h:23
int bmark
Definition: image.h:27
int satActive
Definition: image.h:81
int badchshow
Definition: image.h:26
float plotmax
Definition: image.h:45
int plot_noint
Definition: image.h:34
float datamax
Definition: image.h:98
int mode
Definition: image.h:76
double tcal
Definition: image.h:62
struct ACCUM_INFO ainfo
Definition: image.h:100
int gridMode
Definition: image.h:24
char magic[32]
Definition: image.h:7
float plotmin
Definition: image.h:44
int bplot
Definition: image.h:35
int mshow
Definition: image.h:29
#define MAX_PLOT_ARRAYS
Definition: image.h:4
double restfreq
Definition: image.h:60
float gplot[MAX_CHANS]
Definition: image.h:115
float ylower
Definition: image.h:42
char magic[32]
Definition: image.h:72
int xdelay
Definition: image.h:91
int shifted
Definition: image.h:94
int bshow
Definition: image.h:28
int peakChan
Definition: image.h:77
double scan
Definition: image.h:59
int baselines[MAX_BASELINES][2]
Definition: image.h:9
float a
Definition: image.h:11
struct MISC_HEADER_PARAMS mhp[MAX_PLOT_ARRAYS]
Definition: image.h:105
int scanct
Definition: image.h:51
double freqres
Definition: image.h:63
int narray
Definition: image.h:79
float bplot[MAX_CHANS]
Definition: image.h:116
char backend[8]
Definition: image.h:58
int yscale
Definition: image.h:33
float b
Definition: image.h:12
char title[256]
Definition: image.h:74
double stsys
Definition: image.h:61
double refpt_vel
Definition: image.h:66
float yplot3[MAX_CHANS]
Definition: image.h:112
struct GAUSSIAN ginfo
Definition: image.h:103
float yplot4[MAX_CHANS]
Definition: image.h:113