diff --git a/aurora/transfer_function/kernel_dataset.py b/aurora/transfer_function/kernel_dataset.py index 6fa481f1..35383c83 100644 --- a/aurora/transfer_function/kernel_dataset.py +++ b/aurora/transfer_function/kernel_dataset.py @@ -381,7 +381,7 @@ def has_remote_mth5(self): return False else: return self.remote_mth5_path.exists() - + @property def processing_id(self): """its difficult to come put with unique ids without crazy long names @@ -389,9 +389,12 @@ def processing_id(self): will have run information and the config parameters. """ if self.remote_station_id is not None: - return f"{self.local_station_id}-rr_{self.remote_station_id}" + return ( + f"{self.local_station_id}-rr_{self.remote_station_id}_" + f"sr{int(self.sample_rate)}" + ) else: - return self.local_station_id + return f"{self.local_station_id}_sr{int(self.sample_rate)}" @property def input_channels(self): diff --git a/tests/transfer_function/test_kernel_dataset.py b/tests/transfer_function/test_kernel_dataset.py index 1ec0e6e0..72c3e9d6 100644 --- a/tests/transfer_function/test_kernel_dataset.py +++ b/tests/transfer_function/test_kernel_dataset.py @@ -8,11 +8,13 @@ from mth5.data.make_mth5_from_asc import MTH5_PATH, create_test12rr_h5 from aurora.transfer_function import KERNEL_DATASET_COLUMNS -from aurora.pipelines.run_summary import RunSummary -from aurora.transfer_function.kernel_dataset import intervals_overlap -from aurora.transfer_function.kernel_dataset import overlap -from aurora.transfer_function.kernel_dataset import KernelDataset +from aurora.pipelines.run_summary import RunSummary +from aurora.transfer_function.kernel_dataset import ( + intervals_overlap, + overlap, + KernelDataset, +) # ============================================================================= @@ -98,7 +100,7 @@ def test_local_df(self): with self.subTest("shape"): self.assertEqual(self.kd.local_df.shape, (1, 20)) with self.subTest("local station only length"): - self.assertEqual(len(self.kd.local_df.station.unqiue()), 1) + self.assertEqual(len(self.kd.local_df.station.unique()), 1) with self.subTest("local station only"): self.assertListEqual( list(self.kd.local_df.station.unique()), ["test1"] @@ -108,13 +110,14 @@ def test_remote_df(self): with self.subTest("shape"): self.assertEqual(self.kd.remote_df.shape, (1, 20)) with self.subTest("remote station only length"): - self.assertEqual(len(self.kd.remote_df.station.unqiue()), 1) + self.assertEqual(len(self.kd.remote_df.station.unique()), 1) with self.subTest("remote station only"): self.assertListEqual( - list(self.kd.remote_df.station.unique()), ["test1"] + list(self.kd.remote_df.station.unique()), ["test2"] ) + def test_processing_id(self): - self.assertEqual(self.kd.processing_id, "test1-rr_test2") + self.assertEqual(self.kd.processing_id, "test1-rr_test2_sr1") # @classmethod # def tearDownClass(self):