[QUANTITY] Why quantities sometimes have errors
David Berry
dsb at ast.man.ac.uk
Mon Nov 17 10:57:52 PST 2003
Doug,
Agreed. Associations are much easier to handle and extend than
inheritance structures. The only thing to be careful of is that the
components which are associated together need to be carefully designed to
be orthogonal - for instance, so that all the WCS functionality is in one
component, and all the error functionality is in another, and so on. It is
possible to get into a situation where future developments of one
component are made difficult because of restrictions imposed by other
components.
David
> Another thing to keep in mind here is that everything does not have to
> be done via some formal class structure. A rigid class structure leads
> to an attempt to define an all-encompassing global data model which will
> never work at the scale of the VO.
>
> An alternative to a class or subclass is association. Association means a
> "has a" relationship rather than "is a". An "Image" "has a" data array
> and it "has a" WCS which we associate at a higher level to model Image.
> A measurement "has a" value and it "has an" associated error. A measurement
> value "is a" Quantity.
>
> Both subclassing and association are needed to model data. Subclassing
> binds classes very tightly together. Association is much more flexible
> as the relationships do not have to be predefined and can be many-to-one.
> This reduces complexity and encourages reuse.
>
> In general we want to rely upon subclassing mostly at the lower levels,
> preferring association at the higher levels where we attempt to model
> entire complex datasets and reuse components.
----------------------------------------------------------------------
Dr David S. Berry (dsb at ast.man.ac.uk)
STARLINK project | Centre for Astrophysics
(http://www.starlink.ac.uk/) | University of Central Lancashire
Rutherford Appleton Laboratory | PRESTON
DIDCOT | United Kingdom
United Kingdom | PR1 2HE
OX11 0QX
More information about the dm
mailing list