From 4121bdf5b37cd95155df293cdeb281488ecf9387 Mon Sep 17 00:00:00 2001 From: Phil Brodrick Date: Tue, 13 May 2025 14:13:31 -0700 Subject: [PATCH 1/3] resolve flat field issue with ortho flag on --- emit_utils/reformat.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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: From b94733f3b3cff1e4c69117f628bd9aeb3eac00b1 Mon Sep 17 00:00:00 2001 From: Winston Olson-Duvall Date: Tue, 24 Jun 2025 14:10:47 -0700 Subject: [PATCH 2/3] Prepare for v1.3.3 release --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', From 5ad271f09866577414956cd3543ccaaeb730a3a3 Mon Sep 17 00:00:00 2001 From: winstonolson Date: Tue, 24 Jun 2025 14:20:39 -0700 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) 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