Skip to content

Commit

Permalink
Add controls for fourier coeff save for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
kkappler committed Nov 25, 2023
1 parent 7ea1d0f commit d6c9d83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/synthetic/test_fourier_coefficients.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def test_create_then_use_stored_fcs_for_processing(self):

z_file_path_1 = AURORA_RESULTS_PATH.joinpath("test2.zss")
z_file_path_2 = AURORA_RESULTS_PATH.joinpath("test2_from_stored_fc.zss")
tf1 = process_synthetic_2(force_make_mth5=True, z_file_path=z_file_path_1)
tf1 = process_synthetic_2(force_make_mth5=True, z_file_path=z_file_path_1, save_fc=True)
tf2 = process_synthetic_2(force_make_mth5=False, z_file_path=z_file_path_2)
assert tf1 == tf2

Expand Down
8 changes: 5 additions & 3 deletions tests/synthetic/test_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def process_synthetic_1(
return tf_result


def process_synthetic_2(force_make_mth5=True, z_file_path=None):
def process_synthetic_2(force_make_mth5=True, z_file_path=None, save_fc=False):
""""""
station_id = "test2"
mth5_path = create_test2_h5(force_make_mth5=force_make_mth5)
Expand All @@ -253,8 +253,10 @@ def process_synthetic_2(force_make_mth5=True, z_file_path=None):
tfk_dataset.from_run_summary(run_summary, station_id)
processing_config = create_test_run_config(station_id, tfk_dataset)
for decimation_level in processing_config.decimations:
decimation_level.save_fcs = True
decimation_level.save_fcs_type = "h5"
if save_fc:
decimation_level.save_fcs = True
decimation_level.save_fcs_type = "h5"
decimation_level.window.type = "boxcar"
# decimation_level.save_fcs_type = "csv"
tfc = process_mth5(
processing_config,
Expand Down

0 comments on commit d6c9d83

Please sign in to comment.