After digging in forum, re-re-..-reading scripting manual and testing different approaches, I found following solution:
---------------------------------------------------------
list = "a.lst"
while (fscan(list, s1) !=EOF) {
imgets(s1,"DATE-OBS")
hedit (s1,"UT",substr(imgets.value,12,19), add+, ver-)
}
---------------------------------------------------------I agree, that this solution is pretty limited (what happens when DATE-OBS contains fraction of seconds.. :wink
but it does what I need. Plain CL-script works now very well when using [i:64373f951a]cl < script[/i:64373f951a].Setairmass requires sidereal time keyword to be presented in the header. After creating this keyword, it is indeed possible to add UT or UTMIDDLE (default) keyword using setairmass. The problem is/was, that for computing ST, UT is needed ;-) In my case, only the DATE-keyword (containing both date and time) was in the FITS header and ST has to be computed more or less "manually", like:
[i:64373f951a]hedit @a.lst st '(6.6974-(2451543.5-@"ljd")/15.21842447+1.764417+@"UT"*1.002738)' add+ ver-
[/i:64373f951a]
Actually, I found that when my DATE-OBS keyword was in the form:
DATE-OBS= '2007-03-14T18:36:20' and i added UT-keyword manually as 18:36:20,
[i:64373f951a]setairmass file.fits ut=ut update+[/i:64373f951a] created UTMIDDLE as:
UTMIDDLE= '2007-03-14T18:41:20.00'
Seems that [i:64373f951a]setairmass[/i:64373f951a] creates UTMIDDLE always in such format (and it is totally fine for UTMIDDLE keyword).At the moment I would conclude: in similar situation, one can create UT keyword containing just time only with parsing strings.Also, thank you very much for your answers
Tõnis