Star Catalogue Format

From Stellarium Wiki
(Difference between revisions)
Jump to: navigation, search
(Zone Records)
 
(20 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{ActualVersion|0.10.6}}
+
{{ActualVersion|0.12.4}}
 
This document describes how Stellarium records it's star catalogues, and the related file formats.
 
This document describes how Stellarium records it's star catalogues, and the related file formats.
  
Line 18: Line 18:
  
 
The main catalogue data is split into several files:
 
The main catalogue data is split into several files:
* stars_0_0v0_1.cat
+
* stars_0_0v0_3.cat
* stars_1_0v0_1.cat
+
* stars_1_0v0_3.cat
* stars_2_0v0_1.cat
+
* stars_2_0v0_3.cat
* stars_3_0v0_0.cat
+
* stars_3_0v0_2.cat
 
* stars_4_1v0_0.cat
 
* stars_4_1v0_0.cat
 
* stars_5_1v0_0.cat
 
* stars_5_1v0_0.cat
Line 31: Line 31:
 
* stars_hip_cids_0v0_0.cat
 
* stars_hip_cids_0v0_0.cat
 
* stars_hip_sp_0v0_0.cat
 
* stars_hip_sp_0v0_0.cat
 +
* gcvs_hip_part.dat
 
* stars.ini
 
* stars.ini
 
* name.fab
 
* name.fab
Line 36: Line 37:
 
When Stellarium starts, it reads the stars.ini file, from which it determines the names of the other files, which it then loads.
 
When Stellarium starts, it reads the stars.ini file, from which it determines the names of the other files, which it then loads.
  
The '''stars_hip_cids_0v0_0.cat and stars_hip_sp_0v0_0.cat''' files contain reference data for the main catalogue files.
+
The '''stars_hip_cids_0v0_0.cat and stars_hip_sp_0v0_0.cat''' files contain reference data for the main catalogue files. The '''gcvs_hip_part.dat''' file contain data about variables stars (see section [[Variable Stars]]) which reference for the main catalogue files too.
  
 
A given catalogue file models stars for one and only one level (i.e. for a fixed number of zones), which is recorded in the header of the file. Individual star records do not contain full positional coordinates, instead they contain coordinates relative to the central position of the zone they occupy. Thus, when parsing star catalogues, it is necessary to know about the zone model to be able to extract positional data.
 
A given catalogue file models stars for one and only one level (i.e. for a fixed number of zones), which is recorded in the header of the file. Individual star records do not contain full positional coordinates, instead they contain coordinates relative to the central position of the zone they occupy. Thus, when parsing star catalogues, it is necessary to know about the zone model to be able to extract positional data.
{| class="standard"
+
{| class="guidetable"
 
  |+ Stellarium's star catalogue files
 
  |+ Stellarium's star catalogue files
 
  | ''File''
 
  | ''File''
Line 46: Line 47:
 
  | ''Geodesic Level''
 
  | ''Geodesic Level''
 
  | ''#Records''
 
  | ''#Records''
  | ''Notes''
+
  !class="rbn"| ''Notes''
  |-
+
  |-  
  | stars_0_0v0_1.cat
+
  |stars_0_0v0_3.cat
  | 0
+
  |0
  | 28 bytes
+
  |28 bytes
  | 0
+
  |0
  | 5,013
+
  |5,013
  | Hipparcos
+
  |class="rbn"|Hipparcos
  |-
+
  |-  
  | stars_1_0v0_1.cat
+
  |stars_1_0v0_3.cat
  | 0
+
  |0
  | 28 bytes
+
  |28 bytes
  | 1
+
  |1
  | 21,999
+
  |21,999
  | Hipparcos
+
  |class="rbn"|Hipparcos
  |-
+
  |-  
  | stars_2_0v0_1.cat
+
  |stars_2_0v0_3.cat
  | 0
+
  |0
  | 28 bytes
+
  |28 bytes
  | 2
+
  |2
  | 151,516
+
  |151,516
  | Hipparcos
+
  |class="rbn"|Hipparcos
  |-
+
  |-  
  | stars_3_1v0_0.cat
+
  |stars_3_1v0_2.cat
  | 1
+
  |1
  | 10 bytes
+
  |10 bytes
  | 3
+
  |3
  | 434,064
+
  |434,064
  | Tycho
+
  |class="rbn"|Tycho
  |-
+
  |-  
  | stars_4_1v0_0.cat
+
  |stars_4_1v0_0.cat
  | 1
+
  |1
  | 10 bytes
+
  |10 bytes
  | 4
+
  |4
  | 1,725,497
+
  |1,725,497
  | Tycho
+
  |class="rbn"|Tycho
  |-
+
  |-  
  | stars_5_2v0_0.cat  
+
  |stars_5_2v0_0.cat  
  | 2
+
  |2
  | 8 bytes
+
  |8 bytes
  | 5
+
  |5
  | 7,669,011
+
  |7,669,011
  | NOMAD
+
  |class="rbn"|NOMAD
  |-
+
  |-  
  | stars_6_2v0_0.cat
+
  |stars_6_2v0_0.cat
  | 2
+
  |2
  | 8 bytes
+
  |8 bytes
  | 6
+
  |6
  | 26,615,233
+
  |26,615,233
  | NOMAD
+
  |class="rbn"|NOMAD
  |-
+
  |-  
  | stars_7_2v0_0.cat
+
  |stars_7_2v0_0.cat
  | 2
+
  |2
  | 8 bytes
+
  |8 bytes
  | 7
+
  |7
  | 57,826,266
+
  |57,826,266
  | NOMAD
+
  |class="rbn"|NOMAD
  |-
+
  |-  
  | stars_8_2v0_0.cat
+
  |stars_8_2v0_0.cat
  | 2
+
  |2
  | 8 bytes
+
  |8 bytes
  | 7
+
  |7
  | 116,923,084
+
  |116,923,084
  | NOMAD
+
  |class="rbn"|NOMAD
 
  |}
 
  |}
 
For a given catalogue file, there may be one of three formats for the actual star data. The variation comes from the source of the data - the larger catalogues of fainter stars providing less data per star than the brighter star catalogues. See tables ''Stellarium's star catalogue'' and for details.
 
For a given catalogue file, there may be one of three formats for the actual star data. The variation comes from the source of the data - the larger catalogues of fainter stars providing less data per star than the brighter star catalogues. See tables ''Stellarium's star catalogue'' and for details.
Line 115: Line 116:
 
===File Sections===
 
===File Sections===
 
The catalogue files are split into three main sections as described in table ''File sections''.
 
The catalogue files are split into three main sections as described in table ''File sections''.
{| class="standard"
+
{| class="guidetable"
 
  |+ File sections
 
  |+ File sections
 
  | ''Section''
 
  | ''Section''
 
  | ''Offset''
 
  | ''Offset''
  | ''Description''
+
  |class="rbn"| ''Description''
 
  |-
 
  |-
 
  | File Header Record
 
  | File Header Record
 
  | 0
 
  | 0
  | Contains magic number, geodesic subdivision level, and magnitude range
+
  |class="rbn"| Contains magic number, geodesic subdivision level, and magnitude range
 
  |-
 
  |-
 
  | Zone Records
 
  | Zone Records
 
  | 32
 
  | 32
  | A list of how many records there are for each zone. The length of the zones section depends on the level value from the header
+
  |class="rbn"| A list of how many records there are for each zone. The length of the zones section depends on the level value from the header
 
  |-
 
  |-
 
  | Star Data Records
 
  | Star Data Records
 
  | 32+4''n''
 
  | 32+4''n''
  | This section of the file contains fixed-size star records, as described below. Records do not contain zone information, which must be inferred by counting how many records have been read so far and switching zones when enough have been read to fill the number of stars for the zone, as specified in the zones section above. The value of ''n'' used in the offset description is the number of zones, as described above.
+
  |class="rbn"| This section of the file contains fixed-size star records, as described below. Records do not contain zone information, which must be inferred by counting how many records have been read so far and switching zones when enough have been read to fill the number of stars for the zone, as specified in the zones section above. The value of ''n'' used in the offset description is the number of zones, as described above.
 
  |}
 
  |}
 +
 
===Record Types===
 
===Record Types===
 
====File Header Record====
 
====File Header Record====
 
The File Header Record describes file-wide settings. It also contains a magic number which servers as a file type identifier. See table ''Header Record''.
 
The File Header Record describes file-wide settings. It also contains a magic number which servers as a file type identifier. See table ''Header Record''.
{| class="standard"
+
{| class="guidetable"
 
  |+ Header Record
 
  |+ Header Record
 
  | ''Name''
 
  | ''Name''
Line 142: Line 144:
 
  | ''Type''
 
  | ''Type''
 
  | ''Size''
 
  | ''Size''
  | ''Description''
+
  |class="rbn"| ''Description''
 
  |-
 
  |-
 
  | Magic
 
  | Magic
Line 148: Line 150:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | The magic number which identifies the file as a star catalogue. 0xde0955a3
+
  |class="rbn"| The magic number which identifies the file as a star catalogue. 0xde0955a3
 
  |-
 
  |-
 
  | Data Type
 
  | Data Type
Line 154: Line 156:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | This describes the type of the file, which defines the size and structure of the Star Data record for the file.  
+
  |class="rbn"| This describes the type of the file, which defines the size and structure of the Star Data record for the file.  
 
  |-
 
  |-
 
  | Major Version
 
  | Major Version
Line 160: Line 162:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | The file format major version number
+
  |class="rbn"| The file format major version number
 
  |-
 
  |-
 
  | Minor Version
 
  | Minor Version
Line 166: Line 168:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | The file format minor version number
+
  |class="rbn"| The file format minor version number
 
  |-
 
  |-
 
  | Level
 
  | Level
Line 172: Line 174:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | Sets the level of sub-division of the geodesic sphere used to create the zones. 0 means an icosahedron (20 sizes), subsequent levels of sub-division lead to numbers of zones as described in section [sub:Zones]
+
  |class="rbn"| Sets the level of sub-division of the geodesic sphere used to create the zones. 0 means an icosahedron (20 sizes), subsequent levels of sub-division lead to numbers of zones as described in section [[Star_Catalogue#Zones|Zones]]
 
  |-
 
  |-
 
  | Magnitude Minimum
 
  | Magnitude Minimum
Line 178: Line 180:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | The low bound of the magnitude scale for values in this file. Note that this is still an integer in Stellarium's own internal representation
+
  |class="rbn"| The low bound of the magnitude scale for values in this file. Note that this is still an integer in Stellarium's own internal representation
 
  |-
 
  |-
 
  | Magnitude Range
 
  | Magnitude Range
Line 184: Line 186:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | The range of magnitudes expressed in this file
+
  |class="rbn"| The range of magnitudes expressed in this file
 
  |-
 
  |-
 
  | Magnitude Steps
 
  | Magnitude Steps
Line 190: Line 192:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | The number of steps used to describes values in the range
+
  |class="rbn"| The number of steps used to describes values in the range
 
  |}
 
  |}
 +
 
====Zone Records====
 
====Zone Records====
 
The ''Zone Records'' section of the file lists the number of star records there are per zone. The number of zones is determined from the level value in the File Header Record, as described in section [[Star_Catalogue#Zones|Zones]]. The Zones section is simply a list of integer values which describe the number of stars for each zone. The total length of the Zones section depends on the number of zones. See table ''Zones section''.
 
The ''Zone Records'' section of the file lists the number of star records there are per zone. The number of zones is determined from the level value in the File Header Record, as described in section [[Star_Catalogue#Zones|Zones]]. The Zones section is simply a list of integer values which describe the number of stars for each zone. The total length of the Zones section depends on the number of zones. See table ''Zones section''.
{| class="standard"
+
{| class="guidetable"
 
  |+ Zones section
 
  |+ Zones section
 
  | ''Name''
 
  | ''Name''
Line 200: Line 203:
 
  | ''Type''
 
  | ''Type''
 
  | ''Size''
 
  | ''Size''
  | ''Description''
+
  |class="rbn"| ''Description''
 
  |-
 
  |-
 
  | num stars in zone 0
 
  | num stars in zone 0
Line 206: Line 209:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | The number of records in this file which are in zone 0
+
  |class="rbn"| The number of records in this file which are in zone 0
 
  |-
 
  |-
 
  | num stars in zone 1
 
  | num stars in zone 1
Line 212: Line 215:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | The number of records is this file which are in zone 1
+
  |class="rbn"| The number of records is this file which are in zone 1
 
  |-
 
  |-
 
  | ...
 
  | ...
Line 218: Line 221:
 
  |  
 
  |  
 
  |   
 
  |   
  |   
+
  |class="rbn"|   
 
  |-
 
  |-
 
  | num stars in zone ''n''
 
  | num stars in zone ''n''
Line 224: Line 227:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | The number of records is this file which are in zone ''n''
+
  |class="rbn"| The number of records is this file which are in zone ''n''
 
  |}
 
  |}
  
Line 236: Line 239:
 
It should be noted that although the positional data loses accuracy as one progresses though the Star Record Types, this is compensated for by the face that the number of zones is much higher for the files where the smaller precision position fields are used, so the actual resolution on the sky isn't significantly worse for the type 1 and 2 records in practice.
 
It should be noted that although the positional data loses accuracy as one progresses though the Star Record Types, this is compensated for by the face that the number of zones is much higher for the files where the smaller precision position fields are used, so the actual resolution on the sky isn't significantly worse for the type 1 and 2 records in practice.
  
{| class="standard"
+
{| class="guidetable"
 
  |+ Star Data Record Type 0
 
  |+ Star Data Record Type 0
 
  | ''Name''
 
  | ''Name''
Line 242: Line 245:
 
  | ''Type''
 
  | ''Type''
 
  | ''Size''
 
  | ''Size''
  | ''Description''
+
  |class="rbn"| ''Description''
 
  |-
 
  |-
 
  | hip
 
  | hip
Line 248: Line 251:
 
  | int
 
  | int
 
  | 3
 
  | 3
  | Hipparcos catalogue number
+
  |class="rbn"| Hipparcos catalogue number
 
  |-
 
  |-
 
  | component_ids
 
  | component_ids
Line 254: Line 257:
 
  | unsigned char
 
  | unsigned char
 
  | 1
 
  | 1
  | This is an index to an array of catalogue number suffixes. The list is read from the '''stars_hip_component_ids.cat''' file. The value of this field turns out to be the line number in the file - 1
+
  |class="rbn"| This is an index to an array of catalogue number suffixes. The list is read from the '''stars_hip_component_ids.cat''' file. The value of this field turns out to be the line number in the file - 1
 
  |-
 
  |-
 
  | x0
 
  | x0
Line 260: Line 263:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | This is the position of the star relative to the central point in the star's zone, in axis 1
+
  |class="rbn"| This is the position of the star relative to the central point in the star's zone, in axis 1
 
  |-
 
  |-
 
  | x1
 
  | x1
Line 266: Line 269:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | This is the position of the star relative to the central point in the star's zone, in axis 2
+
  |class="rbn"| This is the position of the star relative to the central point in the star's zone, in axis 2
 
  |-
 
  |-
 
  | b_v
 
  | b_v
Line 272: Line 275:
 
  | unsigned char
 
  | unsigned char
 
  | 1
 
  | 1
  | This is the magnitudemagnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file
+
  |class="rbn"| This is the magnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file
 
  |-
 
  |-
 
  | mag
 
  | mag
Line 278: Line 281:
 
  | unsigned char
 
  | unsigned char
 
  | 1
 
  | 1
  | This is the magnitudemagnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file
+
  |class="rbn"| This is the magnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file
 
  |-
 
  |-
 
  | sp_int
 
  | sp_int
Line 284: Line 287:
 
  | unsigned short int
 
  | unsigned short int
 
  | 2
 
  | 2
  | This is the index in an array of spectral type descriptions which is taken from the file '''stars_hip_sp.cat''', the index corresponds to the line number in the file - 1
+
  |class="rbn"| This is the index in an array of spectral type descriptions which is taken from the file '''stars_hip_sp.cat''', the index corresponds to the line number in the file - 1
 
  |-
 
  |-
 
  | dx0
 
  | dx0
Line 290: Line 293:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | This is the proper motionproper motion of the star in axis 1
+
  |class="rbn"| This is the proper motion of the star in axis 1
 
  |-
 
  |-
 
  | dx1
 
  | dx1
Line 296: Line 299:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | This is the proper motion of the star in axis 2
+
  |class="rbn"| This is the proper motion of the star in axis 2
 
  |-
 
  |-
 
  | plx
 
  | plx
Line 302: Line 305:
 
  | int
 
  | int
 
  | 4
 
  | 4
  | This is the parallaxparallax of the star. To get the actual value, divide by 10000.
+
  |class="rbn"| This is the parallax of the star. To get the actual value, divide by 10000.
 
  |}
 
  |}
  
{| class="standard"
+
{| class="guidetable"
 
  |+ Star Data Record Type 1
 
  |+ Star Data Record Type 1
 
  | ''Name''
 
  | ''Name''
Line 311: Line 314:
 
  | ''Type''
 
  | ''Type''
 
  | ''Size''
 
  | ''Size''
  | ''Description''
+
  |class="rbn"| ''Description''
 
  |-
 
  |-
  | x0 || 0 || int || 20 bits || This is the position of the star relative to the central point in the star's zone, in axis 1
+
  | x0  
 +
| 0  
 +
| int  
 +
| 20 bits  
 +
|class="rbn"| This is the position of the star relative to the central point in the star's zone, in axis 1
 
  |-
 
  |-
  | x1 || 20 bits || int || 20 bits || This is the position of the star relative to the central point in the star's zone, in axis 2
+
  | x1  
 +
| 20 bits
 +
| int  
 +
| 20 bits  
 +
|class="rbn"| This is the position of the star relative to the central point in the star's zone, in axis 2
 
  |-
 
  |-
  | dx0 || 40 bits || int || 14 bits || This is the proper motionproper motion of the star in axis 1
+
  | dx0  
 +
| 40 bits  
 +
| int  
 +
| 14 bits
 +
|class="rbn"| This is the proper motion of the star in axis 1
 
  |-
 
  |-
  | dx1 || 54 bits || int || 14 bits || This is the proper motion of the star in axis 2
+
  | dx1  
 +
| 54 bits  
 +
| int  
 +
| 14 bits
 +
|class="rbn"| This is the proper motion of the star in axis 2
 
  |-  
 
  |-  
  | b_v || 68 bits || unsigned int || 7 bits || This is the magnitudemagnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file
+
  | b_v
 +
| 68 bits
 +
| unsigned int  
 +
| 7 bits  
 +
|class="rbn"| This is the magnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file
 
  |-
 
  |-
  | mag || 75 bits || unsigned int || 5 bits || This is the magnitudemagnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file
+
  | mag  
 +
| 75 bits  
 +
| unsigned int  
 +
| 5 bits  
 +
|class="rbn"| This is the magnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file
 
  |}
 
  |}
  
{| class="standard"
+
{| class="guidetable"
 
  |+ Star Data Record Type 2
 
  |+ Star Data Record Type 2
 
  | ''Name''
 
  | ''Name''
Line 332: Line 359:
 
  | ''Type''
 
  | ''Type''
 
  | ''Size''
 
  | ''Size''
  | ''Description''
+
  |class="rbn"| ''Description''
 
  |-
 
  |-
  | x0 || 0 || int || 18 bits || This is the position of the star relative to the central point in the star's zone, in axis 1
+
  | x0  
 +
| 0  
 +
| int
 +
| 18 bits  
 +
|class="rbn"| This is the position of the star relative to the central point in the star's zone, in axis 1
 
  |-
 
  |-
  | x1 || 18 bits || int || 18 bits || This is the position of the star relative to the central point in the star's zone, in axis 2
+
  | x1  
 +
| 18 bits  
 +
| int  
 +
| 18 bits  
 +
|class="rbn"| This is the position of the star relative to the central point in the star's zone, in axis 2
 
  |-
 
  |-
  | b_v || 36 bits || unsigned int || 7 bits || This is the magnitudemagnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file
+
  | b_v  
 +
| 36 bits  
 +
| unsigned int  
 +
| 7 bits  
 +
|class="rbn"| This is the magnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file
 
  |-  
 
  |-  
  | mag || 43 bits || unsigned int || 5 bits || This is the magnitudemagnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file
+
  | mag  
 +
| 43 bits  
 +
| unsigned int  
 +
| 5 bits  
 +
|class="rbn"| This is the magnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file
 
  |}
 
  |}
  
{{Template:LRCNavigation|TUI Commands|Stellarium User Guide|Creating a Personalised Landscape for Stellarium}}
+
{{Template:LRCNavigation|TUI Commands|Stellarium User Guide|Variable Stars}}
  
 
[[Category:Stellarium User Guide]]
 
[[Category:Stellarium User Guide]]

Latest revision as of 16:51, 4 October 2013

Information is actual for version 0.12.4

This document describes how Stellarium records it's star catalogues, and the related file formats.

Contents

[edit] Stellarium's Sky Model

[edit] Zones

The celestial sphere is split into zones, which correspond to the triangular faces of a geodesic sphere. The number of zones (faces) depends on the level of sub-division of this sphere. The lowest level, 0, is an icosahedron (20 faces), subsequent levels, L, of sub-division give the number of zones, n as:

n=20•4L

Stellarium uses levels 0 to 7 in the existing star catalogues. Star Data Records contain the position of a star as an offset from the central position of the zone in which that star is located, thus it is necessary to determine the vector from the observer to the centre of a zone, and add the star's offsets to find the absolute position of the star on the celestial sphere.

This position for a star is expressed as a 3-dimensional vector which points from the observer (at the centre of the geodesic sphere) to the position of the star as observed on the celestial sphere.

[edit] Star Catalogue File Format

[edit] General Description

Stellarium's star catalogue data is kept in the stars/default sub-directory of the Installation Directory and/or User Directory (see section Files and Directories).

The main catalogue data is split into several files:

  • stars_0_0v0_3.cat
  • stars_1_0v0_3.cat
  • stars_2_0v0_3.cat
  • stars_3_0v0_2.cat
  • stars_4_1v0_0.cat
  • stars_5_1v0_0.cat
  • stars_6_2v0_0.cat
  • stars_7_2v0_0.cat
  • stars_8_2v0_0.cat

There also exist some control and reference files:

  • stars_hip_cids_0v0_0.cat
  • stars_hip_sp_0v0_0.cat
  • gcvs_hip_part.dat
  • stars.ini
  • name.fab

When Stellarium starts, it reads the stars.ini file, from which it determines the names of the other files, which it then loads.

The stars_hip_cids_0v0_0.cat and stars_hip_sp_0v0_0.cat files contain reference data for the main catalogue files. The gcvs_hip_part.dat file contain data about variables stars (see section Variable Stars) which reference for the main catalogue files too.

A given catalogue file models stars for one and only one level (i.e. for a fixed number of zones), which is recorded in the header of the file. Individual star records do not contain full positional coordinates, instead they contain coordinates relative to the central position of the zone they occupy. Thus, when parsing star catalogues, it is necessary to know about the zone model to be able to extract positional data.

Stellarium's star catalogue files
File Data Type Data Record Size Geodesic Level #Records Notes
stars_0_0v0_3.cat 0 28 bytes 0 5,013 Hipparcos
stars_1_0v0_3.cat 0 28 bytes 1 21,999 Hipparcos
stars_2_0v0_3.cat 0 28 bytes 2 151,516 Hipparcos
stars_3_1v0_2.cat 1 10 bytes 3 434,064 Tycho
stars_4_1v0_0.cat 1 10 bytes 4 1,725,497 Tycho
stars_5_2v0_0.cat 2 8 bytes 5 7,669,011 NOMAD
stars_6_2v0_0.cat 2 8 bytes 6 26,615,233 NOMAD
stars_7_2v0_0.cat 2 8 bytes 7 57,826,266 NOMAD
stars_8_2v0_0.cat 2 8 bytes 7 116,923,084 NOMAD

For a given catalogue file, there may be one of three formats for the actual star data. The variation comes from the source of the data - the larger catalogues of fainter stars providing less data per star than the brighter star catalogues. See tables Stellarium's star catalogue and for details.

[edit] File Sections

The catalogue files are split into three main sections as described in table File sections.

File sections
Section Offset Description
File Header Record 0 Contains magic number, geodesic subdivision level, and magnitude range
Zone Records 32 A list of how many records there are for each zone. The length of the zones section depends on the level value from the header
Star Data Records 32+4n This section of the file contains fixed-size star records, as described below. Records do not contain zone information, which must be inferred by counting how many records have been read so far and switching zones when enough have been read to fill the number of stars for the zone, as specified in the zones section above. The value of n used in the offset description is the number of zones, as described above.

[edit] Record Types

[edit] File Header Record

The File Header Record describes file-wide settings. It also contains a magic number which servers as a file type identifier. See table Header Record.

Header Record
Name Offset Type Size Description
Magic 0 int 4 The magic number which identifies the file as a star catalogue. 0xde0955a3
Data Type 4 int 4 This describes the type of the file, which defines the size and structure of the Star Data record for the file.
Major Version 8 int 4 The file format major version number
Minor Version 12 int 4 The file format minor version number
Level 16 int 4 Sets the level of sub-division of the geodesic sphere used to create the zones. 0 means an icosahedron (20 sizes), subsequent levels of sub-division lead to numbers of zones as described in section Zones
Magnitude Minimum 20 int 4 The low bound of the magnitude scale for values in this file. Note that this is still an integer in Stellarium's own internal representation
Magnitude Range 24 int 4 The range of magnitudes expressed in this file
Magnitude Steps 28 int 4 The number of steps used to describes values in the range

[edit] Zone Records

The Zone Records section of the file lists the number of star records there are per zone. The number of zones is determined from the level value in the File Header Record, as described in section Zones. The Zones section is simply a list of integer values which describe the number of stars for each zone. The total length of the Zones section depends on the number of zones. See table Zones section.

Zones section
Name Offset Type Size Description
num stars in zone 0 0 int 4 The number of records in this file which are in zone 0
num stars in zone 1 4 int 4 The number of records is this file which are in zone 1
...
num stars in zone n 4n int 4 The number of records is this file which are in zone n

[edit] Star Data Records

After the Zones section, the actual star data starts. The star data records themselves do not contain the zone in which the star belongs. Instead, the zone is inferred from the position of the record in the file. For example, if the Zone Records section of the file says that the first 100 records are for zone 0, the next 80 for zone 1 and so on, it is possible to infer the zone for a given record by counting how many records have been read so far.

The actual record structure depends on the value of the Data Type, as found in the File Header Record.

See tables Star Data Record Type 0, Star Data Record Type 1 and Star Data Record Type 2 for record structure details.

It should be noted that although the positional data loses accuracy as one progresses though the Star Record Types, this is compensated for by the face that the number of zones is much higher for the files where the smaller precision position fields are used, so the actual resolution on the sky isn't significantly worse for the type 1 and 2 records in practice.

Star Data Record Type 0
Name Offset Type Size Description
hip 0 int 3 Hipparcos catalogue number
component_ids 3 unsigned char 1 This is an index to an array of catalogue number suffixes. The list is read from the stars_hip_component_ids.cat file. The value of this field turns out to be the line number in the file - 1
x0 4 int 4 This is the position of the star relative to the central point in the star's zone, in axis 1
x1 8 int 4 This is the position of the star relative to the central point in the star's zone, in axis 2
b_v 9 unsigned char 1 This is the magnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file
mag 10 unsigned char 1 This is the magnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file
sp_int 11 unsigned short int 2 This is the index in an array of spectral type descriptions which is taken from the file stars_hip_sp.cat, the index corresponds to the line number in the file - 1
dx0 13 int 4 This is the proper motion of the star in axis 1
dx1 17 int 4 This is the proper motion of the star in axis 2
plx 21 int 4 This is the parallax of the star. To get the actual value, divide by 10000.
Star Data Record Type 1
Name Offset Type Size Description
x0 0 int 20 bits This is the position of the star relative to the central point in the star's zone, in axis 1
x1 20 bits int 20 bits This is the position of the star relative to the central point in the star's zone, in axis 2
dx0 40 bits int 14 bits This is the proper motion of the star in axis 1
dx1 54 bits int 14 bits This is the proper motion of the star in axis 2
b_v 68 bits unsigned int 7 bits This is the magnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file
mag 75 bits unsigned int 5 bits This is the magnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file
Star Data Record Type 2
Name Offset Type Size Description
x0 0 int 18 bits This is the position of the star relative to the central point in the star's zone, in axis 1
x1 18 bits int 18 bits This is the position of the star relative to the central point in the star's zone, in axis 2
b_v 36 bits unsigned int 7 bits This is the magnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file
mag 43 bits unsigned int 5 bits This is the magnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file
Personal tools
Namespaces
Variants
Actions
in this wiki
other languages
Toolbox