Add gallery examples for cropping and extracting profiles - #263
Add gallery examples for cropping and extracting profiles#263Amityush-lgtm wants to merge 4 commits into
Conversation
| @@ -0,0 +1,89 @@ | |||
| """ | |||
| Cropping a WIND/WAVES spectrogram | |||
There was a problem hiding this comment.
| Cropping a WIND/WAVES spectrogram | |
| Cropping a Spectrogram |
as it not specifically to WIND/WAVES that just the data being used for the example
| # Two key methods are available: | ||
| # | ||
| # * `~ndcube.NDCube.crop` — accepts high-level coordinate objects | ||
| # (e.g. `~astropy.time.Time`). |
There was a problem hiding this comment.
Got it, i'll add SpectralCoord :)
| spec = waves_specs[0] | ||
|
|
||
| ############################################################################### | ||
| # Cropping by time |
There was a problem hiding this comment.
Hum maybe just Crop and show how to crop using only one axes e.g. Time then the other e.g. SpectralCoord and the using both?
| time_cropped = spec.crop((start_time, None), (end_time, None)) | ||
|
|
||
| ############################################################################### | ||
| # Cropping by frequency |
There was a problem hiding this comment.
again maybe keep same as above for by time using u.s then frequency as a quantity an then both?
There was a problem hiding this comment.
I'm not sure but could maybe fold this into the other example as its an extreme version of cropping to a single axis
|
Ive pushed the suggested changes and updated the examples. While testing locally, the NASA SPDF server is having some issues so fido.search() was getting stuck query, i tried with some other instruments and they are working |
PR Description
This PR adds two new gallery examples demonstrating slicing and cropping using the
ndcubeAPI as discussed in #262.Changes:
plot_cropping.pyto demonstrate cropping spectrograms usingcrop()andcrop_by_values().plot_profiles.pyto demonstrate extracting time profiles and line profiles usingndcubeslicing.AI Assistance Disclosure
AI tools were used for: