Kcwi dec 2024 weights - #2149
Conversation
kbwestfall
left a comment
There was a problem hiding this comment.
Very minor comments. The only actual change requested is related to a docstring. I'll make this change myself.
| # required by the function but not used | ||
| gpm_stack, sigma_clip=self.par['clip'], | ||
| gpm_stack, | ||
| weights=None, |
There was a problem hiding this comment.
Adding weights to the function call isn't necessary, right? I assume this is mostly included just to make clear to a developer that the stack is unweighted?
There was a problem hiding this comment.
That's correct. I think it's a bit strange that we have a function called weighed_combine() where the weights are not currently being used, so just being explicit (and to make sure this remains supported the way it was originally intended in case the defaults change somewhere down the line.
| = combine.weighted_combine([img_stack, scl_stack], # images to stack | ||
| [rn2img_stack, basev_stack], # variances to stack | ||
| gpm_stack, sigma_clip=self.par['clip'], | ||
| gpm_stack, weights=None, sigma_clip=self.par['clip'], |
There was a problem hiding this comment.
As above :-) Happy to remove these, if preferred.
| # or one can use the single pixel computation (extended sources) in compute_weights. | ||
| # 6. Re-combined the cubes using these weights, again performing the final round of sigma clipping | ||
| # 7. Write out the individual cubes with their sigma clipped pixels masked (?) | ||
| # 8. Write out the final combined cube. |
There was a problem hiding this comment.
I assume this is still a "TODO"? I'd prefer we move the comments out of the docstring, or actually use docstring syntax.

An extension to the sequence of PRs related to #1929. In this PR, I have:
weighted_combine()(and propagated changes).coadd3d.run()to a new routine. The code flow is largely unchanged, but I made some modifications (moved some bits outside of a for loop that didn't need to be updated every loop).save_separateparameter to output individual datacubes (on the final combined WCS) if requested. Previously this was output by default.Dev-suite is running on the cloud, but the relevant parts pass on my machine. There is a related dev-suite PR.