When reading in the model grid, you must also specify the wavelength grid on which the model grid is stored internally. This has two advantages:

a) it normally reduces the demand on internal storage

b) it allows model spectra with different wavelength grids to be combined.

There is a payback. The input file has to be changed. For an example see folder /home/csj/sdb_fits on comet. When you specify the wavelength grid, a check will be run to ensure that it will fit the internal arrays. Individual spectra can be much larger than this (currently 50000 wavelength points).

1) test_newgrid.input

models{ !-----! define model grid
0 ! file format specifier Sterne/Spectrum:
hot blue ! title for model grid
5 5 5 ! dimensions of grid (nT, ng, nHe)
3900 5000 0.1 ! grid wavelengths (ws, we, dw)
/electra/models/7030/40060m10.blue.000 }

save_grid sdb_new.grd

2) /alpha/sdb_fits/hd149382.sfit

read_grid sdb_new.grd

II. The latter file is an excellent example of some other new features.

1) A single step normalisation can be done before the amoeba solution. This means that, for example, fluxed spectra, or badly normalised spectra can be roughly normalised using an approximate model before the amoeba solution begins.

2) The "pamela" input format is an alternative to the "spectrum" format. It expects data in three columns: wavelength, flux, flux error If you have the true flux errors, these can be used instead of an assumed standard error in the weighted least squares fitting procedure .

3) If you don't have the flux errors, you can put a command "sigma 0.1" (for example) before the command "spectrum" within the "data{ }" context. This means you can change the default value of 0.01 which is especially useful if you have noisier data. I have changed the output of sfit so that a "reduced chi squared" is also reported. This number should be close to 1; 3 is probably acceptable, <1 is remarkable, but it is only valid if the flux errors (s.d) are representative.