Skip to content

Add test for missing instrument metadata in RPWSpectrogram#177

Open
tejasnarwade wants to merge 4 commits intosunpy:mainfrom
tejasnarwade:add-test-rpw-missing-meta
Open

Add test for missing instrument metadata in RPWSpectrogram#177
tejasnarwade wants to merge 4 commits intosunpy:mainfrom
tejasnarwade:add-test-rpw-missing-meta

Conversation

@tejasnarwade
Copy link

@tejasnarwade tejasnarwade commented Mar 17, 2026

This PR adds a test to check the behavior of RPWSpectrogram when the
"instrument" key is missing from the metadata.

Previously, accessing this key directly could raise an error. With the
recent change to use a safer access method, this test ensures that the
function handles such cases gracefully and returns False instead of
failing.

This helps improve reliability and prevents similar issues in the future.

PR Description
AI tools were used for:

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding
  • No AI tools were used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant