Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly calculate y-axis range for multi-frequency upper limits #567

Merged
merged 4 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
11 changes: 11 additions & 0 deletions vasttools/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_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:
Expand Down