1 Introduction

Spectral studies of Seyfert galaxies began more than 50 years ago at the Fesenkov Astrophysical Institute (FAI), and are still ongoing [1,2,3,4,5,6]. FAI has a unique archive of photographic films with the spectra of planetary nebulae, stars, and Seyfert galaxies, cumulatively counting to about 7,000 spectrograms obtained between 1970 and 1990 [7].

The use of archival data and the results of modern spectral observations in the FAI makes it possible to obtain a complete picture of the evolutionary changes of the studied objects. Digitized archive data obtained in Kazakhstan contributes to the International Virtual Observatory AllianceFootnote 1 (IVOA) by preserving, sharing and using of the astronomical data.

More than 400 Markarian galaxies have been studied at the FAI, and 42 new Seyfert galaxies have been discovered during the observations. Based on the data obtained at our observatory and abroad, the first Markarian catalog of galaxies “First Byurakan Survey” was compiled, and published in 1986 in the USA and in 1989 in the USSR.

Our observations in 1970–1990 were made mainly in the “red” wavelength range, in the region of \(H_{\alpha }\) and its neighboring emission lines, while the data of the other authors were obtained mainly in the “blue” spectral range, for the \(H_\beta + [OIII]\) emission lines. Statistically, at that time, observations in the “red” spectral region accounted for \(\sim 20\)\(25\%\) of the total number of optical observations. In other words, our results were a weighty addition to the database for Seyfert galaxies.

This paper presents the results of the digitization of archived data and of comparing them with the results of modern observations. The galaxy Mrk 3 was chosen for example. The Seyfert galaxy Mrk 3 is at 56.6 Mpc, (redshift \(z=0.013\)), and due to its fair proximity this object has been studied in all ranges of wavelengths [8]. The galaxy belongs to the Sy2 class, i.e., the spectrum contains both permitted and forbidden lines, and the widths of lines correspond to velocities of up to thousand km/s. Some authors [9] believe that the rapid growth of the gas mass of this galaxy is due to its interaction with the nearby spiral galaxy UGC 3422.

2 Observations of archival and modern data

Since 1970, spectral observations of various objects have been carried out with a diffraction spectrograph [10] designed and built at the Fesenkov Astrophysical Institute. The spectrograph is mounted in the Cassegrain focus of the 70 cm telescope AZT-8. From 1970 to 1998, the three-cascade image-tube UM-92 was used to record spectra. The images from its photocathode were registered on special astronomical A600 film with a maximum sensitivity at \(\sim 5500\) Å. Resolution of the photographic emulsion was approximately 100 lines/mm.

Modern spectral data are acquired using the 1.5 m telescope AZT-20, boasting the largest aperture in Kazakhstan, enabling detection of dim objects (up to \(21^\textrm{m}\)\(22^\textrm{m}\)). An innovative spectrograph (ISP) was installed at the telescope. The spectrograph is equipped with Volume Phase Holographic Gratings (VPHG), fiber optic technology, and a CCD camera with signal amplification (EMCCD), and high-speed image reading with minimum noise. The instrument is used for spectral and photometric observations of objects required within the framework of the institute’s programs. In our case, data were obtained for the Sy Mrk 3 (Table 1).

Table 1 Observational data of the Seyfert galaxy Mrk 3

3 The process of the archive spectra digitizing

3.1 Scanning of spectra

The archived spectra have been saved as images on the special astronomical film. The spectra of the lamp emitting the emission lines HeAr,  and Ne were imprinted on each frame with the object’s spectrum. A fragment of such a film is shown in Fig. 1.

For the calibration of photographic images (transition of the optical density to intensities), special step-tablet calibration plates were used. Their images, obtained with different time exposures, were imprinted on each film for 35 frames.

Fig. 1
figure 1

Fragments of the film from the glass archive library: (a) images of spectra, and (b) step-tablet plate

The Epson Perfection V850 Pro scanner with optional SilverFast8 software was used to scan the photographic films. It allows cropping of the frame while maintaining image quality. The first step is to select the size and resolution of the scanned image to provide the desired high quality at an acceptable size for the finished file. The resulting TIFF frames are converted in bulk to FIT (16-bit) format, using Maxim DL Pro via batch save and convert by selecting specific conversion criteria (.fits, 16-bit int, Range, Uncompressed). The frame is then converted from FIT to FITS format in the IRAF software. Received file’s headers are written with IRAF [13] or with the codeFootnote 2 written in Python [14].

To date, more than 2,000 archived spectra of Seyfert galaxies obtained with the AZT-8 telescope have been scanned with the 2400 dpi resolution. An example of the obtained spectrum image of the Seyfert galaxy Mrk 3 is shown in Fig. 2.

Fig. 2
figure 2

Digitized image of the spectrum of the Seyfert galaxy Mrk 3

4 Alignment of the digitized frame

As can be seen in Fig. 2, the spectrum is angled horizontally and has an S-shaped distortion. The distortion is caused by the magnetic field of the image-tube, it is used for the focusing of the electron fluxes. Such distortions are inherent to all spectral frames, obtained with image-tube. For further analysis, the spectra need to be smoothed out by reducing the noise level. A detailed algorithmFootnote 3 for image alignment is described in the block diagram in Fig. 3.

Fig. 3
figure 3

The process of frame alignment. The green color of the blocks indicates the stages where the initial data is loaded and the result of the alignment procedure is obtained; grey indicates using the data without changing it; yellow indicates using external programs; blue indicates changing the data

For all frames, the first step is horizontal alignment. To determine the slope angle of the spectrum or the step-tablet plate, an oblique straight line repeating the slope of the image is plotted on the frame. The slope angle is calculated for the straight line, after which the image is rotated and cropped.

4.1 Correcting of the S-shaped distortion

The step-tablet plate images (Fig. 4b) are practically free of S-distortion, so only horizontal rotation is performed for them. Distortion reduction is performed for the spectral images. A rectangular area around the spectrum is extracted from the image, which is already aligned to the horizontal. The median Y values for the columns are searched for in the selected part of the frame and their values are approximated by a 3–9 order polynomial. The choice of polynomial order is influenced by the Mean Squared Error (MSE). We aim for the lowest MSE, but very high-order polynomials consume more memory and computational resources. Additionally, when approximating by summing column pixel values, an overly detailed polynomial can introduce errors due to outliers. Hence, we select the polynomial order corresponding to the lowest MSE, beyond which the error doesn’t decrease by more than 1%, as depicted in Fig. 5.

Fig. 4
figure 4

Result of alignment of the digitized calibration frame (a) to the horizontal (b)

Fig. 5
figure 5

Determining the optimal polynomial order for aligning archival spectra of two galaxies

To avoid loss of information and distortion, a sloping straight line is superimposed over the area of the profile containing the spectral lines of interest. The pixels are shifted vertically concerning this straight line and thus the S-distortion is reduced. The results of the S-distortion correction procedure are shown in Fig. 6.

Fig. 6
figure 6

Result of horizontal alignment and S-distortion correction of the spectrum image frame

After the spectral images have been aligned, the data sets are stored. Initially, they are obtained in the optical density scale and must be converted to the intensity scale for further processing. For this purpose, images of the step-tablet calibration plate, obtained with different time exposures are used. The steps of the calibration plate have different degrees of radiation transparency. The ratio of these values is known, it is expressed in the logarithmic scale of the stellar magnitudes (Table 2). Measurement of the images of the step-tablet calibration plate determines the relationship between optical density and radiation intensity.

Table 2 Stellar magnitude for 2 step-tablet calibration plates

When measuring the optical densities of the images of steps, we obtain sets of points for different exposures (Fig. 7, upper panel). The logarithmic scale of the magnitude allows to shift points along the X-axis depending on exposures. In such a way we obtain the common curve (Fig. 7, lower panel).

Fig. 7
figure 7

a) Optical density values of the step-tablet plate were obtained with the different exposures; b) The result of the horizontal shift of the points, taking into account the exposure, towards the points of the maximum exposure

The dependence of the stellar magnitudes on the intensity is known (1) and it allows to recalculate our characteristic curve into the scale of the incident light intensity.

$$\begin{aligned} \log \frac{I}{I_0} = 2.512 \times \left( {m_0}- {m} \right) , \end{aligned}$$
(1)

where \(I_0\) is the intensity of radiation corresponding to the maximal density of an image.

Obtained characteristic curve (Fig. 8) is approximated by the polynomial of the 5–7 orders. The choice of order depends on the MSE, as in the case of S-distortion. Also, the monotonicity of the curve is taken into account. Monotonicity is an extremely important parameter since each optical density value must correspond to only one intensity value. The equation of resulting polynomial is applied to convert each pixel of the spectrum image into the intensity scale.

Fig. 8
figure 8

Example of the characteristic curve, obtained from data on 25–26.01.1976

The data set, expressed in the intensity scale is saved in a .fit format with headers prescribed. All other required data are copied from the Digital Astroplate Data Log and written into the header using a software scriptFootnote 4 [13, 14].

5 Processing and analysis of digitized images with IRAF software

After the image alignment and correction procedure, the following data is checked in the header of the corresponding file: JD, AIRMASS, UTMIDDLE, LST, RA, DEC, UT, EPOCH, DATE, RDNIOSE, GAIN, etc. If any parameters are missing, they must be added. This can be done either manually with hedit function or by using a script. Then, with the selected aperture, the rows containing the spectrum of the object and the spectra of the lamp (\(He-Ne-Ar\)) are selected.

The lamp spectra are used for the wavelength calibration. The spectra of Seyfert galaxies obtained with the image-tube were designed to study the emission line profiles and search for additional emission details in their profiles. Therefore, the spectra of standard stars, which can be used for absolute calibration of the object spectra, were not obtained. Basically, the IRAF option allows using an absolute blackbody calibration. Another way is to apply the emission fluxes of the \([S\,II]\) (\(\lambda \,6717\, \text{\AA},\, 6731\, \text{\AA} \)) or \([O\,I]\) (\(\lambda \,6300\,\text{\AA}, 6363\,\text{\AA}\)) lines. These lines are formed in the Narrow Line Region, far away from the galaxy’s central body, so they remain stable for months or even years.

Naturally, using the emission fluxes in the forbidden lines obtained in 2023 for observations made 30–40 years ago is not entirely correct—real changes in both continuum and emission lines may have occurred in the intervening time [15, 16]. But this is the only way to make a qualitative comparison of the spectral characteristics of a galaxy over a large time interval. For the galaxy Mrk 3, we compared the fluxes in the \([S\,II]\) lines obtained on 25.01.1976 with the fluxes measured on 14.03.2023 which were observed with different telescope AZT-8. The second spectrum (January 25, 2023) has not been used for calibration of the archival data because it was obtained with EMCCD when testing the different equipment options, and was not intended for absolute calibration of the results. Comparison of the spectra obtained at telescopes AZT-20 (January 25, 2023) and AZT-8 (March 14, 2023) in relative units is shown in Fig. 10. The flux ratio of \([ S\, II ]\) emission lines were used to calibrate the archive spectra. The results are visualized as plots in Figs. 9 and 10. In general, the results of the digitization of archival data are in good agreement with modern data. This indicates the good quality of the archival spectra and the correctness of the digitization procedure. Changes in the intensity ratios of the \(H\alpha \) and \([ N\, II]\) emission lines reflect the real changes that have taken place over many years in galaxies.

Fig. 9
figure 9

Comparison of the digitized archived spectra of Mrk 3 with the results, obtained in 2023 (AZT-8)

Fig. 10
figure 10

Comparison of the spectra obtained on the telescopes AZT-20 (January 25, 2023) and AZT-8 (March 14, 2023) in relative units

6 Conclusion

At present, the work is underway to digitize the entire volume of FAI archival spectra. More than 18 million archival data from the glass libraries of different observatories all over the world have already been digitized. This procedure makes it possible not only to preserve the experimental data obtained on films and photographic plates in former years but also to organize convenient access to the information contained therein. We can analyze and compare observational data, obtained over a large time interval and apply modern research approaches to them. Moreover, digitization of archive data significantly increases the probability of discovering completely new phenomena and significantly enriches the information base of astronomical objects.

Great work was carried out at FAI in 2022, under the research programFootnote 5, including the digitization of photometric data, which allowed Kazakhstan to be elected a memberFootnote 6 of the International Virtual Observatory Alliance (IVOA).