Skip to content

Commit

Permalink
setup: migrate from qpimage 0.7.4 to 0.7.6
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Mar 18, 2022
1 parent 95975b8 commit 85a7796
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
0.11.1
- setup: migrate from qpimage 0.7.4 to 0.7.6
0.11.0
- feat: implement FDTD/Meep reader for data from ODTbrain paper
- fix: remove call to deprecated Element.getchildren
Expand Down
2 changes: 0 additions & 2 deletions qpformat/file_formats/series_hdf5_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ def _get_data_indices(self):
indices = sorted(h5["sinogram"].keys(), key=lambda x: int(x))

if not indices:
# if this error is raised, the signal_type is probably not
# set to "hologram".
raise NoSinogramDataFoundError(
f"No sinogram data found in '{self.path}'!")
return indices
Expand Down
6 changes: 3 additions & 3 deletions qpformat/file_formats/series_hdf5_hyperspy.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ class SeriesHdf5HyperSpy(SeriesData):
HyperSpy has its :ref:`own implementation
<hyperspy:electron-holography-label>` to read this file format.
"""
storage_type = "hologram"
storage_type = "raw-oah"

def __len__(self):
return len(self._get_experiments())

def _check_experiment(self, name):
"""Check the signal type of the experiment
"""Check the signal type "hologram" of the experiment
Returns
-------
Expand Down Expand Up @@ -89,7 +89,7 @@ def get_qpimage_raw(self, idx=0):
meta_data.update(self.meta_data)

qpi = qpimage.QPImage(data=data,
which_data="hologram",
which_data="raw-oah",
meta_data=meta_data,
holo_kw=self.holo_kw,
h5dtype=self.as_type)
Expand Down
2 changes: 1 addition & 1 deletion qpformat/file_formats/series_zip_tif_holo.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SeriesZipTifHolo(SeriesData):
The data are stored as multiple TIFF files
(:class:`qpformat.file_formats.SingleTifHolo`) in a zip file.
"""
storage_type = "hologram"
storage_type = "raw-oah"

def __init__(self, *args, **kwargs):
super(SeriesZipTifHolo, self).__init__(*args, **kwargs)
Expand Down
4 changes: 2 additions & 2 deletions qpformat/file_formats/single_tif_holo.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class SingleTifHolo(SingleData):
"""Off-axis hologram image (TIFF format)"""
storage_type = "hologram"
storage_type = "raw-oah"

@staticmethod
def _get_tif(path):
Expand Down Expand Up @@ -44,7 +44,7 @@ def get_qpimage_raw(self, idx=0):
holo = tf.pages[0].asarray()
meta_data = copy.copy(self.meta_data)
qpi = qpimage.QPImage(data=holo,
which_data="hologram",
which_data="raw-oah",
meta_data=meta_data,
holo_kw=self.holo_kw,
h5dtype=self.as_type)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
long_description=open('README.rst').read() if exists('README.rst') else '',
install_requires=["h5py>=2.7.0",
"numpy>=1.12.0",
"qpimage>=0.7.4",
"qpimage>=0.7.6",
"tifffile>=2020.5.25",
],
python_requires='>=3.6, <4',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_series_zip_tif_holo.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_basic():
path = setup_test_zip(num)
ds = qpformat.load_data(path)
# basic tests
assert ds.storage_type == "hologram"
assert ds.storage_type == "raw-oah"
assert len(ds) == num
assert ds.is_series
assert ds.path.samefile(path)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_single_tif_holo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def test_basic():
path = datapath / "single_holo.tif"
ds = qpformat.load_data(path)
# basic tests
assert ds.storage_type == "hologram"
assert ds.storage_type == "raw-oah"
assert not ds.is_series
assert ds.path == path.resolve()
assert "SingleTifHolo" in ds.__repr__()
Expand Down

0 comments on commit 85a7796

Please sign in to comment.