July2025updates #17

Merged
asia merged 14 commits from July2025updates into master 2025-07-08 14:49:32 +02:00
Showing only changes of commit 36378f4d6c - Show all commits

View File

@ -339,6 +339,12 @@ verbose: {verbose}")
elif time_unit == 'years':
multiplicator = 1 / 365
# Raise an exception when time_range from the user is too large
if time_range/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."
logger.error(msg)
raise Exception(msg)
# Selects dates in datenum format and procceeds to forecast value
start_date = datenum_data[-1] - (2 * time_win_duration / multiplicator)
dates_calc = [date for date in datenum_data if start_date <= date <= datenum_data[-1]]