Ticket #1490 (closed: wontfix)

Opened 10 years ago

Last modified 5 years ago

Make ConvertUnits handle EventWorkspaces

Reported by: Michael Reuter Owned by: Michael Reuter
Priority: major Milestone: Iteration 24
Component: Keywords:
Cc: Blocked By:
Blocking: Tester: Janik Zikovsky

Description

The ConvertUnits algorithm should be able to handle converting EventWorkspaces.

Change History

comment:1 Changed 10 years ago by Michael Reuter

(In [5728]) Reorganize test in preparation for event workspace testing. This refs #1490.

comment:2 Changed 10 years ago by Michael Reuter

(In [5772]) Adding difference CNCS data to make unit test shorter. This refs #1490.

comment:3 Changed 10 years ago by Michael Reuter

(In [5776]) Adding unit conversion for event workspaces. This refs #1490.

comment:4 Changed 10 years ago by Michael Reuter

(In [5777]) Start progress from zero. This refs #1490.

comment:5 Changed 10 years ago by Michael Reuter

  • Status changed from new to accepted

Forgot accept ticket.

comment:6 Changed 10 years ago by Michael Reuter

  • Status changed from accepted to verify

The requested work has been completed.

comment:7 Changed 10 years ago by Peter Peterson

  • Status changed from verify to reopened

comment:8 Changed 10 years ago by Michael Reuter

(In [5804]) Fix conversion to properly handle to<->from correctly and fix histogram axis as well. This refs #1490.

comment:9 Changed 10 years ago by Michael Reuter

(In [5805]) Update unit test to check on histogram bounds. This refs #1490.

comment:10 Changed 10 years ago by Michael Reuter

  • Status changed from reopened to accepted

comment:11 Changed 10 years ago by Peter Peterson

(In [5830]) Added a function to reverse the tof and fixed a typo in setTofs. Refs #1490.

comment:12 Changed 10 years ago by Peter Peterson

(In [5835]) Fixed minor bug in comparing iterators rather than values. Refs #1490.

comment:13 Changed 10 years ago by Peter Peterson

(In [5843]) Fixed off by one error (again) in calculating reverse. Refs #1490.

comment:14 Changed 10 years ago by Michael Reuter

  • Status changed from accepted to verify

comment:15 Changed 10 years ago by Nick Draper

  • Resolution set to fixed

fill in missing resolution

comment:16 Changed 10 years ago by Janik Zikovsky

  • Status changed from verify to verifying
  • Tester set to Janik Zikovsky

comment:17 Changed 10 years ago by Janik Zikovsky

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Works great converting back and forth between TOF, dSpacing, wavelength.

I tried taking some PG3 data (run 732) and converting from TOF to energy (probably doesn't make sense, but I wasn't sure how to try that conversion); I used Indirect and 25 meV for EFixed. The conversion seems to work, it runs, but the final bin X boundary is always infinity; it doesn't matter what the bins are in the input or what EFixed is, the last X boundary is always infinity.

comment:18 Changed 10 years ago by Michael Reuter

  • Status changed from reopened to accepted

comment:19 Changed 10 years ago by Michael Reuter

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

Yes, this is the expected behavior for TOF->E or TOF->deltaE for 1/0. So, instead of the code throwing an exception, the Kernel::Units class puts in a "sensible" number for division by zero. This will make the first bin infinity and the reverse should make it the last bin, but still infinity. I can't think of a better way to handle it unless the event reader blocks the use of zero as the initial lower bin boundary, but I don't like that either. This is just a "feature" of inverse conversions (like E and Q) with 0.

comment:20 Changed 10 years ago by Janik Zikovsky

  • Status changed from verify to verifying

comment:21 Changed 10 years ago by Janik Zikovsky

  • Status changed from verifying to closed

All good!

comment:22 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 2338

Note: See TracTickets for help on using tickets.