[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-devel] [task #14340] Defining arbitrary variable and its value
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-devel] [task #14340] Defining arbitrary variable and its value in FITS headers |
Date: |
Tue, 31 Jan 2017 00:09:50 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 |
URL:
<http://savannah.gnu.org/task/?14340>
Summary: Defining arbitrary variable and its value in FITS
headers
Project: GNU Astronomy Utilities
Submitted by: makhlaghi
Submitted on: Tue 31 Jan 2017 09:09:49 AM JST
Should Start On: Tue 31 Jan 2017 12:00:00 AM JST
Should be Finished on: Tue 31 Jan 2017 12:00:00 AM JST
Category: All Gnuastro
Priority: 5 - Normal
Item Group: Enhancement
Status: Postponed
Privacy: Public
Percent Complete: 0%
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Effort: 0.00
_______________________________________________________
Details:
It is very important for reproducibility that the programs which produce FITS
images also add all their input option values into the produced extension. One
of the reasons this is currently not done was that the option names can be
arbitrarily long and have many types. While the FITS keywords have a strict
limit on their length and there is nothing about specifying a type. So there
was no robust way to keep this information.
After reading the Draft FITS 4.0 standard
<https://fits.gsfc.nasa.gov/standard40/fits_standard40draft1.pdf>, where it
defines `ZNAMEi' and `ZVALi' in section 10.1.2, page 44, I thought of
extending that concept to solve this problem. My proposed style is like the
following, for variable `i':
VNi = 'type variable_name' / [unit] Variable i type and name.
VVi = 3.141592653589 / [unit] Variable i value.
`VN' stands for "Variable Name", and `VV' for "Variable Value". The only
requirement is that `VNi' is placed before/above `VVi'.
For the `type' we can have any of the standard C types and `variable_name' can
be any name (of any length). The type of the value from `VNi' can then be used
to read `VVi' into the proper data type. In Section 4.3.2 (Units in comment
fields) of the same FITS 4.0 standard, a method is defined to store the units
of the variable, which can be stored in one or both of the two comment
sections.
A parser can be written to easily parse these and use them in programs, so for
example you can say that you want to use these values/variables instead of
configuration files and so you can process another input dataset with exactly
the same paramters you used on another image.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/task/?14340>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [gnuastro-devel] [task #14340] Defining arbitrary variable and its value in FITS headers,
Mohammad Akhlaghi <=
Re: [gnuastro-devel] [task #14340] Defining arbitrary variable and its value in FITS headers, boud, 2017/01/31