catch time_win_duration values that are too large
This commit is contained in:
parent
36378f4d6c
commit
664ab1025b
@ -339,8 +339,8 @@ verbose: {verbose}")
|
|||||||
elif time_unit == 'years':
|
elif time_unit == 'years':
|
||||||
multiplicator = 1 / 365
|
multiplicator = 1 / 365
|
||||||
|
|
||||||
# Raise an exception when time_range from the user is too large
|
# Raise an exception when time_win_duration from the user is too large relative to the catalog
|
||||||
if time_range/multiplicator > 0.5*(time[-1] - time[0]):
|
if time_win_duration/multiplicator > 0.5*(time[-1] - time[0]):
|
||||||
msg = "Activity rate estimation time window must be less than half the catalog length. Use a shorter time window."
|
msg = "Activity rate estimation time window must be less than half the catalog length. Use a shorter time window."
|
||||||
logger.error(msg)
|
logger.error(msg)
|
||||||
raise Exception(msg)
|
raise Exception(msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user