Welcome to iraf.net Tuesday, May 21 2024 @ 03:05 AM GMT
massey |
05/21/2007 01:38PM (Read 6899 times)
|
|
|
Status: offline
Registered: 02/10/2006
Posts: 162
|
Mike, et al---Sorry to ask such a simple question, but this one has been confused. I have
a bunch of old blah.ms.imh files, and I'd like to convert these to fits
(blah.ms.fits). So I did the following:
files *%.imh%% > old
imrename @old//.imh @old//.fitsMuch to my surprise, it tried to rename blah.imh.ms (!) to blah.fits.ms:
Warning: cannot rename `d0066.imh.ms' -> `d0066.fits.ms'
Warning: cannot rename `d0067.imh.ms' -> `d0067.fits.ms'
Warning: cannot rename `d0068.imh.ms' -> `d0068.fits.ms'and so on...Sorry to ask such a basic question, but I found this behavior...surprising.
I'm running 2.12.2. This specific example came from a red hat 9 installation.thanks,
phil
|
|
|
|
dr.michi |
05/21/2007 01:38PM
|
|
|
Status: offline
Registered: 01/16/2007
Posts: 14
|
Why not use wfits?Michael
|
|
|
|
massey |
05/21/2007 01:38PM
|
|
|
Status: offline
Registered: 02/10/2006
Posts: 162
|
I would have said because wfits won't preserve the old file name. But
actually there's a different problem with that approach:cl> wfits @old @old
Image 1: a0053.msError writing file: a0053.ms.fits
Warning: Ambiguous image name (a0053.ms)If instead, I try
wfits @old//.imh @old
I'm left with the original problem:
cl> wfits @old//.imh @old
Image 1: a0053.imh.msError writing file: a0053.ms.fits
Warning: Cannot open image (a0053.imh.ms)It is attempting to append the file type BEFORE the .ms.(old contains "a0053.ms")
|
|
|
|
fitz |
05/21/2007 01:38PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Hi Phil,Two problems with this: For image templates the use of "@foo//.fits" appears logical but in fact the ".fits" is not appended to each entry in the @foo file the way you'd expect. Prepending to an @file is permitted however, you'd need to set the 'imtype' to force the output image extension. Second, IMRENAME won't convert the image type, it uses the image kernel to do the renaming and one kernel doesn't know about any others.A better approach would be to use IMCOPY to change the format with the extension, and to avoid the 'ambiguous filename' message (because there's then a foo.imh and a foo.fits in the same dir), copy to/from a different directory. For example,[code:1:e9b1816180]cl> imcopy *.ms.imh *.ms.%imh%fits%[/code:1:e9b1816180]will do what you originally intended, or to use the @file create it with the root filenames and then copy and global edit so you have a file with the proper extensions and directories.Cheers,
-Mike
|
|
|
|
massey |
05/21/2007 01:38PM
|
|
|
Status: offline
Registered: 02/10/2006
Posts: 162
|
Mike---Worked like a charm, of course. Thank you!---phil
|
|
|
|
| |
|
Content generated in: 0.22 seconds |
|