[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #61976] Table arithmetic date-to-sec produces inaccurate result
From: |
Pedram Ashofteh Ardakani |
Subject: |
[bug #61976] Table arithmetic date-to-sec produces inaccurate result |
Date: |
Tue, 1 Feb 2022 13:18:39 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?61976>
Summary: Table arithmetic date-to-sec produces inaccurate
result
Project: GNU Astronomy Utilities
Submitted by: pedram
Submitted on: Tue 01 Feb 2022 06:18:37 PM UTC
Category: Table
Severity: 3 - Normal
Item Group: Output not reasonable
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
This bug was first reported by Zohreh Ghaffari.
== steps to reproduce ==
1. create a dummy fits file
2. add the DATE-OBS keyword with value 2018-05-04T04:16:46.7774
3. run table arithmetic to get the 'date-to-sec' result
4. update the DATE-OBS keyword with value 2018-05-04T04:15:25.8326
5. you'd get the same number of seconds for both even though they are about 80
seconds different
$ echo "1" > dummy.txt
$ astconvertt dummy.txt -odummy.fits
$ astfits dummy.fits -h1 --update=DATE-OBS,2018-05-04T04:16:46.7774
$ astfits dummy.fits -h1 --keyvalue=DATE-OBS --colinfoinstdout | \
asttable -c'arith DATE-OBS date-to-sec' --colinfoinstdout
# Column 1: UNIXSEC [sec,f64,] Unix seconds (from 00:00:00 UTC, 1 January
1970)
1525410945
$ astfits dummy.fits -h1 --update=DATE-OBS,2018-05-04T04:15:25.8326
$ astfits dummy.fits -h1 --keyvalue=DATE-OBS --colinfoinstdout | \
asttable -c'arith DATE-OBS date-to-sec' --colinfoinstdout
# Column 1: UNIXSEC [sec,f64,] Unix seconds (from 00:00:00 UTC, 1 January
1970)
1525410945
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61976>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #61976] Table arithmetic date-to-sec produces inaccurate result,
Pedram Ashofteh Ardakani <=