Ticket #6037 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

TimeSeriesProperty filtering error

Reported by: Russell Taylor Owned by: Wenduo Zhou
Priority: blocker Milestone: Release 2.3
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Russell Taylor

Description

From Owen:

We have a problem with TimeSeriesProperty filtering by time. Line 173 - Line 180 TimeSeriesProperty.cpp is one of the offending sections. The problem is that if you have a start time less than the timeseriesproperty lowest time value, it will erase the first value off the time series whatever. Similar to the removal of the lowest time, It also removes the last value from the log if your stop time is > the largest timeseriesproperty time.

Change History

comment:1 Changed 8 years ago by Russell Taylor

The commit intended to fix the bug:

Changed 63 minutes ago by Wenduo Zhou

Fix a minor bug. Refs #5742.

    Changeset: 40b8ccedd68dc59918dad27faf0e40f1a1df2bbc

comment:2 Changed 8 years ago by Wenduo Zhou

Fix and add unit tests. Refs #6037.

Changeset: 50fbb287c822bd20ce25c781946f2e5450ba7ad5

comment:3 Changed 8 years ago by Russell Taylor

  • Priority changed from critical to blocker

comment:4 Changed 8 years ago by Nick Draper

This is a bug found in the testing of #5775

comment:5 Changed 8 years ago by Nick Draper

We have a commit against this ticket. Should it be marked as fixed now?

comment:6 Changed 8 years ago by Wenduo Zhou

  • Status changed from new to accepted

comment:7 Changed 8 years ago by Wenduo Zhou

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

comment:8 Changed 8 years ago by Nick Draper

  • Status changed from verify to verifying
  • Tester set to Nick Draper

comment:9 Changed 8 years ago by Nick Draper

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Log values are only recorded when they change. This means that we need to be carfull not to remove values that are still valid when filtering.

For example:

######################################################################
#Python Script Generated by GeneratePythonScript Algorithm
######################################################################
Load(Filename='C:\Mantid\Test\AutoTestData\CNCS_7860_event.nxs',OutputWorkspace='CNCS_7860_event',FilterByTimeStart='52',FilterByTimeStop='150',LoadMonitors='1')

Take this file, filtered to start data at 52 seconds. if you look at the sample temp log the first entry is at 54 seconds, so what was the temp between 52 and 54 seconds? When filtering we need to leave the preceeding entry before the filter time period unless the filter period exactly matches a log value.

comment:10 Changed 8 years ago by Wenduo Zhou

  • Status changed from reopened to accepted

comment:11 Changed 8 years ago by Wenduo Zhou

Fix filterByTime(). Refs #6037.

Changeset: 6bb4cda368d6cc388038c757caeaff3815af5fee

comment:12 Changed 8 years ago by Wenduo Zhou

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

comment:13 Changed 8 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester changed from Nick Draper to Russell Taylor

comment:14 Changed 8 years ago by Russell Taylor

  • Status changed from verifying to reopened
  • Resolution fixed deleted

The lower limit seems to behave as advertised now, but if you specify an upper limit on the filter it removes one entry too many. I.e. if I run the following script it removes the SampleTemp entry at 94.542s when it shouldn't.

######################################################################
#Python Script Generated by GeneratePythonScript Algorithm
######################################################################
Load(Filename='/home/tr9/Mantid/Test/AutoTestData/CNCS_7860_event.nxs',OutputWorkspace='b',FilterByTimeStart='53',FilterByTimeStop='100')
Last edited 8 years ago by Russell Taylor (previous) (diff)

comment:15 Changed 8 years ago by Wenduo Zhou

Fix filterByTime() stop time. Refs #6037.

Changeset: 4a9d9b10cb5eadc253319dce08e68ce3d1417db8

comment:16 Changed 8 years ago by Russell Taylor

Although this ticket hasn't been marked as fixed, I have tested the last change made.

Just waiting for Wenduo to show up so we can do the book-keeping.

comment:17 Changed 8 years ago by Wenduo Zhou

  • Status changed from reopened to accepted

comment:18 Changed 8 years ago by Wenduo Zhou

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

comment:19 Changed 8 years ago by Russell Taylor

  • Status changed from verify to verifying

comment:20 Changed 8 years ago by Russell Taylor

  • Status changed from verifying to closed

comment:21 Changed 8 years ago by Wenduo Zhou

Fix and add unit tests. Refs #6037.

Changeset: 50fbb287c822bd20ce25c781946f2e5450ba7ad5

comment:22 Changed 8 years ago by Wenduo Zhou

Fix filterByTime(). Refs #6037.

Changeset: 6bb4cda368d6cc388038c757caeaff3815af5fee

comment:23 Changed 8 years ago by Wenduo Zhou

Fix filterByTime() stop time. Refs #6037.

Changeset: 4a9d9b10cb5eadc253319dce08e68ce3d1417db8

comment:24 Changed 8 years ago by Wenduo Zhou

Fix and add unit tests. Refs #6037.

Changeset: 50fbb287c822bd20ce25c781946f2e5450ba7ad5

comment:25 Changed 8 years ago by Wenduo Zhou

Fix filterByTime(). Refs #6037.

Changeset: 6bb4cda368d6cc388038c757caeaff3815af5fee

comment:26 Changed 8 years ago by Wenduo Zhou

Fix filterByTime() stop time. Refs #6037.

Changeset: 4a9d9b10cb5eadc253319dce08e68ce3d1417db8

comment:27 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6883

Note: See TracTickets for help on using tickets.