Skip to content

Commit

Permalink
Merge branch 'main' into peakheights
Browse files Browse the repository at this point in the history
  • Loading branch information
TomDonoghue committed Aug 3, 2023
2 parents 0f123a8 + 077d8de commit 893fba2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions specparam/objs/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,8 @@ def get_data(self, component='full', space='log'):
With space set as 'linear', this combination holds in linear space.
"""

if not self.has_data:
raise NoDataError("No data available to fit, can not proceed.")
assert space in ['linear', 'log'], "Input for 'space' invalid."

if component == 'full':
Expand Down Expand Up @@ -671,6 +673,8 @@ def get_model(self, component='full', space='log'):
With space set as 'linear', this combination holds in linear space.
"""

if not self.has_model:
raise NoModelError("No model fit results are available, can not proceed.")
assert space in ['linear', 'log'], "Input for 'space' invalid."

if component == 'full':
Expand Down

0 comments on commit 893fba2

Please sign in to comment.