Ticket #7643 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

SANS2D reduction of event mode data

Reported by: Gesner Passos Owned by: Gesner Passos
Priority: major Milestone: Release 3.0
Component: SANS Keywords:
Cc: Blocked By: #7890, #7985, #8064
Blocking: #6928, #8052 Tester: Jay Rainey

Description (last modified by Gesner Passos) (diff)

Make the result of this script compatible

import ISISCommandInterface as ici
run = '19682'
ev, mon = Load(run, LoadMonitors=True)
b = '5.5,45.5,50.0, 50.0,1000.0, 500.0,1500.0, 750.0,99750.0, 255.0,100005.0'
hist = Rebin(ev, b, False)
mon_h = Rebin(mon, b, False)
for i in range(mon_h.getNumberHistograms()):
	hist.setY(i,mon_h.dataY(i))
	hist.setE(i,mon_h.dataE(i))

ici.SANS2D()
ici.MaskFile('/apps/mantid/systemtests/Data/SANS2D/MASKSANS2D.091A')
ici.AssignSample(hist,reload=False)
ici.Gravity(True)
wav1 = 2.0
wav2 = wav1 + 2.0
reduced = ici.WavRangeReduction()
event_reduced = RenameWorkspace(reduced)

current = LoadNexus(run)
ici.SANS2D()
ici.MaskFile('/apps/mantid/systemtests/Data/SANS2D/MASKSANS2D.091A')
ici.AssignSample(current,reload=False)
ici.Gravity(True)
wav1 = 2.0
wav2 = wav1 + 2.0
reduced = ici.WavRangeReduction()
histogram_reduced = RenameWorkspace(reduced)

plot(event_reduced, 0)
plot(histogram_reduced,0)

Currently, there are not compatible, and it seems to be a problem with the logging being different from both workspaces.

Change History

comment:1 Changed 7 years ago by Gesner Passos

  • Status changed from new to inprogress

comment:2 Changed 7 years ago by Gesner Passos

  • Blocked By 7985 added

comment:3 Changed 7 years ago by Gesner Passos

The real problem for not providing the same solution was related to the sample loggings, and it will be addressed in the ticket #7985

comment:4 Changed 7 years ago by Gesner Passos

There is a small problem with the event mode data when extracting the date and time because it provides more information.

comment:5 Changed 7 years ago by Gesner Passos

DateTime extract for isis_instrument

Avoid the issue of datetime throwing exception when extracting the date and time by truncating the input string.

re #7643

Changeset: f3b95f3cf10ecd704f4a7512d3df10914b0a39aa

comment:6 Changed 7 years ago by Gesner Passos

  • Description modified (diff)

Tester:

comment:7 Changed 7 years ago by Gesner Passos

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

Tester:

execute the script in the description of this ticket. The outputs must be the same or at least, very close to one another.

comment:8 Changed 7 years ago by Gesner Passos

  • Blocking 6928 added

comment:8 Changed 7 years ago by Gesner Passos

  • Status changed from verify to reopened
  • Resolution fixed deleted
  • Blocking 6928 removed

comment:9 Changed 7 years ago by Gesner Passos

  • Blocking 6928 added

comment:10 Changed 7 years ago by Gesner Passos

The ticket #7890 imposes some changes on the script to be tested.

comment:11 Changed 7 years ago by Gesner Passos

  • Blocked By 8064 added

The monitors showed wrong sample information.

comment:12 Changed 7 years ago by Gesner Passos

  • Status changed from reopened to inprogress

The correct script now is:

import ISISCommandInterface as ici
run = '19682'
ev, mon = Load(run, LoadMonitors=True)
b = '5.5,45.5,50.0, 50.0,1000.0, 500.0,1500.0, 750.0,99750.0, 255.0,100005.0'
hist = Rebin(ev, b, False)
mon_h = Rebin(mon, b, False)
mon_name = mon_h.name()
ConjoinWorkspaces(mon_h, hist, True)
hist = RenameWorkspace(mon_name)

ici.SANS2D()
ici.MaskFile('/apps/mantid/systemtests/Data/SANS2D/MASKSANS2D.091A')
ici.AssignSample(hist,reload=False)
ici.Gravity(True)
wav1 = 2.0
wav2 = wav1 + 2.0
reduced = ici.WavRangeReduction()
event_reduced = RenameWorkspace(reduced)

current = LoadNexus(run)
ici.SANS2D()
ici.MaskFile('/apps/mantid/systemtests/Data/SANS2D/MASKSANS2D.091A')
ici.AssignSample(current,reload=False)
ici.Gravity(True)
wav1 = 2.0
wav2 = wav1 + 2.0
reduced = ici.WavRangeReduction()
histogram_reduced = RenameWorkspace(reduced)

plot(event_reduced, 0)
plot(histogram_reduced,0)

The reason, is that now, loading event, does not load the monitors spectra, and as so, can be 'conjoined' to the monitors straight forward.

Last edited 7 years ago by Gesner Passos (previous) (diff)

comment:13 Changed 7 years ago by Gesner Passos

  • Blocking 8052 added

comment:14 Changed 7 years ago by Gesner Passos

  • Blocked By 7890 added

comment:15 Changed 7 years ago by Gesner Passos

I can not put it as fixed today, because it depends on #8064 that is not closed. But, it has been in the develop branch since 01/10/2013.

Tester: just execute the script in comment:12

comment:16 Changed 7 years ago by Gesner Passos

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

comment:17 Changed 7 years ago by Jay Rainey

  • Status changed from verify to verifying
  • Tester set to Jay Rainey

comment:19 Changed 7 years ago by Jay Rainey

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/7643_sans2d_fixing_reduction'

Full changeset: 7447741e83f820a726714fcafef459a30be6176b

comment:20 Changed 7 years ago by Jay Rainey

ValueError no longer occurs as datetime problem has been addressed. Provided script returns the same results, as expected. Tested on Ubuntu 12.04.

comment:21 Changed 6 years ago by Martyn Gigg

Fix loading of Vates libraries to initialize VSI.

The package structure is different to the dev layout so we need to ensure we load the Vates libs from the top level pvplugins and not the actual plugins. Refs #7643

Changeset: bb558062c7dbdaef53daeaa94b44501569f7e383

comment:22 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8488

Note: See TracTickets for help on using tickets.