Skip to content
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

Add notebook example showing how to add overlays and decorate an image #45

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

adybbroe
Copy link
Contributor

Think it is important to collect the various ways one can decorate an image for publication, in one example! This judging from my own experience, and the many questions over the years on slack.
This example was from Christian Peters, many thanks.

I have forgotten how we do with images in the examples. I will be happy to refine the example, and also make it possible to run by uploading the data somewhere or taking some other data we already have in the cloud. Just want a confirmation that this example fits in the current collection?

A smaller version of the final image is here:

seviri_overview_20200923_0815_euro4_small

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@mraspaud
Copy link
Member

I took the liberty of creating a kaggle version of this notebook, maybe you can now embed the resulting image in this notebook? https://www.kaggle.com/martinraspaud/decorate-your-satellite-images-to-make-them-ready

@adybbroe
Copy link
Contributor Author

I took the liberty of creating a kaggle version of this notebook, maybe you can now embed the resulting image in this notebook? https://www.kaggle.com/martinraspaud/decorate-your-satellite-images-to-make-them-ready

That's really cool, thanks a lot!
We should and will eventually converge on some standard way to publish the example notebooks. For now i will use your kaggle output image at least.

@djhoese
Copy link
Member

djhoese commented Jun 15, 2021

If you have any additional time, it might be nice to have some explanation of what the various options are doing for each feature-type. Or you could point to the place in pycoast/pydecorate documentation where it is talked about. Yeah, maybe pointing to other docs is the better solution.

@hproe
Copy link

hproe commented Jun 15, 2021

Excellent rework - cannot find a flaw . @christian's template definitely is superior to mine.

…ecorate. Also add image inline using Martins Kaggle upload

Signed-off-by: Adam.Dybbroe <[email protected]>
@adybbroe
Copy link
Contributor Author

If you have any additional time, it might be nice to have some explanation of what the various options are doing for each feature-type. Or you could point to the place in pycoast/pydecorate documentation where it is talked about. Yeah, maybe pointing to other docs is the better solution.

I agree. I did a bit more explaining and pointing to the Pycoast and Pydecorate RTD pages.

@adybbroe
Copy link
Contributor Author

Excellent rework - cannot find a flaw . @christian's template definitely is superior to mine.

Many thanks. I just took what you guys did, and put together. But that also takes a little time. But I need for myself as well!

Signed-off-by: Adam.Dybbroe <[email protected]>
@adybbroe
Copy link
Contributor Author

adybbroe commented Jun 16, 2021

@djhoese @mraspaud @peters77 @pnuu and others interested. Shall we leave this example as it is? I am thinking of showing how to add scale. But adding scale in Satpy is lacking some freedom/flexibility. So, was thinking we could/should make another example discussing adding scale, and then show how that can be done by using Pydecorate, PIL and Trollimage instead? I have no time right now to look at how the adding of scale can/shall be improved in Satpy. But eventually maybe we will have that and can then adapt the example?

adybbroe and others added 6 commits June 16, 2021 18:38
Signed-off-by: Adam.Dybbroe <[email protected]>
… of github.com:pytroll/pytroll-examples into add-satpy-example-adding-overlays-and-image-decoration
Signed-off-by: Adam.Dybbroe <[email protected]>
@adybbroe
Copy link
Contributor Author

Thanks @gerritholl ! I took onboard your suggestions

@adybbroe
Copy link
Contributor Author

Okay for now? I can fix small things today if you like, but on vacation next week.
@djhoese @gerritholl , others?

@@ -0,0 +1,274 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #1.    output_filename=f'seviri_{composite_name:s}_{local_scn.start_time:%Y%m%d_%H%M}_{areaid:s}.tif'

Thoughts on putting a space between the "=" for styling? And maybe instead of printing just doing "output_filename" and letting the notebook handle printing it?


Reply via ReviewNB

Copy link
Member

djhoese commented Jun 18, 2021

Is it possible to add two lines at the top to remove/ignore all warnings?

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

Successfully merging this pull request may close these issues.

5 participants