Skip to content

Commit

Permalink
skip empty groups in new sources groupby-apply (#632)
Browse files Browse the repository at this point in the history
* skip empty groups in new sources groupby-apply
Fixes #631

* updated changelog
  • Loading branch information
marxide authored Feb 23, 2022
1 parent 2198ac2 commit 89678b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

#### Fixed

- Fixed a regression from pandas==1.4.0 that caused empty groups to be passed to an apply function [#632](https://github.com/askap-vast/vast-pipeline/pull/632).
- Fixed source names to be IAU compliant [#618](https://github.com/askap-vast/vast-pipeline/pull/618).
- Fixed broken NED links for coordinates with many decimal places [#623](https://github.com/askap-vast/vast-pipeline/pull/623).
- Added an error handler for the external source queries (e.g. SIMBAD) [#616](https://github.com/askap-vast/vast-pipeline/pull/616).
Expand All @@ -78,6 +79,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

#### List of PRs

- [#632](https://github.com/askap-vast/vast-pipeline/pull/632): fix: skip empty groups in new sources groupby-apply.
- [#634](https://github.com/askap-vast/vast-pipeline/pull/634): dep: bump Jinja2 to v3.
- [#626](https://github.com/askap-vast/vast-pipeline/pull/626): feat: Add a ZTF cone search link.
- [#618](https://github.com/askap-vast/vast-pipeline/pull/618): fix: Produce IAU compliant source names.
Expand Down
3 changes: 3 additions & 0 deletions vast_pipeline/pipeline/new_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ def get_image_rms_measurements(
The group dataframe with the 'img_diff_true_rms' column added. The
column will contain 'NaN' entires for sources that fail.
"""
if len(group) == 0:
# input dataframe is empty, nothing to do
return group
image = group.iloc[0]['img_diff_rms_path']

with fits.open(image) as hdul:
Expand Down

0 comments on commit 89678b9

Please sign in to comment.