Skip to content

Commit

Permalink
Preparing to merge isssue_153 branch into dev
Browse files Browse the repository at this point in the history
replaced config with expected_sample_rate in validate_sample_rate
and also have already got one import from mt_metadata in pipelines/helpers.py
in anticipation of merge

[Issue(s):  #153, #80 ]
  • Loading branch information
kkappler committed Mar 25, 2022
1 parent d8ef2d9 commit 78fa54b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion aurora/pipelines/helpers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from pathlib import Path

from aurora.config.processing_config import RunConfig

from aurora.config.metadata.processing import Processing

def initialize_config(run_config):
"""
Expand All @@ -19,6 +19,9 @@ def initialize_config(run_config):
config.from_json(run_config)
elif isinstance(run_config, RunConfig):
config = run_config
print("ToBeDeprecated")
elif isinstance(run_config, Processing):
config = run_config
else:
print(f"Unrecognized config of type {type(run_config)}")
raise Exception
Expand Down
2 changes: 1 addition & 1 deletion tests/parkfield/test_process_parkfield.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def process_decimation_level(config, run_id, units="MT"):

local_run_obj = mth5_obj.get_run(config["local_station_id"], run_id)
local_run_ts = local_run_obj.to_runts()
validate_sample_rate(local_run_ts, config)
validate_sample_rate(local_run_ts, config.sample_rate)
local_stft_obj = run_ts_to_calibrated_stft(
local_run_ts, local_run_obj, config, units=units
)
Expand Down

0 comments on commit 78fa54b

Please sign in to comment.