Interactive Normalization of 1d-Spectra in fits Format

Below, we discuss a simpler script ( that allows you to interactively normalize a 1d spectrum in fits format. Download the file here.

For normalization, points representing the continuum must be selected interactively by clicking. A cubic spline is then placed through these points, the stiffness of which is controlled by a „smoothing factor“ sm (to be specified in line 23, sm = 1 means that all specified points are touched by the spline, sm = 0, on the other hand, means a compensation line through the selected supporting points). In a graphic the spectrum to be normalized, the selected supporting points and the spline are shown, in a second graphic window the normalized spectrum is shown, which is also saved as fits file. In addition, the interpolation points are stored in a binary file.