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

SSUSI bug #231

Merged
merged 9 commits into from
Jul 12, 2024
Merged

SSUSI bug #231

merged 9 commits into from
Jul 12, 2024

Conversation

aburrell
Copy link
Member

@aburrell aburrell commented Jun 6, 2024

Description

Addresses an issue found when loading subsequent days of DMSP SSUSI SDR-Disk data, which caused a memory failure. Fixed by adding a custom concat_data method. This shares many lines of code with TIMED GUVI, so the comment elements were moved to pysatNASA.instruments.methods.jhuapl.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

import datetime as dt
import pysat

ssusi = pysat.Instrument('dmsp', 'ssusi', 'sdr-disk', 'f18')
stime = dt.datetime(2010, 4, 14)

ssusi.load(date=stime)  # Will be fine

stime += dt.timedelta(days=1)
ssusi.load(date=stime)  # Will fail and potentially crash your computer without fix

Test Configuration:

  • Operating system: OS X Big Sur
  • Version number: Python 3.9
  • Any details about your local setup that are relevant: develop branch of pysat

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 commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • 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
  • Update zenodo.json file for new code contributors

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

Extracted the general portion of the GUVI `concat_data` method, to allow use in the DMSP SSUSI data.
Use the new JHU APL concat function in local method.
Use the JHU APL `concat_data` function in this Instrument.
Modified changelog to reflect changes in this pull request.
@aburrell aburrell requested a review from jklenzing June 6, 2024 22:07
@aburrell aburrell added this to the 0.0.6 Release milestone Jun 6, 2024
@aburrell aburrell added the bug Something isn't working label Jun 6, 2024
Updated the DMSP SSUSI test flags to only test for warnings in the clean routine when appropriate and to skip the new tests for the high resolution imaging data.
Tests still failing due to too much memory, add another skip.
@jklenzing
Copy link
Member

Could you rebase into the #227 pull? That is the most functional branch and may fix the issues with test failure here

@aburrell aburrell changed the base branch from develop to maint/nep29_apr24 June 14, 2024 15:09
@jklenzing jklenzing changed the base branch from maint/nep29_apr24 to develop July 8, 2024 20:40
@aburrell aburrell merged commit 22de06c into develop Jul 12, 2024
15 of 23 checks passed
@aburrell aburrell deleted the ssusi_bug branch July 12, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants