[Dachs-support] unknown data type 'L' in FITS booster

carlosadean at linea.gov.br carlosadean at linea.gov.br
Thu Nov 17 13:25:56 CET 2016


Hello Markus,


> > 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)?

After applying the patch I could create the booster file, however in the database the column 'L' is empty. 

I'm sending you the sample in a separated email.

[gavo at devel2 inputs [master]]$ gavo --hints imp -v sample/s.rd
Making data import_table
00006533 records done.
Rows affected: 0



Thank you for the help.


--
Carlos Adean
IT Team
linea.gov.br
skype: carlosadean



More information about the Dachs-support mailing list