SED Data Model: Questions and Comments

David Berry dsb at ast.man.ac.uk
Wed Feb 16 09:56:59 PST 2005


Pat,

> I think the big win for dimensional analysis is that when you write code to
> handle unit strings, you essentially parse a bunch of ugly stuff using lookup
> tables and trun it into a form you can work with  - the dimensional analysis
> exponents and scale factors - then you use that to convetrt values to your
> preferred unit system.

I'm not sure it's a good principle to duplicate information in different
forms within a DM just to make it easier to write an interpreter. For
instance, FITS-WCS paper II expressely says this shouldn't be done in
the context of FITS WCS headers. The unit string has all the information
you need, in a compact human readable form. Seems good to me.

> So why bother having everyone write that parsing code, which everyone knows
> seems simple enough when you have m <-> ft and maybe sec <-> days but quickly
> degenerates into something very fragile that you keep tacking extra bits
> onto, keep adding rules to your lookup tables, etc.

It shouldn't be necessary or desirable for everyone to write their own
code, since code sharing is presumably what we are about.

> As for converting existing data, it isn't all that bad because only the data
> provider has to understand their own small set of unit strings they used.
> That could be done without a general purpose parsing toolkit/code...

What ever arguments exist apply equally to both schemes. Either you
modify your existing data to correct non-standard unit strings, or you
modify your data to include a dimensional analysis. Except of course
interpreters could be written to be tolerant of the most common
non-standard forms of unit string, meaning that data providers would only
need to correct non-standard unit strings if they were *really* whacky or
ambiguous.

> So, I would go for this in principle, despite having not read the paper :-)

I must confess, I am not completely sure how it works. For instance,
if you had two unit strings "Jy" and "Jy/sr" which have the same
dimensionals (since solid angle is dimensionless), how does the
dimensional analysis approach realise that they are not the same unit?
Pedro?

David



More information about the dm mailing list