Skip to content

Dask array does not support detail (like intensity) calculation #49

@Chenchao-is-CC

Description

@Chenchao-is-CC

Hello,

Recently, I’ve been working on spot detection and retrieving spot intensities. I noticed that when the image is a dask.array, the “details” (such as spot intensity) are not computed. Looking at the code, I found this line:

skip_details = isinstance(img, da.Array)
# Avoid computing details for non-NumPy inputs, which are assumed to be large

This makes sense — since Dask arrays represent large datasets, computing details directly could be very memory-intensive. However, I’d like to use the spot intensities to filter out background noise, and skipping this step prevents that.

I tried retrieving the intensities using Dask’s distributed framework, but it’s difficult to match image chunks with their corresponding spot coordinates (pts), which leads to heavy computation and high memory usage.

I have a (possibly naive) idea:
Could the details be computed when the tiled chunks are sent to the GPU? Once a chunk is on the GPU, it should be much easier to calculate the details locally before moving on to the next chunk.

I’m not sure if this approach would work, but I wanted to share the idea — perhaps it could allow retrieving spot intensities even when working with large Dask arrays.

Lastly, thank you for your great work on this project!

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions