Skip to content

Commit

Permalink
Merge pull request #4 from zhuwq0/main
Browse files Browse the repository at this point in the history
fix station_id format
  • Loading branch information
Dal-mzhang authored Mar 6, 2023
2 parents ae076b5 + 04fb561 commit 5c64caf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Pick/PhaseNet/runphasenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

data[["year", "mon", "day"]] = data["begin_time"].apply(lambda x: pd.Series([f"{x.year:04d}", f"{x.month:02d}", f"{x.day:02d}"]))
data["ss"] = data["begin_time"].apply(lambda x: (x - datetime.fromisoformat(f"{x.year:04d}-{x.month:02d}-{x.day:02d}")).total_seconds())
data[["net", "name", "channel"]] = data["station_id"].apply(lambda x: pd.Series(x.split(".")))
data[["net", "name", "loc", "channel"]] = data["station_id"].apply(lambda x: pd.Series(x.split(".")))
data["dum"] = pd.Series(np.ones(len(data)))
data["phase_amp"] = data["phase_amp"] * 2080 * 20
data["phase_time"] = data["ss"] + data["phase_index"] * samplingrate
Expand Down

0 comments on commit 5c64caf

Please sign in to comment.