Ticket #5384: DetectorMoveWorkaround.py

File DetectorMoveWorkaround.py, 703 bytes (added by Karl Palmen, 8 years ago)
Line 
1rawMapWS = Load(r'\\isis\inst$\NDXMERLIN\Instrument\data\cycle_11_5\MER12024.raw') 
2
3deti = rawMapWS.getDetector( 204801 )
4detiID = deti.getID()
5detiPositionX = deti.getPos().X()
6detiPositionY = deti.getPos().Y() 
7detiPositionZ = deti.getPos().Z()
8yNew = -0.05
9print "About to move detector from", detiPositionY
10MoveInstrumentComponent( rawMapWS, DetectorID=detiID, Y=yNew )
11print "Get moved detector (again) "
12deti = rawMapWS.getDetector( 204801 )
13print "Moved detector. About get its new position."
14newDetiPositionY = deti.getPos().Y() 
15print "Got new position. About to print old position, then new position."
16print "Old position", detiPositionY
17print "New position", newDetiPositionY
18
19   
20