Skip to content

Add generic spectrogram exampleAdd example for creating GenericSpectrogram from unsupported files - #288

Open
25btec017-eng wants to merge 2 commits into
sunpy:mainfrom
25btec017-eng:main
Open

25btec017-eng wants to merge 2 commits into
sunpy:mainfrom
25btec017-eng:main

Conversation

@25btec017-eng

Copy link
Copy Markdown

Description

This pull request adds a new example demonstrating how to construct a GenericSpectrogram object from data obtained from an unsupported file format.

The purpose of this contribution is to help users understand how they can work with spectrogram data even when their original file format is not directly supported by the radiospectra library.

Changes Made

  • Adds a new example file: examples/plot_generic_spectrogram.py.
  • Demonstrates the construction of a GenericSpectrogram object.
  • Provides an example of working with numerical data from an unsupported file format.
  • Illustrates how users can provide the required data and metadata to construct a spectrogram.
  • Provides a practical reference for users who want to use their own spectrogram data with radiospectra.

Motivation

The radiospectra library supports specific radio spectrogram data formats. However, users may also have spectrogram data stored in other formats.

This example aims to demonstrate an alternative approach by manually constructing a GenericSpectrogram object, allowing users to work with data from formats that do not have a dedicated reader.

Related Issue

Closes #286


AI Assistance Disclosure

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

The implementation has been reviewed by the contributor. The contributor takes responsibility for understanding the changes, verifying their correctness, and ensuring compatibility with the existing radiospectra API.

@Hermanlrx

Copy link
Copy Markdown
Member

Please note that we are currently busy migrating the data container to NDCube and might be slow to finish example gallery PR's to avoid adding to migration workload.

This branch has not been deployed

No deployments
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.

Create an example for how to construct a spectrogram object with unsupported filetypes

2 participants