Error Estimates:
Last update:  15 March 2002

One of the biggest difficulties is getting the data error estimate right. Generally the 1-sigma arrays people are provided with apply for independent data bins, and the data has been rebinned and added (and so smoothed to some extent) so the root mean square fluctuations are less than the error array would suggest. So the chi^2 values, which are based on the sum of [(fit-data)/sigma]^2 terms tend to be too small as calculated. Another thing that can happen is that the error estimates, which are based on read noise and electrons per ADU estimates, can be incorrect at the light levels of the data but adequate fits for the calibration frames used to derive them. Whatever the cause, it is important that the VPFIT program has a way of estimating the RMS fluctuations to obtain a realistic chi^2. The easiest way of doing this for the data you might have is to set up an interpolation table consisting of two columns - the wavelength and the ratio of the mean error to the RMS (any format, provided there is a space between the two columns) - in a file which I tend to leave in a subdirectory database/ of the one containing the data. An example of the contents is:

     3600.00    3.0
     3750       3.1
     4500.10    3.0   0.996812    1.66707E-02    5.06716E-02
     4522.23    3.3   0.992793    1.40880E-02    4.72868E-02
     4028.43    3.2    1.00702    1.54867E-02    5.31174E-02
     4066.70    3.1    1.00090    1.87464E-02    5.82343E-02
     4093.27    3.1    1.00026    1.84596E-02    5.51702E-02
 <EOF>

You may note that sometimes there are more than two entries in a line. Surplus ones are ignored, and in this case these are the mean continuum, RMS and mean error estimate on which column #2 is based. Note that it is not worth being desperately accurate, the mean level and RMS estimates themselves are subject to scatter of their own, and e.g. 5% fluctuations in the ratios are not uncommon.

When VPFIT uses a wavelength region, the RMS it uses at a particular wavelength is the error estimate x the wavelength interpolated value from column 2 in this table, provided of course that it knows the table exists! [SCLFILE scalefilename in the FITS or IRAF header] If the wavelength is outside the wavelength range given in the table, it simply takes the nearest value, so, in the example here, the scalefactor at 3550A is 3.0., and at 4100 it is 3.1.

To set up this file you can use the "m"- "m" option in rdgen to provide error/RMS estimates. It prints out lines in the format wavelength, ratio, plus other numbers so you can cut and paste to a file (and then strip out the comments which go along with it to remind the user to press a key a second time). You will probably want to edit the file in other ways while you are doing this, especially to remove anomalous estimates of the ratio, so the file is not written directly. Note that it does have to have the numbers in increasing wavelength order.