Skip to content

Potential memory inefficiency in onekey4-core/central_mask.m #1

Open
lim185 opened this issue Feb 2, 2023 · 1 comment
Open

Potential memory inefficiency in onekey4-core/central_mask.m #1

lim185 opened this issue Feb 2, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@lim185
Copy link
Contributor

lim185 commented Feb 2, 2023

Our cameras capture light at 16bit depth, and single float (32bit) format stores values in 23-bit precision, so I don't think the use of double is justified. Since double precision takes exactly twice as much space as single precision float, and a typical datacube is 256px by 256px by 2048 frames, the 3D mask here would take up 1 GiB of memory instead of just 500MiB.

https://github.itap.purdue.edu/Nolte-Group/alpha-prime-system/blob/9d9036ad83037227526c65904efc6b057a1cd39b/onekey4-core/central_mask.m#L22

@lim185 lim185 changed the title Potential memory inefficiency Potential memory inefficiency in onekey4-core/central_mask.m Feb 2, 2023
@lim185 lim185 self-assigned this Feb 7, 2023
@lim185 lim185 added the enhancement New feature or request label Feb 7, 2023
@lim185 lim185 added this to the code streamlining milestone Feb 7, 2023
@lim185
Copy link
Contributor Author

lim185 commented Feb 16, 2023

https://github.itap.purdue.edu/Nolte-Group/alpha-prime-system/blob/9d9036ad83037227526c65904efc6b057a1cd39b/onekey4-core/central_mask.m#L17
Also a copy of the mask is created but only the copy is used without any other reference to original; this seems unnecessary.

Sign in to join this conversation on GitHub.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant