Skip to content

Commit 0df0724

Browse files
committed
Format and fix test bug with new idealmaps signature
1 parent 68820b0 commit 0df0724

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

examples/advanced/FitPS/main.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ post = VLBIPosterior(skym, dlcamp, dcphase)
143143
# We also need to import Enzyme to allow for automatic differentiation.
144144
using Optimization, OptimizationLBFGSB
145145
# tpost = asflat(post)
146-
xopt, sol = comrade_opt(post, LBFGSB(); initial_params=prior_sample(rng, post), maxiters = 5000)
146+
xopt, sol = comrade_opt(post, LBFGSB(); initial_params = prior_sample(rng, post), maxiters = 5000)
147147

148148
using CairoMakie
149149
using DisplayAs #hide

examples/intermediate/StokesIImaging/main.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ chain = sample(rng, post, NUTS(0.8), 700; n_adapts = 500, initial_params = xopt)
231231

232232

233233
# Now we prune the adaptation phase
234-
chain = chain[begin+500:end]
234+
chain = chain[(begin + 500):end]
235235

236236
#-
237237
# !!! warning

src/posterior/vlbiposterior.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ If `add_thermal_noise` is true then baseline based thermal noise is added. Other
137137
return the model visibilities.
138138
"""
139139
function simulate_observation(rng::Random.AbstractRNG, post::VLBIPosterior, θ; add_thermal_noise = true)
140-
v0 = forward_model(post, θ)
140+
v0 = last(forward_model(post, θ))
141141
Σn = _visnoise(first(post.data))
142142
data = post.data
143143

test/Core/models.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ end
150150
@test tt.dynamic == Comrade.skymodel(oskym, x.dynamic)
151151
@test tt.static == Comrade.skymodel(oskyf, x.static)
152152

153-
vtot = last(Comrade.idealmaps(oskytot, (; sky = x)))
154-
vdyn = last(Comrade.idealmaps(oskym, (; sky = x.dynamic)))
155-
vstat = last(Comrade.idealmaps(oskyf, (; sky = x.static)))
153+
vtot = last(Comrade.idealmaps(Comrade.VisData(), oskytot, (; sky = x)))
154+
vdyn = last(Comrade.idealmaps(Comrade.VisData(), oskym, (; sky = x.dynamic)))
155+
vstat = last(Comrade.idealmaps(Comrade.VisData(), oskyf, (; sky = x.static)))
156156

157-
@test_opt Comrade.idealmaps(oskytot, (; sky = x))
157+
@test_opt Comrade.idealmaps(Comrade.VisData(), oskytot, (; sky = x))
158158

159159
@test vtot vdyn + vstat
160160
end

0 commit comments

Comments
 (0)