Status: offline
Registered: 03/17/2006
Posts: 2
|
Hi,I am trying to obtain the value of specific header keywords,
"HIERARCH ESO SEQ RELOFFSETX ",
which gives the value of relative offsets between two ISAAC images.
However, using the "header" related tasks like imgets, results in an
error message or delivers the value "ESO".The same problems occur if I try to rename this strings.
Is there a possibility to tell iraf , that the WHOLE keyword contains
more than 1 string? Thanks a lot, Angela--
Angela Hempel
Observatoire de Geneve
51, Ch. des Maillettes
CH-1290 SauvernySwitzerlande-mail: Angela.Hempel@obs.unige.ch
phone: +41 22 379 2400
fax: +41 22 379 2205
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Use the banner bar to do a Forum Search for "esoselect" and you'll find a script that will do this. This should probably be in the 'Code Snippets' topics as well, I'll post it separately later.-Mike
|
Status: offline
Registered: 03/17/2006
Posts: 2
|
Hi Mike;thanks for your help. The problem with esoselect is:
I don't know the "value", that is the information I am looking for (i.g. the offset between images). But it helped to find a solution.The script is not perfect, but it does what I want.
Bye,
procedure offset(num,inlist,outlist)#######################################################################
# this procedure reads the header, searches for a certain line,
# i.g. "CUMOFFSETX" and writes its value in a new file.
# This file containes than the offset in x and y direction in
#
# start procedure with
# task offset ="/home/evol/*/iraf/offset.cl"
#######################################################################string inlist {prompt="List of images, e.g. nfdsz.slst"}
string outlist {prompt="Name of offset file"}
int num {prompt="Nuber of images"}struct *imgstruc # contains file list
begin
string lfl # list containing images
string nm # name off offset file
string cim # current image
real xoff # XOFFSET
real yoff # YOFFSET
int number # number of image
string dum # dummy variable
int i # running number
real xsh,ysh # shifts
string gotit # for fscan
# prompt for input values
nm = outlist//".off"
lfl = inlist//".slst"
number = num delete (nm) imgstruc = lfl for (i=1; i<= num; i+=1) {
gotit = fscan(imgstruc,cim)
print (" Processing "//cim)
imhead (cim) | match "CUMOFFSETX " | scan (dum,dum,dum,dum,dum,xoff)
imhead (cim) | match "CUMOFFSETY " | scan (dum,dum,dum,dum,dum,yoff)
xsh = -xoff
ysh = -yoff
printf("%10.5f %10.5f\n",xsh,ysh, >> nm)
} end
|