Page 1 of 1

File formats?

Posted: 25.06.2005, 16:36
by ajtribick
Sorry if I'm being stupid here, but I haven't been able to find out any information about the version 1.4.0 file formats, so I can use the data files from external programs. The files I'm interested in are the star database (stars.dat), the HD cross reference (hdxindex.dat) and SAO cross reference (saoxindex.dat) files. Any help would be much appreciated, thanks.

Posted: 29.06.2005, 11:19
by ajtribick
Ok, I managed to do some investigation of the new formats, the relevant information was in stars.cpp, stars.h, starclass.cpp, starclass.h

**************************

The format of hdxindex.dat and saoxindex.dat are very similar.

8 bytes "CELINDEX"
2 byte integer: version number (0x0100)

followed by records of the form

4 byte integer: HD/SAO catalogue number
4 byte integer: HIP catalogue number

**************************

The new stars.dat has the following format:

8 bytes "CELSTARS"
2 byte integer: version number (0x0100)
4 byte integer: number of stars in database

followed by records of the form

4 byte integer: HIP catalogue number
4 byte float: x-coordinate
4 byte float: y-coordinate
4 byte float: z-coordinate
2 byte integer: absolute magnitude * 256
2 byte integer: spectral class

**************************

The spectral class can be broken down as follows:

bits 0-3: luminosity class

0 - Ia-0
1 - Ia
2 - Ib
3 - II
4 - III
5 - IV
6 - V
7 - VI
8 - unknown

(this field is irrelevant for white dwarfs, neutron stars and black holes)

bits 4-7: subclass

0 - 0
1 - 1
2 - 2
3 - 3
4 - 4
5 - 5
6 - 6
7 - 7
8 - 8
9 - 9
10 - unknown

(this field is irrelevant for neutron stars and black holes)

bits 8-11: spectral class

for normal stars:

0 - O
1 - B
2 - A
3 - F
4 - G
5 - K
6 - M
7 - R
8 - S
9 - N
10 - WC
11 - WN
12 - unknown
13 - L
14 - T
15 - C

for white dwarfs:

0 - DA
1 - DB
2 - DC
3 - DO
4 - DQ
5 - DZ
6 - D (subtype unknown)
7 - DX

(this field is irrelevant for neutron stars and black holes)

bits 12-15: star type

0 - normal star
1 - white dwarf
2 - neutron star
3 - black hole

xyz units

Posted: 07.10.2006, 23:46
by bidmaron
Does anyone know what units the xyz coordinates in stars.dat are in?