New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure data examples achieve a single task #6384
Conversation
d9d6a35
to
7f3323f
Compare
7f3323f
to
790466b
Compare
Sorry for the reviewer pain, I've updated my commit and force pushed. All your comments have been addressed - might be worth having a particular look at the cutout example, which I've modified quite a bit. Tested and working locally for me. |
I think a tracking issue for the tutorials folder should be opened once this is merged so we don't forget. |
Needs a second review but LGTM |
@@ -1,41 +0,0 @@ | |||
""" | |||
====================================== | |||
Downloading and plotting LASCO C2 data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get that this isn't doing anything particularly "interesting" but if someone wants to get a C2 image they are going to find this and follow it. What's the harm in keeping it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone wants to get an AIA 171 image do we need an example for that? Another one for C3? Another one for solar orbiter EUI FSI 174? For tasks that don't require an instrument specific workflow, to keep the gallery a manageable size we shouldn't make the examples for carrying out those tasks instrument specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I get the desire to be pure to the methodology, I do think we also need to consider the experience of someone scrolling through the gallery, if you make a plot after you search for / download data then you get a nice preview image where someone can say "hey that looks like what I am after" if we always just stop at Fido.fetch
then you don't get that.
This is particularly relevant to the JSOC cutout example here.
👍 good point - I will go through these and put back in or add new simple plots wherever we download data. |
I would also point out that the section of our dev guide related to writing example gallery entries (https://docs.sunpy.org/en/latest/dev_guide/contents/example_gallery.html) explicitly says we should include an image wherever possible. If we are going to move away from this policy (I don't think we should, it is a "gallery" after all), we need to change this guide as well. |
No, I don't think we should either! This PR now doesn't remove any final images. |
Downloading and plotting an HMI magnetogram | ||
=========================================== | ||
============================================== | ||
Rotating HMI maps so they're not 'upside-down' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Doc failure on:
|
6715084
to
394ea54
Compare
This should have had two approvals. |
|
||
This example shows how to download a HMI magnetogram data with Fido and make a plot. | ||
This example shows how to rotate a HMI magnetogram, so when you plot it | ||
it appears with solar North puting up, and not upside down! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it appears with solar North puting up, and not upside down! | |
it appears with solar North pointing up. |
cutouts.plot() | ||
|
||
plt.show() | ||
# Next, we will use this map to definte the top right and bottom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Next, we will use this map to definte the top right and bottom | |
# Next, we will use the coordinate frame from this map to definte the top right and bottom |
|
||
plt.show() | ||
# Next, we will use this map to definte the top right and bottom | ||
# left coordinates we want for the submap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# left coordinates we want for the submap. | |
# left coordinates we want for the cutout request. |
The original version for sure. |
The original version of what? |
Of this PR |
There was another version of this PR? I am very confused. |
It's ok. |
As part of the documentation reorganisation we will have the four types of documentation described at https://diataxis.fr/. One of these is "How-to guides", which are
We already have these guides to some extent in our example gallery.
This PR is the first part of work to make sure the files in our example gallery achieve one specific task. I don't think any of the delted content in this PR needs to be moved elsewhere as it's covered by other examples, but in PRs for the other example categories we may want to move some stuff to entries in a Tutorials section.
Fixes #5888