Welcome to iraf.net Wednesday, May 01 2024 @ 08:49 PM GMT
acard |
12/16/2010 12:26PM (Read 1754 times)
|
|
|
Status: offline
Registered: 01/18/2007
Posts: 27
|
Hi guys,
I'm working on a simple programme that makes some counts on header parameters.
The idea is to put as input the name of the keyword, and then to use its value to create a new keyword. However I can't figure out how to combine the name of the key with its value, in hedit.
I show few lines of the programme:
...
string ut = "" {prompt = "Universal Time Keyword (initial)"}
...
hedit (image=name, field="H_UT", value="(ut/3600)", add=yes, addonly=no, delete=no, verify=no, update=yes)How should I write to make the programme able to understand that the variable ut is a keyword which value it should use in the formula?
Thanks!
|
|
|
|
fitz |
12/16/2010 12:26PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Since you're using a script variable in the expression, the simplest thing is to construct the expression using string concatenation, e.g.[code:1:6cfa338f1c]...,value="(" // ut // "/3600)", ....[/code:1:6cfa338f1c]The value of the 'ut' variable will then be used in the expression, and as long as it is a valid header keyword that keyword-value will then be used to compute the value.There is a value-indirection '@' operator (see the help page) to use the value of a parameter, but that applies only to header keyword parameters AFAIK (e.g. a keyword used to name the keyword containing the UT time) and isn't what you need here. Hope this helps.
|
|
|
|
| |
|
Content generated in: 0.06 seconds |
|