Skip to content

Commit

Permalink
Revert "fuse: always use zlib compression when creating tiffs"
Browse files Browse the repository at this point in the history
This reverts commit f9e8136.
  • Loading branch information
gmazzamuto committed Jun 9, 2022
1 parent 348c7ba commit 408ab78
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion zetastitcher/fuse/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ def parse_args():

group.add_argument('-c', '--ch', type=int, dest='channel', help='channel')

group.add_argument('-c', type=str, default=0, dest='compression',
choices=[str(i) for i in range(10)] + ['lzma'],
help='compression')
group.add_argument('--downsample-xy', metavar='S', type=int, required=False,
help='downsample XY plane by factor S')

Expand Down Expand Up @@ -158,6 +161,11 @@ def preprocess_and_check_args(args):
elif args.nz is not None:
args.zmax = args.zmin + args.nz

try:
args.compression = int(args.compression)
except ValueError:
pass


def compute_absolute_positions(args, fm):
xcorr_fm = XcorrFileMatrix.from_yaml(fm.input_path)
Expand Down Expand Up @@ -239,7 +247,8 @@ def main():
logger.info(f'fused shape, whole volume: {fr.output_shape}, {bytes_human}')
if args.output_filename is not None:

keys = ['zmin', 'zmax', 'output_filename', 'debug', 'channel', 'downsample_xy']
keys = ['zmin', 'zmax', 'output_filename', 'debug', 'channel',
'compression', 'downsample_xy']

for k in keys:
setattr(fr, k, getattr(args, k))
Expand Down

0 comments on commit 408ab78

Please sign in to comment.