Ticket #4715 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

OrientedLattice exposed to python issue

Reported by: Andrei Savici Owned by: Martyn Gigg
Priority: major Milestone: Release 2.0
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Andrei Savici

Description

I am trying to get hold of the Oriented lattice object in python. See the following script:

w=Load(Filename='CNCS_7860_event.nxs')
SetUB(Workspace='w',a='2',b='2',c='2')
print "Direct"
print w.sample().getOrientedLattice().getB()
o=w.sample().getOrientedLattice()
print "Assigned"
print o.getB()

One would think that the two methods should yield identical results. Instead, I get

Direct
[[  7.10420549e-316   6.90197301e-310   7.10420549e-316]
 [  4.94065646e-324   4.61967979e-316   4.61968019e-316]
 [  0.00000000e+000   6.90197301e-310   5.00000000e-001]]
Assigned
[[  5.00000000e-01  -8.04061325e-17  -8.04061325e-17]
 [  0.00000000e+00   5.00000000e-01  -3.06161700e-17]
 [  0.00000000e+00   0.00000000e+00   5.00000000e-01]]

Change History

comment:1 Changed 9 years ago by Andrei Savici

  • type changed from enhancement to defect

comment:2 Changed 9 years ago by Martyn Gigg

They certainly should be the same. I'll have a look at why they are not.

comment:3 Changed 9 years ago by Martyn Gigg

  • Status changed from new to accepted
  • Milestone changed from Iteration 33 to Iteration 32

comment:4 Changed 9 years ago by Martyn Gigg

Refs #4715. Fix OrientedLattice return to avoid unintended copy.

Changeset: fda7b056434ba3ca2cc6c5b8ee5771e78d96b849

comment:5 Changed 9 years ago by Martyn Gigg

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:6 Changed 9 years ago by Andrei Savici

  • Status changed from verify to verifying
  • Tester set to Andrei Savici

comment:7 Changed 9 years ago by Andrei Savici

  • Status changed from verifying to closed

:)

comment:8 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5562

Note: See TracTickets for help on using tickets.