Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuwq0 committed Dec 1, 2023
1 parent 0f1750e commit 50fd6fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion slurm/download_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 7 additions & 6 deletions slurm/run_gamma.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit 50fd6fd

Please sign in to comment.