mirror of
https://github.com/Derisis13/SeismStart.git
synced 2025-12-06 19:42:49 +01:00
chore: clean up bisect_moonquake.py
This commit is contained in:
@@ -1,16 +1,11 @@
|
|||||||
# Import libraries
|
"""Cut out relevant samples from the training set"""
|
||||||
import numpy as np
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from obspy import UTCDateTime, read
|
from obspy import UTCDateTime, read
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
import os
|
import os
|
||||||
from scipy import signal
|
|
||||||
from matplotlib import cm
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
||||||
from from_notebook import plot_impact_spectrogram
|
|
||||||
|
|
||||||
# Define directories for use
|
# Define directories for use
|
||||||
CAT_LUNAR_DIR = './space_apps_2024_seismic_detection/data/lunar/training/catalogs/'
|
CAT_LUNAR_DIR = './space_apps_2024_seismic_detection/data/lunar/training/catalogs/'
|
||||||
@@ -48,7 +43,6 @@ if __name__ == "__main__":
|
|||||||
utc_arrival = UTCDateTime(arrival_time)
|
utc_arrival = UTCDateTime(arrival_time)
|
||||||
endtime = UTCDateTime(arrival_time + timedelta(seconds=7000))
|
endtime = UTCDateTime(arrival_time + timedelta(seconds=7000))
|
||||||
stream_out.trim(utc_arrival, endtime)
|
stream_out.trim(utc_arrival, endtime)
|
||||||
# plot_impact_spectrogram(stream_out.traces[0].copy(), arrival)
|
|
||||||
fout_name = test_filename + "_trimmed_7000_sec.mseed"
|
fout_name = test_filename + "_trimmed_7000_sec.mseed"
|
||||||
stream_out.write(os.path.join(PREPROCESSED_LUNAR_DIR, fout_name), format="mseed")
|
stream_out.write(os.path.join(PREPROCESSED_LUNAR_DIR, fout_name), format="mseed")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user