From b1db6041f1ef8b95d4be331867874b34a6d3667d Mon Sep 17 00:00:00 2001 From: Winston Olson-Duvall Date: Thu, 17 Nov 2022 08:05:27 -0800 Subject: [PATCH 1/3] Ignore duplicate coarse times --- reformat_bad.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/reformat_bad.py b/reformat_bad.py index bd16e17..0dbf3fe 100644 --- a/reformat_bad.py +++ b/reformat_bad.py @@ -113,7 +113,7 @@ def main(): # Read in the STO files and store data in out_arr # TODO: Do I need to fill in missing data somehow? out_arr = [] - out_arr_lens = [] + coarse_times = set() for p in sto_paths: logger.info(f"Processing file {p}") @@ -149,10 +149,16 @@ def main(): # Check if data is in start/stop time range and if so, append to output array if ind is None: raise RuntimeError("Attempting to add data, but no header row has been found.") - timestamp = get_utc_time_from_gps(int(data[ind["time_coarse"]])) - if start_time <= timestamp <= stop_time: + if data[ind["time_coarse"]] is None: + # If there is no coarse time, then just move on to the next row + logger.debug(f"Skipping row because no coarse time was found: {data}") + continue + coarse_time = int(data[ind["time_coarse"]]) + timestamp = get_utc_time_from_gps(coarse_time) + if start_time <= timestamp <= stop_time and coarse_time not in coarse_times: out_arr.append(data) - out_arr_lens.append(len(data)) + coarse_times.add(coarse_time) + logger.debug(f"Adding row: {data}") # out_file.writelines(",".join(data).rstrip(",") + "\n") # Set or reset data_start to True if "Start_Data" in line: From eb77b22ac8ac88e8e125e81943fde758a7ed59ab Mon Sep 17 00:00:00 2001 From: Winston Olson-Duvall Date: Thu, 17 Nov 2022 08:43:51 -0800 Subject: [PATCH 2/3] Update version to 1.5.1 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 65c9c92..e43f1d0 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setuptools.setup( name="emit_sds_l1a", - version="1.5.0", + version="1.5.1", author="Winston Olson-Duvall", author_email="winston.olson-duvall@jpl.nasa.gov", description=""" From bb2a9222d42aaaf8eed5a6eb314988a5239e63da Mon Sep 17 00:00:00 2001 From: Winston Olson-Duvall Date: Thu, 17 Nov 2022 08:44:39 -0800 Subject: [PATCH 3/3] Update change log --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d14723d..7384497 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,18 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [v1.5.1](https://github.com/emit-sds/emit-sds-l1a/compare/v1.5.0...v1.5.1) + +> 17 November 2022 + +- Ignore duplicate coarse times [`b1db604`](https://github.com/emit-sds/emit-sds-l1a/commit/b1db6041f1ef8b95d4be331867874b34a6d3667d) +- Update version to 1.5.1 [`eb77b22`](https://github.com/emit-sds/emit-sds-l1a/commit/eb77b22ac8ac88e8e125e81943fde758a7ed59ab) + #### [v1.5.0](https://github.com/emit-sds/emit-sds-l1a/compare/v1.4.1...v1.5.0) -> 14 October 2022 +> 17 October 2022 +- Merge develop into main for v1.5.0 [`#10`](https://github.com/emit-sds/emit-sds-l1a/pull/10) - Corrupt frame handling in reassembly [`#9`](https://github.com/emit-sds/emit-sds-l1a/pull/9) - Merge IOC hotfixes into develop [`#8`](https://github.com/emit-sds/emit-sds-l1a/pull/8) - Save corrupt frames with '9' as acquisition status. During reassembly only use these frames if data is not compressed. [`8ce2620`](https://github.com/emit-sds/emit-sds-l1a/commit/8ce26200972cb2d3ebca109977b7c37abe9da578)