irobench is a Python toolkit for simulating, filtering and analysing ionospheric radio occultation (IRO) electron density profiles for modelling purposes.
It is built for students, beginners and researchers who want a practical starting point for:
- simulating IRO-style profiles
- injecting realistic retrieval artifacts
- testing filtering rules
- running Chapman-based structural checks
- processing real
ionPrfNetCDF profile files
If this is your first time using the repository, follow this order:
| Step | What to do | Why |
|---|---|---|
| 1 | Install the package | Gets the code working locally |
| 2 | Run examples/run_demo.py |
Confirms everything is set up correctly |
| 3 | Open the notebooks | Helps you understand the workflow interactively |
| 4 | Run scripts/filter_v10.py or scripts/filter_v10_mode.py on real data |
Applies the real-data filtering pipeline |
irobench supports two main use cases.
You can generate synthetic IRO-like profiles, inject controlled artifacts, compute quality metrics and visualize the result.
This is useful when you want to:
- test filtering ideas
- understand failure modes
- compare statistical and structural checks
- reproduce thesis-style experiments
You can process real COSMIC-style ionPrf NetCDF files and generate:
- filtered profile outputs
- pass/fail plots
- summary CSV files
- diagnostic figures for downstream analysis
irobench/
├── irobench/ # core Python package
├── examples/ # minimal runnable example
├── scripts/ # batch-processing scripts
├── notebooks/ # exploratory notebooks
├── data/real_iro/ # place real input files here
├── docs/images/ # README images
├── README.md
├── TROUBLESHOOTING.md
├── CITATION.cff
├── CONTRIBUTING.md
├── LICENSE
└── pyproject.toml
irobench/models.py— synthetic truth-profile generationirobench/artifacts.py— controlled corruption and artifact injectionirobench/metrics.py— profile-quality metricsirobench/chapman.py— Chapman-profile fittingirobench/bench.py— single and batch simulation entry pointsirobench/plotting.py— profile visualizationirobench/v9.py— thesis-era statistical metric workflowirobench/thesis_pipeline.py— higher-level processing helpersscripts/filter_v10.py— command-line batch filter for real datascripts/filter_v10_mode.py— command-line batch filter for real data with selectable decision modes (v9, v10, v10c)
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -e .python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -e .For the full analysis workflow, including optional peak-detection utilities:
pip install -e ".[analysis]"Run the example script:
python examples/run_demo.pyIf everything is working, this writes:
irobench_demo.png
in the current folder.
That is the easiest way to confirm the project is installed correctly before moving on.
Install Jupyter if needed:
pip install jupyter
jupyter notebookThen open any notebook in notebooks/.
A good beginner path is:
simulation_study.ipynbSimulator_Thesis_Final.ipynbAnalysis_Thesis_Final.ipynb
The PDFs of above mentioned notebooks with cell captions can be found in the same folder for better understanding.
The batch scripts are:
scripts/filter_v10.py
scripts/filter_v10_mode.py
filter_v10.pyruns the original real-data pipeline.filter_v10_mode.pyadds selectable decision modes: v9 (statistical-only), v10c (Chapman-only) and v10 (Combined statistical + Chapman filtering)
Both scripts expect a directory of NetCDF profile files. By default, the repository includes an empty placeholder folder here:
data/real_iro/
You can place your files there or point the script to another directory.
python scripts/filter_v10.py --data-dir ./data/real_iro --out-root ./outputspython scripts/filter_v10_mode.py --data-dir ./data/real_iro --out-root ./outputs_v9 --mode v9
python scripts/filter_v10_mode.py --data-dir ./data/real_iro --out-root ./outputs_v10 --mode v10
python scripts/filter_v10_mode.py --data-dir ./data/real_iro --out-root ./outputs_v10c --mode v10cpython scripts/filter_v10.py --data-dir .\data\real_iro --out-root .\outputspython scripts/filter_v10_mode.py --data-dir .\data\real_iro --out-root .\outputs_v9 --mode v9
python scripts/filter_v10_mode.py --data-dir .\data\real_iro --out-root .\outputs_v10 --mode v10
python scripts/filter_v10_mode.py --data-dir .\data\real_iro --out-root .\outputs_v10c --mode v10cIf your filenames follow a different pattern, you can also set:
--file-prefix ionPrf_ --file-suffix _ncThis repository works with COSMIC/CDAAC ionPrf NetCDF profile files.
Download Level 2 ionospheric profile files in ionPrf format.
Typical filenames look like:
ionPrf_IIII.YYYY.DDD.HH.MM.GGG_SSSS.VVVV_nc
For official COSMIC GNSS radio occultation data, use the CDAAC archive from UCAR.
Use COSMIC-1 if you want historical mission data and reprocessed archives.
Archive root:
https://data.cosmic.ucar.edu/gnss-ro/cosmic1/
Use COSMIC-2 if you want newer ionospheric profiles.
Archive root:
https://data.cosmic.ucar.edu/gnss-ro/cosmic2/provisional/spaceWeather/
- Download the
ionPrffiles you need. - Put them into:
data/real_iro/
- Run the filter script:
python scripts/filter_v10.py --data-dir ./data/real_iro --out-root ./outputs- Make sure you download
ionPrffiles specifically, not other product types such asatmPrforwetPrf. data/real_iro/is only a placeholder folder in this repository. You add the real NetCDF files yourself locally.- If your downloaded filenames use a slightly different naming pattern, use
--file-prefixand--file-suffixwhen running the script.
A typical run can produce:
iro_summary_v10.csviro_failed_v10_profiles.csviro_v9pass_v10fail_profiles.csvfiltered_profiles_npz/failed_profiles_plots_v10/passed_profiles_plots_v10/v9pass_v10fail_plots/figures/
A mode-selectable run writes outputs specific to the selected mode.
For --mode v9:
iro_summary_v9.csvfiltered_profiles_npz_v9/failed_profiles_plots_v9/passed_profiles_plots_v9/figures_v9/
For --mode v10:
iro_summary_v10.csvfiltered_profiles_npz_v10/failed_profiles_plots_v10/passed_profiles_plots_v10/figures_v10/
For --mode v10c:
iro_summary_v10c.csvfiltered_profiles_npz_v10c/failed_profiles_plots_v10c/passed_profiles_plots_v10c/figures_v10c/
Put real NetCDF input files in data/real_iro/, and/or point --data-dir to any other folder.
The filtering script is built for COSMIC-style ionPrf NetCDF profile files.
No. The repository is usable on its own.
The thesis gives the scientific background, design logic and validation context, but a new user can start directly with the example script and notebooks.
No. The repository is intentionally kept lightweight. Add your own real data locally.
- install the package
- run the demo script
- explore the notebooks
- test simulation settings
- download
ionPrfdata from CDAAC - run
scripts/filter_v10.pyorscripts/filter_v10_mode.py - inspect mode-specific CSV summaries and figures
- use the cleaned outputs for downstream modelling or analysis
If you run into environment or notebook errors, see:
TROUBLESHOOTING.md
This repository accompanies the Master's thesis done by Swaraj Bhosale at DGFI-TUM titled:
Analysis and Filtering of Ionospheric Radio Occultation Measurements for Modelling Purposes
The codebase reflects the practical software side of that work:
- simulation of controlled good and corrupted profiles
- evaluation of filtering logic
- comparison of statistical and Chapman-based checks
- application to real COSMIC-style data
For a public GitHub audience, the repository is intentionally organised as a usable software project first and a thesis companion second.
If you use this repository in academic work, please cite the repository and the associated Master's thesis.
A machine-readable citation file is included in:
CITATION.cff
Suggestions, bug reports and cleanup improvements are welcome.
See:
CONTRIBUTING.md
MIT
