I want to use hselect to parse out all images of a given filter.. the relevant header keyword used in these images is FILTER but unfortunately the value assigned to this keyword has an apostrophe as in:
FILTER = u'
FILTER = g'
FILTER = i'
so when I use what would be the correct command to parse out the images with u filter, the apostrophe creates an error. - command is:
hselect @list.txt $I "(FILTER ?= 'r'')"
error returned is:
ERROR: missing closing quote in string constant
is there an escape character that can be used to get hselect to recognise the apostrophe?
Assuming the apostrophe is done properly in the header (i.e. that a value like "O'Hara" is written as "O''Hara"), the you can use either the same double-apostrophe trick or a '\' to escape the value. For example
however, the output returned suggested that not only did hselect add keyword FILTER with value X to images that currently did not have that keyword but it also changed the keyword value for all other images that already had the keyword FILTER, here is a sample of the output returned to me:
DATE/nov21/full_moon_033.fit,FILTER: u' -> X
add DATE/nov21/bias_001.fit,FILTER = X
add DATE/nov21/bias_050.fit,FILTER = X
DATE/nov21/full_moon_083.fit,FILTER: u' -> X
DATE/nov21/full_moon_015.fit,FILTER: u' -> X
add DATE/nov21/bias_110.fit,FILTER = X
DATE/nov21/full_moon_089.fit,FILTER: u' -> X
add DATE/nov21/bias_134.fit,FILTER = X
add DATE/nov21/bias_158.fit,FILTER = X
add DATE/nov21/bias_116.fit,FILTER = X
....and so on
first off, I only wanted wanted it to add the keyword FILTER if it didn't exist, not to update it if it did already exist!! - that was probably down to my misunderstanding what each of the parameters actually does....
But more surprising than that is that despite the output of hedit as quoted above, if after running hedit I then check the keyword FILTER of any of the images that it supposedly updated, the value for FILTER remains at its old value or if the keyword FILTER did not exist for a particular image it will still not exist although the output of hedit suggests otherwise. For example, from the above output, if I were to check the keyword FILTER of
DATE/nov21/full_moon_089.fit, it would still be FILTER = u'...or if I check FILTER value for DATE/nov21/bias_116.fit, the keyword FILTER will still not exist for this image..
Why is this?
(and apologies for longwinded post!)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum