# [QUANTITY] Review of Quantity suggestions

DIDELON Pierre pdidelon at cea.fr
Thu Jul 24 02:27:14 PDT 2003

```Hi Patrick,

First of all, a detail; it seems that in all the properties your are
using measurement instead quantity because they contain
value, units and error.

I think that we are dealing here with three entities
data (structure and representation = dimension and type),
units and errors. All the game depends on the way you combine
them and wich ones are your basic stone used after
It can be seen as a factorisation in the basic stone of the informations
you don't want to repeat everywhere.

I feel that it would be very hard to associate in once the three entities.

For me the basic thing is data which combined structure and representation,
and factorize units ( in fig 10 and 11 of JCM/SL doc. would be a polymorphic
specialisation of data type as well as structure, i.e. naxis & axislength).
The composite  pattern can be used for that and even used to introduce
composite data.

Error is then something using data. it is a complex object using polymorphism
(like in fig  12) to allow several representation, associated to a Data object
to store the related value. It can use then a scalar value giving the sigma;
value and units (related to whatever data scalar or vector... in the vector case
it gives an error factorisation), or a vector value giving min and max,
or a matrix giving min and max for a vector .....

Then all the complexity is in the quantity treatment which could combined,
data and errors, even multiple ones.
For example position data can be x,y , RA,DEC and the related errors
could be DeltaRa,DeltaDec but also EllipseMajorAxis,EllipsMinorAxis and
EllipseOrientation.

But even with this very simple thing we got an horribly complicated
schema... Is this really what we want? or do we need only
scalar data value associated with scalar error for very simple things
like coneSearch....

sincerely yours,
--
Pierre
-------------------------------------------------------------------------------
DIDELON                               e-mail : pdidelon_at_cea.fr
CEA SACLAY - Service d'Astrophysique  W3 : http://www-dapnia.cea.fr/Sap/
91191 Gif-Sur-Yvette Cedex            Phone : 33 (0)1 69 08 58 89
-------------------------------------------------------------------------------

```