Repository navigation
FITS unit format fixes - #3993
Conversation
- Accept power-of-10 scales in FITS units (and only power-of-10 scales) - Accept * as a separator between the scale factor and the units
|
I feel like this should be a 1.1 fix, since it could cause existing code to break, maybe? What do you think? |
|
Actually, looking back at the original bug report (I didn't see that before) it's a little more clear to me now what's going on here--that units that should have been accepted aren't. |
There was a problem hiding this comment.
This not not conformant with the standard though. The intent is unambiguous so I don't mind accepting it but this could be pointing out (the standard here is a little ambiguous too, but if you dig in it seems to imply that this is not allowed).
There was a problem hiding this comment.
Yeah -- I agree. I don't think this is explicitly in the standard, though if you read only the operator table, you might think that it was. As it's unambiguous, I'm applying the "be liberal in what you accept" rule. But I'll add a comment to this effect.
|
Yeah -- I'm waffling about whether this is 1.1 or 1.0.4. It does actually break units that used to be accepted, i.e.: master: This PR: So maybe this should be 1.1 after all? |
|
Okay, let's do 1.1 then. |
|
Or could still accept the arbitrary scale with a deprecation warning? |
|
As this is all so closely packed, I think it's easiest to just make this 1.1. |
|
Okay, fine by me. |
|
@saimn: Can you confirm this works for you? Once that's done, I think this is good to go. |
|
@mdboom - looks good to me! This means |
|
Yes, percent can now be written: |
|
@mdboom I have tested several formats, |
|
And as |
|
Yeah -- the exponent without the parentheses was just broken by accident. A fix and additional tests have been added here. |
|
Looks like this is good to go. @saimn , do want to do any more testing or are you satisfied by the changes? |
|
Looks good to me, thanks for the quick iterations on this Michael. |
Fixes #3991.