gnuastro-devel
[Top][All Lists]
Advanced

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

[bug #62548] Table doesn't recognize plain-text string column when defin


From: Mohammad Akhlaghi
Subject: [bug #62548] Table doesn't recognize plain-text string column when defined width is larger and it is the last column
Date: Mon, 30 May 2022 19:55:44 -0400 (EDT)

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

                 Summary: Table doesn't recognize plain-text string column
when defined width is larger and it is the last column
                 Project: GNU Astronomy Utilities
            Submitted by: makhlaghi
            Submitted on: Tue 31 May 2022 12:55:42 AM BST
                Category: Table
                Severity: 3 - Normal
              Item Group: Output not reasonable
                  Status: In Progress
                 Privacy: Public
             Assigned to: makhlaghi
             Open/Closed: Open
         Discussion Lock: Any


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Tue 31 May 2022 12:55:42 AM BST By: Mohammad Akhlaghi <makhlaghi>
When the last column of an input table (in plain-text) has a string type, but
the given width (number of characters) in the column's metadata
<https://www.gnu.org/software/gnuastro/manual/html_node/Gnuastro-text-table-format.html>
gives a width that is larger than the string, Table will not recognize that
string column!

For example see the example below where the second column is a string (date
format) that actually has 19 characters, but we have given it 'str23': 


$ cat cat.txt
# Column 1: id   [counter, u8] Counter of exposure
# Column 2: date [time, str23] The exposure date
1 2019-03-07T20:14:11
2 2019-03-07T20:12:37
3 2018-07-18T21:23:14
4 2019-03-30T00:32:29

$ asttable cat.txt -i
--------
cat.txt
-------  -----    ----   -------
No.Name  Units    Type   Comment
-------  -----    ----   -------
1  id    counter  uint8  Counter of exposure
--------
Number of rows: 4
--------


As you see, Table hasn't recognized the last string column, and only reports
the existence of the first column. In case we remove the first column from the
previous table, then Table will complain that there is no data (like below):


$ cat cat.txt
# Column 1: date [time, str23] The exposure date
2019-03-07T20:14:11
2019-03-07T20:12:37
2018-07-18T21:23:14
2019-03-30T00:32:29

$ asttable cat.txt -i
asttable: cat.txt: no usable data rows


This bug was found with the help of Sepideh Eskandarlou. I am now working on
the fix.







    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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