dcnum 0.19.0__tar.gz → 0.19.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dcnum might be problematic. Click here for more details.
- {dcnum-0.19.0 → dcnum-0.19.1}/CHANGELOG +2 -0
- {dcnum-0.19.0/src/dcnum.egg-info → dcnum-0.19.1}/PKG-INFO +1 -1
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/_version.py +2 -2
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/read/hdf5_data.py +6 -2
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/read/mapped.py +1 -3
- {dcnum-0.19.0 → dcnum-0.19.1/src/dcnum.egg-info}/PKG-INFO +1 -1
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_meta_ppid_data.py +3 -1
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_read_hdf5.py +19 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/.github/workflows/check.yml +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/.github/workflows/deploy_pypi.yml +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/.gitignore +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/.readthedocs.yml +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/LICENSE +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/README.rst +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/docs/conf.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/docs/extensions/github_changelog.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/docs/index.rst +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/docs/requirements.txt +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/pyproject.toml +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/setup.cfg +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/__init__.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/__init__.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/event_extractor_manager_thread.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_background/__init__.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_background/base.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_background/bg_copy.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_background/bg_roll_median.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_background/bg_sparse_median.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_brightness/__init__.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_brightness/bright_all.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_brightness/common.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_contour/__init__.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_contour/contour.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_contour/moments.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_contour/volume.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_texture/__init__.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_texture/common.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/feat_texture/tex_all.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/gate.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/feat/queue_event_extractor.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/logic/__init__.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/logic/ctrl.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/logic/job.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/logic/json_encoder.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/meta/__init__.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/meta/paths.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/meta/ppid.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/read/__init__.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/read/cache.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/read/const.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/segm/__init__.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/segm/segm_thresh.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/segm/segmenter.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/segm/segmenter_cpu.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/segm/segmenter_gpu.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/segm/segmenter_manager_thread.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/write/__init__.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/write/deque_writer_thread.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/write/queue_collector_thread.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum/write/writer.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum.egg-info/SOURCES.txt +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum.egg-info/dependency_links.txt +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum.egg-info/requires.txt +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/src/dcnum.egg-info/top_level.txt +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/conftest.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/data/fmt-hdf5_cytoshot_extended-moments-features.zip +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/data/fmt-hdf5_cytoshot_full-features_2023.zip +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/data/fmt-hdf5_cytoshot_full-features_2024.zip +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/data/fmt-hdf5_cytoshot_full-features_legacy_allev_2023.zip +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/data/fmt-hdf5_shapein_empty.zip +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/data/fmt-hdf5_shapein_raw-with-variable-length-logs.zip +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/helper_methods.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/requirements.txt +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_feat_background_base.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_feat_background_bg_copy.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_feat_background_bg_roll_median.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_feat_background_bg_sparsemed.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_feat_brightness.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_feat_event_extractor_manager.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_feat_gate.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_feat_haralick.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_feat_moments_based.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_feat_moments_based_extended.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_feat_volume.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_init.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_logic_job.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_logic_join.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_logic_json.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_logic_pipeline.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_meta_paths.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_meta_ppid_base.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_meta_ppid_bg.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_meta_ppid_feat.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_meta_ppid_gate.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_meta_ppid_segm.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_read_basin.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_read_concat_hdf5.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_read_hdf5_index_mapping.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_segm_base.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_segm_no_mask_proc.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_segm_thresh.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_write_deque_writer_thread.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_write_queue_collector_thread.py +0 -0
- {dcnum-0.19.0 → dcnum-0.19.1}/tests/test_write_writer.py +0 -0
|
@@ -355,8 +355,12 @@ class HDF5Data:
|
|
|
355
355
|
elif val == "0":
|
|
356
356
|
kwargs["index_mapping"] = None
|
|
357
357
|
elif val.count("-"):
|
|
358
|
-
start, stop =
|
|
359
|
-
kwargs["index_mapping"] = slice(
|
|
358
|
+
start, stop, step = val.split("-")
|
|
359
|
+
kwargs["index_mapping"] = slice(
|
|
360
|
+
None if start == "n" else int(start),
|
|
361
|
+
None if stop == "n" else int(stop),
|
|
362
|
+
None if step == "n" else int(step)
|
|
363
|
+
)
|
|
360
364
|
else:
|
|
361
365
|
kwargs["index_mapping"] = int(val)
|
|
362
366
|
else:
|
|
@@ -54,12 +54,10 @@ def _get_mapping_indices_cached(
|
|
|
54
54
|
return np.arange(index_mapping)
|
|
55
55
|
elif isinstance(index_mapping, tuple):
|
|
56
56
|
im_slice = slice(*index_mapping)
|
|
57
|
-
if im_slice.step is not None:
|
|
58
|
-
raise NotImplementedError("Slices with step not implemented yet")
|
|
59
57
|
if im_slice.stop is None or im_slice.start is None:
|
|
60
58
|
raise NotImplementedError(
|
|
61
59
|
"Slices must have start and stop defined")
|
|
62
|
-
return np.arange(im_slice.start, im_slice.stop)
|
|
60
|
+
return np.arange(im_slice.start, im_slice.stop, im_slice.step)
|
|
63
61
|
elif isinstance(index_mapping, list):
|
|
64
62
|
return np.array(index_mapping, dtype=np.uint32)
|
|
65
63
|
else:
|
|
@@ -12,7 +12,9 @@ def test_ppid_decoding_dat_check_kwargs():
|
|
|
12
12
|
@pytest.mark.parametrize("imppid,value", [
|
|
13
13
|
["0", None],
|
|
14
14
|
["10", 10],
|
|
15
|
-
["10-20", slice(10, 20)]
|
|
15
|
+
["10-20-n", slice(10, 20)],
|
|
16
|
+
["10-20-2", slice(10, 20, 2)],
|
|
17
|
+
["n-n-2", slice(None, None, 2)],
|
|
16
18
|
])
|
|
17
19
|
def test_ppid_decoding_dat_check_kwargs_index_mapping(imppid, value):
|
|
18
20
|
dat_ppid = f"hdf:p=0.2658^i={imppid}"
|
|
@@ -158,6 +158,25 @@ def test_image_cache_iter_chunks(size, chunks, tmp_path):
|
|
|
158
158
|
assert list(hic.iter_chunks()) == list(range(chunks))
|
|
159
159
|
|
|
160
160
|
|
|
161
|
+
@pytest.mark.parametrize("index_mapping,result_data", [
|
|
162
|
+
[2, [0, 1]],
|
|
163
|
+
[slice(1, 10, 2), [1, 3, 5, 7, 9]],
|
|
164
|
+
[slice(1, 11, 3), [1, 4, 7, 10]],
|
|
165
|
+
[slice(10, 11), [10]],
|
|
166
|
+
[slice(1, 3, None), [1, 2]],
|
|
167
|
+
])
|
|
168
|
+
def test_index_mapping(index_mapping, result_data):
|
|
169
|
+
path = retrieve_data(
|
|
170
|
+
"fmt-hdf5_cytoshot_full-features_legacy_allev_2023.zip")
|
|
171
|
+
with h5py.File(path, "a") as h5:
|
|
172
|
+
size = len(h5["events/image"])
|
|
173
|
+
assert size == 11
|
|
174
|
+
h5["events/temp"] = np.arange(size, dtype=np.float64)
|
|
175
|
+
|
|
176
|
+
with read.HDF5Data(path, index_mapping=index_mapping) as hd:
|
|
177
|
+
assert np.allclose(hd["temp"], result_data)
|
|
178
|
+
|
|
179
|
+
|
|
161
180
|
def test_keyerror_when_image_is_none(tmp_path):
|
|
162
181
|
path = tmp_path / "test.hdf5"
|
|
163
182
|
with h5py.File(path, "w") as hw:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dcnum-0.19.0 → dcnum-0.19.1}/tests/data/fmt-hdf5_cytoshot_full-features_legacy_allev_2023.zip
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|