bugGNU Astronomy Utilities - Bugs: bug #59469, Gaia server returns fits.gz, but...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Tue 17 Nov 2020 01:49:54 AM UTC
   
 
Category:  Query Severity:  3 - Normal
Item Group:  Output not reasonable Status:  Fixed
Privacy:  Public Assigned to:  makhlaghi
Open/Closed:  Closed

Sat 19 Dec 2020 01:54:14 AM UTC, comment #1: 

This bug has been fixed as part of Commit 6ef71c2fd39f (November 19th, 2020).

The raw downloaded table is no longer directly returned to the user. Query immediately opens the downloaded table after downloading it and writes it into the user's desired output file, then deletes the raw downloaded file.

But this can lead to potentially loosing important database-specific metadata. So I just defined task #15843 to allow users to preserve the raw downloaded file if they want.

Mohammad Akhlaghi <makhlaghi>
Group administrator
Tue 17 Nov 2020 01:49:54 AM UTC, original submission:  

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.

Mohammad Akhlaghi <makhlaghi>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)
  • -email is unavailable- added by makhlaghi
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-12-19 makhlaghi StatusConfirmed Fixed
        Assigned toNone makhlaghi
        Open/ClosedOpen Closed
    2020-11-17 makhlaghi Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code