Welcome to iraf.net Saturday, May 11 2024 @ 12:33 PM GMT
Alexa |
11/17/2013 08:00PM (Read 2197 times)
|
|
|
Status: offline
Registered: 11/10/2013
Posts: 5
|
Hi All,
I'm trying to convert some text files back to fits images and I can't get it to work right.
I do -
rspectext
And it doesn't give any errors but when I try to display or use splot I get the following error,
ERROR: FXF: SIMPLE keyword value is not standard
which the header is -
SIMPLE F / Standard SPE format
LENGTH 1114
FORMAT TRUE
EQUID FALSE
CRPIX 1.000000
CRVAL 4037.0461
CDELT 0.075438000
....
I tried just editing the SIMPLE keyword to T and redoing the rspectext which also runs without error but then I get a seg fault when I try to display or splot.
I don't know the specifics of fits files so I don't understand what I should be doing here. Any suggestions?
|
|
|
|
fitz |
11/17/2013 08:35PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Could you please post the parameters you used (e.g. "cl\$this->_split2($m[0]) dpar rspectext") as well as the IRAF and OS version you are using? It would also help to have the text file itself, this could be uploaded to the anonftp at ftp://iraf.noao.edu/pub
Note that if you create a filename explicitly with a ".imh" extension (e.g. "spec.imh") you'll create a different type of image format, if that also fails the error might be in the task and not specifically a FITS problem.
|
|
|
|
Alexa |
11/17/2013 11:37PM
|
|
|
Status: offline
Registered: 11/10/2013
Posts: 5
|
I'm running IRAF 2.16 on a Mac with OS Mavericks
From dpar:
rspectext.input = "55X08023.N"
rspectext.output = "tmp.fits"
rspectext.title = ""
rspectext.flux = no
rspectext.dtype = "linear"
rspectext.crval1 = 1.
rspectext.cdelt1 = 1.
rspectext.fd1 = ""
rspectext.fd2 = ""
rspectext.mode = "ql"
# EOF
I can't recreate my original problem but the task still isn't working properly.
Example 1 -
https://docs.google.com/document/d/1gCv7CH3OfwWt3edLu6FCZdUvMvzGuMDtlmBaW0OrPTs/pub
Here rspectext doesn't even run I get the error
"ERROR: Not 8-bit ASCII characters
"nskip=0, dim=dim)"
line 58: onedspec$rspectext.cl
called as: `rspectext (input=29X06181.N, output=temp.fits)'"
I tried using both ".imh" extension and ".fits" extension. When I try ".'fits" the task completely fails but when I use ".imh" it creates the image but when I try to splot it gives this error
"ERROR: MWCS: dimension mismatch (mw_open)"
Example 2 -
https://docs.google.com/document/d/1KUstTi0LGCuW0snqafNOb89uXe-DakL1dwL4KjH0YNA/pub
It's with this kind of file that rspectext works fine but when I try to splot or display I get "ERROR: segmentation violation" and this is the same for both ".fits" and ".imh"
|
|
|
|
fitz |
11/18/2013 06:13PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
The problem is that RSPECTEXT is expecting a valid FITS header in front of the wavelength/pixel pairs, this means that lines like
History of spectrum E:\OLES\NORDIC\RR_TAU\29x06181.dat 08-02-96 12:01:45
Length 1137
Equid False
:
Divided by file E:\OLES\NORDIC\RR_TAU\SYN\29x06181.po 02-06-96 13:55:10
in Example 1 are invalid, and the "Not 8-bit ASCII" message comes from the BITPIX=-32 value (and not BITPIX=8). In the second example the same "Divided by...." line applies and the lines
SIMPLE T / Standard SPE format
LENGTH 1141
FORMAT TRUE
EQUID FALSE
CRPIX 1.000000
CRVAL 7657.1782
CDELT 0.14278100
aren't valid because of a missing '=' in column 9. Fixing these lines allows me to run the task successfully.
Alternatively, you could remove the header from the input file entirely and use RSPECTEXT to create the image, then use the ARTDATA.MKHEADER task to add the (still corrected) header to the resulting image.
|
|
|
|
| |
|
Content generated in: 0.12 seconds |
|