HYG-Lite star catalogue
The HYG star catalogue contains 119,626 stars, including several names and designations, position indications and proper movements, all that in one database table.
For my use with Povray, I've removed unnecessary columns, renamed columns, and converted them. The result lacks scientific accuracy, but this does not play a role in the amateur sector. On the other hand, it is smaller and clearer.
The table of my Lite version can be downloaded as a SQL import and in the form of Povray arrays.
The original
The name
HYG is made up of the names of three common star catalogues, whose information has been combined:
Hipparcos,
Yale and
Gliese. The catalogue was created by
David Nash and is maintained every year, the version 4.2 I processed is from mid-2025.
Informations:
https://www.astronexus.com/projects/hyg
Download CSV-file + column description:
https://codeberg.org/astronexus/hyg/src/branch/main/data/hyg
Included are the brightest and closest 119,626 stars, starting with
red dwarfs. It does not include
brown dwarfs,
free-floating planets and
exoplanets. Galaxies and nebulae are also not included, unless they include a visible star as in planetary nebulae.
Accordingly, there are some celestial bodies in our immediate vicinity that are not listed. These include the binary star system
Luhman 16 and
WISE 0855−0714, all less than 10 light-years away.
See the Wikipedia
list of the next stars.
Anything marked brown or light brown in the wiki table is not mentioned in the HYG catalogue. But that's not a bad thing, because none of the objects can be seen with the naked eye or an amateur telescope.
Changes in the Lite version
I've removed most of the columns that aren't needed to show the stars:
pmra, pmdec, ci, x,y,z, vx,vy,vz, pmrarad, pmdecrad, lum, var, var_min, var_max.
Values for right ascension and declination were converted from
radians to degrees, the distance from
parsecs to light years (factor 3.26156378). The accuracy of decimal numbers has been reduced without really losing quality.
The database table itself is trimmed for readability so that it can be easily viewed and entries can be checked via SQL browser. The file size does not play such a big role with only 120,000 entries.
Therefore, there are several VarChar columns that could also be integers. However, there would then be many entries
0 or
NULL, which I find annoying when viewed directly. Column
gl (Gliese designation) cannot be converted because it contains alternating letters at the front and sometimes digits at the end.
The following could be converted into integers:
hip, hd, hr, flam, bay_s, comp_n, comp_p
Copyright and License
The original HYG catalogue as well as my Lite version is licensed under a
Commons Attribution-ShareAlike 4.0 International License.
In a nutshell this means that both can be used, modified and republished in a modified format. The new format must also be distributed under this license, and information from the reference and participants would be quite nice.
Columns + content
Column names and content of the Lite version, which (see above) differ from the original in a few ways.
| id | HYG-ID |
| hip | Star-ID in the Hipparcos catalogue |
| hd | Star-ID in the Henry Draper catalogue |
| hr | Star-ID in the Harvard Revised catalogue (same as Yale Bright Star) |
| gl | Star designation in the Gliese catalogue of Nearby Stars (3. Edition) |
| bf | Bayer-Flamsteed designation, with spaces as in HYG catalogue |
| bayer | Bayer designation |
| flam | Flamsteed number from 1 bis 140 |
| bay_g | Bayer - abbreviation english name of greek letter |
| bay_s | Bayer - superscript (number in multi starsystems) |
| con | Abbreviation of constellation name |
| name_proper | Proper name by IAU |
| name_ascii | Starname without special chars |
| dist_ly | Distance in light years |
| mag | Magnitude as viewed from Earth |
| mag_abs | Absolute magnitude as seen from a distance of 10 parsec |
| ra_d | Right ascension in degree (0 to 360) |
| de_d | Declination in degree (-90 to +90) |
| spec | Spectrum |
| spec_s | Spectrum - first upper case letter (often Main Sequence Type) |
| comp_n | Companion - number |
| comp_p | Companion - HYG-ID of the primary |
| base_gl | Gliese designation of the starsystem (in multi starsystems) |
Notes
Column
bf contains the original value from the HYG catalogue, with spaces for missing information, which looks strange at first glance. It can be formed with or without spaces from the columns
flam + bay_g + bay_s + con.
Column
name_ascii contains the value from
name_proper with converted special characters (á, à, â, ã, ā => a).
The
color of a star can be determined by the columns
spec and
spec_s.
Smal flaws
Just over ten thousand stars are recorded at a distance of 326,156 light-years (equal to 100,000 parsecs), including many with very high absolute magnitude. These should be errors without exception, NOT false entries, because the stars exist.
Example:
Campbell's Hydrogen Star is only 16,000 light years away.
Our Sun is also mentioned as
Sol with ID = 0, as a helpful comparison to other stars. This null ID can cause problems when importing or converting the column ID to an auto-increment. In this case, either remove the first row from the SQL insert script, or manually remove row 0 before converting the column (DELETE FROM hygl_421 WHERE id = 0).
Conceivable extensions
Version 1 is the first one that was created reasonably quickly, so I had something to work with. In the year 2026 the following improvements would be possible, depends on my free time.
- adding columns regarding the star proper motion
- adding further columns (color index)
- correct various columns (distance, multiple system information)
- adding missing proper names
- adding new entries (brown dwarfs)
This is only a low priority, as I will next try my hand at the AT-HYG catalogue, which contains over 2 million entries.
Download
The current version is
HYG-Lite 4.2.1 or
hygl_421 from December 2025. The name is made up of the HYG version used (4.2) and that of my Lite one (1).
SQL
In most cases, the file
complete should work for the import, optimized for MySQL or Maria-DB. If other database formats are used, the file
create to be adapted serves as a template. Both files contain a
drop-table statement, the table name is
hygl_421.
All inserts are also separately summarized in the file
inserts, which should be compatible with the vast majority of DB formats.
The SQL files were exported using the PHP database tool
Adminer 5.4.1 and successfully imported. Unzipped and imported, the table is about 12 MB in size. A database is not created and no indexes are set up, sorting as in the HYG catalogue right ascension ascending.
SQL-Downloads
⬇
dbstars_hygl_421_sql_complete.gz => 4,0 MB
⬇
dbstars_hygl_421_sql_create.sql => 0,1 MB
⬇
dbstars_hygl_421_sql_inserts.gz => 4.0 MB
Povray
The zips contain text files that can be included in Povray and provide a string array with all the necessary information. Integer or float variables must be converted before use, as Povray does not allow arrays with different data types (string, integer, float) in version 3.7. Also Povray does not like special characters, so the column
name_proper is not included in the array,
name_ascii as a replacement.
What the array file looks like can be seen in a
mini-example. A macro collection that makes use of this catalogue is in the works.
Sorted by magnitude desc
⬇
dbstars_hygl_421_pov_mag_10k.zip => 0,5 MB
⬇
dbstars_hygl_421_pov_mag_50k.zip => 1,8 MB
⬇
dbstars_hygl_421_pov_mag_all.zip => 4,2 MB
Sorted by distance asc
⬇
dbstars_hygl_421_pov_dis_10k.zip => 0,4 MB
⬇
dbstars_hygl_421_pov_dis_50k.zip => 1,8 MB
⬇
dbstars_hygl_421_pov_dis_all.zip => 4,0 MB