Skip to content

Commit 7e7b21c

Browse files
author
scexao6
committed
attempt to fix sdi contrast
1 parent b28bc46 commit 7e7b21c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/metrics/contrast.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ function throughput(alg, cube::AbstractArray{T,3}, angles, psf_model;
277277
return output, (distance=radii, fake_comps=fake_comps_full, noise=noise)
278278
end
279279

280-
_fix_range(radii, cube::AbstractArray{T,3}) where {T} = radii
280+
_fix_range(radii, cube::AbstractArray{T}) where {T} = radii
281281
_fix_range(radii, cube::AnnulusView) = filter(r -> cube.rmin r cube.rmax, radii)
282282
function _fix_range(radii, cube::MultiAnnulusView)
283283
rmin, rmax = extrema(cube.radii) .- cube.width / 2
@@ -334,7 +334,7 @@ function throughput(alg, cube::AbstractArray{T,4}, angles, psf_model, scales;
334334

335335
inject!(tmp_frame, psf_model; x, y, amp=mean(A .* flux_scale), fwhm)
336336
for wl_idx in axes(tmp_cube, 3)
337-
inject!(tmp_cube, psf_model, angles; x, y, amp=A * flux_scale[wl_idx], fwhm)
337+
inject!(tmp_cube[:, :, wl_idx, :], psf_model, angles; x, y, amp=A * flux_scale[wl_idx], fwhm)
338338
end
339339

340340
return CircularAperture(x, y, fwhm / 2)
@@ -343,7 +343,7 @@ function throughput(alg, cube::AbstractArray{T,4}, angles, psf_model, scales;
343343
fake_comps_full .+= tmp_frame
344344

345345
# get reduced output after subtracting and collapsing
346-
reduced = alg(tmp_cube, angles; kwargs...)
346+
reduced = alg(tmp_cube, angles, scales; kwargs...)
347347

348348
injected_flux = photometry(apertures, tmp_frame).aperture_sum
349349
recovered_flux = photometry(apertures, reduced .- reduced_empty).aperture_sum

0 commit comments

Comments
 (0)