From 6aadc8a5d9c49c9a50c1900f587963ec58b1dfea Mon Sep 17 00:00:00 2001 From: Dougal Dobie Date: Wed, 11 Sep 2024 14:19:57 +1000 Subject: [PATCH 1/3] Recalculate upper_lims --- vasttools/source.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vasttools/source.py b/vasttools/source.py index 1ff3af23..5058b9ea 100644 --- a/vasttools/source.py +++ b/vasttools/source.py @@ -569,6 +569,17 @@ def plot_lightcurve( detections = measurements_df[ ~upper_lim_mask ] + + if self.pipeline: + upper_lim_mask = measurements_df.forced + else: + upper_lim_mask = measurements_df.detection == False + if use_forced_for_all: + upper_lim_mask = np.array([False for i in upper_lim_mask]) + upper_lims = measurements[ + upper_lim_mask + ] + if yaxis_start == "0": max_det = detections.loc[:, [flux_col, err_value_col]].sum(axis=1) if use_forced_for_limits or self.pipeline: From 7cea460394d379f81453dd07a188e0286b7ec3e1 Mon Sep 17 00:00:00 2001 From: Dougal Dobie Date: Wed, 11 Sep 2024 14:41:28 +1000 Subject: [PATCH 2/3] PEP8 --- vasttools/source.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vasttools/source.py b/vasttools/source.py index 5058b9ea..25b1e44b 100644 --- a/vasttools/source.py +++ b/vasttools/source.py @@ -569,17 +569,17 @@ def plot_lightcurve( detections = measurements_df[ ~upper_lim_mask ] - + if self.pipeline: upper_lim_mask = measurements_df.forced else: upper_lim_mask = measurements_df.detection == False if use_forced_for_all: upper_lim_mask = np.array([False for i in upper_lim_mask]) - upper_lims = measurements[ + upper_lims = measurements_df[ upper_lim_mask ] - + if yaxis_start == "0": max_det = detections.loc[:, [flux_col, err_value_col]].sum(axis=1) if use_forced_for_limits or self.pipeline: From 481342f42ee7c5b01964e856e4289b6e774c3726 Mon Sep 17 00:00:00 2001 From: Dougal Dobie Date: Wed, 11 Sep 2024 14:43:08 +1000 Subject: [PATCH 3/3] Updated changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cfdadb8..1d222dd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), #### Fixed +- Correctly calculate plot_lightcurve y-axis range for multi-frequency upper limits [#567](https://github.com/askap-vast/vast-tools/pull/567) - Fixed formatting of new epoch addition git example [#568](https://github.com/askap-vast/vast-tools/pull/568) - Directly compare stmoc times, avoiding conversion to JD, and replace equality requirement with `isclose` [#334](https://github.com/askap-vast/vast-tools/pull/334) @@ -34,6 +35,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), #### List of PRs +- [#567](https://github.com/askap-vast/vast-tools/pull/567): fix: Correctly calculate plot_lightcurve y-axis range for multi-frequency upper limits - [#568](https://github.com/askap-vast/vast-tools/pull/568): feat, docs: Add epochs 64 and 65, and fix new epoch addition docs page syntax - [#334](https://github.com/askap-vast/vast-tools/pull/334): fix, docs, feat: Dependency refresh including python 3.10 support and corresponding minor updates - [#563](https://github.com/askap-vast/vast-tools/pull/563): feat: Add access to epoch 63