Skip to content

Commit

Permalink
formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollman committed Jan 31, 2024
1 parent 04e623b commit b058f78
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions python/neuroglancer/write_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ class Annotation(NamedTuple):


def choose_output_spec(total_count, total_bytes,
hash: ShardHashType = "murmurhash3_x86_128",
hashtype: ShardHashType = "murmurhash3_x86_128",
gzip_compress=True):
if total_count ==1:
return None

options = {
'@type': 'neuroglancer_uint64_sharded_v1',
'hash': hash,
'hash': hashtype,
}

total_minishard_bits = 0
Expand All @@ -99,11 +99,9 @@ def choose_output_spec(total_count, total_bytes,
options['data_encoding'] = 'raw'
options['minishard_index_encoding'] = 'raw'

# options.setdefault('minishard_index_compression', {}).setdefault('gzip_compression', {})['level'] = minishard_index_compression
# options.setdefault('data_compression', {}).setdefault('gzip_compression', {})['level'] = data_compression

return options


def _get_dtype_for_geometry(annotation_type: AnnotationType, rank: int):
geometry_size = rank if annotation_type == "point" else 2 * rank
return [("geometry", "<f4", geometry_size)]
Expand Down Expand Up @@ -141,7 +139,7 @@ def __init__(
self,
coordinate_space: coordinate_space.CoordinateSpace,
annotation_type: AnnotationType,
lower_bound: Sequence,
lower_bound: Sequence = (0, 0, 0),
relationships: Sequence[str] = (),
properties: Sequence[viewer_state.AnnotationPropertySpec] = (),
chunk_size: Sequence[int] = [256, 256, 256]
Expand Down

0 comments on commit b058f78

Please sign in to comment.