gnuastro-devel
[Top][All Lists]
Advanced

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

[bug #59469] Gaia server returns fits.gz, but output written as .fits


From: Mohammad Akhlaghi
Subject: [bug #59469] Gaia server returns fits.gz, but output written as .fits
Date: Mon, 16 Nov 2020 20:49:56 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0

URL:
  <https://savannah.gnu.org/bugs/?59469>

                 Summary: Gaia server returns fits.gz, but output written as
.fits
                 Project: GNU Astronomy Utilities
            Submitted by: makhlaghi
            Submitted on: Tue 17 Nov 2020 01:49:54 AM UTC
                Category: Query
                Severity: 3 - Normal
              Item Group: Output not reasonable
                  Status: Confirmed
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Currently when the 'astquery' program downloads a table from Gaia, Gaia
actually sends a compressed FITS file ('.fits.gz'). However, the default name
(when the user doesn't specify an '--output' option) is 'query.fits'! This can
be misleading and cause confusion. 

The reason I hadn't noticed this until now was that Gnuastro (through CFITSIO)
automatically decompresses the compressed file internally. So for example when
you run any of the commands below, it acts like an ordinary FITS table:


astfits query.fits             # To just see the extensions.
asttable query.fits            # To see the column values.
asttable query.fits --info     # To see the metadata.


But other FITS table viewers may not be equipped for this, and generally, the
name should hint at the format. So this is a bug that should be fixed.

The fix should include two modes:

1. When an '--output' name isn't given, the default name for Gaia should be
'query.fits.gz'.

2. When an output name is given to the '--output' option, we should check if
the suffix is '.fits' or '.fits.gz'. Based on the user's requested format, we
should decompress the downloaded table internally and give the user what they
want.

For the time being, one fast solution is to use Gnuastro's table, like the
format below. If the input is compressed, it will decompress it internally,
and if it isn't compressed, it will effectively just copy the first extension.
But in any case, 'query-good-format.fits' will not be a compressed file
anymore.


asttable query.fits --output=query-good-format.fits


This bug was reported by Francois Ochsenbein.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59469>

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




reply via email to

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