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

Creating day/night composites #460

Closed
hany opened this issue Oct 13, 2018 · 7 comments · Fixed by #804
Closed

Creating day/night composites #460

hany opened this issue Oct 13, 2018 · 7 comments · Fixed by #804
Labels
component:compositors enhancement code enhancements, features, improvements

Comments

@hany
Copy link

hany commented Oct 13, 2018

Hi there,

I'm not sure if this is possible, but is there a way to produce day and night composites via GOES-16 ABI to create an image similar to this?

https://cdn.star.nesdis.noaa.gov/GOES16/ABI/FD/GEOCOLOR/20182831245_GOES16-ABI-FD-GEOCOLOR-1808x1808.jpg

The description of "GeoColor" is:

GeoColor is a multispectral product composed of True Color (using a simulated green component) during the daytime, and an Infrared product that uses bands 7 and 13 at night. During the day, the imagery looks approximately as it would appear when viewed with human eyes from space. At night, the blue colors represent liquid water clouds such as fog and stratus, while gray to white indicate higher ice clouds, and the city lights come from a static database that was derived from the VIIRS Day Night Band.

Any help would be appreciated! Thanks for maintaining such a robust and useful project!

@djhoese
Copy link
Member

djhoese commented Oct 13, 2018

I think @pnuu is doing something very similar to this already and has also created the DayNightCompositor class. He could maybe show you his example, but here is one of the existing ones in composites/visir.yaml:

  natural_with_night_fog:
    compositor: !!python/name:satpy.composites.DayNightCompositor
    standard_name: natural_with_night_fog
    prerequisites:
      - natural_color
      - night_fog
      - solar_zenith_angle

So this is using the natural_color RGB in the day time, night_fog composite in the night time, and using the existing (optional) solar_zenith_angle dataset to determine day and night time.

@pnuu
Copy link
Member

pnuu commented Dec 4, 2018

I think we don't (yet?) have a compositor that would use an pre-made image as a background. There is a compositor (CloudCompositor) that can be used to isolate the high cold clouds, and then colorized (colorize enhancement). Not sure how to isolate the low clouds, but if you find out how to do that (PRs wellcome!), then you can also colorize them. Maybe it's better to create a new compositor for the low/high clouds.

The background compositor is an interesting one. I'm not yet sure how to pass the filename from the YAML config so that everything would still work. Maybe via enhancement? I might take a closer look at this, if I find the time.

When all the separate pieces (composites) are together, they can be put together:

  geo_color_night:
    standard_name: geo_color_night
    # This compositor doesn't exist yet
    compositor: !!python/name:satpy.composites.BackgroundCompositor
    # BackGroundCompositor's init takes an keyword argument "background_filename"
    background_filename: /path/to/static/night/image.tif
    # Use in-line compositing
    prerequisites:
      # This compositor doesn't exist yet
      - compositor: !!python/name:satpy.composites.HighLowCloudCompositor
        prerequisites:
        - something
        - something_other
        - maybe_even_something_more

  geo_color:
    compositor: !!python/name:satpy.composites.DayNightCompositor
    standard_name: geo_color
    prerequisites:
      - true_color
      - geo_color_night
      - solar_zenith_angle

@pnuu
Copy link
Member

pnuu commented Dec 4, 2018

Forgot that the compositor init can take keyword arguments, so we can pass the background filename that way. Example updated accordingly.

@mraspaud mraspaud added enhancement code enhancements, features, improvements component:compositors labels Dec 7, 2018
@bbartlett-beamio
Copy link

Hello all just curious if any progress was made with this concept?

@pnuu
Copy link
Member

pnuu commented Apr 26, 2019

No, unfortunately no. But the BackgroundCompositor is on my todo list on the Pytroll Contributors Week (PCW), starting on May 13. I'll create a separate issue for that and link to the PCW project.

@bbartlett-beamio
Copy link

ok great this would be an amazing addition to the already stellar repo :)

@pnuu
Copy link
Member

pnuu commented Jun 7, 2019

@hany @bbartlett-beamio you might want to have a look at #804 :-)

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 a pull request may close this issue.

5 participants