Skip to content

RT1D O-Mode: Appleton vs Sen-Wyller

1D O-Mode Formulation Comparison

Compare Appleton-Hartree and Sen-Wyller tracer outputs on the same IRI profile, frequency sweep, and plotting frame.

This page explains:

  • examples/rtmodel_omode_appleton_sw_demo.py

Call Flow

  1. main() parses config/time/frequency arguments (--fmin, --fmax, --nfreq, --mode).
  2. load_config_1D(...) loads bundled or user-provided config1D.json.
  3. RT1D(...) creates the 1D profile and fetches IRI (and geomag unless --no-geomag).
  4. Two tracer runs are executed with the same mode and sweep:
  5. formulation="appleton"
  6. formulation="senwyller"
  7. A single-panel figure is built with:
  8. Appleton and Sen-Wyller virtual-height traces
  9. IRI f_p profile on main axis
  10. IRI N_e profile on top axis
  11. Script logs numerical summaries and output path via loguru.

Key Code (From rtmodel_omode_appleton_sw_demo.py)

1) Shared Profile Setup

cfg = load_config_1D(config_path)
rt = RT1D(
    cfg=cfg,
    time=event_time,
    fetch_iri=True,
    fetch_geomag=not args.no_geomag,
    fetch_msise=False,
    workers=max(1, int(getattr(cfg, "worker", 1))),
)

2) Same-Mode, Different-Formulation Tracers

out_a = rt.NVIS_tracer(
    freq_mhz=freqs_mhz,
    mode=args.mode,
    formulation="appleton",
    use_nonuniform_grid=not args.uniform_grid,
    nonuniform_points=int(args.nonuniform_points),
    nonuniform_sharpness=float(args.nonuniform_sharpness),
)
out_s = rt.NVIS_tracer(
    freq_mhz=freqs_mhz,
    mode=args.mode,
    formulation="senwyller",
    use_nonuniform_grid=not args.uniform_grid,
    nonuniform_points=int(args.nonuniform_points),
    nonuniform_sharpness=float(args.nonuniform_sharpness),
)

3) Overlay Plot (Trace + f_p + N_e)

ax.plot(freqs_mhz, vh_app, ...)
ax.plot(freqs_mhz, vh_sw, ...)
ax.plot(pf_mhz, alt_km, ..., label="IRI fp profile")

ax_top = ax.twiny()
ax_top.semilogx(ne_m3, alt_km, ..., label="IRI Ne profile")

Run

O-mode sweep:

cd /home/chakras4/Research/CodeBase/trace
python examples/rtmodel_omode_appleton_sw_demo.py \
  --fmin 3 --fmax 7 --nfreq 51 --mode O

Three-frequency compact run:

python examples/rtmodel_omode_appleton_sw_demo.py \
  --fmin 3 --fmax 7 --nfreq 3 --mode O

Interpretation Note

At upper frequencies, Sen-Wyller may deviate strongly from Appleton-Hartree due to generalized collisional response behavior. Keep all profile/config inputs the same when comparing formulations.

Output Figure

Default output:

  • docs/examples/figures/rt1d_omode_appleton_vs_sw.png

RT1D O Mode Appleton SenWyller

  • examples/rtmodel_omode_appleton_sw_demo.py
  • hfpytrace/model/rt1d.py
  • hfpytrace/model/dispersion.py
  • hfpytrace/density/iri.py
  • hfpytrace/geomag.py

See Also