[QUANTITY] Data Model for Quantity v0.5 - inheritance vs aggregation

Martin Hill mchill at dial.pipex.com
Mon May 10 09:46:47 PDT 2004


David Berry wrote:

> Martin wrote:
>>Thinking about it more, Mappings should definitely not be part of the
>>Quantity; Mappings (if I have them right) define how to convert values
>>between one Frame and another, and this depends upon what the Quantity's
>>user wants, not upon what the Quantity has.  The Frame should define
>>enough about the source & target values to know which Mapping to use...
> 
> 
> Not sure what you mean by "be part of" - Mappings are defined totally
> separately from Q, but are aggregated as components within the Q model.
> 
> If a 2D image Q wants to express the relationship between pixel coords and
> (RA,Dec) (for instance), then the Q will need to contain a Mapping
> describing how to transform the pixel coords, and will also need to
> contain a Frame saying what this transformation gives you (in this case,
> the Frame will identify the Mapping outputs as (RA,Dec)). If the user
> wants to use (l,b) coords instead of (RA,Dec) coords, then the CoreQ
> which contains the Frame and Mapping will need to be know how to convert
> "what we have got" (RA,Dec) into "what we want" (l,b). This is do-able.

My view on this is that a Quantity might describe some pixel values, 
within a Frame that describes the pixel coordinates.  The process of 
dealing with relationships 'between' things then belongs to whatever is 
using the Quantity; ie, you 'apply' a Mapping depending on what you want 
to do, rather than relying on the Quantity having that Mapping.

So for example if you have a Quantity that gives some pixel values in a 
2D image described by the Frame, then that can be passed around from 
service to service without any extra mappings.  If one service wants to 
read in (Ra, Dec) coords, it applies that Mapping, that knows how to 
deal with this particular Frame.  If a new service comes along with an 
entirely new coordinate system, it has its own Mappings to deal with this.

However having skimmed Brian's "Heaviness of Q" (good title for a band I 
should think) I might have entirely the wrong end of the stick on 
Quantity...

> 
> David
> 


-- 
Martin Hill
www.mchill.net
07901 55 24 66



More information about the dm mailing list