Reducing an existing catalog

Skip to first unread message

Jeffrey McCall

Nov 3, 2023, 4:43:25 PM11/3/23
to astrometry
Is there a way to take an existing index file and reduce its size by filtering out stars below a certain magnitude threshold? For example if I have an index file that contains stars up to magnitude 16, is there a way to filter out stars that have a magnitude > 10 so that I can drastically reduce the amount of stars in the file? I did try to see if there was a way to use the "build-astrometry-index" command to do this, but based on what I saw in the code it looks like if you use the "-B" option and also pass an index file with "-1", the code ignores the "-B" option completely. 

As a side note, I don't have access to the original catalog files used to create these index files.

If I can't do that, is there a way to take an index file that is at scale 4 and has a lot of stars and rebuild it with a much higher scale value like 19? When I've tried to do that, I get errors like the following:

.quad-builder.c:167:quadbuilder_create: quad-builder: failed to malloc qb->inbox or qb->pquads.  Nstars=827813

It looks like it's trying to allocate a huge amount of memory. Is there a workaround for this error?

I'd appreciate any help that anyone could provide with this.

Jeff M.

Dustin Lang

Nov 3, 2023, 5:01:17 PM11/3/23
to Jeffrey McCall, astrometry

The index files are built to contain a bright subset of stars selected at a given scale, AND "features" (micro-constellations) with a given range of scales.  So you can't just drop stars, you would also need to select new features at a new set of scales, likely.

So I think your question boils down to, if you only have an index file, can you get back to a list of RA,Dec,mag, from which you could build a new index file.

One issue with trying to do this: index files don't always *have* the magnitudes of the stars, that's an optional thing.

The RA,Dec positions are encoded in a rather complicated way, so reading them straight out of the index files will be a pain.

You might try using the "query-starkd" program to "query" all the stars in the index -- eg, query for RA,Dec of 0,0 with a radius of 180 degrees, or something like that.  I'm not certain that will work, but it might be your best bet.


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
To view this discussion on the web visit
Reply all
Reply to author
0 new messages