Ionogram Scaler (pynasonde.vipir.analysis.scaler)¶
Automatic Ionogram Parameter Scaling
Derives standard URSI/CCIR ionospheric parameters from a filtered, O-mode-labelled echo DataFrame with bootstrap uncertainty estimates.
Scaled parameters¶
| Parameter | Description |
|---|---|
foE_mhz |
E-layer critical frequency (MHz) |
h_prime_E_km |
E-layer minimum virtual height (km) |
foF1_mhz |
F1-layer critical frequency (MHz); NaN when absent |
h_prime_F1_km |
F1-layer minimum virtual height (km); NaN when absent |
foF2_mhz |
F2-layer critical frequency (MHz) |
h_prime_F2_km |
F2-layer minimum virtual height (km) |
MUF3000_mhz |
Maximum usable frequency for a 3 000 km path (MHz) |
M3000F2 |
Transmission factor MUF(3000)/foF2 |
foF2_sigma_mhz |
Bootstrap σ(foF2) (MHz) |
h_prime_F2_sigma_km |
Bootstrap σ(h′F2) (km) |
Layer height windows used internally:
| Layer | Height range (km) | Frequency range (MHz) |
|---|---|---|
| E | 90 – 160 | 1.0 – 4.5 |
| F1 | 160 – 250 | — |
| F2 | 160 – 800 | ≥ 2.0 |
Classes¶
pynasonde.vipir.analysis.scaler
¶
scaler.py — Automatic ionogram parameter scaling.
Derives the standard URSI/CCIR scaled parameters from a filtered, O-mode-labelled echo DataFrame:
- foE — ordinary-mode critical frequency of the E-layer (MHz)
- h'E — minimum virtual height of E-layer echoes (km)
- foF1 — ordinary-mode critical frequency of the F1-layer (MHz)
(may be absent;
NaNwhen not detected) - h'F — minimum virtual height of F-layer echoes (km)
- foF2 — ordinary-mode critical frequency of the F2-layer (MHz)
- h'F2 — minimum virtual height of F2-layer echoes (km)
- MUF(3000) — maximum usable frequency for a 3 000 km path (MHz)
- M(3000)F2 — transmission factor MUF(3000)/foF2 (dimensionless)
Bootstrap uncertainty (foF2_sigma_mhz, h_prime_F2_sigma_km) is
estimated by resampling echoes at each layer cluster.
This module provides:
:class:IonogramScaler
Processor — derives ionospheric parameters from an O-mode echo
DataFrame (optionally pre-labelled by
:class:~pynasonde.vipir.analysis.polarization.PolarizationClassifier).
:class:ScaledParameters
Output dataclass — holds all scaled parameters, uncertainties, and
quality flags.
References¶
Reinisch, B. W., & Huang, X. (1983). Automatic calculation of electron density profiles from digital ionograms: 3. Processing of bottomside ionograms. Radio Science, 18(3), 477–492.
Piggott, W. R., & Rawer, K. (1972). URSI Handbook of Ionogram Interpretation and Reduction (2nd ed.). World Data Center A for Solar-Terrestrial Physics.
IonogramScaler
¶
Derive standard ionospheric parameters from a filtered echo DataFrame.
The scaler operates on O-mode echoes only. If the mode_col column
is absent all echoes are treated as O-mode (consistent with
:class:~pynasonde.vipir.analysis.spread_f.SpreadFAnalyzer).
Parameters¶
e_layer_height_range_km
Height window for E-layer detection (km). Default (90, 160).
f1_layer_height_range_km
Height window for F1-layer detection (km). Default (160, 250).
f2_layer_height_range_km
Height window for F2-layer detection (km). Default (160, 800).
e_freq_range_mhz
Frequency window for E-layer cluster selection (MHz).
Default (1.0, 4.5).
f1_detection_threshold_mhz
A local maximum in the O-mode trace between foE and foF2 is
interpreted as foF1 only if it exceeds foE by this margin (MHz).
Default 0.3.
min_echoes_for_layer
Minimum O-mode echo count required before a layer is considered
detected. Default 3.
n_bootstrap
Number of bootstrap resamples for uncertainty estimation.
Default 200.
mode_col
Name of the wave-mode column. Default "mode".
Examples¶
from pynasonde.vipir.analysis.polarization import PolarizationClassifier from pynasonde.vipir.analysis.scaler import IonogramScaler pol = PolarizationClassifier().fit(df) params = IonogramScaler().fit(pol.annotated_df) print(params.summary())
Source code in pynasonde/vipir/analysis/scaler.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | |
fit(df)
¶
Scale ionospheric parameters from an echo DataFrame.
Parameters¶
df
Echo DataFrame — must contain frequency_khz and
height_km. Optionally contains a mode column
(from :class:~pynasonde.vipir.analysis.polarization.PolarizationClassifier).
Returns¶
ScaledParameters
Source code in pynasonde/vipir/analysis/scaler.py
ScaledParameters
dataclass
¶
Scaled ionospheric parameters for one ionogram sounding.
Parameters¶
foE_mhz
E-layer critical frequency (MHz). NaN when no E-layer
echoes are found.
h_prime_E_km
E-layer minimum virtual height (km). NaN when absent.
foF1_mhz
F1-layer critical frequency (MHz). Often absent / NaN.
h_prime_F1_km
F1-layer minimum virtual height (km). NaN when absent.
foF2_mhz
F2-layer critical frequency (MHz). NaN when absent.
h_prime_F2_km
F2-layer minimum virtual height (km). NaN when absent.
MUF3000_mhz
MUF for a 3 000 km path (MHz). NaN when foF2 is absent.
M3000F2
Transmission factor MUF(3000)/foF2 (dimensionless).
NaN when foF2 is absent.
foF2_sigma_mhz
Bootstrap standard deviation of foF2 (MHz).
h_prime_F2_sigma_km
Bootstrap standard deviation of h'F2 (km).
quality_flags
Dict of boolean flags: "E_detected", "F1_detected",
"F2_detected", "foF2_reliable" (≥ 5 O-mode echoes).
Source code in pynasonde/vipir/analysis/scaler.py
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 194 195 196 197 198 199 200 201 202 203 204 | |
to_dataframe()
¶
Return a single-row DataFrame of scalar parameters.
Source code in pynasonde/vipir/analysis/scaler.py
summary()
¶
One-line text summary.
Source code in pynasonde/vipir/analysis/scaler.py
plot(ax=None)
¶
Bar chart of the key scaled parameters with uncertainty bars.
Parameters¶
ax
Existing axes. A new figure is created when None.
Returns¶
matplotlib.axes.Axes
Source code in pynasonde/vipir/analysis/scaler.py
IonogramScaler¶
Quick start¶
from pynasonde.vipir.analysis import IonogramScaler, PolarizationClassifier
clf = PolarizationClassifier(o_mode_sign=-1)
pol = clf.fit(echo_df)
scaler = IonogramScaler()
params = scaler.fit(pol.annotated_df)
print(params.summary())
# ScaledParameters: foF2=8.20 MHz h'F2=245 km foE=3.10 MHz MUF(3000)=14.5 MHz
params.plot()
ScaledParameters dataclass¶
| Field | Type | Description |
|---|---|---|
foE_mhz |
float |
E-layer critical frequency |
h_prime_E_km |
float |
E-layer min virtual height |
foF1_mhz |
float |
F1 critical frequency (NaN if absent) |
h_prime_F1_km |
float |
F1 min virtual height (NaN if absent) |
foF2_mhz |
float |
F2 critical frequency |
h_prime_F2_km |
float |
F2 min virtual height |
MUF3000_mhz |
float |
MUF for 3 000 km path |
M3000F2 |
float |
MUF(3000)/foF2 |
foF2_sigma_mhz |
float |
Bootstrap σ(foF2) |
h_prime_F2_sigma_km |
float |
Bootstrap σ(h′F2) |
quality_flags |
dict |
"E_detected", "F1_detected", "F2_detected", "foF2_reliable" |
Methods¶
params.summary() # one-line summary string
params.plot() # ionogram with layer annotations and scaled values
References¶
- Reinisch, B. W., & Huang, X. (1983). Radio Science, 18(3), 477–492.
- Piggott, W. R., & Rawer, K. (1972). URSI Handbook of Ionogram Interpretation and Reduction (2nd ed.). World Data Center A for Solar-Terrestrial Physics.
See Also¶
- Analysis Overview
- Polarization Classifier — provides mode-labelled input
- True Height Inversion — converts foF2 trace to N(h)