[Dachs-support] unknown data type 'L' in FITS booster
Markus Demleitner
msdemlei at ari.uni-heidelberg.de
Thu Nov 17 08:26:23 CET 2016
Carlos,
On Wed, Nov 16, 2016 at 05:56:12PM -0200, carlosadean at linea.gov.br wrote:
> But I have new small issue. I'm trying to generate the booster but
> the fits has a unknown data type 'L' in the header, it's a boolean
> value.
>
>
> [gavo at devel2 inputs [master]]$ gavo mkboost sample/s.rd#booster > sample/res/boosterfunc.c
> *** Error: FITS type 'L' of SNX3 not handled by gavo mkboost; add
> handling if you can.
Disclaimer: It's been a while since I touched that code, and I'm a
busy right now, so I'm not building a test data set and a test case.
I *believe* the following patch should do the trick (although it
wastes 15 bytes per value, storing a boolean in a short; on the plus
side, the resulting tables won't give headaches when accessed through
TAP):
Index: gavo/grammars/directgrammar.py
===================================================================
--- gavo/grammars/directgrammar.py (revision 5394)
+++ gavo/grammars/directgrammar.py (working copy)
@@ -546,6 +546,7 @@
"J": ("TLONG", "long"),
"K": ("TLONGLONG", "long long"),
"E": ("TFLOAT", "float"),
+ "L": ("TLOGICAL", "short"),
"D": ("TDOUBLE", "double")}
makers = {
"bigint": "MAKE_BIGINT",
Would you try it? If it doesn't do the trick, could you send me a
little sample of this file (one row, or perhaps two, one with true,
one with false, will do)?
Thanks,
Markus
More information about the Dachs-support
mailing list