ptiede / Comrade.jl

MIT License
48 stars 7 forks source link

Caches no longer work with intensity maps #178

Closed dominic-chang closed 1 year ago

dominic-chang commented 2 years ago

A change in commit cdbcc6b11117632d5b3f3cee22604d378cfa7af2 causes intensitymap to fail when called on models that are defined with caches. The change is on around line 86 of of src/models/modelimage/nfft_alg.jl where,

@inline function create_cache(alg::ObservedNUFT{<:NFFTAlg}, plan, phases, img)
    timg = IntensityMap(transpose(img.im), img.fovx, img.fovy, img.pulse)
    return NUFTCache(alg, plan, phases, img.pulse, timg)

was changed to

@inline function create_cache(alg::ObservedNUFT{<:NFFTAlg}, plan, phases, img)
    #timg = #IntensityMap(transpose(img.im), img.fovx, img.fovy, img.pulse)
    return NUFTCache(alg, plan, phases, img.pulse, img.im')
ptiede commented 1 year ago

A quick update on this. #169 fixed this as a side project. I am going to add this to a test to make sure that I don't mess this up again in the future.