From 9b29d0eb8782454a6730cb05166a890aee0b0bde Mon Sep 17 00:00:00 2001 From: Nate Tellis Date: Wed, 15 Jan 2025 13:10:03 -0500 Subject: [PATCH] ensure correct timescales for errored window_results --- src/adam_impact_study/impacts_study.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/adam_impact_study/impacts_study.py b/src/adam_impact_study/impacts_study.py index fcf80a1..cc749a6 100644 --- a/src/adam_impact_study/impacts_study.py +++ b/src/adam_impact_study/impacts_study.py @@ -244,8 +244,6 @@ def run_impact_study_for_orbit( if pc.any(pc.invert(pc.is_null(result.error))).as_py(): logger.warning(f"Error: {result.error}") results = qv.concatenate([results, result]) - if results.fragmented(): - results = qv.defragment(results) else: futures.append( @@ -360,6 +358,9 @@ def calculate_window_impact_probability( observation_end=end_date, observation_count=[observations_count], observation_nights=[num_observation_nights], + mean_impact_time=Timestamp.nulls(1, scale="tdb"), + minimum_impact_time=Timestamp.nulls(1, scale="tdb"), + maximum_impact_time=Timestamp.nulls(1, scale="tdb"), error=[str(e)], ) @@ -373,6 +374,9 @@ def calculate_window_impact_probability( observation_count=[observations_count], observation_nights=[num_observation_nights], observations_rejected=[len(rejected_observations)], + mean_impact_time=Timestamp.nulls(1, scale="tdb"), + minimum_impact_time=Timestamp.nulls(1, scale="tdb"), + maximum_impact_time=Timestamp.nulls(1, scale="tdb"), error=[error], ) @@ -427,6 +431,9 @@ def calculate_window_impact_probability( observation_count=[observations_count], observation_nights=[num_observation_nights], observations_rejected=[len(rejected_observations)], + mean_impact_time=Timestamp.nulls(1, scale="tdb"), + minimum_impact_time=Timestamp.nulls(1, scale="tdb"), + maximum_impact_time=Timestamp.nulls(1, scale="tdb"), error=[str(e)], )