pytroll / pytroll/satpy

Proposal: Add "filters"

Open
#29 12 comments 0 reactions 1 assignee View on GitHub

@djhoese is already working on this.

Since Feb 17, 2017.

enhancement future ideas help wanted
Dominant language
Python
Stars
1.2k
Forks
335
Avg merge
1d 18h
Merged PRs (30d)
10

Description

Currently SatPy has the idea of readers, writers, compositors, and modifiers. I would like to add a "filter" object type. @mraspaud and I have been talking about this on and off for a while so I thought I'd make the discussion a little more official.

A Filter is an optional object or function that when enabled checks the currently loaded datasets against some condition. If the condition is satisfied then the Dataset does not continue on in processing. Otherwise the Dataset continues on as normal. A Filter should not modify the values inside a Dataset (only modifiers should do this). However, a Filter may filter out individual pixels if it makes sense.

During our last discussion is was decided that Filters are executed before composites are generated and after composites are generated. I'm not sure whether or not the "before" execution is done inside the readers.

Use cases (please add more as they come up):

  1. Day or night filter: useful for reflectances that shouldn't be generated if a scene is more than X% night time. Or 'fog' like composites that are only useful if it is X% night time. How does this differ from per-pixel filtering?
  2. Time of year filter: Some products or composites are most useful at a certain time of year. I've seen one case like this with Polar2Grid where there is a certain stretching/enhancement applied to a product that makes it "summer land surface temperature", but another stretching is just "land surface temperature". Not sure if there are others.
  3. Quality filtering: Some data arrive degraded after subnominal reception, The filter would check some parameters (high frequencies in the data for example) and prevent bad quality products from being generated.
  4. Pressure level filtering: Some retrieval products have a 3rd vertical dimension. This could arguably need it's own more complex feature set added to the satpy readers for selecting a dataset based on pressure.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.