Ticket #373 (closed: fixed)

Opened 12 years ago

Last modified 5 years ago

Allow removal to non edge bins with RemoveTimeBins (also rename to RemoveBins)

Reported by: Nick Draper Owned by: Russell Taylor
Priority: major Milestone: Iteration 15
Component: Keywords:
Cc: Blocked By:
Blocking: Tester:

Description

Allow the removal of bins from the middle of the range. Add a parameter for interpolation (initially allow None and linear). If linear interpolation interpolate the value across the remaining bins.

If None then just remove it.

Change History

comment:1 Changed 12 years ago by Matt Clarke

(In [1872]) First attempt at the new RemoveBins algorithm. Refs #373

comment:2 Changed 12 years ago by Matt Clarke

(In [1874]) Refs #373. Some changes.

comment:3 Changed 12 years ago by Matt Clarke

(In [1877]) Refs #373. Forgot to save it before commiting!

comment:4 Changed 12 years ago by Matt Clarke

(In [1885]) Refs #373. Should hopefully not set all other values to zero!

comment:5 Changed 12 years ago by Matt Clarke

(In [1895]) Refs #373. Testing buildserver.

comment:6 Changed 12 years ago by Nick Draper

We need to alter the StartX and EndX to take the x bin values, not the indexes.

Just iterate over the X array until you find the first bin that would contain the value, and then crop until the bin that contains the EndX value.

comment:7 Changed 12 years ago by Matt Clarke

(In [1913]) Refs #373. RemoveTimeBins now takes xvalues.

comment:8 Changed 12 years ago by Matt Clarke

(In [1915]) Refs #373. Adjusted SConstruct

comment:9 Changed 12 years ago by Matt Clarke

(In [1919]) Refs #373. Updated sendStatusEmail.py so it recognises "Failed 1 of 1 test"

comment:10 Changed 12 years ago by Russell Taylor

(In [1924]) RemoveBins wasn't copying the spectrum numbers across to the output workspace. Re #373.

comment:11 Changed 12 years ago by Nick Draper

  • Owner changed from Matt Clarke to Russell Taylor

comment:12 Changed 12 years ago by Russell Taylor

(In [1947]) RemoveBins can now take in an X range which is in different units to that of the input workspace. This is required for the SANS instruments. Also, when not interpolating, the counts in a bin that straddles the edge of the range is scaled proportionately to the portion of the bin that is within the range. Indices used for interpolation end points should be looked at at some point, and the tests should be expanded... Re #373.

comment:13 Changed 12 years ago by Russell Taylor

(In [1948]) Mistaken check-in. Re #373.

comment:14 Changed 12 years ago by Russell Taylor

(In [1950]) Fix RemoveBinsTest. Re #373.

comment:15 Changed 12 years ago by Russell Taylor

  • Status changed from new to closed
  • Resolution set to fixed

At some point, the interpolation will need upgrading to, e.g., cubic spline.

comment:16 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 1221

Note: See TracTickets for help on using tickets.