From 158e64ca84d7173c47cda8bb5cf4d7a31396702a Mon Sep 17 00:00:00 2001 From: Caio Begotti Date: Tue, 22 Oct 2024 14:17:40 -0300 Subject: [PATCH] fifx --- ABV.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ABV.py b/ABV.py index 1413e9c..be48ebb 100755 --- a/ABV.py +++ b/ABV.py @@ -6,13 +6,15 @@ import json import os import sys + from datetime import datetime, timedelta +from getKpindex import getKpindex +from matplotlib import rcParams +from scipy.interpolate import CubicSpline import matplotlib.dates as mdates import matplotlib.pyplot as plt import numpy as np -from scipy.interpolate import CubicSpline -from matplotlib import rcParams # constants KP_THRESHOLD = 5 @@ -52,8 +54,8 @@ def load_or_fetch_kp_index(year, quiet=False): json.dump({'times': [t.strftime('%Y-%m-%dT%H:%M:%SZ') for t in times], 'kp_index': kp_values}, f) return times, kp_values - except Exception: - log(f"Error fetching Kp index data for {year}.", quiet) + except Exception as error: + log(f"Error fetching Kp index data for {year}: {error}", quiet) sys.exit(1) def load_sunspot_data(start_year, end_year, quiet=False):