Linuxpops  3.01.04
Spectral Anaysis Package for Single Dish Data
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sdd.h
Go to the documentation of this file.
1 #ifndef SDD_H
2 #define SDD_H
3 
4 struct BOOTSTRAP {
5  unsigned int num_index_rec; /* # of records in index including the bootstrap record */
6  unsigned int num_data_rec; /* of data records which follow the index records. */
7  unsigned int bytperrec; /* bytes per record (use 512 in making the file) */
8  unsigned int bytperent; /* # of bytes per index entry (still 64) */
9  unsigned int num_entries_used; /* # of index entries already used.
10  (This is actually misleading. This field is really
11  the last index entry used. All index entries after
12  this number are guaranteed to be empty, the index
13  entries prior to this number may or may not be empty.)
14  */
15  unsigned int counter; /* Counter which indicates whether the file has been
16  updated. This field is used by the unipops disk
17  access routines to tell if the file has changed since
18  the last access. It should be reset to 0 for a
19  new or reindexed file. It should be incremented
20  by 1 EVERY TIME the file is changed. It should
21  reset to 0 if an increment would exceed the max value
22  possible by the storage type. */
23  unsigned int typesdd; /* type of SDD: 0 is normal, 1 is records (GB only)*/
24  unsigned int version; /* SDD Version = 1 for this version. This is the field
25  that is guaranteed to be non-zero in the bootstrap
26  block as compared to the previous SDD files. */
27  char padd[480]; /* all zero */
28 };
29 
30 
31 struct DIRECTORY {
32 
33  unsigned int start_rec; /* Starting Record number for the scan about to be
34  described by this index entry (the bootstrap record is
35  record 1). */
36  unsigned int end_rec; /* Last Record number for that scan. */
37  float h_coord; /* Horizontal Coordinate in degrees.
38  (the SOURCEX header word) */
39  float v_coord; /* Vertical Coordinate in degrees.
40  (the SOURCEY header word) */
41  char source[16]; /* Source Name. */
42  float scan; /* Scan Number */
43  float freq_res; /* For LINE scans: the frequency resolution in MHz
44  (the FREQRES header word)
45  For CONT scans: the slew rate of the telescope in
46  degrees/sec (appropriate
47  combination of DELTAXR and DELTAYR
48  taking into account the cos of the
49  declination of the source) */
50  double rest_freq;/* For LINE scans: the rest frequency in MHz
51  (the RESTFREQ header word)
52  For CONT scans: the integration time per point in seconds.
53  (the SAMPRAT header word) */
54  float lst; /* LST in hours. */
55  float ut; /* UT date in YYY.MMDD format. */
56  short obsmode; /* Observing mode (Coded). */
57  short phase_rec; /* phase and record number for GB records data.
58  Should be -1 for all normal data. */
59  short pos_code; /* Position Code. */
60  short unused;
61 };
62 /*
63 Notes:
64 
65  The position code was moved to the end so that the alignment on word
66  boundaries was still good. The cookbook descriptions of the
67  meaning of position code values is wrong. The correct code for
68  all known position codes (the COORDCD header word) follows:
69 */
70 
71 #define GALACTIC 1
72 #define X1950RADC 2
73 #define EPOCRADC 3
74 #define MEANRADC 4
75 #define APPRADC 5
76 #define APPHADC 6
77 #define X1950ECL 7
78 #define EPOCECL 8
79 #define MEANECL 9
80 #define APPECL 10
81 #define AZEL 11
82 #define USERDEF 12
83 #define X2000RADC 13
84 #define INDRADC 14
85 
86 /*
87  An empty COORDCD string (all blanks) implies 2 (1950RADC).
88 
89  The observing mode coding is described corectly in the cookbook.
90 See the include file ~unipops/test/includes/modes.h for the most
91 up to date listing of known observing modes and their corresponding
92 codes. The file ~unipops/test/source/conline/modefn.c contains some
93 useful functions for using the information in modes.h.
94 
95  The phase_rec field is only used for GB records data currently.
96 It should be set to -1 for all other data (sdd type = 0 in the bootstrap
97 record). If it is not -1, then it corresponds to 64*record_num + phase_num.
98 
99  Index entries can not extend beyond the length of a record as
100 indicated by the bootstrap block (in the current situation, there are
101 exactly 8 index entries per record, but there is no requirement that
102 there be exactly N index entries per record [although clearly its
103 desirable so that space isn't wasted] unused portions of index
104 records [non-bootstrap and non-data records] are undefined].
105 
106 */
107 
108 #endif
float lst
Definition: sdd.h:54
char source[16]
Definition: sdd.h:41
short phase_rec
Definition: sdd.h:57
unsigned int num_data_rec
Definition: sdd.h:6
double rest_freq
Definition: sdd.h:50
short pos_code
Definition: sdd.h:59
float ut
Definition: sdd.h:55
unsigned int counter
Definition: sdd.h:15
float v_coord
Definition: sdd.h:39
short unused
Definition: sdd.h:60
unsigned int version
Definition: sdd.h:24
unsigned int end_rec
Definition: sdd.h:36
unsigned int num_entries_used
Definition: sdd.h:9
unsigned int bytperrec
Definition: sdd.h:7
short obsmode
Definition: sdd.h:56
float freq_res
Definition: sdd.h:43
unsigned int typesdd
Definition: sdd.h:23
char padd[480]
Definition: sdd.h:27
Definition: sdd.h:4
float h_coord
Definition: sdd.h:37
unsigned int start_rec
Definition: sdd.h:33
unsigned int bytperent
Definition: sdd.h:8
float scan
Definition: sdd.h:42
unsigned int num_index_rec
Definition: sdd.h:5
Definition: sdd.h:31