Add gallery examples for cropping and extracting profiles - #263
Add gallery examples for cropping and extracting profiles#263Amityush-lgtm wants to merge 7 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 |
|
Need to megre / rebase |
|
I have updated the RTD config |
|
@samaloney i have brought all the requirements that were added in the Waves Example gallery setup here to check the example here, let me know if this looks right |
|
Yea I guess we should keep the ndcube branch up today with main to avoid having to make the same changes manually |
|
That sounds good, but since @hayesla created the |
PR Description
This PR adds a new gallery examples demonstrating slicing and cropping using the
ndcubeAPI as discussed in #262.Changes:
plot_cropping.pyto demonstrate cropping spectrograms and extracting time profiles and line profiles using NDCube'scrop()andcrop_by_values().AI Assistance Disclosure
AI tools were used for: