Ticket #94 (closed: fixed)

Opened 13 years ago

Last modified 5 years ago

Implement units within our workspaces

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

Description (last modified by Nick Draper) (diff)

After consideration this should not use the gnu units program, this would be over complicated and perhaps not support what we need anyway.

LibIsis takes a simpler approach where it supports a limited number of units http://web2.isis.rl.ac.uk/libisiswiki/units%20code.

We need to understand how LibISIS performs it's units onversion, and implement sonething similar as an algorithm (or collection of algorithms). Talk to Dickon to get an idea of how LibISIS does it.

We would need to store a unit for the Y and X values. We will also need to store a bool for each to indicate if the data is a distribution.

The units string should be as standard as possible use the settings in UDUnits (google it) as examples(i.e. no pluralisation of the unit). However do not include the use of UDUnits itself.

After speaking to Freddie it appears that for the conversions we can probably get away with using a common unit as a middle man in all conversions. Eg. to convert from wavelength to energy you first convert wavelength to TOF and the TOF to energy. this reduces the number of conversions you need from n*n to n+n.

Change History

comment:1 Changed 13 years ago by Nick Draper

  • Description modified (diff)

comment:2 Changed 13 years ago by Nick Draper

  • Description modified (diff)

comment:3 Changed 13 years ago by Russell Taylor

(In [806]) PhysicalConstants really wasn't in the right place. Re #94. (Also some other bits of tidying up.)

comment:4 Changed 13 years ago by Nick Draper

  • Milestone changed from Iteration 6 to Iteration 7

comment:5 Changed 13 years ago by Russell Taylor

(In [815]) First elements of a framework for units in workspaces. Only deals with histogram (not point) data initially and is essentially akin to the opengenie implementation. This first commit just replicated the TOFtoWavelength that's now been removed. Lots more units still to be added... Re #94.

comment:6 Changed 13 years ago by Russell Taylor

(In [816]) Windows stuff. Re #94.

comment:7 Changed 13 years ago by Nick Draper

(In [817]) re #94 Adjusted vcproj files for file inclusion/exclusion

comment:8 Changed 13 years ago by Russell Taylor

(In [818]) Added Workspace unit tests. Re #94.

comment:9 Changed 13 years ago by Russell Taylor

(In [819]) VS picks up the stupid mistakes that gcc let me get away with.... Re #94.

comment:10 Changed 13 years ago by Russell Taylor

(In [820]) Added unit tests for the Unit class (so called UnitTest). Modified SimpleRebin to use Workspace's new distribution flag. Re #94.

comment:11 Changed 13 years ago by Laurent Chapon

(In [821]) re #94 Add getAzimuth method in Component class. Return the spherical azimuth angle between two components assuming implicitely that z is the azimuth

comment:12 Changed 13 years ago by Russell Taylor

(In [830]) More unit conversions implemented. Re #94.

comment:13 Changed 13 years ago by Russell Taylor

(In [835]) Added more efficient implementation for when one unit can be converted to another by a simple factor (i.e. without geometry information). Re #94.

comment:14 Changed 13 years ago by Russell Taylor

(In [836]) Moved 1 '}'. Re #94.

comment:15 Changed 13 years ago by Russell Taylor

(In [837]) Linux build server appears to be less precise than other places... Re #94.

comment:16 Changed 12 years ago by Russell Taylor

(In [865]) Fix doxygen warnings. Re #94.

comment:17 Changed 12 years ago by Nick Draper

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

comment:18 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 942

Note: See TracTickets for help on using tickets.