Skip to content

Commit

Permalink
add doc & don't clip space pxiels
Browse files Browse the repository at this point in the history
  • Loading branch information
gerritholl committed Dec 18, 2024
1 parent 5f6598b commit d404a79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/source/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ If ``clip_negative_radiances=False``, pixels with negative radiances will have

Clipping of negative radiances is currently implemented for the following readers:

* ``abi_l1b``, ``ami_l1b``
* ``abi_l1b``, ``ami_l1b``, ``fci_l1c_nc``


Temporary Directory
Expand Down
2 changes: 1 addition & 1 deletion satpy/readers/fci_l1c_nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def calibrate_counts_to_rad(self, data, key):
def _clipneg(data):
"""Clip counts to avoid negative radiances."""
lo = -data.attrs.get("add_offset", 0) // data.attrs.get("scale_factor", 1) + 1
return data.where(data>=lo, lo)
return data.where((~data.notnull())|(data>=lo), lo)

def calibrate_rad_to_bt(self, radiance, key):
"""IR channel calibration."""
Expand Down

0 comments on commit d404a79

Please sign in to comment.