Skip to content

Commit

Permalink
fix deconv and mixture
Browse files Browse the repository at this point in the history
  • Loading branch information
Affie committed Oct 16, 2023
1 parent c8ecc22 commit 0888e90
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/Factors/Mixture.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ function sampleFactor(cf::CalcFactor{<:Mixture}, N::Int = 1)
cf.cache,
cf.fullvariables,
cf.solvefor,
cf.manifold
cf.manifold,
cf.measurement
)
smpls = [getSample(cf_) for _ = 1:N]
# smpls = Array{Float64,2}(undef,s.dims,N)
Expand Down
5 changes: 1 addition & 4 deletions src/services/DeconvUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ function approxDeconv(

islen1 = zDim == 1

# FIXME, is this still in use
destVarVals = Vector{Int}()

for idx = 1:N
# towards each particle in their own thread (not 100% ready yet, factors should be separate memory)
target_smpl = makeTarget(idx)
Expand All @@ -82,7 +79,7 @@ function approxDeconv(
resize!(ccw.hyporecipe.activehypo, length(hyporecipe.activehypo[2][2]))
ccw.hyporecipe.activehypo[:] = hyporecipe.activehypo[2][2]

onehypo!, _ = _buildCalcFactorLambdaSample(ccw, idx, target_smpl, measurement)
onehypo! = _buildCalcFactorLambdaSample(ccw, idx, measurement)
#

# lambda with which to find best measurement values
Expand Down
2 changes: 1 addition & 1 deletion src/services/NumericalCalculations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ end
# struct OptimCalcConv end
# CalcFactorNormSq cost function for an input in coordinates as used by Optim.jl
function (hypoCalcFactor::CalcFactorNormSq)(M::AbstractManifold, Xc::AbstractVector)
# M = hypoCalcFactor.manifold # calc factor has factor manifold in not variable that is needed here
# hypoCalcFactor.manifold is the factor's manifold, not the variable's manifold that is needed here
ϵ = getPointIdentity(M)
X = get_vector(M, ϵ, Xc, DefaultOrthogonalBasis())
p = exp(M, ϵ, X)
Expand Down

0 comments on commit 0888e90

Please sign in to comment.