pyvalion
PyVALION is a Python-based software package for validating ionospheric electron density model outputs.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.8%) to scientific vocabulary
Repository
PyVALION is a Python-based software package for validating ionospheric electron density model outputs.
Basic Info
- Host: GitHub
- Owner: victoriyaforsythe
- License: mit
- Language: Python
- Default Branch: main
- Size: 2.7 MB
Statistics
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 5
- Releases: 1
Metadata Files
README.md

PyVALION (Python VALidation for IONosphere)
PyVALION is a Python-based software package for validating ionospheric electron density model outputs.
For a given day, it downloads ionospheric parameters (such as NmF2, hmF2, B0, and B1) from the Global Ionosphere Radio Observatory (GIRO) and constructs a forward operator (geometry matrix) to compute the model-expected observations. It then calculates residuals between the observed ionospheric parameters and the model predictions and provides visual diagnostics.
A key advantage of PyVALION is its efficiency: if you need to validate multiple model runs on the same grid, the geometry matrix only needs to be computed once. This significantly speeds up and simplifies the validation process.
If you're validating your model across multiple days, you can run PyVALION in a loop and concatenate the residuals into 1-D arrays for broader analysis.
Installation
PyVALION can be installed from PyPI, which will handle all dependencies:
pip install PyVALION
Alternatively, you can clone and install it from GitHub:
git clone https://github.com/victoriyaforsythe/PyVALION.git
cd PyVALION
python -m build .
pip install .
See the documentation for details about the required dependencies.
Example Workflow
- Create the model output dictionary Record your model output into a dictionary called model with the following keys: 'NmF2', 'hmF2', 'B0', and 'B1', shaped as [Ntime, Nlat, N_lon].
N_time: number of time steps (e.g., 96 for 15-minute resolution)
N_lat: number of geographic latitudes
N_lon: number of geographic longitudes
All arrays must have the same shape. Otherwise, the forward operator G cannot be applied consistently.
- Define the units dictionary
units = {'NmF2': 'm$^{-3}$', 'hmF2': 'km', 'B0': 'km', 'B1': ' '}
Ensure your model output is in these units.
- Create the atime array This array should have N_time elements and must be a list of datetime objects that match the time dimension of your model dictionary. Example for 15-minute resolution:
dtime = datetime.datetime(year, month, day)
atime = pd.to_datetime(np.arange(dtime,
dtime + datetime.timedelta(days=1),
datetime.timedelta(minutes=15)))
Define the latitude array alat This array must have N_lat elements and match the second dimension in the model dictionary.
Define the longitude array alon This array must have N_lon elements and match the third dimension in the model dictionary.
Load the list of GIRO ionosondes
file_ion_name = os.path.join(PyVALION.giro_names_dir, 'GIRO_Ionosondes.p')
giro_name = pickle.load(open(file_ion_name, 'rb'))
If you wish to exclude ionosondes used in your data assimilation, simply modify the giro_name['name'] array.
- Download GIRO parameters
raw_data = PyVALION.library.download_GIRO_parameters(atime[0],
atime[-1],
giro_name['name'],
data_save_dir,
save_res_dir,
name_run,
clean_directory=True,
filter_CS=90)
datasavedir: path to save downloaded data
saveresdir: path to save processed results
name_run: your chosen name for this run
Create the forward operator
obs_data, obs_units, G, obs_info = PyVALION.library.find_G_and_y(atime, alon, alat, raw_data, save_res_dir, name_run, True)Compute residuals
model_data, residuals, model_units, res_ion = PyVALION.library.find_residuals(
model, G, obs_data, obs_info, units)
- Plot results
# Map of ionosonde locations PyVALION.plotting.plot_ionosondes(obs_info, dtime, save_res_dir, plot_name='Ionosondes_Map.pdf')
Histogram of residuals
PyVALION.plotting.plot_histogram(residuals,
model_units,
dtime,
save_res_dir,
plot_name='Residuals.pdf')

Mean residuals for each ionosonde
PyVALION.plotting.plot_individual_mean_residuals(res_ion,
obs_info,
model_units,
dtime,
save_res_dir,
plot_name='IonRes.pdf')


Learn More
See the tutorials folder for an example that validates NmF2 and hmF2 from PyIRI.
Owner
- Login: victoriyaforsythe
- Kind: user
- Repositories: 1
- Profile: https://github.com/victoriyaforsythe
Citation (CITATION.cff)
cff-version: 0.0.1
message: "If you use this software, please cite it as below."
authors:
- family-names: Forsythe
given-names: Victoriya V.
orcid: https://orcid.org/0000-0003-0894-2951
affiliation: U.S. Naval Research Laboratory
- family-names: Burrell
given-names: Angeline G.
orcid: https://orcid.org/0000-0001-8875-9326
affiliation: U.S. Naval Research Laboratory
title: victoriyaforsythe/PyIRI: v0.0.1
version: v0.0.1
date-released: 2023-08-10
GitHub Events
Total
- Release event: 1
- Watch event: 1
- Delete event: 1
- Member event: 1
- Public event: 1
- Push event: 10
- Pull request event: 2
- Create event: 3
Last Year
- Release event: 1
- Watch event: 1
- Delete event: 1
- Member event: 1
- Public event: 1
- Push event: 10
- Pull request event: 2
- Create event: 3
Packages
- Total packages: 1
-
Total downloads:
- pypi 25 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 2
pypi.org: pyvalion
Python Validation Tool for the Ionosphere
- Documentation: https://pyvalion.readthedocs.io/en/latest/
- License: MIT License Copyright (c) 2023 victoriyaforsythe Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
Latest release: 0.0.1
published 11 months ago
Rankings
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- PyIRI *
- cartopy *
- matplotlib *
- numpy *
- pandas *
- scipy *