-
Notifications
You must be signed in to change notification settings - Fork 61
Rbsp magephem update #1153
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
Open
xnchu
wants to merge
8
commits into
spedas:master
Choose a base branch
from
xnchu:rbsp_magephem
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rbsp magephem update #1153
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…larity - Updated variable names in the magephem_read.py file to follow a consistent naming convention, improving readability and maintainability. - Renamed columns to use camel case and underscores for better clarity (e.g., "Julian Date" to "JulianDate"). - Enhanced error handling in the data reading functions to ensure robustness against missing variables. - Adjusted return statements to provide lists instead of keys for better usability in downstream processing.
- Refactored the magephem_ect function to include additional parameters (notplot, prefix, suffix) in the magephem_read_h5 and magephem_read_txt calls, improving flexibility in data handling. - Cleaned up import statements for better organization and readability. - Ensured that the function remains robust for various data formats while maintaining compatibility with existing workflows.
It looks like there was a test failure related to the latest changes to pyspedas/projects/rbsp/magephem_read.py : the test is looking for a variable CD_MLAT, but it looks like that column might have been renamed in the PR?
|
- Modified unit tests in LoadTestCases to replace outdated variable names (CD_MLAT, CD_MLON, CD_MLT) with the updated naming convention (CDMAG_MLAT, CDMAG_MLON, CDMAG_MLT) for consistency with recent data handling improvements. - Ensured that the tests continue to validate the existence of necessary data after the renaming.
- Changed the default value of the last_version parameter in the download function to True, ensuring that the latest file is downloaded by default when multiple matches are found. - Updated the function documentation to reflect this change, clarifying the behavior of the last_version parameter. - Added logging to indicate whether local files were found, improving traceability during the download process.
…o rbsp_magephem
- Modified the test_wildcard method to set last_version parameter to False in the download function, ensuring that all matching files are considered during the test. - Cleaned up the code by removing unnecessary blank lines and ensuring consistent use of double quotes for strings. - Added a newline at the end of the file for better formatting.
Please don't default last_version to True in download.py. It will adversely affect performance for many missions that don't have multiple CDF versions. |
…performance measure.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactor magephem_read Module for Clarity and Consistency
• Standardized variable naming conventions for improved readability and maintainability.
• Renamed data columns to use camel case with underscores (e.g., Julian Date → JulianDate).
• Enhanced error handling for more robust data reading.
• Adjusted return values to provide lists instead of keys for easier downstream use.
Enhance RBSP Module with New magephem_ect Functionality
• Added magephem_ect function to support loading ECT magnetic field line mapping ephemeris data from HDF5 and text files.
• Integrated new magephem_read module for handling both file formats.
• Updated RBSP config to include remote ECT data directory.
• Refactored existing magephem function for improved clarity and consistency.
• Added unit tests covering magephem_ect data loading to ensure reliability across formats.