Skip to content

Commit

Permalink
Add explicit copy() of raw counts
Browse files Browse the repository at this point in the history
Also adjusted the formatting of test_abi_l1b.py so that it'll conform
with flake8 (and flake8-docstring).
  • Loading branch information
jon4than committed Aug 24, 2021
1 parent 28cf5c9 commit 4b4d2f4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion satpy/readers/abi_l1b.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_dataset(self, key, info):
logger.debug('Reading in get_dataset %s.', key['name'])
# For raw cal, don't apply scale and offset, return raw file counts
if key['calibration'] == 'counts':
radiances = self.nc['Rad']
radiances = self.nc['Rad'].copy()
else:
radiances = self['Rad']

Expand Down
1 change: 0 additions & 1 deletion satpy/tests/reader_tests/test_abi_l1b.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ class Test_NC_ABI_L1B_invalid_cal(Test_NC_ABI_L1B_Base):

def test_invalid_calibration(self):
"""Test detection of invalid calibration values."""

# Need to use a custom DataID class because the real DataID class is
# smart enough to detect the invalid calibration before the ABI L1B
# get_dataset method gets a chance to run.
Expand Down

0 comments on commit 4b4d2f4

Please sign in to comment.