Skip to content

Commit

Permalink
IgorIBWReader tests_correction
Browse files Browse the repository at this point in the history
  • Loading branch information
Slautin committed Jul 12, 2024
1 parent c1e8c18 commit 9d412af
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/readers/microscopy/spm/afm/test_igor.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_igor_matrix_file_image(self):
assert dataset.data_descriptor==true_dd, "Data descriptor was expected to be {} \
but received {}".format(true_dd, dataset.data_descriptor)
dimension_sizes = [58,256]
dimension_types = [sidpy.DimensionType.SPATIAL,sidpy.DimensionType.SPATIAL]
dimension_types = [sidpy.DimensionType.SPATIAL, sidpy.DimensionType.SPATIAL]
for dim in dataset._axes:
dimension = dataset._axes[dim]
assert dimension.size == dimension_sizes[dim]
Expand Down Expand Up @@ -117,7 +117,7 @@ def test_load_test_ibw_force_file(self):
data_translator = sr.IgorIBWReader(file_path)
datasets = data_translator.read(verbose=False)
assert len(datasets)==3, "Length of dataset should be 3 but is instead {}".format(len(datasets))
metadata = datasets[0].original_metadata
metadata = datasets['Channel_000'].original_metadata
data_descriptors = ['Raw (m)', 'Defl (m)', 'ZSnsr (m)']

original_metadata ={'MostPosZVoltage': 150,
Expand Down Expand Up @@ -756,7 +756,8 @@ def test_load_test_ibw_force_file(self):
assert original_metadata[key] == metadata[key], "Metadata incorrect for key {}, should be {} " \
"but was read as {}".format(key, original_metadata[key], metadata[key])

for ind in range(len(datasets)):
#for ind in range(len(datasets)):
for ind in datasets:
assert type(datasets[ind])== sidpy.sid.dataset.Dataset, "Dataset No. {} not read in as sidpy dataset" \
"but was instead read in as {}".format(ind, type(datasets[ind]))

Expand Down Expand Up @@ -1412,7 +1413,7 @@ def test_load_test_ibw_image_file(self):
'modDate': 3692884718,
'bname': b'BTFO_DSO_Thick0000'}

metadata = datasets[0].original_metadata
metadata = datasets['Channel_000'].original_metadata

data_labels = [['x (m)', 'y (m)'],
['x (m)', 'y (m)'],
Expand All @@ -1427,7 +1428,8 @@ def test_load_test_ibw_image_file(self):
"but was read as {}".format(key, original_metadata[key], metadata[key])


for ind in range(len(datasets)):
#for ind in range(len(datasets)):
for ind in datasets:
assert type(datasets[ind])== sidpy.sid.dataset.Dataset, "Dataset No. {} not read in as sidpy dataset" \
"but was instead read in as {}".format(ind, type(datasets[ind]))

Expand Down

0 comments on commit 9d412af

Please sign in to comment.