Stellarium catalogue files - how to extract?

  • Curious


    I'm interesting in extracting the raw data and producing a CSV file with the
    data. I'm able to generally parse the data but am stuck on determining the
    central position of the 'zone' in order to make sense of the offsetted

    I spend a few hours looking at the source but couldn't determine how to
    calculate zone co-ordinates for the geodesic sphere.

    Could any of you be kind enough to provide pseudo code or pointers on how to
    calculate suitable co-ordinates that can be translates to J2000 epoch I'd be
    very grateful.

  • Viper OS Team
    Viper OS Team

    What program are you using?

    The stelarium catalog files are NOT meant to be extracted! You can get the
    source from the SAO and HIP catalog websites. They have a (very) long text
    file you can download to get something better than a csv, or you could convert
    that to a

  • Curious

    Hi Viperos

    Thanks for the reply.

    I've already got a partial HIP catalog (about 120K stars) but was interested
    in Stellarium's vast database of over 100M! I'll try to see if I can get a
    relatively large catolog from SAO, as I'm trying to plot these stars in OpenGL
    and get a feel for the vastness of our galaxy.

    I'm so close, yet so far...

    As for Stellarium's database files, the format is published and I am able to
    decode/extract everything except I cannot really do much with the data without
    correctly computing the offset per zone (since data is stored relative to a
    zone's center and not in absolute terms).

    The reason I'd prefer to use Stellarium's database is because the data is
    neatly placed into 'zones' which makes lookup and plotting efficient and
    furthermore, I trust the data has been cleaned, normalized and otherwise
    pretreated. However if I can find a comprehensive catolog of as many stars as
    possible I'd be quite happy!

  • Timothy Reaves
    Timothy Reaves

    Or, you could look at the source, see where WE import the database from, and
    go from there! Imagine!

  • Curious


    I've spent a few hours already looking at the code. Though I'm somewhat
    clearer on what's going on now than earlier, I couldn't find the magic formula
    to calculate zones directly. Though I think the answer lies in the "


    " file, as basically I want to specify the


    data and

    zone number

    to a function and have it return the absolute co-ordinate for that segment.

    Please let me know if I'm on the right tracks, or any pointers (other than
    looking at the code) to proceed.

  • Timothy Reaves
    Timothy Reaves

    Actually, I was referring to the catalogue import code, not the stellarium
    code for reading our zone files. Those zone files come from somewhere. They
    are not hand written.

  • Curious

    Thanks treaves

    Is that code part of the main stellarium src distribution? Specifically which
    file/function should I be looking out? At a cursory glance I was unable to
    find anything specific.


  • Matthew Gates
    Matthew Gates

    IIRC, Johannes Gajdosik was sent a hard disk with NOMAD data on it, and
    processed this into the catalog files which Stellarium now uses. I do not
    recall of the source of the data. You may find some details in the pubdevel
    mailing list archive from 2007.

    There is a file authored by Johannes in the "util" directory of the source
    tree called "ParseNomad.C" which might be helpful.

    I spent some time trying to work out the file format myself - the
    documentation I derived from the code and data can be found in the PDF version
    of the Stellarium User Guide - Appendix D. I realize this documentation could
    do with a bit more information about what the positional values mean exactly,
    but at present that information is not included (I didn't work it out).
    However, the data structure information in Appendix D should be enough help
    you write a program to at least parse the records, and separate out the
    individual values.

    If you do improve on the information in the user guide, please consider
    augmenting the guide. The best place to do that is in the wiki, where future
    version of the guide will be maintained.


  • Matthew Gates
    Matthew Gates

    P.S. util/MakeCombinedCatalogue.C might also be helpful.


  • Curious

    matthewg42 - thank you very much.

    Your pointer to util/MakeCombinedCatalogue.C provided the answer! It's a
    standalone file that's easy to compile and contains information on how zones
    are assigned values as a function of level. After some tinkering with the
    source, I managed to 'hotwire' it to output zone centres.

    Initially I'll just create zone lookup tables per level so I can reference
    them independently of this code. However, if anyone is interested, I can try
    and streamline this code so it will do a zone/level lookup and return the
    centre values. This could prove invaluable for anyone else who wishes to read
    stellarium database files.

    I looked at your documentation and it was extremely useful to initially parse
    the datafiles and I believe the missing piece of information was just how to
    determine zone info, so I'm more than happy to help with that once I've
    refined the solution.

    Thanks again matthewg42 for an extremely helpful answer which eventually lead
    to the solution!



Cancel   Add attachments