Problem with rspectext/wspectext
cosmologist wrote on Mar 03, 2012
Hi,
I am having a problem converting an ASCII file into a fits file.
Converting doesn't give me any error, but when I use splot to plot the spectrum I get:
And when I try to convert that file back to ASCII I get:
The file I am using is the one here (without the first line):
http://vizier.cfa.harvard.edu/viz-bin/nph-Plot/Vgraph/txt?III%2f219%2f.%2fcluster%2fNGC2157.oi&-X&\*l%20[\oA]&-Y&Normalized%20Flux&--bitmap-size&600x400
Thanks!
I am having a problem converting an ASCII file into a fits file.
Converting doesn't give me any error, but when I use splot to plot the spectrum I get:
ERROR: floating point overflowAnd when I try to convert that file back to ASCII I get:
ERROR: floating point overflow
"> specout)"
line 44: onedspec$wspectext.cl
called as: `wspectext (mode=h)'
The file I am using is the one here (without the first line):
http://vizier.cfa.harvard.edu/viz-bin/nph-Plot/Vgraph/txt?III%2f219%2f.%2fcluster%2fNGC2157.oi&-X&\*l%20[\oA]&-Y&Normalized%20Flux&--bitmap-size&600x400
Thanks!
Mike Fitzpatrick wrote on Mar 03, 2012
Works fine for me on a macintel system with the latest code, so maybe it is a bug that's already been fixed. What IRAF version and platform are you using, also what parameters to RSPECTEXT did you use?
cosmologist wrote on Mar 03, 2012
Thanks for your reply. I am using iraf on mac as well:
with these parameters:
Thanks
NOAO/IRAFNET PC-IRAF Revision 2.14 Fri Nov 30 15:27:05 MST 2007with these parameters:
(title = ) Spectrum title
(flux = yes) Flux calibrated?
(dtype = linear) Dispersion type
(crval1 = INDEF) Coordinate of first pixel
(cdelt1 = INDEF) Coordinate interval per pixel
(fd1 = )
(fd2 = )
(mode = ql)Thanks
cosmologist wrote on Mar 03, 2012
Am I using an older version of Iraf? :shock:
Mike Fitzpatrick wrote on Mar 03, 2012
The problem is in your use of INDEF for crval1/cdelt1: these value are written to the header but aren't legal FITS values, and don't make for a sensible WCS anyway. For your data table, reasonable values would be crval1=3690 and cdelt1=2, or else try using dtype=interp to interpolate the dispersion.
cosmologist wrote on Mar 03, 2012
Yep! That was it!! Thank you :D
Last post on Mar 03, 2012