From the command prompt, the syntax is:
l
sd-admin --db /a41217d5/morganson/LSD/ create table --comp blosc
--comp-level 5 --primary-key obj_id --spatial-keys ra,dec blah
obj_id:u8 ra:f8 dec:f8 median:5f8 err:5f8 nmag_ok:5i2
'lc_mags:(5,10)f4'
The last field 'lc_mags:(5,10)f4' is a 2D array.
In python, you do something like this:
out = colgroup.ColGroup(
dtype=[
('obj_id', 'u8'),
('ra', 'f8'), ('dec', 'f8'),
('median_ap', '5f4'), ('q25_ap', '5f4'),
('q75_ap', '5f4'),
('lc_mag', '(5,10)f4'), ('lc_err',
'(5,10)f4'), ('lc_mjd', '(5,10)f8'),
],
size=len(objs)
)
'f8' is just a float
'5f4' is an array of 5 floats
'(5,10)f4' is a 2d array
You then can fill up that array how you like and the write out with
something like:
result = qwriter.write(qresult.static_cell, out)
That python stuff will only make sense if you have something like that
already written.
-E
--
Dr. Eric Morganson
Max Planck Institut für Astronomie
Königstuhl 17
D-69117 Heidelberg
Germany