Inside database (index).

18 views
Skip to first unread message

Zero Pointer

unread,
Jul 4, 2024, 4:22:03 AM (13 days ago) Jul 4
to astrometry
Hi Dustin!

I have some questions about database (index), which is strored at the *.fits file.

There are total 14 fields of data in the database (index) file.
They are 3 headers (fields 0, 2, 7), and 11 fields with data (fields 1, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13).
I have an interest in fields: 1 (quads), 3 (kdtree_lr_codes), 4 (kdtree_split_codes), 5 (kdtree_range_codes), 6 (kdtree_data_codes), 8 (kdtree_lr_stars), 10 (kdtree_split_stars), 11 (kdtree_range_stars), 12 (kdtree_data_stars).

What data type does each field have? (from *.fits file I can get only sizeof, but what is hidden inside?)
What does the "kdtree_*_codes, kdtree_*_stars"  part of the name mean in the group name?
What does the "*lr*, *split*, *range*, *data*"  part of the name mean in the group name?
Why are the fields divided into "kdtree_*_codes, kdtree_*_stars" and *lr*, *split*, *range*, *data*"?

Thank You!
Have a nice day!

Dustin Lang

unread,
Jul 4, 2024, 6:37:56 AM (13 days ago) Jul 4
to Zero Pointer, astrometry
Hi,

The index files contain two kd-tree structures and a "quads" map.

The first kd-tree is for the "codes" -- for most index files, these are 4-dimensional descriptors of the local shapes of 4-star features.

When trying to match your image to the index file, astrometry.net looks at 4-star features in your image, computes their shape codes, and looks for nearby matches in the code kd-tree.

Next is the "quads" map, which for a given code, says which four stars were used in the code.  This lets us go from a matched code to a set of matched stars.

Then there is the second kd-tree, for "stars".

Once astrometry.net has found a matched code, it looks up which stars
formed that code, and then it can look up their RA,Dec positions in the star kd-tree, and then look for other nearby stars that should be found inside your image, by searching the star kd-tree.

The different "lr", "split", "range" fields in the kd-tree tables are descriptions of the kd-tree data structure.

We abused the FITS format - we store little-endian raw data rather than formatting it correctly as FITS data.  Originally this was so we could use mmap() to load index files directly from disk.  There are some additional headers that tell you what kind and shape of data are held there.  The code is in libkd/kdtree_fits.c or something like that.

cheers,
dustin


--
You received this message because you are subscribed to the Google Groups "astrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astrometry+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astrometry/80541426-0673-49eb-91f6-6e8a7494c925n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages