← Back to team overview

python-quantities-developers team mailing list archive

Re: implementation of units with absolute zeros

 

On Thu, Jan 8, 2009 at 4:59 AM, John Salvatier <jsalvati@xxxxxxxxxxxxxxxx>wrote:

> Have you decided exactly how you want to implement units that have absolute
> zeros? At some point you wanted to have two different units for intervals
> and absolutes (e.g. temperature differences vs absolute temperatures). I
> assume that these will interact specially so most absolute units would have
> an associated interval unit. Specifically:
>
> 1) absolute - absolute = interval
> 2) absolute + absolute  (not allowed)
> 3) absolute +- interval = absolute
> 4) interval + interval = interval
>
> I ask about this because some of this comes up in implementing some of the
> numpy member functions. I have implemented most of the numpy member
> functions, and I am writing tests for them, but I think I will have to go
> back and deal with interval vs. absolute units a bit.
>

I'm inclined to not bother with absolute temperatures, at least for now.
Like Anne Archibald commented in the original discussion at scipy-dev:

I don't think lat/long, or even Fahrenheit/Celsius are a good idea.
> For one thing, it's a short step from there to general coordinate
> system conversion (what about UTM? ECEF? do you want great circle
> distances or direct line?), and then to conversion of tensor
> quantities between coordinate systems, and down that road lies
> madness. I think to be a tractable package this needs well-defined
> boundaries, and the place I'd put those boundaries is at
> multiplicative units. That's enough to be genuinely useful, and it's
> small enough to be doable.
>

References