Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: pyDARN v4.1! #398

Merged
merged 133 commits into from
Sep 5, 2024
Merged

Release: pyDARN v4.1! #398

merged 133 commits into from
Sep 5, 2024

Conversation

carleyjmartin
Copy link
Collaborator

@carleyjmartin carleyjmartin commented Jul 25, 2024

Scope

This minor release includes:

  • NEW MAG projection
  • NEW 'Zooming-in' on GEO and MAG projections
  • NEW NSSC Radars Included
  • NEW Calculation of Potential at Lat/Lon Position from Map Files
  • NEW Map Potential Time-Series Plots at Lat/Lon Position
  • NEW User Input Fan Plots
  • Cartopy now a full dependency
  • Updates to fan plots for usability including scan_time and scan_time_tolerance keywords
  • Embargo warning for -CPID data that is less than a year old
  • Coordinates converted to magnetic coordinates more efficiently
  • Bug fix Map plots lowlat default discrepancy fixed

Documentation updates are found here: https://pydarn.readthedocs.io/en/release-v4.1/

Approval

Number of approvals: 3

Please check that you are happy with your inclusion and position in the zenodo files for authorship - and let me know if I forgot anyone!

Test

Before testing this release, please check out the following unmerged PR's if they have been set as ready to review!
#397

We are expecting pyDARNio to be released before this release of pyDARN is ready, if you find you are getting a numpy error when testing, this is fixed in the latest pyDARNio release, is outside the scope of pyDARN so please either downgrade numpy to version 1.26.4 or install the release/develop branch of pyDARNio, thanks!

matplotlib version: 3.7.0 +
numpy version: No restrictions
Cartiopy: 0.22 +
Note testers: please indicate what version of matplotlib, Cartopy and numpy you are using

What needs testing:

  • Fan plots - lots of new features! Note that your old code may need updating to work
  • New projection plots on fan and grid data
  • Pulling hardware data for the new NSSC radars
  • Map potential time-series plots
  • ACF Plots
  • As always, test with north and south data with as many keyword variations as possible!
  • Mac OS
  • Opensuse, Fedora or RedHat
  • Ubuntu
  • Windows

For examples of test code, see the readthedocs link above.

For those interested, you can also run the unit tests by installing pytest and running pytest from the top directory of a clone of this branch.

Deadline

September 6th 2024 - but earlier the better!

Carley's To Do List:

  • Amend new user fan input for MAG projections

carleyjmartin and others added 30 commits September 11, 2023 13:48
* This allows overplotting on an axes object
* Changed projections.py so that a user can pass in an already-defined axis with a projection
* Changed scan.py to find records in a scan by either scan index or datetime
* Refactored fan.py to incorporate the above changes, and allow user to pass in axis object to plot colorbar in.
* Refactored all methods in fan.py to staticmethods
Method for calculating the electric potentials at a given coordinate
Calculating potentials at any coordinate
* The default background_alpha is used for calls to plot_range_time and plot_coord_time.
* Was improperly ensuring that the first scan was always scan_index=0, and instead all scans were being assigned as scan_index=0.
Allow user to specify background transparency in RTP calls.
Lots of little changes to customize Fan plots.
Option to output coastline coordinates in magnetlic longitude
things to check if this doesn't work
-the way I'm getting the location of the radars
-I should probably add the elevation of the radars for the calculation
-I'm not sure if I'm sweeping the terminator correctly
-somebody smarter than me should probably check this
Co-authored-by: Evan Thomas <evan.g.thomas@dartmouth.edu>
Add alpha to plt.colorbar when using pyplot.contourf
Fixed `map_info=False` not working
carleyjmartin and others added 3 commits July 26, 2024 11:58
@hiyadutuje

This comment was marked as resolved.

@Doreban
Copy link
Collaborator

Doreban commented Jul 31, 2024

Testing environment: OpenSuse 15.5, numpy 1.26.4, matplotlib 3.9.1, cartopy 0.23.0, pydarn 4.1

I did some testing of fan and fov plots. Tested all plots on POLAR, MAG, and GEO projections, and found no issues with plots generated. Embargo flag is working, as is adjusting the MAG and GEO plot center and extent. Overall didn't find any issues with the fan or fov plots.

@Doreban
Copy link
Collaborator

Doreban commented Aug 1, 2024

Testing environment: OpenSuse 15.5, numpy 1.26.4, matplotlib 3.9.1, cartopy 0.23.0, pydarn 4.1

Did some more testing, on grid and map plotting now. Grid plots are working with all projections for both northern and southern hemisphere. Tested plotting each parameter type of the grid file and had no issues.

Similar for map plots. Both northern and southern hemisphere plotted fine and I had no issues with any of the keyword options. Each parameter plotted without issue. Also had no issues plotting map time series for various parameters and potential time series parameter worked as expected.

@carleyjmartin
Copy link
Collaborator Author

I've added ruff as an automatic linter for commits and pull requests to this branch and develop (you'll see develop is failing because I've only fixed errors here).
Anyway, this will be a nice check when anyone commits to a branch or makes a pull request in the future as it will automatically tell you if there are issues with style or imports etc - you can see below that there are now checks on the pull request, which should say they've passed, and you get a little tick by your commit message to say that it's good.

@Doreban
Copy link
Collaborator

Doreban commented Aug 1, 2024

Testing environment: OpenSuse 15.5, numpy 2.0.1, matplotlib 3.9.1, cartopy 0.23.0, pydarn 4.1

Finished reviewing summary plots / time series plotting as well as hardware files. Changes to summary plotting to allow a subset of parameters to be plotted is working well, and all the RTP plots seem to be working (I don't think there were many if any changes to the RTP plots so I wasn't super thorough). Hardware files for the new NSSC radars are present and I had no issues checking the hardware files or plotting the FOVs of all SuperDARN radars.

Also, no issues with newer versions of numpy now.

@Doreban
Copy link
Collaborator

Doreban commented Aug 1, 2024

Testing environment: OpenSuse 15.5, numpy 2.0.1, matplotlib 3.9.1, cartopy 0.23.0, pydarn 4.1

Also tested ACF plotting with a number of keywords and found no problems.

Copy link
Collaborator

@Doreban Doreban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing I have run has had no issues.

@Doreban
Copy link
Collaborator

Doreban commented Aug 2, 2024

Testing Environment: Windows 10, numpy 2.0.1, matplotlib 3.9.1, cartopy 0.23.0, pydarn 4.1

Ran the same tests I ran on OpenSuse on my Windows laptop and came across no issues.

@carleyjmartin carleyjmartin merged commit 9d9d43c into main Sep 5, 2024
2 checks passed
@carleyjmartin carleyjmartin deleted the release/v4.1 branch September 5, 2024 17:38
@HangLiNSSC
Copy link
Collaborator

Testing Environment: Windows 10, numpy 1.26.4, matplotlib 3.7.1, cartopy 0.23.0, pydarn 4.1

There are no issues with the new features for the time being, but using Themis mode, sometimes will report an error:" for g, gate in enumerate(matching_records1[i]['slist']): KeyError: 'slist' ".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release Proposing or PR on a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposed Release of v4.1.0 for End of Summer
8 participants