From 50fd6fdd2d32a9952dbc54a465b13c7ae09ca543 Mon Sep 17 00:00:00 2001 From: zhuwq Date: Thu, 30 Nov 2023 20:22:00 -0800 Subject: [PATCH] update --- slurm/download_station.py | 2 +- slurm/run_gamma.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/slurm/download_station.py b/slurm/download_station.py index b5b61b7..4efbcbe 100644 --- a/slurm/download_station.py +++ b/slurm/download_station.py @@ -223,7 +223,7 @@ def parse_inventory_csv(inventory, mseed_ids=[]): # %% merge stations stations = [] for provider in config["provider"]: - tmp = pd.read_csv(f"{root_path}/{data_dir}/stations_{provider.lower()}.csv") + tmp = pd.read_csv(f"{root_path}/{data_dir}/stations_{provider.lower()}.csv", dtype={"location": str}) tmp["provider"] = provider stations.append(tmp) stations = pd.concat(stations) diff --git a/slurm/run_gamma.py b/slurm/run_gamma.py index 7c63148..76c4af5 100644 --- a/slurm/run_gamma.py +++ b/slurm/run_gamma.py @@ -137,12 +137,13 @@ def run_gamma( if len(events) > 0: ## create catalog - events = pd.DataFrame( - events, - columns=["time"] - + config["dims"] - + ["magnitude", "sigma_time", "sigma_amp", "cov_time_amp", "event_index", "gamma_score"], - ) + # events = pd.DataFrame( + # events, + # columns=["time"] + # + config["dims"] + # + ["magnitude", "sigma_time", "sigma_amp", "cov_time_amp", "event_index", "gamma_score"], + # ) + events = pd.DataFrame(events) events[["longitude", "latitude"]] = events.apply( lambda x: pd.Series(proj(longitude=x["x(km)"], latitude=x["y(km)"], inverse=True)), axis=1 )