Spectral DM document update

Paul Harrison pharriso at eso.org
Mon Oct 9 08:37:53 PDT 2006



On 09.10.2006, at 16:53, Doug Tody wrote:

> On Mon, 9 Oct 2006, Paul Harrison wrote:
>> On 09.10.2006, at 15:51, Doug Tody wrote:
>>> This approach would make sense, as not only is it more efficient
>>> for large spectral arrays of several thousand points, it is more
>>> consistent with the other serializations, which are also array- 
>>> based.
>>> Data handling and transformations between formats would thus be
>>> more straightforward.
>> I would argue that the whole point of the "pure XML" serialization  
>> is that it is verbose - XML is intended to be self-describing and  
>> naturally hierarchical, so expressing this serialization in a form  
>> that is as close to the DM as possible would seem sensible - i.e.  
>> <Points> with all their associated children rather than <Flux>  
>> with an array of points <Error> with an array etc. If you want to  
>> be storage efficient then just use the FITS serialization....
>
> This is the usual approach with XML, and in general I agree, but in
> this case we are talking about bulk data arrays which can be thousands
> of points in length.  Ignoring for the moment efficiency concerns, it
> is just a whole lot easier to deal with them as a single vector-valued
> data element.  Plus as I say, this is more consistent with the other
> serializations, facilitiating conversions, and with the likely use
> of this data in applications code - which will probably also be
> array based (all current spectral applications I am familiar with
> are array based).
>
> 	- Doug

Still not convinced this is an argument for making the XML  
serialization more vector-like, its all depends on what your idea of  
an array is - you could still have all the abcissae,ordinate,errors  
etc.  for a single spectral point localized in memory and then a  
whole spectrum

* in a modern OO language would be an array of "point objects"
* in a C like language it could be an array of structs
* even in FORTRAN it could be one a big array, just with a index  
increment of > 1 to obtain the next element of the same physical  
meaning e.g. Flux (assuming that all the values were stored as the  
same basic data type)


Paul Harrison
ESO Garching
www.eso.org



More information about the dm mailing list