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

ENH: Added a DMSP SSJ instrument #81

Merged
merged 10 commits into from
Jun 6, 2023
Merged

ENH: Added a DMSP SSJ instrument #81

merged 10 commits into from
Jun 6, 2023

Conversation

aburrell
Copy link
Member

@aburrell aburrell commented Mar 2, 2023

Description

Added an instrument for the DMSP SSJ auroral boundary index data. This data is stored in yearly files, and requires an update to pysat to work correctly. It also revealed a local bug in the general download function.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality or documentation)
  • This change requires a documentation update

How Has This Been Tested?

import datetime as dt
import pysat
import pysatMadrigal as pymad

stime = dt.datetime(2014, 3, 26)
ssj = pysat.Instrument(inst_module=pymad.instruments.dmsp_ssj, tag='abi')
ssj.download(start=stime)
ssj.load(date=stime)

ssj.data

Yields

                    year  month   day  ...  eqb_prb_kp  sat_id   epowq
2014-03-26 00:06:45  2014.0    3.0  26.0  ...       0.911    17.0  2170.0
2014-03-26 00:29:37  2014.0    3.0  26.0  ...       0.868    18.0  2181.0
2014-03-26 00:38:45  2014.0    3.0  26.0  ...       0.881    17.0  2171.0
2014-03-26 00:41:33  2014.0    3.0  26.0  ...       0.622    16.0  2160.0
2014-03-26 00:45:33  2014.0    3.0  26.0  ...       0.946    18.0  2181.0
...                     ...    ...   ...  ...         ...     ...     ...
2014-03-26 23:33:17  2014.0    3.0  26.0  ...       0.940    16.0  2161.0
2014-03-26 23:38:09  2014.0    3.0  26.0  ...       0.768    17.0  2170.0
2014-03-26 23:42:29  2014.0    3.0  26.0  ...       0.913    18.0  2180.0
2014-03-26 23:43:29  2014.0    3.0  26.0  ...       0.892    16.0  2161.0
2014-03-26 23:51:33  2014.0    3.0  26.0  ...       0.911    17.0  2170.0

[131 rows x 22 columns]

Test Configuration

Checklist:

  • Make sure you are merging into the develop (not main) branch
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have linted the files updated in this pull request
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • [N/A] My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • Add a note to CHANGELOG.md, summarizing the changes

If this is a release PR, replace the first item of the above checklist with the
release checklist on the pysat wiki:
https://github.com/pysat/pysat/wiki/Checklist-for-Release

aburrell added 4 commits March 2, 2023 16:47
Fixed the definition of the download stop time, not assuming it has a daily cadence.
Added an instrument for the DMSP SSJ auroral boundary data.
Added the DMSP SSJ instrument to the docs.
Added a summary of the changes to the changelog.
@aburrell
Copy link
Member Author

Requires pysat 3.1.0 release

@aburrell aburrell added this to the Future milestone Mar 20, 2023
@aburrell aburrell modified the milestones: Future, 0.2.0 Release Apr 11, 2023
@aburrell aburrell marked this pull request as ready for review May 31, 2023 20:24
aburrell added 4 commits May 31, 2023 16:40
Because DMSP SSJ requires annual loading, it cannot be handled correctly by the general pandas instrument.
Fix CI docs tests with a sphinx version limit.
Updated the docstring and import style.
Attempt to update flake8 so PEP8 tests pass.
aburrell added 2 commits June 1, 2023 15:18
Removed an extra blank line in a docstring.
Fixed variable names to lowercase, to comply with pysat standards.
@aburrell aburrell requested review from jklenzing and rstoneback June 2, 2023 18:44
@aburrell aburrell mentioned this pull request Jun 5, 2023
11 tasks
@aburrell aburrell requested a review from JonathonMSmith June 6, 2023 13:08
@aburrell aburrell merged commit 15a95df into develop Jun 6, 2023
@aburrell aburrell mentioned this pull request Jun 6, 2023
10 tasks
@aburrell aburrell deleted the dmsp_ssj4 branch June 7, 2023 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants