Skip to content

Commit

Permalink
fix: informative exception
Browse files Browse the repository at this point in the history
* more informative error message on loading type II spectrum
  • Loading branch information
wcxve committed Mar 26, 2024
1 parent 1a825d2 commit 4dde524
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/elisa/data/ogip.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,8 @@ def __init__(self, specfile: str, poisson: bool | None = None):
# TODO: more robust way to detect a type II data
# check if data is type II
if not type_ii:
msg = f'row id must be provided for type II spectrum {specfile}'
msg = 'row id must be provided for type II spectrum, e.g., '
msg += f"'{specfile}{{1}}'"

nchan = len(data)
if int(header.get('DETCHANS', nchan)) != nchan:
Expand Down

0 comments on commit 4dde524

Please sign in to comment.