From 645035804a69e29189f80520f006e85dbbec5c9f Mon Sep 17 00:00:00 2001 From: Valentina Staneva Date: Mon, 11 Mar 2024 19:40:24 -0700 Subject: [PATCH] Create noise_processing.py --- noise_processing.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 noise_processing.py diff --git a/noise_processing.py b/noise_processing.py new file mode 100644 index 00000000..21c68018 --- /dev/null +++ b/noise_processing.py @@ -0,0 +1,20 @@ +import pandas as pd +from orcasound_noise.pipeline.pipeline import NoiseAnalysisPipeline +from orcasound_noise.utils import Hydrophone +import datetime as dt + + +#Example 1: Port Townsend, 1 Hz Frequency, 60-second samples +if __name__ == '__main__': + pipeline = NoiseAnalysisPipeline(Hydrophone.PORT_TOWNSEND, + delta_f=10, bands=None, + delta_t=60, mode='safe') + +psd_path, broadband_path = pipeline.generate_parquet_file(dt.datetime(2023, 3, 23, 7), + dt.datetime(2023, 3, 23, 8), + upload_to_s3=False) + +plot_spec(psd_df) +plot_bb(bb_df) + +plt.savefig('broadband.png')