How can I use the UCAC-4 catalog?

699 views
Skip to first unread message

Dustin Lang

unread,
Mar 30, 2013, 3:36:18 PM3/30/13
to astro...@googlegroups.com
Branimir Sesar wrote:
> Question: How do I compile ucac3tofits and will it work with the UCAC-4 catalog?

I think you should just be able to do:
  > cd blind
  > make ucac3tofits

And I have one report of successfully building an index using the UCAC-4 catalog:
  https://github.com/astrometry/usermanual/issues/1

cheers,
dustin


Branimir Sesar

unread,
Apr 1, 2013, 4:55:57 PM4/1/13
to astro...@googlegroups.com
Unfortunately, structure of the UCAC-4 catalog changed with respect to UCAC-3 so ucac3tofits no longer works :(

B

Dustin Lang

unread,
Apr 1, 2013, 7:16:40 PM4/1/13
to astro...@googlegroups.com
Did you download the UCAC-4 catalog from CDS via the (obscure) FTP link?

With the byte-by-byte file description here it should be straightforward to convert the ucac3 code to ucac4:
 http://cdsarc.u-strasbg.fr/viz-bin/Cat?I/322A

The relevant code would be blind/ucac3.h, blind/ucac3.c, and blind/ucac3tofits.c

cheers,
dstn

Michal Kočer

unread,
Jul 30, 2013, 1:20:53 PM7/30/13
to astro...@googlegroups.com
Hi.

There is NOT straightforward way to use ucac3 routines in astrometry.net sources.
As you can see in appropriate READMEs the binary structure format was slightly changed;
UCAC4 has 78Bytes per star and UCAC3 has 84Bytes per star.

Readmes (look for Data formats section):

I was recetly reading U4 for our local starfield viewer so I'am a bit accutained with the structure.
When I will have some time I'll try to correct appropriate part of ucac3… codes for ucac4 and 
will let you know. But I should be sure that nobody is working on the same task recently :) - 
so Dustin could you let me know if there is somebody working on it via PM, thx? ;)

For better astrometry :)

McHa (from 046 and 246)  

Dne sobota, 30. března 2013 20:36:18 UTC+1 Dustin Lang napsal(a):

Dustin Lang

unread,
Jul 30, 2013, 2:01:51 PM7/30/13
to astro...@googlegroups.com
Ahh yes, I see, I was wrong, there is a report of building a ucac3 index but not ucac4.

Nobody has converted the ucac3tofits code to use ucac4, at least not that I know of.

It shouldn't be hard to do.  It's just converting from their binary format to FITS table(s).

The fastest way is probably to copy blind/ucac3* to ucac4* and edit.

If I had to start again, I would write it in python, probably using the "struct" library.

Another option would be to try to get the Vizier service to produce FITS binary tables for you, but in my experience that is difficult as the tables get big.

cheers,
dustin

Jan-Benedict Glaw

unread,
Jul 30, 2013, 2:24:39 PM7/30/13
to Dustin Lang, astro...@googlegroups.com
On Tue, 2013-07-30 11:01:51 -0700, Dustin Lang <dstn...@gmail.com> wrote:

[ucac4]

> It shouldn't be hard to do. It's just converting from their binary format
> to FITS table(s).
[...]
> If I had to start again, I would write it in python, probably using the
> "struct" library.

Maybe that would even be a nice starter's project, even for other
indexes. I'm just having a look at the docs, seems it's nice and easy.
And with all the other support code that's already available (for
write the FITS files), it shuldn't be too hard.

The hardest part probably is to understand the overall index building
process as it is right now. OTOH, this could be a start to write a bit
of documentation about it :)

MfG, JBG

--
Jan-Benedict Glaw jbg...@lug-owl.de +49-172-7608481
Signature of: What we do for ourselves dies with us. What we do for
the second : others and the world remains and is immortal. (Albert Pine)
signature.asc

Michal Kočer

unread,
Jul 30, 2013, 5:21:13 PM7/30/13
to astro...@googlegroups.com

So I did quick edit of C code and just now the fits are being created - will let you, guys, know.

BTW: i agree with Jan, that some doc would be useful. Python would be great choice. 

M.

Dne úterý, 30. července 2013 20:01:51 UTC+2 Dustin Lang napsal(a):

Dustin Lang

unread,
Jul 31, 2013, 12:19:15 PM7/31/13
to astro...@googlegroups.com
Great -- if you agree, could you please email me those files and I will import them into the codebase?  (And include them in the next release.)  Add your name to the copyright boilerplate, etc.

Index-building is now fairly straightforward.  I just spent a couple of hours writing some documentation:
http://astrometry.net/doc/build-index.html

cheers,
dustin

Reply all
Reply to author
Forward
0 new messages