Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
fc9d9fc
add option for true velocity
carleyjmartin Mar 14, 2023
3c3b8f7
mod line
carleyjmartin Mar 14, 2023
ecd30f9
correction for true velocity calculations
carleyjmartin Apr 26, 2023
5d1c86b
Merge branch 'develop' into ehn/true_velocity
carleyjmartin Oct 6, 2023
eb0c9a5
Merge branch 'develop' into ehn/true_velocity
carleyjmartin Dec 14, 2023
290ed6b
Merge branch 'develop' into ehn/true_velocity
carleyjmartin Jan 23, 2024
3a76b06
Merge branch 'develop' into ehn/true_velocity
carleyjmartin Apr 5, 2024
76a1ee1
Merge branch 'develop' into ehn/true_velocity
Oct 27, 2025
df90087
Apply suggestions from code review
carleyjmartin Oct 27, 2025
44f940e
Initial function
billetd Feb 7, 2026
bdd304d
Class-ified things. Removed test code.
billetd Feb 7, 2026
ee03ac6
Formatting
billetd Feb 7, 2026
8ddc6dc
Added Savitsky-Golay filter option.
billetd Feb 7, 2026
475b939
Fixed docstrings. Updated polyorder handling.
billetd Feb 7, 2026
cfb8ca1
Fix broken kwargs
billetd Feb 7, 2026
075206c
Incorrect default fixed
billetd Feb 17, 2026
633770f
Merge branch 'main' into ehn/true_velocity
Feb 17, 2026
49d413f
update to true velocity code
Feb 18, 2026
6bc344e
restrict scipy to >=1.17
Feb 23, 2026
f11828e
changing mag longitude to MLT in the plot_centre option as the MAG pr…
Feb 23, 2026
f756953
tidy
Feb 23, 2026
eb9724b
plot_tight option, centered FOV
Feb 24, 2026
2ab4bdc
amend docs
Feb 24, 2026
2905772
flake 8 and ruff fix
Feb 24, 2026
b096f27
Modified get_hdw_files and read_hdw_files for file handling and porta…
Wtristen Mar 5, 2026
8f6c6d7
reverted read_hdw_file because it seems like it was correct originially
Wtristen Mar 5, 2026
e461037
Merge pull request #436 from SuperDARN/fix/scipy-restriction
carleyjmartin Mar 17, 2026
69e9e11
include option to return full array of data including NaNs when required
Mar 24, 2026
bc96dd7
Update pydarn/utils/superdarn_radars.py
Wtristen Apr 8, 2026
6fcc38f
Update pydarn/utils/superdarn_radars.py
Wtristen Apr 8, 2026
914f4e5
Delete test/test_hdw.py
Wtristen Apr 8, 2026
faa8a74
added option ot remove ionospheric scatter or ground scatter
Apr 20, 2026
0ab8aed
fix bug in rmove iono scatter for fan
Apr 20, 2026
48bb6b0
Merge pull request #438 from Wtristen/hdw-refactor
carleyjmartin May 1, 2026
706b911
suggestions from code review
May 1, 2026
39c5220
Merge pull request #435 from SuperDARN/enh/detrend
carleyjmartin May 1, 2026
e22c087
Merge pull request #307 from SuperDARN/ehn/true_velocity
carleyjmartin May 1, 2026
72745af
update documentation for new features in develop
May 19, 2026
9cf2796
Merge pull request #446 from SuperDARN/docs/update-v4.3
carleyjmartin May 20, 2026
43dcf5e
pre-release checklist
May 20, 2026
64f4a5f
Merge pull request #440 from SuperDARN/ehn/valid-gates-return
KieranKuch May 21, 2026
ebf4d2b
Merge branch 'develop' into release/v4.3
May 21, 2026
c00fce6
Merge pull request #437 from SuperDARN/fix/plot-center
RileySylvestre May 21, 2026
581fc3c
Merge branch 'develop' into release/v4.3
May 21, 2026
86d738e
Merge branch 'develop' into enh/plot-only-gs
carleyjmartin May 25, 2026
0878699
Merge pull request #442 from SuperDARN/enh/plot-only-gs
KieranKuch May 25, 2026
d5e87a0
Merge branch 'develop' into release/v4.3
May 25, 2026
81170fa
update zenodo
May 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
{
"name": "SuperDARN Data Visualization Working Group"
},
{
"affiliation": "University of Saskatchewan",
"name": "Rohel, R.A.",
"orcid": "0000-0003-2208-1553"
},
{
"affiliation": "University of Saskatchewan",
"name": "Martin, C.J.",
Expand All @@ -18,6 +13,24 @@
"name": "Billett, D.D.",
"orcid": "0000-0002-8905-8609"
},
{
"affiliation": "Virginia Tech",
"name": "Wanner, T.D.",
"orcid":"0009-0007-0616-5796"
},
{
"affiliation": "University of Saskatchewan",
"name": "Kucharyshen, K."
},
{
"affiliation": "University of Saskatchewan",
"name": "Sylvestre, R."
},
{
"affiliation": "University of Saskatchewan",
"name": "Rohel, R.A.",
"orcid": "0000-0003-2208-1553"
},
{
"affiliation": "Virginia Tech",
"name": "Sterne, K.T.",
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ Python data visualization library for the Super Dual Auroral Radar Network (Supe

## Changelog

## Version 4.2 - Major Release!
## Version 4.3 - Minor Release!

This major release includes:
- Updates to pyDARNio interface: faster reading of files
- `nightshade` added to range-time plot options
- ENUM use for retrieving radar information
This minor release includes:
- Updated SciPy restriction and changes associated
- NEW: True velocity in map plots
- NEW: FITACF data detrending algorithm
- Bug Fix: Updating HDW files on Windows fixed

## Documentation

Expand Down Expand Up @@ -51,7 +52,7 @@ plt.show()

For more information and tutorials on pyDARN please see the [tutorial section](https://pydarn.readthedocs.io/en/main/).

We also have a [Jupyter notebook](https://zenodo.org/record/7005203) with many examples to support our recent [publication](https://doi.org/10.3389/fspas.2022.1022690).
We also have a [Jupyter notebook](https://zenodo.org/record/7005203) with many examples to support our [publication](https://doi.org/10.3389/fspas.2022.1022690). This notebook may be out of date.

## Getting involved

Expand Down
Binary file added docs/imgs/detrend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/user/axis.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ plt.show()
| coastline_linewidth=(float) | Uses Cartopy to set line width of the coastlines |
| grid_lines=(bool) | Uses Cartopy to plot grid lines |
| nightshade=(int) | Uses the value given to calculate and show where on the plot the Earth is in shadow |
| plot_center=[float,float] | Longitude and latitude of the desired center of the plot (e.g. [-90, 60]) |
| plot_center=[float,float] | MLT(MAG)/Longitude(GEO) and latitude of the desired center of the plot (e.g. [6, 60]) |
| plot_extent=[float,float] | Plotting extent in terms of percentage of the earth (e.g. [80,50]) |

This choice will return an `ax` object and a Cartopy `ccrs` object (coordinate reference system).
Expand Down
2 changes: 1 addition & 1 deletion docs/user/coordinates.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ plt.show()
```

!!! Note
Nightshade is now available in range-time plots. See [range-time plots](user/range_time.md).
Nightshade is now available in range-time plots. See [range-time plots](user/range_time.md).
4 changes: 4 additions & 0 deletions docs/user/fan.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ Here is a list of all the current options than can be used with `plot_fan`
| colorbar_label=(string) | Label that appears next to the color bar, requires colorbar to be True |
| coastline=(bool) | Plots outlines of coastlines below data (Uses Cartopy) |
| beam=(int) | Only plots data/outline of specified beam (default: None) |
| plot_tight=(bool)* | Centers the radars FOV in the plot and calculates extents based on FOV (default: False) |
| kwargs ** | Axis Polar settings. See [polar axis](axis.md) |


Expand All @@ -142,6 +143,9 @@ Here is a list of all the current options than can be used with `plot_fan`
In other cases, the user may want to specify the channel and use an integer (N) for the `scan_index`. Be aware that this will show the
data for the Nth scan of only the chosen channel, not that of the entire file.

!!! Note
* plot_tight option only works with MAG and GEO projections, plot_tight will overwrite plot_center and plot_extent options from axis setup

!!! Warning
Not all data is designed to be plotted on a fan plot. Some CPID's, such as camping beam/themisscan, do not plot well due to overlapping beams in a single scan. It is up to the user to interpret the suitability of the plotting method used.

Expand Down
23 changes: 17 additions & 6 deletions docs/user/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@ and conditions of version 3 of the GNU General Public License, supplemented by
the additional permissions listed below.
-->

# Filtering Data
# Filtering and Detrending Data
---



Currently pyDARN has one filtering option.

## Boxcar Filtering

!!! Note
Expand Down Expand Up @@ -81,4 +77,19 @@ plt.show()
```

![](../imgs/unfiltered.png)
![](../imgs/filtered.png)
![](../imgs/filtered.png)

## Data Detrending

FITACF level data can be detrended to view background periodic fluctuations in data.
You can choose between using a mean value of the window length ('mean'), or using the Sovitsky-Golay filter ('sov-gal').

```python
import pydarn

data, _ = pydarn.read_fitacf('superdarn.data.file.fitacf')

dmap_detrended = pydarn.Detrend.detrend_fitacf(data, parameter='both', window_length=600, detrend_type='mean')
```

![](../imgs/detrend.png)
5 changes: 5 additions & 0 deletions docs/user/fov.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@ Here is a list of all the current options than can be used with `plot_fov`
| radar_label=(bool) | Places the radar 3-letter abbreviation next to the radar location |
| coastline=(bool) | Plots outlines of coastlines below FOV (Uses Cartopy) |
| beam=(int) | Only plots outline/fill of specified beam (default: None) |
| plot_tight=(bool)* | Centers the radars FOV in the plot and calculates extents based on FOV (default: False) |
| kwargs ** | Axis Polar settings. See [polar axis](axis.md) |

!!! Note
* plot_tight option only works with MAG and GEO projections, plot_tight will overwrite plot_center and plot_extent options from axis setup



### Examples

Expand Down
5 changes: 4 additions & 1 deletion docs/user/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ pip3 install --upgrade pydarn

Installing in virtual environments is recommended, see below for details.

!!! Note
Many funding agencies count acknowledgements and citations when assessing projects. Please remember to [acknowledge](/citing.md) the SuperDARN data, and tools you are using so we can keep producing high quality data and tools to use it!

## Prerequisites

pyDARN requires **python 3.8** or later, see list below for library dependencies.
Expand All @@ -59,7 +62,7 @@ You can check your python version using
On installation, pyDARN will download the following dependencies:

- [NumPy](https://numpy.org/)
- [scipy <1.15.0](https://scipy.org/)
- [scipy 1.17.0+](https://scipy.org/)
- [matplotlib 3.7.0+](https://matplotlib.org/)
- [PyYAML](https://pyyaml.org/wiki/PyYAMLDocumentation)
- [pyDARNio 2.0.0+](https://pydarnio.readthedocs.io/en/latest/user/install/)
Expand Down
2 changes: 1 addition & 1 deletion docs/user/io.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ the additional permissions listed below.
# Reading in DMap structured SuperDARN data files
---

Data Map (DMap) is a binary self-describing format that was developed by Rob Barnes.
Data Map (DMap) is a binary self-describing format that was developed by the SuperDARN community.
This format is currently the primary format used by SuperDARN.
For more information on DMap please see [RST Documentation](https://radar-software-toolkit-rst.readthedocs.io/en/latest/).
Types of files used by SuperDARN which are usually accessed in DMap format are:
Expand Down
6 changes: 6 additions & 0 deletions docs/user/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Map field descriptions can be found [here](https://radar-software-toolkit-rst.re
| ------------------ | ----------------------------- | ----------------------------- |
| Fitted Velocity | `MapParams.FITTED_VELOCITIES` | see Fitted Velocities section |
| Modeled Velocities | `MapParams.MODEL_VELOCITIES` | `model.vel.median` |
| True Velocities | `MapParams.TRUE_VELOCITIES` | see True Velocities section |
| Raw Velocities | `MapParams.RAW_VELOCITIES` | `vector.vel.median` |
| Power | `MapParams.POWER` | `vector.pwr.median` |
| Spectral Width | `MapParams.SPECTRAL_WIDTH` | `vector.wdt.median` |
Expand All @@ -38,6 +39,11 @@ Fitted velocities are velocity vectors which represent the fitted convection pat

Fitted velocity vectors are by default only calculated at the same positions of the line-of-sight vectors, but fit vectors at an arbitrary position can be obtained by using the `calculated_fitted_velocities` function in `map.py`.

### True Velocities

True velocity is a name given to a value of velocity derived from the fitted and raw velocities. Note that is not the 'absolute true' velocity that is occuring in the ionosphere, it is just a different representation of the velocities.
The True velocity is given by combining the average line-of-sight velocity measured at each grid cell with the component of the fitted velocity which is perpendicular to the line-of-sight direction. More information can be read in [Chisham et al.2002](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2001JA009124).

## Basic usage

pyDARN and pyplot need to be imported and the desired MAP file needs to be [read in](https://pydarn.readthedocs.io/en/main/user/io/):
Expand Down
2 changes: 1 addition & 1 deletion docs/user/superdarn_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The [Data Distribution Working Group (DDWG)](https://github.com/SuperDARN/DDWG)
## Data Mirrors
To get access to rawacf, fitacf and sometimes higher lever data, there are three possible data servers: one utilizes *Globus*, others use `rsync`, `sftp` and `scp`:

- [SuperDARN Canada](https://superdarn.ca/): uses [Globus](https://github.com/SuperDARNCanada/globus) to allow access to the SuperDARN data. Contact [[email protected]](mailto:[email protected]) for access.
- [SuperDARN Canada](https://superdarn.ca/data-access): uses [Globus](https://github.com/SuperDARNCanada/globus) to allow access to the SuperDARN data. Contact [[email protected]](mailto:[email protected]) for access or fill in the online form at the link above.
- [BAS](https://www.bas.ac.uk/project/superdarn/#about): information on data access can be found [here](https://www.bas.ac.uk/project/superdarn/#data)
- [NSSC](https://www.nssdc.ac.cn/nssdc_en/html/task/sdarn.html): please contact NSSC for access.

Expand Down
1 change: 1 addition & 0 deletions pydarn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
from .utils.terminator import terminator
from .utils.recalculate_elevation import recalculate_elevation
from .utils.filters import Boxcar
from .utils.detrend import Detrend

# import plotting
from .plotting.color_maps import PyDARNColormaps
Expand Down
8 changes: 8 additions & 0 deletions pydarn/exceptions/plot_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
# supplemented by the additional permissions listed below.
import datetime

class GeneralError(Exception):
'''
Error for general messages
'''
def __init__(self, message):
self.message = message
super().__init__(self.message)


class PartialRecordsError(Exception):
"""
Expand Down
Loading
Loading