gnuastro-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #110952] agstscript-zero errors on --hdu=0


From: INVALID.NOREPLY
Subject: [sr #110952] agstscript-zero errors on --hdu=0
Date: Wed, 1 Nov 2023 15:45:15 -0400 (EDT)

URL:
  <https://savannah.gnu.org/support/?110952>

                 Summary: agstscript-zero errors on --hdu=0
                   Group: GNU Astronomy Utilities
               Submitter: danc
               Submitted: Wed 01 Nov 2023 07:45:13 PM UTC
                Category: Installed scripts
                Priority: 5 - Normal
                Severity: 4 - Important
              Item Group: Crash
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: GNU/Linux


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Wed 01 Nov 2023 07:45:13 PM UTC By: Anonymous
I followed the online tutorial about astscript-zero point.
When I enter the following command:


astscript-zeropoint ARP_Solved.fits --hdu=0 --refcat=sdss-catalog.fits
--refcatmag=imag --refcatra=RA_ICRS --refcatdec=DE_ICRS
--output=arp-zeropoint-cat.fits --magnituderange=14,19
--aperarcsec=2,2.5,3,3.5,4 --keepzpap


I get the error:


         | cat -n \
         | asttable
--output=/home/astro/Desktop/gnuas/test_zeropoint/ARP_Solved_zeropoint/ref1-2-cat.fits
\
               --colmetadata=1,OBJ_ID,int32,"Id of object." \
               --colmetadata=2,RA,float64,"Right Assencion." \
               --colmetadata=3,DEC,float64,"Declination." \
               --colmetadata=4,MAGNITUDE,float32,"Magnitude."
raw=/home/astro/Desktop/gnuas/test_zeropoint/ARP_Solved_zeropoint/stars-raw.fits;
\
astquery gaia --dataset=dr3 \
         --overlapwith=ARP_Solved.fits \
         -csource_id -cra -cdec -cparallax \
         -cparallax_error -cpmra -cpmdec --output=$raw; \
asttable $raw -cra,dec --colinfoinstdout \
         -c'arith parallax parallax abs \
                  parallax_error 3 x lt nan where ' \
         --colmetadata=3,GOODPLX,int32,"Stars with good parallax." \
         --noblankend=GOODPLX \
         | asttable -cra,dec
--output=/home/astro/Desktop/gnuas/test_zeropoint/ARP_Solved_zeropoint/stars.fits;
\
rm $raw
asttable sdss-catalog.fits -cRA_ICRS,DE_ICRS -cimag \
         | cat -n \
         | asttable
--output=/home/astro/Desktop/gnuas/test_zeropoint/ARP_Solved_zeropoint/ref1-2.5-cat.fits
\
               --colmetadata=1,OBJ_ID,int32,"Id of object." \
               --colmetadata=2,RA,float64,"Right Assencion." \
               --colmetadata=3,DEC,float64,"Declination." \
               --colmetadata=4,MAGNITUDE,float32,"Magnitude."
asttable sdss-catalog.fits -cRA_ICRS,DE_ICRS -cimag \
         | cat -n \
         | asttable
--output=/home/astro/Desktop/gnuas/test_zeropoint/ARP_Solved_zeropoint/ref1-3-cat.fits
\
               --colmetadata=1,OBJ_ID,int32,"Id of object." \
               --colmetadata=2,RA,float64,"Right Assencion." \
               --colmetadata=3,DEC,float64,"Declination." \
               --colmetadata=4,MAGNITUDE,float32,"Magnitude."
astquery: ARP_Solved.fits: only has one HDU.

You should inform this program to look for your desired input data in the
primary HDU with the '--hdu=0' option. For more, see the FOOTNOTE below.

Pro TIP: if your desired HDU has a name (value to 'EXTNAME' keyword), it is
best to just use that name with '--hdu' instead of relying on a counter. You
can see the list of HDUs in a FITS file (with their data format, type, size
and possibly HDU name) using Gnuastro's 'astfits' program, for example:

    astfits ARP_Solved.fits

FOOTNOTE -- When writing a new FITS file, Gnuastro leaves the pimary HDU only
for metadata. The output datasets (tables, images or cubes) are written after
the primary HDU. In this way the keywords of the the first HDU can be used as
metadata of the whole file (which may contain many extensions, this is
stipulated in the FITS standard). Usually the primary HDU keywords contains
the option names and values that the program was run with. Because of this,
Gnuastro's default HDU to read data in a FITS file is the second (or
'--hdu=1'). This error is commonly caused when the FITS file wasn't created by
Gnuastro or by a program respecting this convention.
make: *** [/usr/local/share/gnuastro/zeropoint.mk:66:
/home/astro/Desktop/gnuas/test_zeropoint/ARP_Solved_zeropoint/stars.fits]
Error 1
make: *** Waiting for unfinished jobs....

The fits looks like:

astfits ARP_Solved.fits



Run on Wed Nov  1 16:27:14 2023
-----
HDU (extension) information: 'ARP_Solved.fits'.
 Column 1: Index (counting from 0, usable with '--hdu').
 Column 2: Name ('EXTNAME' in FITS standard, usable with '--hdu').
           ('n/a': no name in HDU metadata)
 Column 3: Image data type or 'table' format (ASCII or binary).
 Column 4: Size of data in HDU.
 Column 5: Units of data in HDU (only images, for tables use 'asttable -i').
           ('n/a': no unit in HDU metadata, or HDU is a table)
-----
0      n/a             float32         4524x3624 n/a

What am I doing wrong?







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?110952>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]