Skip to content

Potential memory optimization for .ptu file decoding in lifetime_cal.py #1

Description

@GuangchenW

Dear developers,

Thank you for your work on this project.

I noticed that this line of code in lifetime_cal.py can cause memory issues when loading somewhat large .ptu files.

The issue is that the code tries to load all data on the T, Y, X, and H axes before integrate over the T axis. For large files, this can be very memory-intensive. The time binning feature does not address this issue, since it happens afterward.

The recommended way to do this would be using the decode_image function or using slice notation to integrate along the T axis while decoding (see the ptufile examples). This is also how the phasorpy library does it.

Would you consider updating the implementation accordingly? I believe this would make the code more robust for .ptu files with high resolution and/or long acquisition time.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions