Welcome to iraf.net Wednesday, April 24 2024 @ 12:51 PM GMT
grayro |
01/20/2017 09:58PM (Read 1168 times)
|
|
|
Status: offline
Registered: 03/15/2014
Posts: 23
|
Hi, I am having problems with some RA and DEC keywords in fxcor. fxcor wants the values to be delimited with colons, such as "12:30:56", but I have some spectra which have spaces instead: "12 30 56" and fxcor chokes on those. I want to be able to edit the header to correct those strings (by simple character replacement: replace " " with ":"), but I cannot find a string function in IRAF that will do that replacement. I could do this easily in "C", but do not see how to do this within IRAF. Can you help?
Richard
|
|
|
|
fitz |
01/20/2017 10:37PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
You can wrap it up in a script to process lists of images, but the basic steps would make use of the 'sed' foreign command in something like:
hselect ("foo.fits", "RA", yes) | sed("-e 's/ /:/g'") | scan (s1)
hedit ("foo.fits", "RA", s1, update+, verify-)
and then the same for the 'DEC" keyword. Unfortunately there isn't a string replacement function built directly into any of the header tasks.
|
|
|
|
| |
|
Content generated in: 0.13 seconds |
|