Use of text2fits

29 views
Skip to first unread message

tano...@gmail.com

unread,
May 16, 2023, 8:52:28 AM5/16/23
to astrometry
Hello everyone,
I have a problem in building a new index from a huge csv file of a star catalog.
From the user guide of Astrometry, the first thing to do is to "Convert the reference catalog in a fits table" using text2fits.
From terminal I execute the line:

text2fits input.csv output.fits

and it starts as follow:
screen1.png

but at the end it kills the process
screen2.png

Am I doing the building procedure in the right way?

Cheers
Gaetano

Martin Sadler

unread,
May 16, 2023, 9:22:11 AM5/16/23
to tano...@gmail.com, astrometry
Just a wild guess - running out of memory?

On 16 May 2023, at 13:52, tano...@gmail.com <tano...@gmail.com> wrote:

Hello everyone,
I have a problem in building a new index from a huge csv file of a star catalog.
From the user guide of Astrometry, the first thing to do is to "Convert the reference catalog in a fits table" using text2fits.
From terminal I execute the line:

text2fits input.csv output.fits

and it starts as follow:
<screen1.png>

but at the end it kills the process
<screen2.png>

Am I doing the building procedure in the right way?

Cheers
Gaetano

--
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/8c469e7d-fdd3-4b72-b34f-695a77062103n%40googlegroups.com.
<screen1.png><screen2.png>

tano...@gmail.com

unread,
May 16, 2023, 10:02:05 AM5/16/23
to astrometry
Hi
First of all thanks for the quickly response
I'm running it on a server with a 128 Gb of RAM. The csv file size is about 70 Gb with more than 200 million lines.
Now I'm trying to split the csv file in smallers ones.
Hope it will works.
Do you have other suggestions?

Cheers

Dustin Lang

unread,
May 16, 2023, 2:51:46 PM5/16/23
to tano...@gmail.com, astrometry
Hi,

This probably isn't the core issue, but text2fits isn't smart and you will need to tell it the data types (and names, apparently) of each column:

text2fits -H "ra dec flux and other column names" -f ddddddd input.csv output.fits

where "-f" is the format and "d" is "double" (float64), which you should use for RA,Dec; most other columns can probably get away with using "f" (float, ie float32) instead, or j for int, s for string, etc.  Run text2fits without any arguments for the help text.

cheers,
dustin


tano...@gmail.com

unread,
May 18, 2023, 9:19:19 AM5/18/23
to astrometry
Hi Dustin
Following your suggestions it reads all catalog line, but it doesn't create the fits table.
In order to obtain a fits table, is the output a .fits file or something else?

Cheers
Gaetano

tano...@gmail.com

unread,
May 18, 2023, 10:47:09 AM5/18/23
to astrometry
Sorry Dustin
I missed to insert the separetor (comma in this case) in the command line
Now it is running. I'll update you!!

Cheers
Gaetano

Reply all
Reply to author
Forward
0 new messages