We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
Here's my code for the task as an inspiration.
with open(obs_path, "w") as f: for event_idx, event_catalog in catalog.groupby("event_idx"): f.write(f"PUBLIC_ID E{event_idx:08d}\n") for _, pick in event_catalog.iterrows(): # Example: GRX ? ? ? P U 19940217 2216 44.9200 GAU 2.00e-02 -1.00e+00 -1.00e+00 -1.00e+00 if isinstance(pick["time"], datetime.datetime): time = pick["time"] else: time = datetime.datetime.fromisoformat(pick["time"]) phase = pick["phase"].upper() station = self._station_mapper.translate_station(pick["station"]) daystr = time.strftime("%Y%m%d") hourmin = time.strftime("%H%M") second = time.strftime("%S.%f")[:-2] f.write( f"{station:6s} ? ? ? {phase} ? {daystr} {hourmin} {second} " f"GAU 2.00e-02 -1.00e+00 -1.00e+00 -1.00e+00\n" ) f.write("\n") return obs_path
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: