Irregularity Analyzer (pynasonde.vipir.analysis.irregularities)¶
Small-Scale Ionospheric Irregularity Analysis via EP Structure Function
Computes the power-law spectral index of sub-wavelength irregularities from the EP (residual phase) parameter, binned by virtual height.
Theory¶
The EP parameter carries information about sub-wavelength irregularities. The second-order structure function of EP vs frequency lag Δf is:
For a power-law irregularity spectrum with spectral index α:
A log–log fit yields α (spectral index) and A₀ (amplitude coefficient). The outer scale L_outer is estimated as the lag where D_EP saturates (≥ 85% of max).
Anisotropy proxy: σ_EP(O-mode) / σ_EP(X-mode) — ratio close to unity → isotropic; deviations → field-aligned anisotropy.
Classes¶
pynasonde.vipir.analysis.irregularities
¶
irregularities.py — Small-scale ionospheric irregularity analysis via EP.
The EP (residual phase) parameter from the Dynasonde/VIPIR signal model carries information about sub-wavelength irregularities in the ionospheric reflection layer. Irregularities scatter the wave coherently or incoherently, imprinting a structured signature on EP as a function of sounding frequency f.
Structure function approach The second-order structure function of EP as a function of frequency lag Δf is defined as:
D_EP(Δf) = ⟨ [EP(f + Δf) − EP(f)]² ⟩
For a power-law irregularity spectrum with spectral index α, the
structure function follows a power law::
D_EP(Δf) ∝ Δf^α
A log–log fit of D_EP(Δf) vs Δf yields the spectral index α and the
amplitude coefficient A₀. The outer scale L_outer is estimated as the
lag at which D_EP saturates (flattens).
Height-resolved analysis Echoes are binned by virtual height. The structure function and spectral fit are computed independently for each height bin, yielding a profile of α(h) that maps how irregularity characteristics change with altitude (e.g., stronger irregularities at the F-layer base during equatorial spread-F events).
Anisotropy proxy When both O-mode and X-mode EP values are available for the same frequency step the ratio σ_EP(O)/σ_EP(X) provides a proxy for the anisotropy of field-aligned irregularities. A ratio close to unity indicates isotropic scattering; deviations indicate anisotropy.
This module provides:
:class:IrregularityAnalyzer
Processor — computes the EP structure function, spectral index, outer
scale, and anisotropy proxy from a labelled echo DataFrame.
:class:IrregularityProfile
Output dataclass — holds the structure-function table, spectral-fit
parameters, and per-height profile.
References¶
Hysell, D. L., & Burcham, J. D. (1998). JULIA radar studies of equatorial spread F. Journal of Geophysical Research, 103(A12), 29155–29167.
Zabotin, N. A., Wright, J. W., & Zhbankov, G. A. (2006). NeXtYZ: Three- dimensional electron density inversion for Dynasonde and ARTIST ionosondes. Radio Science, 41, RS6S32.
Kintner, P. M., & Seyler, C. E. (1985). The status of observations and theory of high latitude ionospheric and magnetospheric plasma turbulence. Space Science Reviews, 41, 91–129.
IrregularityAnalyzer
¶
Estimate ionospheric irregularity spectral properties from EP.
The analysis requires a column residual_deg (EP) in the echo
DataFrame, typically produced by the Dynasonde/VIPIR signal model.
If the column is absent the processor logs a warning and returns
empty results.
Parameters¶
f_layer_height_range_km
(min, max) height window for the analysis (km).
Default (160, 800).
height_bin_km
Bin size for the height-resolved profile (km). Default 50.0.
max_delta_f_mhz
Maximum frequency lag Δf included in the structure function (MHz).
Default 2.0.
min_pairs_for_fit
Minimum number of distinct lag values with valid D_EP before
the power-law fit is attempted. Default 4.
mode_col
Name of the wave-mode column (added by
:class:~pynasonde.vipir.analysis.polarization.PolarizationClassifier).
Used for the anisotropy proxy only. Default "mode".
Examples¶
from pynasonde.vipir.analysis.irregularities import IrregularityAnalyzer irr = IrregularityAnalyzer().fit(pol.annotated_df) print(irr.summary())
Source code in pynasonde/vipir/analysis/irregularities.py
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 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | |
fit(df)
¶
Run irregularity analysis on an echo DataFrame.
Parameters¶
df
Echo DataFrame — must contain frequency_khz and
height_km. Should also contain residual_deg
(EP); if absent, empty results are returned with a warning.
Returns¶
IrregularityProfile
Source code in pynasonde/vipir/analysis/irregularities.py
IrregularityProfile
dataclass
¶
EP structure-function and spectral-index results for one sounding.
Parameters¶
pd.DataFrame
Columns: delta_f_mhz, D_EP_deg2, n_pairs.
One row per frequency lag Δf.
spectral_index
Power-law exponent α from log–log fit of D_EP vs Δf.
NaN when fit failed.
amplitude_coeff
Amplitude coefficient A₀ (in deg²) from the fit:
D_EP(Δf) ≈ A₀ × Δf^α.
NaN when fit failed.
outer_scale_mhz
Estimated outer scale L_outer (MHz) — the lag at which D_EP
first exceeds _SATURATION_FRACTION × D_EP_max.
NaN when saturation was not observed.
anisotropy_ratio
σ_EP(O-mode) / σ_EP(X-mode). NaN when X-mode EP data
are unavailable.
pd.DataFrame
Columns: height_bin_km, spectral_index, amplitude_coeff,
outer_scale_mhz, n_echoes.
One row per height bin.
n_echoes_total
Total number of echoes used in the analysis.
Source code in pynasonde/vipir/analysis/irregularities.py
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 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | |
to_dataframe()
¶
summary()
¶
One-line text summary.
Source code in pynasonde/vipir/analysis/irregularities.py
plot(ax=None)
¶
Two-panel plot: structure function (left) and α profile (right).
Parameters¶
ax
If provided, used for the structure function only. A new
two-panel figure is created when None.
Returns¶
matplotlib.axes.Axes Left axes (structure function).
Source code in pynasonde/vipir/analysis/irregularities.py
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 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | |
IrregularityAnalyzer¶
Quick start¶
from pynasonde.vipir.analysis import IrregularityAnalyzer, PolarizationClassifier
clf = PolarizationClassifier(o_mode_sign=-1)
pol = clf.fit(echo_df)
ia = IrregularityAnalyzer()
profile = ia.fit(pol.annotated_df)
print(profile.summary())
# IrregularityProfile: n_echoes=1842 spectral_index=1.23
# outer_scale=0.18 MHz anisotropy=1.04
profile.plot()
IrregularityProfile dataclass¶
| Field | Type | Description |
|---|---|---|
structure_function |
DataFrame |
Columns: delta_f_mhz, D_EP_deg2, n_pairs |
spectral_index |
float |
α from log-log fit (NaN if fit failed) |
amplitude_coeff |
float |
A₀ in deg² (NaN if fit failed) |
outer_scale_mhz |
float |
L_outer (MHz) where D_EP saturates (NaN if not observed) |
anisotropy_ratio |
float |
σ_EP(O) / σ_EP(X); NaN when X-mode EP unavailable |
height_profile |
DataFrame |
Columns: height_bin_km, spectral_index, amplitude_coeff, outer_scale_mhz, n_echoes |
n_echoes_total |
int |
Total echoes used |
Methods¶
profile.summary() # one-line summary string
profile.to_dataframe() # returns height_profile DataFrame
profile.plot() # structure function + height-resolved spectral index
References¶
- Hysell, D. L., & Burcham, J. D. (1998). JULIA radar studies of equatorial spread F. J. Geophys. Res., 103(A12), 29155–29167.
- Kintner, P. M., & Seyler, C. E. (1985). High-latitude ionospheric turbulence. Space Science Reviews, 41, 91–129.
See Also¶
- Analysis Overview
- Polarization Classifier — provides mode-labelled input with EP
- Spread-F Analyzer — related large-scale irregularity analysis