Skip to content

Commit

Permalink
Crash on bad common beam
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecThomson committed May 23, 2024
1 parent 2f06cf3 commit 9289e4d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arrakis/imager.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,9 @@ def get_beam(image_set: ImageSet, cutoff: Optional[float]) -> Path:

logger.info(f"The common beam is: {common_beam=}")

if any([np.isnan(common_beam.major), np.isnan(common_beam.minor)]):
raise ValueError("Common beam is NaN, consider raising the cutoff.")

# serialise the beam
common_beam_pkl = Path(f"beam_{image_hash}.pkl")

Expand Down

0 comments on commit 9289e4d

Please sign in to comment.