<p><em>Note: this question is <strong>not</strong> about PixInsight's drizzle integration module, it's specifically about the mentioned drizzle implementation. Answers describing PI functionality are automatically off topic.</em></p>
<p>When drizzling frames using drizzle (<a href="https://github.com/spacetelescope/drizzle" rel="nofollow noreferrer">gitlab: spacetelescope/drizzle</a>, a drizzled output image plus an output_counts array is generated.</p>
<p>I'm looking to understand the correct way to stack the output. For a given drizzled image, some pixel values may be determined by a &quot;droplet&quot; from the input image that completely covers the pixel in the drizzled image whereas others may be determined by a droplet that only overlaps a little.</p>
<p>When stacking the drizzled images, should the pixel values from the drizzled images be weighted according to the corresponding output count in the corresponding output_counts array in order to ensure that the droplet that completely covers the pixel is weighted higher than the one that barely overlaps? My hunch is yes, but I can't find anywhere in the documentation that confirms this.</p>

CC BY-SA 4.0
2024-03-30T11:51:13.127Z
Drizzle is working fine, I get a sequence of correctly drizzled images. Codebase is as linked, minor modifications to fit my program's data structures. The question is, suppose the output pixel in one drizzled image has an output_count of 0.9 (based on being almost covered by a "droplet" from its input image) and the output pixel in another drizzled image has an output_count of 0.1 (based on only a little bit of overlap), when stacking the two pixels should I be using a weighted average so that the pixel with an associated output_count of 0.9 gets weighted more in the final stack?
Adrian K-B.
CC BY-SA 4.0
2024-03-30T12:56:32.607Z
(second comment owing to character restrictions): in other words, the question is more about how to optimally process already-drizzled data from a statistical point of view, rather than how to do the drizzling itself. I think my suggestion is right (and also that it's more important with fewer subs to stack: if I've drizzled each frame of a 30k frame SER file the contributions to pixel weight should average out when stacked much more than if I only have 10 subs).
Adrian K-B.
CC BY-SA 4.0
2024-03-20T20:11:57.050Z
I don’t get your question: The page is rather clear about the APIs you‘re expected to call and given your description, seems to cover your use case without output_weights (or I didn‘t understand what you’re asking for). Can you please provide more details? What problem do you want to solve, and what‘s the code you‘re using? At best provide a working example using some dummy data, showing the invocation yielding the data (output image, output_counts) and where you‘re stuck. Thanks
Grimaldi
<observational-astronomy><photography><image-processing><drizzle>
Stacking of frames drizzled using the AURA drizzle implementation hosted on github/spacetelescope (NOT PixInsight drizzle integration)
Adrian K-B.
# Stacking of frames drizzled using the AURA drizzle implementation hosted on github/spacetelescope (NOT PixInsight drizzle integration)

(Asked by: username_0 on 2024-03-08)

*Note: this question is **not** about PixInsight's drizzle integration module, it's specifically about the mentioned drizzle implementation. Answers describing PI functionality are automatically off topic.*

When drizzling frames using drizzle ([gitlab: spacetelescope/drizzle](https://github.com/spacetelescope/drizzle), a drizzled output image plus an output\_counts array is generated.

I'm looking to understand the correct way to stack the output. For a given drizzled image, some pixel values may be determined by a "droplet" from the input image that completely covers the pixel in the drizzled image whereas others may be determined by a droplet that only overlaps a little.

When stacking the drizzled images, should the pixel values from the drizzled images be weighted according to the corresponding output count in the corresponding output\_counts array in order to ensure that the droplet that completely covers the pixel is weighted higher than the one that barely overlaps? My hunch is yes, but I can't find anywhere in the documentation that confirms this.

**Tags:** observational-astronomy, photography, image-processing, drizzle
> **Comments:**
> **username_1**: I don’t get your question: The page is rather clear about the APIs you‘re expected to call and given your description, seems to cover your use case without output_weights (or I didn‘t understand what you’re asking for). Can you please provide more details? What problem do you want to solve, and what‘s the code you‘re using? At best provide a working example using some dummy data, showing the invocation yielding the data (output image, output_counts) and where you‘re stuck. Thanks  
> **username_0**: Drizzle is working fine, I get a sequence of correctly drizzled images. Codebase is as linked, minor modifications to fit my program's data structures. The question is, suppose the output pixel in one drizzled image has an output_count of 0.9 (based on being almost covered by a "droplet" from its input image) and the output pixel in another drizzled image has an output_count of 0.1 (based on only a little bit of overlap), when stacking the two pixels should I be using a weighted average so that the pixel with an associated output_count of 0.9 gets weighted more in the final stack?  
> **username_0**: (second comment owing to character restrictions): in other words, the question is more about how to optimally process already-drizzled data from a statistical point of view, rather than how to do the drizzling itself. I think my suggestion is right (and also that it's more important with fewer subs to stack: if I've drizzled each frame of a 30k frame SER file the contributions to pixel weight should average out when stacked much more than if I only have 10 subs).  

---

## 0 answers

