Repository navigation
Write registered movies as deflated HDF5 by default - #14
Merged
Merged
Conversation
save_tif now defaults to False, so register_multiroi writes E*_REGISTERED_DOWNSAMPLED-80Hz.h5 (deflate 1, about 7x smaller than TIFF) unless asked for TIFF. GIAnT-MATLAB SILo reads both. giant register gains --tif for MATLAB's BigTIFF; --h5 is kept and now matches the default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change to default registered-movie output to HDF5.
No open issues 🎉
What changed in this PR
This PR makes deflate-compressed HDF5 the default output for registered movies, reducing storage and write overhead while retaining TIFF as an explicit option.
Changes:
- Changes
MultiRoiRegistrationParams.save_tifto default toFalse, using the existing HDF5 writer. - Adds
giant register --tifand retains--h5, with the flags mutually exclusive. - Adds CLI format-selection tests and updates documentation for the new default.
| File | Description |
|---|---|
tests/registration/test_cli.py |
Tests default HDF5 output, explicit format flags, and mutual exclusion. |
src/giant_python/models/params.py |
Defaults to HDF5 and updates parameter documentation. |
src/giant_python/cli.py |
Adds --tif and passes the selected format to registration. |
README.md |
Documents default compressed HDF5 output and the BigTIFF option. |
docs/source/file_formats.rst |
Describes registered-movie filenames as either .tif or .h5. |
Review effort: Balanced
# Conflicts: # docs/source/file_formats.rst # tests/registration/test_cli.py
Raster localization reads the registered movie that GIAnT-Python's registration writes, now HDF5 by default. The new test writes the same frames with MovieWriter in both formats and checks that load_registered_trial returns them in MATLAB's rows and columns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Registered movies are now written as deflated HDF5 by default.
MultiRoiRegistrationParams.save_tifdefaults toFalse, soregister_multiroiwritesE<epoch>T<trial>DMD<path>_REGISTERED_DOWNSAMPLED-80Hz.h5with/dataat deflate level 1 (movie_deflate), about 7x smaller than the BigTIFF. In the SLAP2 F0 GPU capsule, registration was limited by writing TIFF movies (GPU 3–6% busy, 53–137 GB of movies per session at 180 s; AllenNeuralDynamics/slap2-dev#57).giant registergains--tiffor MATLAB's BigTIFF.--h5still works and now matches the default; the two are mutually exclusive.Readers of the movie.
.h5and.tifmovies (load_registered_trial). A new test writes the same frames with the registration'sMovieWriterin both formats and checks that they load identically..h5movies when loading trials (loadAndProcessTrialAsync) and when sizing its worker pool (localizationTrialBytes).getAnnotationImageused the movie's file size as a stand-in for trial length, which compression breaks. Since Choose the annotation trial by movie data, not file size GIAnT-MATLAB#55 (merged) it sizes.h5movies by their dataset, so TIFF and HDF5 runs annotate on the same trial.saveTif.saveTifis already a neutral parameter in its comparison.predict-registeredreads only TIFF. The GPU capsule fetches GIAnT-Python'sslap2-trial-tablebranch, which does not include this change, so it keeps writing TIFF for now.dev is merged in (9004673), including #16; the only conflicts were in
test_cli.pyand thefn_reg_dsrow offile_formats.rst. Tests: all 116 pass (new ones cover the CLI flags and the HDF5/TIFF round trip through localization); black and flake8 are clean.🤖 Generated with Claude Code