Skip to content

Commit

Permalink
Fix passing chunk_shape when converting non-mag1 knossos datasets (#857)
Browse files Browse the repository at this point in the history
* Fix passing chunk_shape when converting non-mag1 knossos datasets

* changelog

* format
  • Loading branch information
fm3 authored Jan 23, 2023
1 parent d3bedf7 commit 020728f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions wkcuber/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ For upgrade instructions, please check the respective *Breaking Changes* section
### Changed

### Fixed
- Fixed a bug where converting coarse-mag Knossos data would crash with an assertion error. [#857](https://github.com/scalableminds/webknossos-libs/pull/857)


## [0.11.2](https://github.com/scalableminds/webknossos-libs/releases/tag/v0.11.2) - 2023-01-18
Expand Down
4 changes: 2 additions & 2 deletions wkcuber/wkcuber/convert_knossos.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def convert_knossos(
dtype: str,
voxel_size: Tuple[float, float, float],
data_format: DataFormat,
chunk_shape: Vec3Int,
chunk_shape: Vec3Int, # in target-mag
chunks_per_shard: Vec3Int,
mag: int = 1,
args: Optional[Namespace] = None,
Expand Down Expand Up @@ -134,7 +134,7 @@ def convert_knossos(
with get_executor_for_args(args) as executor:
target_mag.for_each_chunk(
partial(convert_cube_job, source_knossos_info),
chunk_shape=chunk_shape * chunks_per_shard,
chunk_shape=chunk_shape * mag * chunks_per_shard,
executor=executor,
progress_desc=f"Converting knossos layer {layer_name}",
)
Expand Down

0 comments on commit 020728f

Please sign in to comment.