Store images as `float` to reduce memory requirements

Open
#3,174 10 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
data, performance

Research direction

Start at get_corrected_data, where the image is loaded as double, and trace how the shoebox values are filled as float during integration. Check whether spot-finding reads the same loaded data, since the issue questions whether it needs the extra precision. Settle that question first, because the issue does not resolve it. Done means images are loaded as float with integration and spot-finding results unchanged in the existing tests.

Written by the indexing model from the issue text.

Description

A related point: we load the image in get_corrected_data as double, but only ever fill the shoeboxes as float. So we are getting no benefit of the extra precision in integration. Perhaps we should just load them as float to begin with. This could also be a significant memory saving. A double-precision EIGER 16M image is 145 MB, which adds up fast when you have multiple processes doing integration.

Maybe spot-finding benefits from the extra precision even if integration doesn't (although that seems doubtful).

Originally posted by @dagewa in #3117

Dominant language
Python
Stars
107
Forks
61
Avg merge
2d 15h
Merged PRs (30d)
12

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dials/dials

All issues in dials/dials

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.