@@ -454,11 +454,16 @@ function evalPotentialSpecific(
454
454
ret
455
455
end
456
456
457
+ # TODO consider improving isPartial(ccwl<:AbstractPrior) to also check dimensions since we know pretty well what varDim is.
458
+ # TODO workaround until partial manifold approach is standardized, see #1492
459
+ Msrc = getManifold (fnc)
460
+ asPartial = isPartial (ccwl) || manifold_dimension (Msrc) < manifold_dimension (mani)
461
+
457
462
# view on elements marked for nullhypo
458
463
addEntrNH = view (addEntr, nhmask)
459
464
spreadDist = spreadNH * calcStdBasicSpread (getVariableType (variables[sfidx]), addEntr)
460
465
# partials are treated differently
461
- ipc = if ! isPartial (ccwl) # ccwl.partial
466
+ ipc = if ! asPartial # isPartial(ccwl) #ccwl.partial
462
467
# TODO for now require measurements to be coordinates too
463
468
# @show typeof(ccwl.measurement[1])
464
469
for m in (1 : length (addEntr))[ahmask]
@@ -473,7 +478,12 @@ function evalPotentialSpecific(
473
478
ones (getDimension (variables[sfidx]))
474
479
else
475
480
# FIXME but how to add partial factor info only on affected dimensions fro general manifold points?
476
- pvec = [fnc. partial... ]
481
+ # pvec
482
+ partialCoords = if hasfield (typeof (fnc), :partial )
483
+ ccwl. partialDims # [fnc.partial...]
484
+ else
485
+ collect (1 : manifold_dimension (Msrc))
486
+ end
477
487
478
488
if ! hasmethod (getManifold, (typeof (fnc),))
479
489
@debug " No method getManifold for $(typeof (fnc)) , using getManifoldPartial"
@@ -484,13 +494,13 @@ function evalPotentialSpecific(
484
494
# addEntr is no longer in coordinates, these are now general manifold points!!
485
495
# for (i,dimnum) in enumerate(fnc.partial)
486
496
# FIXME , need ability to replace partial points
487
- partialCoords = ccwl. partialDims
497
+ # partialCoords = ccwl.partialDims
488
498
489
499
# FIXME check if getManifold is defined otherwise fall back to getManifoldPartial, JT: I would like to standardize to getManifold
490
500
if hasmethod (getManifold, (typeof (fnc),))
491
- Msrc = getManifold (fnc)
492
- # TODO workaround until partial manifold approach is standardized, see #1492
493
- asPartial = isPartial (fnc) || manifold_dimension (Msrc) < manifold_dimension (mani)
501
+ # Msrc = getManifold(fnc)
502
+ # # TODO workaround until partial manifold approach is standardized, see #1492
503
+ # asPartial = isPartial(fnc) || manifold_dimension(Msrc) < manifold_dimension(mani)
494
504
495
505
setPointPartial! (
496
506
mani,
@@ -520,10 +530,10 @@ function evalPotentialSpecific(
520
530
# null hypo mask that needs to be perturbed by "noise"
521
531
addEntrNHp = view (addEntr, nhmask)
522
532
# ongoing part of RoME.jl #244
523
- addEntropyOnManifold! (mani, addEntrNHp, 1 : getDimension (mani), spreadDist, pvec)
533
+ addEntropyOnManifold! (mani, addEntrNHp, 1 : getDimension (mani), spreadDist, partialCoords) # pvec
524
534
# do info per coords
525
535
ipc_ = zeros (getDimension (variables[sfidx]))
526
- ipc_[pvec ] .= 1.0
536
+ ipc_[partialCoords ] .= 1.0 # pvec
527
537
ipc_
528
538
end
529
539
0 commit comments