Conversation
Summary of ChangesHello @joelridden, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the data processing pipeline by integrating local StationXML inventory files, which streamlines waveform processing by reducing external API calls. It also refines the instrument response removal mechanism from Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a significant improvement by caching station inventory XML files, which reduces reliance on FDSN services. The changes are extensive, touching data retrieval, processing, and documentation. The core logic of switching from remove_sensitivity to remove_response is correctly implemented.
However, I've identified a few issues:
- A critical logic error in
waveform_manipulation.pythat inverts the inventory handling. - Code duplication and lack of error handling when reading XML files.
- Inefficient and non-robust station data fetching in the new
inventory_xml.pymodule. - A non-reproducible default date.
I've provided detailed comments and suggestions to address these points. Once these are resolved, the PR will be in great shape.
# Conflicts: # nzgmdb/calculation/snr.py # nzgmdb/data_processing/process_observed.py # nzgmdb/data_processing/waveform_manipulation.py # nzgmdb/data_retrieval/sites.py # nzgmdb/mseed_management/reading.py
lispandfound
left a comment
There was a problem hiding this comment.
Just some minor type checking issues.
| bypass_row: pd.Series = None, | ||
| inventory: Inventory = None, |
There was a problem hiding this comment.
| bypass_row: pd.Series = None, | |
| inventory: Inventory = None, | |
| bypass_row: pd.Series | None = None, | |
| inventory: Inventory | None = None, |
There was a problem hiding this comment.
Can't use this sadly due to a forced python 3.8 or 3.9 for PhaseNet and GMC
| def run_phasenet( | ||
| mseed_files_ffp: Path, output_dir: Path, bypass_ffp: Path | None = None | ||
| ): | ||
| def run_phasenet(mseed_files_ffp: Path, output_dir: Path, bypass_ffp: Path = None): |
There was a problem hiding this comment.
| def run_phasenet(mseed_files_ffp: Path, output_dir: Path, bypass_ffp: Path = None): | |
| def run_phasenet(mseed_files_ffp: Path, output_dir: Path, bypass_ffp: Path | None = None): |
There was a problem hiding this comment.
Can't use this sadly due to a forced python 3.8 or 3.9 for PhaseNet and GMC
Adds the XML station inventory files.
Reduces needed retrieval of inventory info from the FDSN by using local files.
Adds XML to the dropbox upload process.
Changed remove sensitivity to remove response.
Adjusted wiki and changelog.