Ticket #5203 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Expose log filtering to Python

Reported by: Nick Draper Owned by: Martyn Gigg
Priority: blocker Milestone: Release 2.1
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Roman Tolchenov

Description

Rob Dalgleish needs to access period specific log values in python

Change History

comment:1 Changed 8 years ago by Martyn Gigg

Export LogFilter class to python. Refs #5203

Required for some reflectometry work next cycle.

Changeset: 597bd6905367d41963518771819bfc99ef212296

comment:2 Changed 8 years ago by Martyn Gigg

Fix gcc build by including full definition. Refs #5203

Changeset: 5ad344bc1a72e8fca27a096d691b06e5b9e897cd

comment:3 Changed 8 years ago by Martyn Gigg

Add a test to LogFilterTest Refs #5203

Needs debugging by Wendou for it to be turned on.

Changeset: 492ddb9c75ea1f02a8a536bc7d18a10472c3ebc6

comment:4 Changed 8 years ago by Martyn Gigg

To test:

from mantid.kernel import LogFilter
from mantid.simpleapi import Load

testWS = Load(Filename="CSP78173.raw", OutputWorkspace='testWS')
print testWS
ws = testWS[6] #period 7
print ws
run_info = ws.getRun()
height_log = run_info.getLogData("height")
period_log = run_info.getLogData("period 7")

print 'N log values %d' % height_log.size()
filter = LogFilter(height_log)
filter.addFilter(period_log)        
filteredLog = filter.data()
print 'N log values after filter %d' % filteredLog.size()

Last edited 8 years ago by Martyn Gigg (previous) (diff)

comment:5 Changed 8 years ago by Martyn Gigg

  • Status changed from new to accepted

comment:6 Changed 8 years ago by Martyn Gigg

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

comment:7 Changed 8 years ago by Martyn Gigg

  • Status changed from verify to reopened
  • Resolution fixed deleted

I've made an error here. I assumed the value method on timeseries property would only give back the filtered data but it doesn't, you need the nthValue, nthTime, nthInterval methods to access the filtered data and I haven't exposed them.

Basically the filtering is useless without them. On the bright side the are trivial to expose

comment:8 Changed 8 years ago by Martyn Gigg

Exports filtered data methods to python. Refs #5203

Without these you cannot access filtered data at all.

Changeset: 553fdc4e33f1513225bf5cc3e585a5c1a8bfd539

comment:9 Changed 8 years ago by Martyn Gigg

  • Status changed from reopened to accepted

comment:10 Changed 8 years ago by Martyn Gigg

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

comment:11 Changed 8 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester set to Roman Tolchenov

comment:12 Changed 8 years ago by Roman Tolchenov

  • Status changed from verifying to closed

Tested by running the script.

comment:13 Changed 8 years ago by Martyn Gigg

Export LogFilter class to python. Refs #5203

Required for some reflectometry work next cycle.

Changeset: 597bd6905367d41963518771819bfc99ef212296

comment:14 Changed 8 years ago by Martyn Gigg

Fix gcc build by including full definition. Refs #5203

Changeset: 5ad344bc1a72e8fca27a096d691b06e5b9e897cd

comment:15 Changed 8 years ago by Martyn Gigg

Add a test to LogFilterTest Refs #5203

Needs debugging by Wendou for it to be turned on.

Changeset: 492ddb9c75ea1f02a8a536bc7d18a10472c3ebc6

comment:16 Changed 8 years ago by Martyn Gigg

Exports filtered data methods to python. Refs #5203

Without these you cannot access filtered data at all.

Changeset: 553fdc4e33f1513225bf5cc3e585a5c1a8bfd539

comment:17 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6049

Note: See TracTickets for help on using tickets.