-
Notifications
You must be signed in to change notification settings - Fork 303
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 VIIRS Fire Temperature rgb #728
Conversation
satpy/etc/enhancements/generic.yaml
Outdated
@@ -79,6 +79,22 @@ enhancements: | |||
- name: gamma | |||
method: *gammafun | |||
kwargs: {gamma: 1.8} | |||
fire_temperature_default: |
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.
Is this enhancement specific to VIIRS? Maybe we should put it in enhancements/viirs.yaml
?
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 guess the same enhancement can be applied to any sensor with a 1.6, 2.2 and 3.7 micron channel....
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 will continue on Tuesday, possibly tuning it further. But now Easter holiday. So, @djhoese
don't merge yet. Just wanted to add it before closing down for today.
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.
And here the one from http://rammb.cira.colostate.edu/projects/alaska/blog/index.php/tag/fire-temperature-rgb/
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.
After some further tuning...
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.
...after a bit of further tuning with @mraspaud using a bit of gamma we are even closer. This is my final bet!
Signed-off-by: Adam Dybbroe <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #728 +/- ##
==========================================
+ Coverage 80.02% 80.71% +0.69%
==========================================
Files 147 149 +2
Lines 21498 21836 +338
==========================================
+ Hits 17203 17626 +423
+ Misses 4295 4210 -85
Continue to review full report at Codecov.
|
Signed-off-by: Adam Dybbroe <[email protected]>
…g the one we guessed Signed-off-by: Adam Dybbroe <[email protected]>
…YAML configurations Signed-off-by: Adam Dybbroe <[email protected]>
@djhoese and @mraspaud I added some documentation, please could you take what you feel is necessary and reorganize if needed? |
doc/source/overview.rst
Outdated
enhancements, see below. For more details on how to add your own composite | ||
recipe to the configuration see :doc:`composites` and :doc:`enhancements`. | ||
|
||
Satpy also makes it possible to create your own custom composites |
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'm not sure this is the right place for this. This is the overview section and I don't think it should have real code in it or talk about the details of YAML files. You also mention creating your own composite, but the rest of the existing paragraph talks again about making your own custom composites. The Scene
is missing a reader
parameter.
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'll have to see if I can find time this week to re-organize some of the compositor/enhancement documentation you started. It would make the PCW easier for people unfamiliar with Satpy.
doc/source/composites.rst
Outdated
|
||
|
||
In the composite YAML file it os then necessary to map the right enhancement to | ||
the right composite using the `name` attribute:: |
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'm worried about this too because it over simplifies the logic of enhancers and mentions matching based on name
but doesn't say anything about standard_name
even though it is also specified.
This is also being talked about in detail in the "Built-in composites" when maybe it should be put in a custom compositor section and this section can add a link to it.
@adybbroe Could you give me a summary of what I'm supposed to be seeing in your images? First, what is "original VIIRS" (your first image)? I know from being on the email chain that you were given two recipes so I understand what those are. Is there any reason to keep the SMHI version now that we have the "official" recipe? |
To answer your question @djhoese I repeat what I wrote on Slack (for completeness): They are all supposed to show fires obviously, but background temperatures might have influence on how each one of them perform. |
Signed-off-by: Adam Dybbroe <[email protected]>
I'm pasting here the documentation @adybbroe wrote, so that they can be taken up in another PR while this one can be merged. In composites.rst: RGB composites and associated enhancements
------------------------------------------
The default RGB composites available are all configured in YAML configuration
files, as mentioned above. However, the composite YAML configuration files
doesn't specify how the final image is enhanced (stretched). This is specified
in the YAML configuration files for the enhancements (e.g. `generic.yaml`). It
is possible to have several recipes for the same combination of channels. This
is for instace the case for the fire temperature RGB, where different agencies
use slightly different enhancements for the same combination VIIRS bands.
Here are two different enhancements used at EUMETSAT and NOAA::
fire_temperature_awips:
standard_name: fire_temperature
name: fire_temperature_awips
operations:
- name: stretch
method: *stretchfun
kwargs:
stretch: crude
min_stretch: [273.0, 0, 0]
max_stretch: [333.0, 100., 75.]
- name: gamma
method: *gammafun
kwargs: {gamma: [0.4, 1.0, 1.0]}
fire_temperature_eumetsat:
standard_name: fire_temperature
name: fire_temperature_eumetsat
operations:
- name: stretch
method: *stretchfun
kwargs:
stretch: crude
min_stretch: [273.0, 0, 0]
max_stretch: [350.0, 60., 60.]
- name: gamma
method: *gammafun
kwargs: {gamma: [1.0, 1.0, 1.0]}
In the composite YAML file it os then necessary to map the right enhancement to
the right composite using the `name` attribute::
fire_temperature_awips:
# CIRA: EUMETSAT
compositor: !!python/name:satpy.composites.GenericCompositor
prerequisites:
- name: M12
- name: M11
- name: M10
standard_name: fire_temperature
name: fire_temperature_awips
fire_temperature_eumetsat:
# CIRA: AWIPS
compositor: !!python/name:satpy.composites.GenericCompositor
prerequisites:
- name: M12
- name: M11
- name: M10
standard_name: fire_temperature
name: fire_temperature_eumetsat
In overview.rst: Compositing
===========
Many users of satellite imagery combine multiple sensor channels to bring
out certain features of the data. This includes using one dataset to enhance
another, combining 3 or more datasets in to an RGB image, or any other
combination of datasets. Satpy comes with a lot of common composite
combinations built-in and allows the user to request them like any other
dataset.
The list of default RGB composites available depends obviously on the
sensor. For instance the AVHRR sensor does not allow to generate a true color
RGB, whereas that is possible with VIIRS and MODIS. It is straightforward to
see what default possibilities are available:
>>> from satpy.scene import Scene
>>> scene = Scene(filenames=myfiles)
>>> print(scene.available_composite_names())
These default RGB composites have recipes that are specified in the
`visir.yaml` and/or in the config file specific for the given sensor
(e.g. `viirs.yaml` or `seviri.yaml`). The composites may use different
enhancements, see below. For more details on how to add your own composite
recipe to the configuration see :doc:`composites` and :doc:`enhancements`.
Satpy also makes it possible to create your own custom composites
and have Satpy treat them like any other dataset. See :doc:`composites`
for more information. |
…ncement YAML configurations" This reverts commit 4d6e88e.
Codecov Report
@@ Coverage Diff @@
## master #728 +/- ##
==========================================
+ Coverage 80.02% 80.71% +0.69%
==========================================
Files 147 149 +2
Lines 21498 21836 +338
==========================================
+ Hits 17203 17626 +423
+ Misses 4295 4210 -85
Continue to review full report at Codecov.
|
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.
LGTM
Adding the Fire Temperature RGB for VIIRS
git diff origin/master -- "*py" | flake8 --diff