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 night lights composites for ABI, AHI and AMI #1141

Merged
merged 6 commits into from Jun 2, 2020
Merged

Add night lights composites for ABI, AHI and AMI #1141

merged 6 commits into from Jun 2, 2020

Conversation

simonrp84
Copy link
Member

@simonrp84 simonrp84 commented Apr 13, 2020

This PR adds true color composites that use the VIIRS night lights as a background for night-time pixels. No code changes have been made, it simply re-uses the existing SEVIRI night lights composite (natural_color_with_night_ir). In the case of the new instruments, however, I chose to use true_color instead of natural_color to reflect the capabilities of the instruments.

  • Tests passed

@ghost
Copy link

ghost commented Apr 13, 2020

Congratulations 🎉. DeepCode analyzed your code in 0.195 seconds and we found no issues. Enjoy a moment of no bugs ☀️.

👉 View analysis in DeepCode’s Dashboard
Edit DeepCode’s Configurations here

@coveralls
Copy link

coveralls commented Apr 13, 2020

Coverage Status

Coverage increased (+0.2%) to 89.804% when pulling 2c48c3e on simonrp84:night_lights_comps into 446af3a on pytroll:master.

@codecov
Copy link

codecov bot commented Apr 13, 2020

Codecov Report

Merging #1141 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1141   +/-   ##
=======================================
  Coverage   89.60%   89.60%           
=======================================
  Files         200      200           
  Lines       29484    29484           
=======================================
  Hits        26420    26420           
  Misses       3064     3064           
Impacted Files Coverage Δ
satpy/readers/__init__.py 95.09% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 446af3a...245169e. Read the comment docs.

… modifications, SZA and rayleigh, for true_color and natural_color
@simonrp84
Copy link
Member Author

I've just pushed a few more composites to this, which add a _nocorr version of true_color and natural_color for SEVIRI, ABI, AMI and AHI.
These versions (i.e: true_color_nocorr) disable both the solar zenith and rayleigh scattering corrections, and hence produce data as it looked to the satellite sensor.

@codecov
Copy link

codecov bot commented Apr 17, 2020

Codecov Report

Merging #1141 into master will increase coverage by 0.19%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1141      +/-   ##
==========================================
+ Coverage   89.60%   89.80%   +0.19%     
==========================================
  Files         200      204       +4     
  Lines       29484    30148     +664     
==========================================
+ Hits        26420    27074     +654     
- Misses       3064     3074      +10     
Impacted Files Coverage Δ
satpy/readers/tropomi_l2.py 87.06% <0.00%> (-2.94%) ⬇️
satpy/readers/avhrr_l1b_gaclac.py 93.33% <0.00%> (-1.34%) ⬇️
satpy/readers/viirs_compact.py 64.12% <0.00%> (-1.27%) ⬇️
satpy/readers/hrit_jma.py 97.94% <0.00%> (-1.22%) ⬇️
satpy/tests/test_composites.py 99.88% <0.00%> (-0.12%) ⬇️
satpy/writers/cf_writer.py 93.77% <0.00%> (-0.03%) ⬇️
satpy/writers/geotiff.py 90.74% <0.00%> (ø)
satpy/tests/test_dataset.py 100.00% <0.00%> (ø)
satpy/readers/netcdf_utils.py 100.00% <0.00%> (ø)
satpy/readers/seviri_l1b_native.py 71.96% <0.00%> (ø)
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 446af3a...2c48c3e. Read the comment docs.

Copy link
Member

@pnuu pnuu left a comment

Choose a reason for hiding this comment

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

Couple things came to mind, but otherwise looks good to me.

  1. The composites in <instrument>.yaml should IMHO use the channel names, and only the generic ones in visir.yaml have wavelengths. This is debatable, so not strictly necessary here. But it would make things look more consistent and ensure the correct channels to be used.
  2. As the _nocorr composites use reflectances, correction for the Sun-Earth distance should be needed as an modifier. We don't have that modifier yet, and it might need some reader-level metadata additions and checks, so not a problem here. For reference on reflectance/correction/modifier discussion: When is reflectance actually reflectance? #536

satpy/etc/composites/ahi.yaml Outdated Show resolved Hide resolved
@simonrp84
Copy link
Member Author

I've now, after a few failures, updated the YAML with @pnuu's request - the channels needed for the new composites are now specified by name.

satpy/etc/composites/abi.yaml Outdated Show resolved Hide resolved
Copy link
Member

@pnuu pnuu left a comment

Choose a reason for hiding this comment

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

Added two suggested changes (one of which doesn't work with the current version). Otherwise LGTM.

Co-authored-by: Panu Lahtinen <pnuu+git@iki.fi>
@mraspaud mraspaud added component:compositors enhancement code enhancements, features, improvements labels Jun 1, 2020
@mraspaud mraspaud merged commit d77c195 into pytroll:master Jun 2, 2020
@simonrp84 simonrp84 deleted the night_lights_comps branch June 2, 2020 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:compositors enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants