Skip to content

score_gvec_z

score_gvec_z(ubi, ub, gv, g0, g1, g2, e, recompute)

Categories: Scattering geometry

Description

reads ubi, ub, gv and recompute if (recompute) it fills directions to project errors per peak: g0 = gv / |gv| = unit vector along g g1 = gxy / |gxy| = unit vector perpendicular to z and g (omega) g2 ... ought to be cross( g0, g1 ) ? (eta) For all peaks it computes h = ubi.g, rounds to nearest ih = int(h) and then computes gcalc = ub.ih = dot( ub, ( round( dot( ubi, g) ) ) ) The error gv - gcalc is then projected into the co-ordinate system g0,g1,g2 for errors along g, z and the rhs Beware : work in progress. Is z always the right axis?

Parameters

Name Description
e Output error array.
g0 Error along g component.
g1 Error along z component.
g2 Error along rhs component.
gv Experimental g-vectors, shape (ng, 3) flattened.
recompute If non-zero, recompute gcalc from ub.
ub UB matrix (9-element flattened double).
ubi UBI matrix (9-element flattened double).

Constraints

  • ubi.format == 'd'
  • ubi.n == 9
  • ub.format == 'd'
  • ub.n == 9
  • gv.format == 'd'
  • gv.ndim >= 1
  • g0.format == 'd'
  • g1.format == 'd'
  • g2.format == 'd'
  • e.format == 'd'

Overloads

C function Condition
score_gvec_z always

Built from commit 7ba8255fa8d680e1a1df79e67aee3873247ce69c (v0.4.5)