mirror of
https://github.com/cdtools-developers/cdtools.git
synced 2026-09-11 14:02:38 +02:00
Fix an issue with the modulus projector, update test to catch that issue
This commit is contained in:
@@ -32,9 +32,9 @@ def modulus(wavefront, intensities, mask = None):
|
||||
projected = wavefront * (amplitudes / wavefront_mag)[...,None]
|
||||
# Replace amplitude of wavefront with measured amplitude
|
||||
if mask is not None:
|
||||
selection = (mask == 0)
|
||||
selection = mask == 0
|
||||
# Apply the mask to replace unmasked pixels in the original wavefront
|
||||
projected[selection] = wavefront[selection]
|
||||
projected = projected.masked_scatter(selection, wavefront.masked_select(selection))
|
||||
|
||||
return projected
|
||||
|
||||
|
||||
Reference in New Issue
Block a user