diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ef35e9..250093d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. Dates are displayed in UTC. +#### [v1.3.3](https://github.com/emit-sds/emit-utils/compare/v1.3.2...v1.3.3) + +> 24 June 2025 + +* resolve flat field issue with ortho flag on by @pgbrodrick in https://github.com/emit-sds/emit-utils/pull/16 + #### [v1.3.2](https://github.com/emit-sds/emit-utils/compare/v1.3.1...v1.3.2) > 5 May 2025 diff --git a/emit_utils/reformat.py b/emit_utils/reformat.py index 378736d..721871e 100644 --- a/emit_utils/reformat.py +++ b/emit_utils/reformat.py @@ -115,13 +115,18 @@ def main(rawargs=None): if 'wavelength' in list(metadata.keys()) and 'band names' not in list(metadata.keys()): metadata['band names'] = metadata['wavelength'] - envi_ds = envi.create_image(envi_header(output_name), metadata, ext='', force=args.overwrite) - mm = envi_ds.open_memmap(interleave='bip',writable=True) + # special case for flat field updat + if ds == 'flat_field_update' and args.orthorectify: + print(f'{ds} is not something that can be orthorectified - skipping. If you want this file, rerun without --orthorectify') + continue dat = np.array(nc_ds[ds]) if len(dat.shape) == 2: dat = dat.reshape((dat.shape[0],dat.shape[1],1)) + envi_ds = envi.create_image(envi_header(output_name), metadata, ext='', force=args.overwrite) + mm = envi_ds.open_memmap(interleave='bip',writable=True) + if args.orthorectify: mm[...] = single_image_ortho(dat, glt) else: diff --git a/setup.py b/setup.py index 817e70e..c0364fc 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup(name='emit_utils', packages=find_packages(), include_package_data=True, - version='1.3.2', + version='1.3.3', install_requires=[ 'gdal>=2.0', 'spectral>=0.21',