tfits file problem
alan wrote on Aug 24, 2009
I am trying to splot a tfits downloaded from the following webapge http://www.sc.eso.org/santiago/uvespop/field_stars_uptonow.html
in order to do some template matching. Even though after trying to change the header using hierarch28 it still does not work (http://www.sc.eso.org/santiago/uvespop/legend.html#column5)
Thanks
in order to do some template matching. Even though after trying to change the header using hierarch28 it still does not work (http://www.sc.eso.org/santiago/uvespop/legend.html#column5)
Thanks
Mike Fitzpatrick wrote on Aug 24, 2009
What exactly does "not work" mean? The default hierarch28 translation table doesn't affect spectral dispersion keywords and the link you sent mentions that the table needs to be rebinned/converted before splot can use it, did you do that? Garbage on the screen is a problem in doing graphics that has nothing to do with the data directly, a specific error message would point to something else.
alan wrote on Aug 24, 2009
the link for hierach28 http://archive.eso.org/saft/
..the error message in IRAF: Can't get image <image_name>
..the error message in IRAF: Can't get image <image_name>
Mike Fitzpatrick wrote on Aug 24, 2009
That means the image could not be opened. Note a FITS binary table is not an image and cannot be used with SPLOT, see the note in http://www.sc.eso.org/santiago/uvespop/legend.html#column5 about converting the file. If you did that already, can you run some non-image task like IMHEAD on the file without error?
alan wrote on Aug 24, 2009
i thought that hierarch28 was solving the problem without the need to rebin....
what would be the values then tfor trebin?
name of independent variable column:
first output value of independent variable:
last value of independent variable:
increment in independent variable ...............0.0125
what would be the values then tfor trebin?
name of independent variable column:
first output value of independent variable:
last value of independent variable:
increment in independent variable ...............0.0125
Mike Fitzpatrick wrote on Aug 24, 2009
Hierarch28 simply remaps keywords with the HIERARCH keyword convention to standard FITS. See the note about trebin not being strictly necessary since you can read the text file and have the dispersion computed for you. I didn't download and image so I can't tell you specifically what the wavelength/flux column names are.
alan wrote on Aug 24, 2009
tried using the text file hd105071 .... but having the following error
input = hd105071.dat Input list of text spectra
output = hd105071.fits Output list of image spectra
(title = ) Spectrum title
(flux = no) Flux calibrated?
(dtype = nonlinear) Dispersion type
(crval1 = 3040.1577148438) Coordinate of first pixel
(cdelt1 = 0.0125) Coordinate interval per pixel
(fd1 = )
(fd2 = )
(mode = ql)
.................
error message:
ERROR: Out of space in image header (WAT2_775)
"listonly=no, verbose=no, logfile="")"
line 92: onedspec$rspectext.cl
called as: `rspectext (mode=h)'
input = hd105071.dat Input list of text spectra
output = hd105071.fits Output list of image spectra
(title = ) Spectrum title
(flux = no) Flux calibrated?
(dtype = nonlinear) Dispersion type
(crval1 = 3040.1577148438) Coordinate of first pixel
(cdelt1 = 0.0125) Coordinate interval per pixel
(fd1 = )
(fd2 = )
(mode = ql)
.................
error message:
ERROR: Out of space in image header (WAT2_775)
"listonly=no, verbose=no, logfile="")"
line 92: onedspec$rspectext.cl
called as: `rspectext (mode=h)'
Mike Fitzpatrick wrote on Aug 24, 2009
You can increase the size of the image header area by increasing the 'min_lenuserarea' environment variable. This is defined (but commented out) in your login.cl file if you want to make a permanent change, on the command line increase it as e.g.
-Mike
cl> reset min_lenuserarea = 512000
cl> respectext ......
-Mike
alan wrote on Aug 24, 2009
now i have this error...
ERROR: No write permission on file (String_File)
"listonly=no, verbose=no, logfile="")"
line 92: onedspec$rspectext.cl
called as: `rspectext (mode=h)'
need to do it with nonlinear dtype in rspectext ....otherwise the spectra is badly calibrated.
ERROR: No write permission on file (String_File)
"listonly=no, verbose=no, logfile="")"
line 92: onedspec$rspectext.cl
called as: `rspectext (mode=h)'
need to do it with nonlinear dtype in rspectext ....otherwise the spectra is badly calibrated.
Mike Fitzpatrick wrote on Aug 24, 2009
The String_File error is usually a buffer overflow problem. I didn't realize these data had >400,000 values. The bad calibration may just be trying to read the data in as is they were linear already, but with a non-linear dispersion the header gets written with the wavelength values for each of the points (i.e. you'd need an absurdly large header to hold it all).
I downloaded one of the spectra and followed the instructions to TREBIN the table. I could use the TPRINT task to print the wavelength of the first pixel then was able to convert the text file to an image with RSPECTEXT. One trick to remember is to remove the header info from the rebinned text table, also remember to remove lines from the beginning/end of the text file that may contain INDEF values. After this, I was able to SPLOT the image and things seemed to work as expected.
-Mike
I downloaded one of the spectra and followed the instructions to TREBIN the table. I could use the TPRINT task to print the wavelength of the first pixel then was able to convert the text file to an image with RSPECTEXT. One trick to remember is to remove the header info from the rebinned text table, also remember to remove lines from the beginning/end of the text file that may contain INDEF values. After this, I was able to SPLOT the image and things seemed to work as expected.
-Mike
Last post on Aug 24, 2009