Skip to content

Commit

Permalink
Paths
Browse files Browse the repository at this point in the history
  • Loading branch information
calum-chamberlain committed Dec 7, 2023
1 parent 4eb31f5 commit cd5e2de
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions eqcorrscan/tests/matched_filter/match_filter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ def test_set_normxcorr2(self):
"""
Check that correlations output are the same irrespective of version.
"""
testing_path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'test_data')
testing_path = os.path.join(
os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
'test_data')
template = read(os.path.join(testing_path, 'test_template.ms'))
template = template[0].data.astype(np.float32)
image = read(os.path.join(testing_path, 'test_image.ms'))
Expand Down Expand Up @@ -605,7 +606,7 @@ def test_tribe_copy(self):
"""Test copy method"""
party = Party().read(
filename=os.path.join(
os.path.abspath(os.path.dirname(__file__)),
os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
'test_data', 'test_party.tgz'))
tribe = Tribe(f.template for f in party.families)
copied = tribe.copy()
Expand Down Expand Up @@ -709,7 +710,7 @@ def setUpClass(cls):
endtime=st[0].stats.starttime + process_len)
party = Party().read(
filename=os.path.join(
os.path.abspath(os.path.dirname(__file__)),
os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
'test_data', 'test_party.tgz'))
cls.family = party.sort()[0].copy()
cls.t1, cls.t2, cls.template_stachans = (t1, t2, template_stachans)
Expand Down Expand Up @@ -1075,7 +1076,7 @@ class TestMatchObjectLight(unittest.TestCase):
def setUpClass(cls):
cls.party = Party().read(
filename=os.path.join(
os.path.abspath(os.path.dirname(__file__)),
os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
'test_data', 'test_party.tgz'))
cls.tribe = Tribe(templates=[fam.template for fam in cls.party])
cls.family = cls.party.sort()[0].copy()
Expand Down Expand Up @@ -1725,8 +1726,8 @@ def test_match_filter(plot=False, extract_detections=False,
import inspect
# Read in the synthetic dataset
templates = []
testing_path = os.path.join(os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe()))), 'test_data',
testing_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))), 'test_data',
'synthetic_data')
templates.append(read(os.path.join(testing_path, 'synth_template_0.ms')))
templates.append(read(os.path.join(testing_path, 'synth_template_1.ms')))
Expand Down

0 comments on commit cd5e2de

Please sign in to comment.