MMM datatypes¶
C
pynasonde.digisonde.datatypes.mmmdatatypes — ModMaxDataUnit, ModMaxHeader, ModMaxFreuencyGroup
Dataclasses modeling MMM-format headers and spectral blocks.
pynasonde.digisonde.datatypes.mmmdatatypes
¶
MMM / ModMax datatypes used by Digisonde MMM files.
This module defines simple dataclasses that represent the header and data
blocks found in MMM/ModMax-format files. These are small containers that
help the parser provide structured access to parsed fields and perform
lightweight unit conversions in __post_init__ where necessary.
ModMaxDataUnit
dataclass
¶
Container for a full MMM data block.
Attributes:
| Name | Type | Description |
|---|---|---|
header |
ModMaxHeader
|
|
frequency_groups |
List[ModMaxFreuencyGroup]
|
List of parsed frequency-group |
Source code in pynasonde/digisonde/datatypes/mmmdatatypes.py
ModMaxHeader
dataclass
¶
Header for an MMM/ModMax data block.
Attributes:
| Name | Type | Description |
|---|---|---|
record_type |
int
|
int Numeric record type identifier. |
header_length |
int
|
int Length of the header in bytes. |
version_maker |
hex
|
hex Version/maker code (raw representation). |
year |
int
|
int Year of the measurement. |
doy |
int
|
int Day-of-year timestamp component. |
hour |
int
|
int Hour component of timestamp. |
minute |
int
|
int Minute component of timestamp. |
second |
int
|
int Second component of timestamp. |
program_set |
hex
|
hex Program set identifier (raw). |
program_type |
hex
|
hex Program type identifier (raw). |
journal |
List[int]
|
List[int] Journal bits/flags (parser-specific meaning). |
nom_frequency |
float
|
float
Nominal frequency (converted to Hz in |
tape_ctrl |
hex
|
hex Tape write control flags (raw). |
print_ctrl |
hex
|
hex Printer control flags (raw). |
mmm_opt |
hex
|
hex MMM options bitfield (raw). |
print_clean_ctrl |
hex
|
hex Printer clean control (raw). |
print_gain_lev |
hex
|
hex Printer gain level (raw). |
ctrl_intm_tx |
hex
|
hex Control for intermittent transmitter (raw). |
drft_use |
hex
|
hex Drift usage flag (raw). |
start_frequency |
float
|
float
Start frequency (converted to Hz in |
freq_step |
float
|
float
Frequency step (converted to Hz in |
stop_frequency |
float
|
float
Stop frequency (converted to Hz in |
trg |
hex
|
hex Trigger flags (raw). |
ch_a |
hex
|
hex Channel A flags/identifier (raw). |
ch_b |
hex
|
hex Channel B flags/identifier (raw). |
sta_id |
str
|
str Station identifier string. |
phase_code |
int
|
int Phase code or modulation identifier. |
ant_azm |
int
|
int Antenna azimuth. |
ant_scan |
int
|
int Antenna scan setting. |
ant_opt |
int
|
int Antenna options / Doppler spacing. |
num_samples |
int
|
int Number of samples recorded. |
rep_rate |
int
|
int Pulse repetition rate. |
pwd_code |
int
|
int Password/code field (parser-specific meaning). |
time_ctrl |
int
|
int Time control flags. |
freq_cor |
int
|
int Frequency correction value. |
gain_cor |
int
|
int Gain correction value. |
range_inc |
int
|
int Range increment value. |
range_start |
int
|
int Starting range value. |
f_search |
int
|
int Frequency search parameter/flag. |
nom_gain |
int
|
int Nominal gain setting. |
Note: "The __post_init__ method performs unit conversions for a subset
of fields (for example frequency fields are converted to Hz). The
attributes here reflect the raw-parsed fields before or after those
lightweight conversions.
Source code in pynasonde/digisonde/datatypes/mmmdatatypes.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | |
ModMaxFreuencyGroup
dataclass
¶
Represents a single frequency group (sub-block) inside an MMM block.
Attributes:
| Name | Type | Description |
|---|---|---|
blk_type |
int
|
int Block type identifier (e.g. 1 or 2). |
frequency |
int
|
int Frequency value (MHz in raw header; may be converted by parsers). |
frequency_k |
int
|
int Frequency expressed in kHz. |
frequency_search |
int
|
int Frequency-search parameter/flag. |
gain_param |
int
|
int Gain parameter for this group. |
sec |
int
|
int Time-of-second for this group (timing information). |
mpa |
float
|
float Most probable amplitude value for the group. |