View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

problems with esoselect

cthoene wrote on Jan 19, 2009

Hi,

I want to do some simple pipeline for datareduction and need to sort the files for e.g. the filter name. In ESO data, this is stored in the IRAF nonconform way of using headers names with spaces ("HIERARCH ESO blabla.."). I finally found the program "esoselect.cl" to replace "hselect" for those long ESO headers.
However, at least for me, it only works if the value that the header has to match is a number, not if it is a string as the filter names are (e.g. "I_BESS" etc.). I tried every possible combination of quotes and doublequotes and even including the spaces after the string as in the ESO header, but it does not work.

Does anyone have an idea?? I have been asking around but found no one that could help me, at least not in IRAF directly.

Would be happy for any help!
ct

Mike Fitzpatrick wrote on Jan 19, 2009

Did you quote the keyword string or just the value? I can make it working using something like

cl> esoselect *.fits "HIERARCH ESO FILTER ID" I_BESS


Also, depending on your data you may be interested in the ESOWFI package as a means of working with WFI data a bit easier. It's available from the download area.

-Mike

cthoene wrote on Jan 19, 2009

Unfortunately, it does not work for me. I tried all the following combinations and none of them works:

esoselect *.fits "HIERARCH ESO INS FILT1 NAME" I_BESS
esoselect *.fits "HIERARCH ESO INS FILT1 NAME" "I_BESS"
esoselect *.fits "HIERARCH ESO INS FILT1 NAME" 'I_BESS'
esoselect *.fits "HIERARCH ESO INS FILT1 NAME" " 'I_BESS' "
esoselect *.fits "HIERARCH ESO INS FILT1 NAME" ' "I_BESS" '

however, e.g.

esoselect *.fits "HIERARCH ESO TPL NEXP" 6

works (because the value it has to match is a number, not a string).

I have no clue what is going wrong. In the esoselect code, "value" is explicitely defined as a "string", so it should work in principle.
Any suggestions?

Christina

Mike Fitzpatrick wrote on Jan 19, 2009

Could you please post the image header (i.e. a "cl> imhead foo.fits long+" listing)? I can't reproduce the problem, even is the value is improperly quoted.

-Mike

cthoene wrote on Jan 19, 2009

Hm, here comes the first part of the header:

--> imhead FORS2_IMG003.2.CHIP1.fits long+
FORS2_IMG003.2.CHIP1.fits[2048,1034][ushort]: GRB
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [2048,1034], length of user area 12879 s.u.
Created Wed 18:27:00 21-Jan-2009, Last modified Wed 18:27:00 21-Jan-2009
Pixel file "FORS2_IMG003.2.CHIP1.fits" [ok]
ORIGIN = 'ESO ' / European Southern Observatory
DATE = '2009-01-03T00:53:08.294' / UT date when this file was written
MJD-OBS = 54834.03478941 / MJD start (2009-01-03T00:50:05.805)
DATE-OBS= '2009-01-03T00:50:05.804' / Date of observation
EXPTIME = 179.9854 / Total integration time
CRVAL1 = 339.96000 / value of ref pixel
CRPIX1 = 1022.3 / Ref pixel in x-axis
CTYPE1 = 'RA---TAN' / Coordinate system of x-axis
CRVAL2 = -40.14697 / value of ref pixel
CRPIX2 = 119.2 / Ref pixel in y-axis
CTYPE2 = 'DEC--TAN' / Coordinate system of y-axis
BSCALE = 1.000000000 / pixel=FITS*BSCALE+BZERO
BZERO = 32768.0 / pixel=FITS*BSCALE+BZERO
EXTNAME = 'CHIP1 ' / Extension name
TELESCOP= 'ESO-VLT-U1' / ESO Telescope Name
RA = 339.960000 / 22:39:50.3 RA (J2000) pointing (deg)
DEC = -40.14697 / -40:08:49.0 DEC (J2000) pointing (de
EQUINOX = 2000. / Standard FK5 (years)
RADECSYS= 'FK5 ' / Coordinate reference frame
LST = 10773.836 / 02:59:33.836 LST at start (sec)
UTC = 3003.000 / 00:50:03.000 UTC at start (sec)
OBJECT = 'GRB ' / Target description
INSTRUME= 'FORS2 ' / Instrument used
CD1_1 = -6.998223000E-05 / Translation matrix element.
CD1_2 = -0.000000000E+00 / Translation matrix element.
CD2_1 = -0.000000000E+00 / Translation matrix element.
CD2_2 = 6.998223000E-05 / Translation matrix element.
ORIGFILE= 'FORS2_IMG003.2.CHIP1.fits' / Original File Name
ARCFILE = 'FORS2.2009-01-03T00:50:05.805.fits' / Archive File Name
CHECKSUM= '94QaF1NU91NaE1NU' / ASCII 1's complement checksum
DATASUM = '3483249484' / data unit checksum updated 2009-01-0
HIERARCH ESO OBS TPLNO = 2 / Template number within OB
HIERARCH ESO OBS NAME = 'TOO_FORS2_photometry_R' / OB name
HIERARCH ESO OBS PROG ID = '082.D-0276(B)' / ESO program identification
HIERARCH ESO OBS ID = 330220 / Observation block ID
HIERARCH ESO OBS DID = 'ESO-VLT-DIC.OBS-1.11' / OBS Dictionary
HIERARCH ESO OBS OBSERVER = 'UNKNOWN ' / Observer Name
HIERARCH ESO OBS PI-COI NAME = 'UNKNOWN ' / PI-COI name
HIERARCH ESO OBS PI-COI ID = 685 / ESO internal PI-COI ID
HIERARCH ESO OBS TARG NAME = 'GRB ' / OB target name
HIERARCH ESO OBS GRP = '0 ' / linked blocks
HIERARCH ESO OBS START = '2009-01-03T00:46:27' / OB start time
HIERARCH ESO OBS EXECTIME = 466 / Expected execution time
HIERARCH ESO TPL ID = 'FORS2_img_obs_crsplit' / Template signature ID
HIERARCH ESO TPL NAME = 'jitter images' / Template name
HIERARCH ESO TPL NEXP = 6 / Number of exposures within templ
HIERARCH ESO TPL EXPNO = 2 / Exposure number within template
HIERARCH ESO TPL START = '2009-01-03T00:46:27' / TPL start time
HIERARCH ESO DPR CATG = 'SCIENCE ' / Observation category
[...]

Christina

Mike Fitzpatrick wrote on Jan 19, 2009

Is there more? I was particularly interested in seeing the specific keyword you're trying to access.

cthoene wrote on Jan 19, 2009

ok :)

HIERARCH ESO INS FILT1 ID = '+76 ' / Filter unique ID
HIERARCH ESO INS FILT1 NAME = 'R_SPECIAL' / Filter i name
HIERARCH ESO INS FOCU POS = 0.13120000 / Focus position in cm
HIERARCH ESO INS FOCU TEMP = 13.5 / Focus temperature in C

but it is the same with all strings whereas it works for all numbers...

ct

Mike Fitzpatrick wrote on Jan 19, 2009

Hate to say it, but it works for me:


ecl> cd /tmp
ecl> imcopy dev$pix test.fits
dev$pix -> test.fits
ecl> hfix test.fits
     ....then I just add the HIERARCH keywords from your post
ecl> esoselect *.fits "HIERARCH ESO TPL NEXP" 6
test.fits
ecl> esoselect *.fits "HIERARCH ESO INS FILT1 NAME" R_SPECIAL
test.fits
ecl> esoselect *.fits "HIERARCH ESO INS FILT1 NAME" I_BESS 
ecl>


Maybe we're just using different versions of the script. I've put mine at http://iraf.net/ftp/pub/esoselect.cl in case you want to give that a try.

-Mike

cthoene wrote on Jan 19, 2009

In order to try, I would need permission to see the file ;)

ct

Mike Fitzpatrick wrote on Jan 19, 2009

Sorry, should be fixed now.

Last post on Jan 19, 2009