dkirkby / bossdata

Tools for accessing SDSS BOSS data
MIT License
1 stars 3 forks source link

Some column names return 'invalid' for bossquery #40

Closed belaa closed 9 years ago

belaa commented 9 years ago

The --what option for bossquery does not return data for certain column names (i.e. thing_id, skyflux, id), giving an error 'Invalid column name'. I'm wondering if these cannot be accessed from the 'lite' version or if only certain column names are allowed

dcunning11235 commented 9 years ago

You are correct, only a subset of columns are available in the 'lite' version. A quick way to check which columns, without digging out the file spec docs, is to do something like:

bossquery --what "*" --where "PLATE=3586 and MJD=55181 and FIBER=1" --print --save lite_example_row.dat

Note the --what "*" This returns all columns (this is SQL peeking through again: * means "all columns" in a SQL query.)

The columns you'll find are: PLATE MJD FIBER CLASS SUBCLASS Z Z_ERR ZWARNING PLUG_RA PLUG_DEC PRIMARY CHUNK PLATESN2 DEREDSN2 OBJTYPE BOSS1 ANCILLARY1 EBOSS0 TILEID OBJC_TYPE MODELFLUX_0 MODELFLUX_1 MODELFLUX_2 MODELFLUX_3 MODELFLUX_4

Probably worth adding this to the docs.

dkirkby commented 9 years ago

For the record, the reason the subset of columns available in the "lite" file isn't written down somewhere in the bossdata docs is that they should really be documented as part of the official BOSS datamodel pages and we should link to that. I already filed an issue on the BOSS datamodel package to create the page we would link to, but it doesn't exist yet. In the meantime, thanks Bela for asking the question and Dan for answering it.