Skip to content

Commit

Permalink
point synthetic data at mth5 data path
Browse files Browse the repository at this point in the history
  • Loading branch information
kkappler committed Aug 22, 2024
1 parent 06758cd commit 7844053
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tests/synthetic/test_run_ts_slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
import datetime
import unittest

from mth5.utils.helpers import initialize_mth5
from aurora.test_utils.synthetic.paths import SyntheticTestPaths
from mth5.data.make_mth5_from_asc import create_test1_h5
from mth5.data.paths import SyntheticTestPaths
from mth5.helpers import close_open_files
from mth5.utils.helpers import initialize_mth5

synthetic_test_paths = SyntheticTestPaths()
DATA_PATH = synthetic_test_paths.mth5_path
MTH5_PATH = synthetic_test_paths.mth5_path


class TestSlicingRunTS(unittest.TestCase):
Expand All @@ -18,15 +19,16 @@ class TestSlicingRunTS(unittest.TestCase):

@classmethod
def setUpClass(self):
pass
close_open_files()
self.mth5_path = MTH5_PATH.joinpath("test1.h5")
if not self.mth5_path.exists():
create_test1_h5()

def setUp(self):
pass

def test_can_slice_a_run_ts_using_timestamp(self):
close_open_files()
mth5_path = DATA_PATH.joinpath("test1.h5")
mth5_obj = initialize_mth5(mth5_path, "r")
mth5_obj = initialize_mth5(self.mth5_path, "r")
df = mth5_obj.channel_summary.to_dataframe()
run_001 = mth5_obj.get_run("test1", "001")
run_ts_01 = run_001.to_runts()
Expand Down

0 comments on commit 7844053

Please sign in to comment.