Repository navigation
Include support for jpk-qi-data files - #206
Open
tobyallwood wants to merge 227 commits into
Open
tobyallwood wants to merge 227 commits into
tobyallwood wants to merge 227 commits into
Conversation
…igger point or by contact point
… a function to general loader
…make the save an adjustable option
… once, then extracting separately
…files and removing the ability to run curve analysis directly in the reader
…ore robust coordinate access
…o eagerly load lazy loaded data
…me efficient method
…g to memory then saving in one go when duplicating data to h5
…sampled curves then are streamed directly into h5
…-SPM/AFMReader into tobyallwood/adjusted_volumes
ahobbs7
reviewed
Nov 9, 2026
ahobbs7
left a comment
Collaborator
There was a problem hiding this comment.
Looks great, small thing about flip_image?
| dict | ||
| A dictionary containing the QI curve data for each channel and segment for a pixel. | ||
| """ | ||
| if flip_image is None: |
Collaborator
There was a problem hiding this comment.
Might be good to still allow flip image from the dataclass to overridden by the argument of the function, I believe it is used in napari-TopoStats
| predicted_points_per_channel_segment[segment_name][channel] = ( | ||
| int(np.max(points_for_channel_segment[segment_name][channel]) * 1.1) * num_of_curves | ||
| ) | ||
| max_points + (max_points + 9) // 10 |
Collaborator
There was a problem hiding this comment.
nit: not sure what the +9 is for? Is it to ensure that there is a minimum 'buffer' above the curves if the curves have very few data points?
Collaborator
Author
There was a problem hiding this comment.
@ahobbs7 yeah it's still +10% but using integer values can avoid floating point errors. // rounds down so we add 9 to push it to the next integer (a.k.a rounding up so there's always headroom).
|
|
||
|
|
||
| def _get_channel_scaling(loaded_jpk_properties: dict, channel_index: str) -> tuple[float, float, str]: | ||
| def _get_channel_scaling(loaded_jpk_properties: dict, channel_index: int) -> tuple[float, float, str]: |
tobyallwood
marked this pull request as ready for review
November 10, 2026 11:57
This branch has not been deployed
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.
Adds support for
.jpk-qi-datafiles, allowing the loading of the image for the selected channel. It also allows for the raw force-distance curve data as well as metadata for each curve to be loaded efficiently, using a lazy data structure approach that loads each section of the dataset into memory only when it is required.The updates also allow for the conversion of
.jpk-qi-datafiles into a HDF5 file format (.h5-jpk) for much faster mass analysis. Hence, theh5-jpkloading code has also been updated to support the loading of these converted files.The update also allows
.binwith different binary formats to be loaded.