Skip to content

frostoven/BSC5P-JSON-XYZ

Repository files navigation

Bright Star Catalog in JSON format, optimised for games and visualisation software

This catalog offers star positions both as x,y,z coordinates for 3D software, and right ascension / declination for 2D software. It targets video game developers and visualisation artists that need easy-to-use star catalogs based on real data at their disposal.

This catalog contains all the stars in the BSC5P catalog (all the stars we can see with the naked eye), but with more accurate information taken from modern stellar data. It uses this catalog as its base but adds a huge amount of data, much of which is inferred (such as luminosity and colour info). Extra data not inferred include parallax information and popular names manually researched and added with citations due to these values missing in the original data sources.

The scripts used to create all JSON files are included in this repo in case anyone needs the data adjusted (see 'Scripts provided' section below).

The Cosmosis game project has successfully used this catalog to generate the following visualisations:

Caveats and limitations

Spectral data

Some concessions are made. For example, real spectral data might tell us "this star is either an A type, or an F type. We're certain it's one of the two, but unsure which exactly." This makes visualisation difficult - we can't draw a star that's defined as two completely different things. This catalog will in such cases average between the two possibilities and provide you a single value. In case this is unwanted, the original spectral data string is still provided for you to process yourself. Note that a small amount of spectral data for sibling stars are incorrectly parsed by this catalog's scripts due to edge cases and odd choices of classification in the source.

Distance, temperature, luminosity

Uncertainty in distance is discarded. The same logic applies as above: if we know an object is 10-20 parsecs away in a 3D world, we cannot draw it at both 10 and 20 parsecs (and everything in between). Instead, a value of 15 parsecs is provided in this case as a middle-ground. Temperature and other values also follow this approach. Two fields are provided for luminosity: academically derived, and naively calculated. If a field is known to be inaccurate overall, the JSON keys table below will describe that field as an approximation.

Special and non-stars

S-type and Wolf-Rayet stars are currently excluded (42 total). Non-star items (such as clusters, galaxies) are included but have no colour info, and no specially identifying info (i.e. you'll need to manually check for them by name when visualising). All supernovae are currently excluded (9 total).

All special stars will be included in coming months. Non-stars will have a field added indicating their type (open / globular cluster, supernova, galaxy, etc).

Catalog files

Catalog files are located in the catalogs directory. Most of them come in two variants: regular, and minified. Regular is formatted for ease of human readability while minified is squashed into an unreadable mess easier for computers to read.

Note that each entry in each file has an ID number (except for blackbody.json). These IDs are used to identify the same stars across files.

Files provided:

  • bsc5p_radec: Bright Star Catalog 5th edition data. Star positions given in right ascension / declination.
  • bsc5p_3d: Same data as bsc5p_radec, but star locations are expressed as x,y,z coordinates instead. The center of the universe (coordinates 0,0,0) are located at the center of the ecliptic, in other words very close to Earth. Units are in parsecs. Now you can be the center of the universe in style.
  • bsc5p_names: Contains additional names for each star.
  • bsc5p_spectral_extra: Contains extra spectral information. Some of it is calculated by this application while others are obtained from acedemic resources.
  • blackbody: Contains a table of blackbody temperatures converted to RGB colour. This is used internally by this repo's scripts to try dynamically generate accurate colour for each star.
  • bubble: Same as bsc5p_3d, but with all stars fixed to 500 parsecs from Earth. This is useful for GFX when needing to create a sphere of stars.

Build info

See the build doc if you're a developer wishing to build the catalogs from scratch yourself.

Script files

The scripts used to calculate catalog values are available as a library.

JSON keys

Because this catalog primarily targets video games, things are keep small for faster loading and efficient usage of bandwidth. JSON keys are usually a single character (2 characters for to / or field in the spectral_extra file). This often reduces each file by over 50% which, due to the massive amount of star data, equates to megabytes for some files.

The table below describes what each of these keys mean, and lists the files that use them.

Key Type Symbol Used by Description
i number, string -- bsc5p_radec bsc5p_3d bsc5p_names bsc5p_spectral_extra Original BSC5P line ID, or 'Custom [n]' if added via the amendments mechanism. Used to link stars between files.
n string -- bsc5p_radec bsc5p_3d A single name given to star. Additional known names for each star stored in bsc5p_names.json.
p number pc bsc5p_radec bsc5p_3d Distance in parsecs, ignoring uncertainty. 1 parsec ≈ 3.26 light-years.
r number α bsc5p_radec Right ascension in radians.
d number δ bsc5p_radec Declination in radians.
x number -- bsc5p_3d x coordinate approximation in parsecs.
y number -- bsc5p_3d y coordinate approximation in parsecs.
z number -- bsc5p_3d z coordinate approximation in parsecs.
N number L☉ bsc5p_radec bsc5p_3d Naively calculated luminosity. This does not take dust and other obstruction into account, and can vary several orders of magnitude from real data. This is however still very useful, because being calculated directly from perceived brightness and distance, it gives visualisation software a highly consistent base for realistic-looking 3D calculations. This value may therefore be thought of more as a custom brightness-distance unit than real luminosity. The intended use of this value is generating star size and size falloff based on distance from the software camera (see Inverse Square Law of Brightness).
K vector3 K bsc5p_radec bsc5p_3d Colour of star approximated from star temperature in kelvin (AKA blackbody temperature), converted to RGB. A lot of effort and research has gone into estimating this as physically accurately as humanly possible (while keeping in mind it's still an approximation nonetheless, and will vary by star class and observational quality).

Spectral information

Below follows extra spectral information only found in the bsc5p_spectral_extra file.

Key Type Symbol Description
L number L☉ Real luminosity as determined by academic sources. Very few stars in this catalog have this value defined due to the difficulty in determining it.
b number m, vMag Apparent brightness (also known as apparent magnitude, visual magnitude; not to be confused with absolute magnitude).
a number M, VMag Naively calculated absolute magnitude. This does not take dust and other obstruction into account.
g string -- Colour or glow of star, but cartoony instead of real.
s string -- Spectral classification.
C string -- Spectral type classification (O, B, A, F, G, K, M).
S number -- Spectral type subclass (0-9). 0=hottest, 9=coldest. Fractions exist (eg. Mu Normae is O9.7 [that's an O, not a 0]).
L number -- Luminosity class. Higher numbers generally mean lower surface temperatures.
to object or null -- If specified, the star is in range of the above and whatever is specified here. Used to indicate uncertainty.
or object or null -- If specified, the star is either the above or whatever is specified in this object. Used to indicate uncertainty.
e¹ array -- Containing siblings, if the original data was presented that way.
q string -- Skipped spectral information. These usually contain peculiarities in spectral lines, but may also contain data the parser did not understand.

1: Note that the medium- to long-term goal here is to eliminate sibling data altogether, and present that data as separate stars instead.

Flags indicating carbon stars, S-/T-type stars, T Tauri and Wolf-Rayet planned for future versions.

Note on interpreted spectral data

Parsing spectral luminosity data is insanely complex because of how un-computer-friendly it is. For example, A2/3III/V means we have a star that's either A2 or A3 with a luminosity of either III or V. This is what the / means: either/or. Of course, an A2/F1 means it's either an A2 or F1 (notice how the meaning of the / is subtly different). It gets worse; + can mean "multi-star system" or it may simply mean "higher luminosity" depending on context. This script tries its best to process this correctly, and is known to work with a lot of crazy luminosities (such as A5-6/F1III/IVm s+F8-F9:+F1-F2). A few thousand entries from the BSC5P were manually verified and confirmed to work correctly. No guarantees are made however and you're encouraged to raise an issue if you find a problem.

Note that there are some multi-star systems which do not delimit siblings in their spectral classifications, ex: F0VkA2mA2_lB (HD 432). In this case, we have multiple spectral types bundled together with no delimiter (such as +). There are currently no plans to adjust the interpreter to handle this because previous attempts to do so actually caused some valid unrelated edge cases to come out wrong. These delimit-less classifications might however be adjusted ad-hoc in future via the amendmentFactory mechanism.

Other known edge cases

This catalog uses SIMBAD's spectral info because it's written more reasonably than some other sources. For example, HD 143454 has in the past been written as both sdBe+gM3+Q0 and M3IIIe_sh. The parser will not understand the former because the class info is garbled in between spectral peculiarity info. The latter however will work just fine (and is what this catalog uses). In any case, this script has mechanisms that allow for per-star amendments if needed.

Disclaimer

These catalogs are provided on a best-effort basis. While we try our best to make these catalogs accurate, and spend a considerable amount of reviewing them ourselves, these catalogs nonetheless do not follow the academic rigour expected from scientific research groups. While we appreciate peer review, to our knowledge, no one external to Frostoven has reviewed these catalogs. These catalogs are mostly maintained by one (somewhat obsessive) person, though this work is based on SIMBAD data that many people maintain.

Something very important to note is that we discard uncertainty because we focus on 3D positions. We do this because it simply is NOT helpful when needing to definitively place stars at specific positions in video games, which is what these catalogs are made for. For example, while it's useful for the academic to know that the position of Betelgeuse is known to be -49 to +90 light years off despite humanity's best efforts to calculate its distance definitively, it simply does not help us place the star in a real position within games.

If you find any serious problems with these catalogs, please feel free to raise an issue.

Source data

Excerpt from original data source:

Overview

The BSC5P database table contains data derived from the Bright Star Catalog, 5th Edition, preliminary, which is widely used as a source of basic astronomical and astrophysical data for stars brighter than magnitude 6.5. The database contains the identifications of included stars in several other widely-used catalogs, double- and multiple-star identifications, indication of variability and variable-star identifiers, equatorial positions for B1900.0 and J2000.0, galactic coordinates, UBVRI photoelectric photometric data when they exist, spectral types on the Morgan-Keenan (MK) classification system, proper motions (J2000.0), parallax, radial- and rotational-velocity data, and multiple-star information (number of components, separation, and magnitude differences) for known non-single stars.

References

Hoffleit, D. and Warren, Jr., W.H., 1991, "The Bright Star Catalog, 5th Revised Edition (Preliminary Version)".

Provenance

This table was created by the HEASARC in 1995 based upon a file obtained from either the ADC or the CDS. A number of revisions have been made by the HEASARC to this original version, e.g., celestial positions were added for the 14 non-stellar objects which have received HR numbers: HR 92, 95, 182, 1057, 1841, 2472, 2496, 3515, 3671, 6309, 6515, 7189, 7539 and 8296. In January 2014, the very incorrect position for HR 3671 = NGC 2808 was fixed (the Declination is -65 degrees not +65 degrees!), and smaller corrections were made to the positions of HR 2496, 3515 and 6515 so as to bring them in better agreement with the positions listed in SIMBAD and NED

Legal

Use of catalog data subject to HEASARC terms of use.

Caching query responses from Simbad subject to the SIMBAD Astronomical Database terms of use.

Conversion scripts included in this project are licensed under MIT.

Generated catalogs provided with this repo licensed under Attribution 4.0 International (CC BY 4.0).

Acknowledgments

This research has made use of the SIMBAD database, operated at CDS, Strasbourg, France.

This research has made use of the VizieR catalogue access tool, CDS, Strasbourg, France (DOI : 10.26093/cds/vizier). The original description of the VizieR service was published in 2000, A&AS 143, 23.