helplog.25: rspectext, min_lenuserarea, out of space in image header
Frank Valdes wrote on Feb 22, 2005
NUMBER: 25 KEYWORDS: rspectext, min_lenuserarea, out of space in image header DATE: Tue Feb 22 09:54:07 MST 2005 FROM: valdes Q: I have a lot of spectra in simple column format, wavelength followed by flux. Many are not continuum normalized, and I would like to use IRAF for this task. As far as I can tell, I must first convert these images to an IRAF-readable format, but when I try to use rspectext for this purpose, retaining the wavelength information by using the nonlinear setting for dtype, I get the error message ERROR on line 107: Out of space in image header (WAT2_774) I assume that I can set the relevant buffer length somehow, but I have not been able to find out where this setting is done from the documentation I have or from your FAQ's. Any suggestions would be appreciated! A: You are correct that IRAF does not work directly off a text file such as you have. It is a goal to do this someday but not much progress is being made on the goal right now. So you would need to convert to the current format based on an image with the coordinates described in header keywords. The IRAF spectral formats are generally geared to using a functional representation of the wavelengths. It does have a special case to allow listing the wavelengths but this has two limitations. One is fundamental that the number of WAT keywords has to be less than 999. The other is that the header space be allocated large enough to hold the number of keywords. This latter consideration can be controled through an IRAF environment variable. Look in your login.cl and you will see min_lenuserarea. This is the maximum number of characters preallocated by IRAF tasks whenever they read an image. Since it looks like you are getting up to 774 cards you could uncomment the keyword and double the value. Note that it is not a good idea to arbitrarily make this very large since in some cases, like combining many images, the memory allocated for the headers could cause programs to run out of memory. But a factor of two increase would not be out of line. Let me know if this doesn't fix this particular error message. My other comment is that unless you suspect the wavelengths are not smoothly varying you might consider using the functional fit representation of the wavelengths by chosing "interp". For many cases the difference between a fit and the explicit wavelengths is insignificant. Often the way the wavelength were generated in data such as you have was done by fitting a function and then creating the format by evaluating the function at the pixels.
Last post on Feb 22, 2005