A method, system, and medium for stray light correction in a spectrometer.
By using an optical parametric oscillator as a tunable light source, controlling the output signal light and idler light, and utilizing the energy conservation relationship and main diagonal interpolation to remove the idler light, the problem of insufficient accuracy in stray light correction of spectrometers is solved, achieving high-precision and automated spectral correction.
Patent Information
- Application Number
- CN202611610274.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-19
- Publication Date
- 2026-11-17
AI Technical Summary
Existing methods for stray light correction in spectrometers suffer from insufficient accuracy, low automation, and poor versatility. In particular, when using an optical parametric oscillator as a tunable laser source, idler light interference leads to inaccurate calculation of the stray light distribution matrix, affecting the accuracy of spectral correction.
An optical parametric oscillator is used as a tunable light source to control the output signal light and idler light. The wavelength of the idler light is determined by the energy conservation relationship. The idler light is removed by interpolation along the main diagonal direction, and a stray light correction matrix is constructed for spectral correction.
It improves the precision and accuracy of stray light correction in spectrometers, achieves broadband continuous tuning and highly automated stray light correction, and reduces the interference of idler light on the stray light distribution matrix.
Smart Images

Figure CN123111470A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of machine vision, and particularly relates to a stray light correction method, system and medium for a spectrometer. Background Technology
[0002] Stray light is a crucial technical indicator for evaluating spectrometer performance. Stray light in a spectrometer refers to all unexpected signal light read from the spectrometer. Stray light can originate from various stages of the instrument's imaging process, such as external light illumination, diffraction and scattering from the instrument's internal optomechanical structures, and spectral crosstalk and aliasing caused by the spectroscopic components. Through proper optical design and the implementation of extinction mechanisms, stray light in a spectrometer can be suppressed to a considerable extent. However, before software calibration, depending on the spectrometer's imaging quality, the typical value of stray light intensity when measuring monochromatic light sources is generally around 10. -3 Up to 10 -5 The magnitude of stray light intensity is typically around 10 when measuring broadband light sources. -1 Up to 10 -3 The magnitude of the light intensity is crucial. When the measured light intensity is low, it becomes impossible to distinguish between the true signal and stray light signals, leading to significant errors in subsequent spectral analysis. Therefore, spectrometers also require software-level stray light correction to obtain more accurate spectra.
[0003] Most current stray light correction methods are based on stray light distribution matrix methods. This method requires using the spectrometer under test to obtain the spectral line spread function (LSF) for narrowband light at different wavelengths, then removing the in-band signal of the LSF to obtain the stray light distribution function (SDF), thereby constructing a stray light distribution matrix within the instrument's range. Based on the different methods of obtaining the LSF, existing stray light correction schemes are mainly divided into two categories.
[0004] The first type is based on obtaining the line spread function (LSF) using broadband light and filters. For example, Chinese patents CN121855692A ("A Method for Stray Light Correction in Spectrometers Based on Filters") and CN101813519B ("A Method for Stray Light Correction in Spectrometers") both employ the method of obtaining the spectrum using filters. These two patents mainly utilize a broadband light source and obtain the LSF of narrowband light by placing multiple filters or combinations of filters in the optical path. However, due to limitations in filter manufacturing processes, some bandpass wavelengths are difficult to obtain. To obtain different bandpass combinations, multiple combinations of long-pass, short-pass, and bandpass filters may be required. This type of method typically requires setting up a large number of filters, and the cutoff wavelength of the filters generally has a transition region wider than the resolution of the spectrometer, resulting in limited accuracy. In addition, filter replacement during calibration relies on manual labor, leading to increased labor costs and low efficiency. Furthermore, filter placement may intrude into the spectrometer's interior, resulting in low versatility of this method.
[0005] The second category involves obtaining the spectral line spread function (LSF) using multiple lasers, such as tunable lasers or other types of lasers. Since lasers are very narrow-linewidth light sources, directly using lasers of different wavelengths to obtain the LSF easily yields higher precision stray light distributions. However, since a single laser has a fixed wavelength, in practical applications, only a few wavelengths can typically be used, making continuous wavelength tuning difficult. Furthermore, lasers for certain wavelengths (such as the ultraviolet band) are not readily available, increasing the uncertainty of this method. For common tunable lasers, the tunable range is generally narrow; for example, external cavity semiconductor lasers typically have a range of only tens of nanometers, limiting the application of this type of method.
[0006] To address the aforementioned issues, an optical parametric oscillator (OPO) can be used as a tunable laser source. This source offers ultra-wide spectral coverage from the ultraviolet to the mid-infrared and continuous wavelength tuning. When using an OPO as a tunable source to acquire spectral line spread functions, the spectrometer receives not only the signal light but also potentially the idler light output from the OPO. Since the idler light is not stray light from the spectrometer itself but rather an additional wavelength component added by the source, it creates an unexpected anomalous response region in the stray light distribution matrix. This region typically manifests as a local peak or band-like area deviating from the main diagonal of the matrix, such as... Figure 2 The dark green curve section is shown. If this idler light component is not removed, it will be mistaken for stray light distribution from the instrument itself, thus contaminating the stray light distribution matrix, leading to inaccurate calculation of the subsequent stray light correction matrix, and ultimately affecting the spectral correction accuracy.
[0007] Therefore, how to utilize OPO as a tunable laser source to achieve broadband continuous tuning, high degree of automation, and strong versatility of stray light correction in spectrometers, and effectively remove the interference of OPO idler light on the stray light distribution matrix to improve stray light correction accuracy, has become a technical problem that urgently needs to be solved in this field. Based on this, the present invention provides a stray light correction method, system, and medium for spectrometers. Summary of the Invention
[0008] The purpose of this invention is to overcome the above-mentioned problems in the prior art and to provide a stray light correction method, system and medium for spectrometers.
[0009] To achieve the above-mentioned technical objectives and effects, the present invention is implemented through the following technical solution: A stray light correction method for a spectrometer, comprising: A tunable light source that simultaneously outputs signal light and idler light is controlled to output laser light at preset wavelength intervals. The laser light output by the tunable light source is collected by a spectrometer to be calibrated to obtain the spectral line spread function at multiple wavelengths. The stray light distribution matrix is calculated based on the spectral line spread function at each wavelength. The stray light is the signal in the region remaining after removing the signal in the peak region from the spectral line spread function at each wavelength. The stray light distribution function is formed by removing the signal in the peak region from the spectral line spread function at each wavelength. The stray light distribution matrix is formed by interpolating the stray light distribution function at each wavelength in the wavelength domain of the spectrometer to be calibrated. The idler light in the stray light distribution matrix is removed to obtain the stray light distribution matrix after removing the idler light; wherein, the idler light is the signal in the output laser of the tunable light source corresponding to the signal light within the region where the stray light distribution matrix is located; The stray light correction matrix is calculated using the stray light distribution matrix after removing idler light and an identity matrix of the same size as the stray light distribution matrix. The stray light correction matrix is used to correct the original spectrum obtained by the spectrometer to be calibrated, resulting in the corrected spectrum.
[0010] Furthermore, when the number of wavelengths M output by the tunable light source is not equal to the number of wavelengths N in the wavelength domain of the spectrometer to be calibrated, linear interpolation is performed along the wavelength direction output by the tunable light source to obtain N stray light distribution functions corresponding to N wavelengths in the wavelength domain of the spectrometer to be calibrated, and an N×N stray light distribution matrix is generated from the N stray light distribution functions. The wavelength of the tunable light source output is within the wavelength range of the spectrometer to be calibrated.
[0011] Further, the idler frequencies in the stray light distribution matrix are removed, including: Using the law of conservation of energy, the theoretical idler wavelength corresponding to each signal wavelength is determined based on the pump light wavelength and signal light wavelength used by the tunable light source. Based on the theoretical idler wavelength, the initial search range of the idler peak is determined; Within the initial search range, locate the peak position of the idler frequency light wave; Based on the peak position of the idler light, the idler light region is extracted; Interpolate the idler light region along the main diagonal of the stray light distribution matrix to obtain the stray light distribution matrix after removing the idler light; If there is no peak within the initial search interval, adjust the initial search interval.
[0012] Furthermore, before selecting the corresponding interpolation method based on the width of the idler frequency optical region, the width of the idler frequency optical region along the main diagonal direction is statistically analyzed, including: If the width of the idler light region is less than or equal to the first pixel number threshold, then linear interpolation is used; If the width of the idler frequency region is between the first pixel number threshold and the second pixel number threshold, then cubic spline interpolation is used, where the first pixel number threshold is less than the second pixel number threshold. If the width of the idler light region is greater than or equal to the second pixel number threshold, then the stray light distribution matrix is decomposed into singular values, and the singular values corresponding to the preset proportion of energy are retained to reconstruct the low-rank matrix. The value of the corresponding idler light region in the reconstructed low-rank matrix is used as the ideal value of the idler light region.
[0013] Furthermore, the method for determining the initial search interval of the idler frequency optical peak includes: utilizing the energy conservation relationship. The theoretical idler wavelength is calculated. Based on the pixel size corresponding to the resolution of the spectrometer to be calibrated, the pixel size range corresponding to at least one resolution on both sides of the theoretical idler wavelength is selected as the initial search interval, with the theoretical idler wavelength as the center. Wherein, λ0 represents the pump light wavelength used by the tunable light source, λ s λ represents the wavelength of the signal light. d This indicates the wavelength of the idler frequency light.
[0014] Furthermore, the initial search interval is adjusted based on the number of peaks within it, including: Count the number of peaks within the initial search interval; Adjust the range of the initial search interval based on the statistical results until the number of peaks in the adjusted search interval is 1. If the number of peaks is greater than 1, the initial search interval is narrowed; if the number of peaks is less than 1, the initial search interval is expanded until the number of peaks in the adjusted search interval is equal to 1. If the number of peaks is equal to 1, then the peaks in the initial search interval are idler frequency light peaks.
[0015] Furthermore, when the idler light output from the same pump light wavelength used by the tunable light source overlaps with the signal light, the idler light peak is separated to obtain the idler light peak position.
[0016] Further, the deviation between the wavelength corresponding to the idler light peak located in the initial search interval and the theoretical idler light wavelength is calculated. If the deviation is greater than the preset deviation threshold of the spectrometer resolution, the initial search interval is readjusted until the deviation is not greater than the preset deviation threshold of the spectrometer resolution. The preset deviation threshold is a preset multiple of the spectrometer resolution.
[0017] Based on the same inventive concept, this invention discloses a stray light correction system for a spectrometer, comprising: The spectral line spread function acquisition module controls a tunable light source that simultaneously outputs only signal light and idler light to output laser light at preset wavelength intervals. The laser light output by the tunable light source is acquired by a spectrometer to be calibrated to obtain the spectral line spread function at multiple wavelengths. The stray light distribution module calculates the stray light distribution matrix based on the spectral line diffusion function at each wavelength. The stray light is the signal in the region remaining after removing the signal in the peak region from the spectral line diffusion function at each wavelength. The stray light distribution function is formed by removing the signal in the peak region from the spectral line diffusion function at each wavelength. The stray light distribution matrix is formed by interpolating the stray light distribution function at each wavelength in the wavelength domain of the spectrometer to be calibrated. The idler light removal module removes idler light from the stray light distribution matrix to obtain a stray light distribution matrix after removing idler light; wherein, the idler light is the signal corresponding to the signal light in the output laser of the tunable light source within the region where the stray light distribution matrix is located; The correction matrix analysis module is used to calculate the stray light correction matrix using the stray light distribution matrix after removing idler light and an identity matrix of the same size as the stray light distribution matrix; The stray light correction calculation module uses the stray light correction matrix to correct the original spectrum obtained by the spectrometer to be corrected, and obtains the corrected spectrum.
[0018] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the stray light correction method described in any of the preceding claims.
[0019] The beneficial effects of this invention are: This invention improves the accuracy and precision of stray light correction for spectrometers by locating, extracting, and interpolating the idler light region generated by the optical parametric oscillator in the stray light distribution matrix, thereby removing the idler light from the stray light distribution matrix and obtaining a stray light distribution matrix after removing the idler light that only reflects the stray light characteristics of the spectrometer itself.
[0020] This invention uses the energy conservation equation to determine the theoretical idler wavelength corresponding to the signal light wavelength, and then determines an initial search interval based on the theoretical idler wavelength. The initial search interval is adjusted according to the number of peaks within it, ensuring that the adjusted search interval contains only one peak. This eliminates interference from other irrelevant peaks, reduces misjudgments, and narrows the location range of the idler peak. Further calculations are made to determine the deviation between the located wavelength and the theoretical wavelength. If this deviation exceeds the resolution limit of the spectrometer to be calibrated, the search interval is adjusted. By combining physical constraints with data peak finding, the accuracy and robustness of idler center wavelength location are significantly improved.
[0021] This invention determines the initial boundary of the idler light region by performing Gaussian fitting on the located idler light peak, and dynamically adjusts the initial boundary of the idler light region according to the signal-to-noise ratio of the idler light region within the initial boundary range. This allows the boundary of the idler light region to change dynamically with the actual energy distribution and noise conditions, thereby improving the extraction accuracy of the idler light region while taking into account both extraction integrity and noise resistance.
[0022] This invention fully utilizes the characteristic that the stray light distribution matrix is symmetrical along the main diagonal to interpolate and reconstruct the idler light region along the main diagonal direction. This enables interpolation processing of idler light at different idler light widths to remove idler light from stray light, thus significantly improving the accuracy of interpolation. Attached Figure Description
[0023] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a flowchart of the stray light correction method in this invention; Figure 2 This is a schematic diagram of the stray light distribution matrix before idler light removal in this invention; Figure 3 This is a schematic diagram of the stray light distribution matrix after idler light removal in this invention; Figure 4 This is a block diagram of the stray light correction system in this invention. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] This invention employs an optical parametric oscillator (OPO), which is a tunable laser source capable of achieving ultra-wide spectral coverage from ultraviolet to mid-infrared and continuous wavelength tuning. Since the OPO generates two wavelengths simultaneously during laser output, while the spectrometer under test only requires one wavelength, the wavelength to be measured is used as the signal light, and the other wavelength as the idler light. To avoid interference from the idler light on the correction of stray light collected by the spectrometer under test, the idler light from the two wavelengths generated by the OPO needs to be removed.
[0026] like Figure 1 As shown, this embodiment first provides a stray light correction method for a spectrometer, including: Step 1: Control the tunable light source that simultaneously outputs signal light and idler light to output laser light at preset wavelength intervals. Use a spectrometer to be calibrated to collect the laser light output by the tunable light source to obtain the spectral line spread function at multiple wavelengths.
[0027] The aforementioned tunable light source that simultaneously outputs only signal light and idler light can be configured with an optical parametric oscillator (OPO), an optical parametric amplifier (OPA), or an optical parametric generator (OPG). This application uses an optical parametric oscillator as an example for illustration.
[0028] When an optical parametric oscillator is selected as a tunable light source, laser light is output at preset wavelength intervals and within a set wavelength range. Whenever the optical parametric oscillator outputs laser light at a certain wavelength, the spectrometer to be calibrated collects the laser light emitted by the optical parametric oscillator using an appropriate exposure time. The laser light collected by the spectrometer includes signal light and idler light.
[0029] The wavelengths set by the optical parametric oscillator are sequentially adjusted so that the output wavelengths cover the operating wavelength range of the spectrometer to be calibrated. For each wavelength controlled by the optical parametric oscillator, the spectrometer detects the pixel value corresponding to each wavelength within the operating wavelength range. Based on this, for each wavelength output by the optical parametric oscillator, the spectrometer acquires a corresponding spectral line spread function.
[0030] Since stray light can also be caused by light outside the viewing angle, a cosine corrector or integrating sphere is placed in the optical path to collect incident light from various angles.
[0031] To avoid dark field interference and improve stray light correction accuracy, dark field calibration is performed before obtaining the spectral line diffusion function under narrowband light of different wavelengths. Specifically, this is done by turning off the output of the optical parametric oscillator or turning off the mechanical shutter, and using a spectrometer to collect the dark field spectrum in order to remove the dark field spectrum.
[0032] Step 2: Calculate the stray light distribution matrix based on the spectral spread function at each wavelength; where stray light is the signal in the region remaining after removing the signal in the peak region of the spectral spread function at each wavelength; the stray light distribution function is formed by removing the signal in the peak region of the spectral spread function at each wavelength; the stray light distribution matrix is formed by interpolating the stray light distribution function at each wavelength in the wavelength domain of the spectrometer.
[0033] For each wavelength output by the optical parametric oscillator, the spectrometer acquires a corresponding spectral line spread function. The region covered by each spectral line spread function is divided into an in-band region and an out-of-band region. The peak region of the spectral line spread function at a given wavelength is selected as the in-band region, and the signal within this region is designated as the in-band signal, denoted as the IB signal. The region remaining after removing the in-band region is designated as the out-of-band region, and the signal within this region is stray light.
[0034] The method for setting the in-band region involves taking the peak position as the center and expanding outwards to both sides until the grayscale value drops to a set percentage of the peak value, which is taken as the in-band region. The set percentage is 90% or 95% of the peak value, and is determined as needed. Alternatively, the in-band region can be determined based on a set multiple of the half-width at half-maximum, where the set multiple is 1-3 times.
[0035] The width of the in-band region covered by the spread function of spectral lines of different wavelengths can be the same, or it can be set differently according to the wavelength.
[0036] Calculate the in-band signal area for the m-th wavelength, normalize the gray values corresponding to each wavelength in the spectral spread function of that wavelength using the in-band signal area, and remove the signal within the in-band region to obtain the stray light distribution function at that wavelength.
[0037] An optical parametric oscillator sequentially outputs M wavelength laser beams, and the spectrometer then actually collects the spectral spread functions corresponding to the M wavelengths. The wavelength domain of the spectrometer typically contains N discrete wavelength points. The number of M wavelengths actually collected by the spectrometer may or may not be equal to the number of N wavelengths in the spectrometer's wavelength domain.
[0038] Furthermore, such as Figure 2 As shown, when the number of wavelengths M output by the optical parametric oscillator is not equal to the number of wavelengths N in the wavelength domain of the spectrometer, linear interpolation is performed along the wavelength direction output by the optical parametric oscillator to obtain N stray light distribution functions corresponding to N wavelengths in the wavelength domain of the spectrometer to be calibrated, and an N×N stray light distribution matrix is generated from the N stray light distribution functions, wherein the wavelength output by the optical parametric oscillator is within the wavelength domain range of the spectrometer to be calibrated.
[0039] When the number of wavelengths M equals the number of wavelengths N, the stray light distribution functions corresponding to each wavelength can be directly arranged according to the corresponding wavelength to form a stray light distribution matrix. When M is not equal to N, since the shape of the stray light distribution function usually changes smoothly with wavelength, the stray light distribution function can be interpolated in the wavelength direction of the optical parametric oscillator output to obtain the stray light distribution functions corresponding to all N wavelength points in the wavelength domain of the spectrometer. Interpolation methods can include linear interpolation, cubic spline interpolation, nearest neighbor interpolation, or Gaussian process regression.
[0040] Step 3: Remove the idler light from the stray light distribution matrix to obtain the stray light distribution matrix after removing the idler light. The idler light refers to the signal in the output laser of the optical parametric oscillator corresponding to the signal light within the region where the stray light distribution matrix is located.
[0041] In the process of using an optical parametric oscillator as a tunable light source to obtain the spectral line diffusion function and construct the stray light distribution matrix, the optical parametric oscillator, based on a nonlinear frequency conversion process, will generate idler light corresponding to the signal light while outputting the required signal light, according to the energy conservation relationship.
[0042] Step 4: Calculate the stray light correction matrix using the stray light distribution matrix after removing idler light and an identity matrix of the same size as the stray light distribution matrix.
[0043] The formula for calculating the stray light correction matrix is as follows: C = (I + D) -1 Where I represents the identity matrix with the same size as the stray light distribution matrix after removing the idler frequency, and D represents the stray light distribution matrix after removing the idler frequency.
[0044] Step 5: Correct the original spectrum measured by the spectrometer using the stray light correction matrix to obtain the corrected spectrum.
[0045] The original spectrum obtained from the spectrometer to be calibrated is corrected using the following correction formula: Y IB =CY Where Y is the original spectrum obtained by the spectrometer to be calibrated, Y IB This is the corrected spectrum after stray light correction.
[0046] Because optical parametric oscillators (OPOs) generate idler light while outputting the desired signal light, if this idler light region is not removed, the idler light response will be mistakenly identified as the stray light distribution of the spectrometer itself when calculating the stray light distribution function and stray light distribution matrix. This introduces a stray light coupling term into the stray light distribution matrix. This stray light coupling term will further enter the calculation process of the stray light correction matrix, leading to an inaccurate stray light correction matrix and ultimately affecting the correction accuracy of the spectrometer's measured spectrum. Therefore, to avoid interference from the idler light generated by the OPO on stray light correction, it is necessary to remove the idler light from the stray light distribution matrix.
[0047] Removing idler frequencies from the stray light distribution matrix includes: Using the law of conservation of energy, the theoretical idler wavelengths corresponding to each signal wavelength are determined based on the pump light wavelength and signal light wavelength used by the optical parametric oscillator. The optical parametric oscillator outputs the signal light wavelength and the idler wavelength under the action of the pump light wavelength. Based on the theoretical idler wavelength, the initial search range of the idler peak is determined; Within the initial search range, locate the peak position of the idler frequency light wave; Based on the peak position of the idler light, the idler light region is extracted; Interpolate the idler light region along the main diagonal of the stray light distribution matrix to obtain the stray light distribution matrix after removing the idler light; If there is no peak within the initial search interval, adjust the initial search interval.
[0048] Furthermore, based on the law of conservation of energy, the pump light wavelength λ0 and signal light wavelength λ used in the optical parametric oscillator are established. s and idle frequency light wavelength λ d The model between them is: ; Based on the above formula, the relationship between the idler wavelengths for each signal wavelength can be obtained, namely: .
[0049] Based on the aforementioned formula for calculating the idler wavelength, the theoretical idler wavelength can be obtained. Then, based on the theoretical idler wavelength, the initial search interval for the idler peak is determined. The method for determining the initial search interval for the idler peak includes: calculating the theoretical idler wavelength using the energy conservation principle; and, based on the pixel size corresponding to the resolution of the spectrometer, selecting a range of pixel sizes corresponding to at least one resolution on either side of the theoretical idler wavelength as the initial search interval, centered on the theoretical idler wavelength.
[0050] The initial search range of the idler light peak is determined by the theoretical idler light wavelength, eliminating interference from other irrelevant peak positions and narrowing the location range of the idler light peak.
[0051] The spectral curve of the initial search interval for the idler frequency light peak is preprocessed by using filtering or wavelet transform to remove high-frequency noise and avoid false peaks caused by noise. Peaks are then located within the preprocessed initial search interval by analyzing the spectral curve and determining the number of peaks. The initial search interval is then adjusted based on the number of peaks to determine the position of the idler frequency light peak.
[0052] Specifically, the initial search interval is adjusted based on the number of peaks within it, including: Count the number of peaks within the initial search interval; Adjust the range of the initial search interval based on the statistical results until the number of peaks in the adjusted search interval is 1. If the number of peaks is greater than 1, the initial search interval is narrowed; if the number of peaks is less than 1, the initial search interval is expanded until the number of peaks in the adjusted search interval is equal to 1. If the number of peaks is equal to 1, then the peaks in the initial search interval are idler frequency light peaks.
[0053] When the number of peaks in the initial search interval is not equal to 1, the area range on both sides of the theoretical idler wavelength is narrowed or expanded with the theoretical idler wavelength as the center to adjust the initial search interval and improve the initial positioning accuracy, thereby ensuring that the number of peaks in the adjusted search interval is equal to 1, and the peak position is selected as the idler peak position.
[0054] Since the theoretical wavelength of the idler light is uniquely determined by the pump light wavelength and signal light wavelength of the optical parametric oscillator through the energy conservation relationship, this theoretical wavelength is a known strong physical constraint and can serve as a reliable benchmark for judging whether the actual positioning result is correct. However, in the actual spectrum, the idler light may be weak in intensity, subject to noise interference, overlap with the signal light, or be affected by background stray light. Direct peak searching can easily produce false peaks, shifted peaks, or missing peaks. Without verification, the wrong position may be misjudged as the center of the idler light, making it impossible to accurately locate the center of the idler light.
[0055] Based on the theoretical idler wavelength determined by the energy conservation relationship, the deviation between the wavelength corresponding to the idler peak located in the initial search interval and the theoretical idler wavelength is calculated. If the deviation is greater than the preset deviation threshold of the spectrometer resolution, the initial search interval is readjusted until the deviation is not greater than the preset deviation threshold of the spectrometer resolution.
[0056] The preset deviation threshold is a preset multiple of the spectrometer resolution, preferably 2 times. That is, when the deviation is greater than 2 times the spectrometer resolution, the initial search interval is readjusted so that the deviation between the wavelength corresponding to the idler light peak located in the search interval and the theoretical idler light wavelength is less than 2 times the spectrometer resolution, thereby improving the accuracy of idler light peak location.
[0057] In this embodiment, since the idler light region has a width near the idler light peak, the entire idler light region needs to be labeled for each spectrum in order to remove the idler light. Currently, the labeling of target peak regions in the spectrum usually uses a fixed threshold or a manually set threshold, which cannot determine the boundary of the idler light based on the actual energy distribution of the idler light, and is difficult to adapt to the differences in idler light at different wavelengths and under different signal-to-noise ratio conditions. When the idler light is weak, it is easy to miss the labeling; when the noise is strong, it is easy to mislabel the noise as idler light.
[0058] The methods used to extract idler frequency regions of different wavelengths include: Step 31: Perform Gaussian fitting on the idler frequency peak located within the initial search interval to obtain the full width at half maximum (FWHM) and energy distribution curve.
[0059] Step 32: Calculate the energy percentage corresponding to different wavelength intensity thresholds based on the energy distribution curve, and determine the initial boundary of the idler frequency region.
[0060] After fitting, the Gaussian peak obtained by fitting is integrated in the wavelength domain, and the proportion of energy contained at a certain percentage of the peak intensity relative to the total energy of the idler light is calculated. Specifically, when the energy accounts for 99% of the total energy of the idler light, it means that the marked idler light region contains 99% of the total idler light energy. Based on the proportion of energy to the total idler light energy, the wavelength intensity threshold corresponding to this proportion is derived, and the wavelength range in the fitted peak with wavelength intensity higher than this wavelength intensity threshold is marked as the initial boundary of the idler light region.
[0061] Step 33: Calculate the signal-to-noise ratio (SNR) of the idler optical region within the initial boundary range, and adaptively adjust the idler optical region based on the SNR.
[0062] The formula for calculating the signal-to-noise ratio is as follows:
[0063] Where SNR is the signal-to-noise ratio of the idler optical region within the initial boundary range, I f Indicates the peak intensity of the idler frequency light. σ represents the mean wavelength intensity within the initial boundary range, and σ represents the standard deviation of wavelength intensity within the initial boundary range.
[0064] When the signal-to-noise ratio (SNR) is lower than the first SNR threshold, it indicates strong noise. To avoid noise being misidentified as idler light, the intensity threshold is increased to a first proportion of the peak value. This increases the proportion of the intensity threshold, causing the idler light region boundary to shrink towards the peak value, reducing the number of noise pixels misidentified as idler light regions. When the SNR is higher than the second SNR threshold, it indicates weak noise. The intensity threshold can be reduced to a second proportion of the peak value, causing the idler light region boundary to expand to both sides, thus more accurately covering the idler light region and improving the accuracy of idler light region extraction.
[0065] Wherein, the second signal-to-noise ratio threshold is greater than the first signal-to-noise ratio threshold, and the second ratio is less than the first ratio. Preferably, the first signal-to-noise ratio threshold is 20dB, the second signal-to-noise ratio threshold is 30dB, the first ratio is 15%, and the second ratio is 5%.
[0066] When the signal-to-noise ratio is between the first signal-to-noise ratio threshold and the second signal-to-noise ratio threshold, the intensity threshold is determined between the first and second proportions of the peak value according to the linear interpolation method.
[0067] For multiple spectra processed in batches, the idler frequency width distribution of all spectra can be statistically analyzed to remove regions that are too large or too small, thus ensuring the relative consistency of the extracted idler frequency regions.
[0068] In this embodiment, when the idler light and the signal light are close to each other in the wavelength domain, causing them to overlap on the spectral curve, the idler light cannot be effectively distinguished.
[0069] Based on this, when the idler light output from the same pump light wavelength used by the optical parametric oscillator overlaps with the signal light, the peak of the idler light is separated to obtain the position of the idler light peak.
[0070] Specifically, if the difference between the wavelength corresponding to the idler light peak and the wavelength corresponding to the signal light peak is less than 1.5 times the sum of their half-widths and full heights (FWHMs), or the valley between the two peaks is not less than 80% of the smaller peak's peak value, or the spectral curve shows only one peak and the two peak positions cannot be directly distinguished, then it can be determined that the idler light and signal light overlap. In this case, a multi-peak fitting model is established for the local spectral curve containing the overlapping peaks, and Gaussian fitting or Voigt fitting is used for peak separation to separate the independent idler light peak and signal light peak, so as to accurately locate the peak position of the idler light.
[0071] In this embodiment, for weak idler light signals, multi-scale features of continuous wavelet transform are used to enhance and identify weak peaks, avoiding the omission of weak idler light signals. Based on this, continuous wavelet transform is performed on the spectral curve within the initial search interval, selecting a wavelet basis that matches the peak shape of the idler light, and calculating the transform coefficients at multiple scales. Utilizing the multi-scale characteristics, coarse-scale noise suppression and highlighting of weak peak contours are achieved, while fine-scale precise peak positioning is used. Weak peaks are identified by detecting the modulus maxima at each scale and fusing the multi-scale results.
[0072] Through the above multi-scale feature processing, weak peak features can be effectively enhanced when the idler frequency optical signal intensity is weak and the signal-to-noise ratio is low, avoiding the omission of idler frequency optical peaks due to noise and background submersion, and improving the robustness and accuracy of idler frequency optical positioning.
[0073] In this embodiment, as Figure 3 As shown, based on the stray light distribution in the stray light distribution matrix, the stray light is symmetrically distributed along the main diagonal. Therefore, interpolation is performed on the idler light region along the main diagonal to obtain the stray light distribution matrix after removing the idler light.
[0074] Before selecting the corresponding interpolation method based on the width of the idler frequency optical region, the width of the idler frequency optical region along the main diagonal direction is calculated, including: If the width of the idler light region is less than or equal to the first pixel number threshold, then linear interpolation is used; If the width of the idler frequency region is between the first pixel number threshold and the second pixel number threshold, then cubic spline interpolation is used, where the first pixel number threshold is less than the second pixel number threshold. If the width of the idler light region is greater than or equal to the second pixel number threshold, then singular value decomposition is performed on the stray light distribution matrix. The singular values corresponding to the preset proportion of energy are retained to reconstruct the low-rank matrix. The value of the corresponding idler light region in the reconstructed low-rank matrix is used as the ideal value of the idler light region. Among them, the preset proportion of energy is preferably the first 95% of the energy.
[0075] To establish the relationship between the wavelength domain of the optical parametric oscillator output and the wavelength domain of the spectrometer to be calibrated, a globally symmetric stray light distribution matrix is constructed. Based on the global symmetry of the stray light distribution matrix, interpolation is performed along the main diagonal of the idler light region, which significantly improves the accuracy of the interpolation.
[0076] This embodiment does not limit interpolation to the main diagonal direction only. The corresponding interpolation method can be selected according to the arrangement relationship between the wavelength domain output by the optical parametric oscillator and the wavelength domain of the spectrometer to be calibrated.
[0077] Based on the same inventive concept, such as Figure 4 As shown, the present invention also proposes a stray light correction system for a spectrometer, comprising: The spectral line spread function acquisition module controls a tunable light source that simultaneously outputs only signal light and idler light to output laser light at preset wavelength intervals. The laser light output by the tunable light source is acquired by a spectrometer to be calibrated to obtain the spectral line spread function at multiple wavelengths. The stray light distribution module calculates the stray light distribution matrix based on the spectral line diffusion function at each wavelength. The stray light is the signal in the region remaining after removing the signal in the peak region from the spectral line diffusion function at each wavelength. The stray light distribution function is formed by removing the signal in the peak region from the spectral line diffusion function at each wavelength. The stray light distribution matrix is formed by interpolating the stray light distribution function at each wavelength in the wavelength domain of the spectrometer to be calibrated. The idler light removal module removes idler light from the stray light distribution matrix to obtain a stray light distribution matrix after removing idler light; wherein, the idler light is the signal corresponding to the signal light in the output laser of the tunable light source within the region where the stray light distribution matrix is located; The correction matrix analysis module is used to calculate the stray light correction matrix using the stray light distribution matrix after removing idler light and an identity matrix of the same size as the stray light distribution matrix; The stray light correction calculation module uses the stray light correction matrix to correct the original spectrum obtained by the spectrometer to be corrected, and obtains the corrected spectrum.
[0078] The present invention also provides a computer-readable storage medium including a computer program that, when executed by a processor, implements the above-described stray light correction method.
[0079] In practical applications, a computer-readable storage medium can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0080] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0081] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0082] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0083] In the description of this specification, references to terms such as "an embodiment," "example," and "specific example" indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0084] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.
Claims
1. A method for stray light correction in a spectrometer, characterized in that, include: A tunable light source that simultaneously outputs signal light and idler light is controlled to output laser light at preset wavelength intervals. The laser light output by the tunable light source is collected by a spectrometer to be calibrated to obtain the spectral line spread function at multiple wavelengths. The stray light distribution matrix is calculated based on the spectral line spread function at each wavelength. The stray light is the signal in the region remaining after removing the signal in the peak region from the spectral line spread function at each wavelength. The stray light distribution function is formed by removing the signal in the peak region from the spectral line spread function at each wavelength. The stray light distribution matrix is formed by interpolating the stray light distribution function at each wavelength in the wavelength domain of the spectrometer to be calibrated. The idler light in the stray light distribution matrix is removed to obtain the stray light distribution matrix after removing the idler light; wherein, the idler light is the signal in the output laser of the tunable light source corresponding to the signal light within the region where the stray light distribution matrix is located; The stray light correction matrix is calculated using the stray light distribution matrix after removing idler light and an identity matrix of the same size as the stray light distribution matrix. The stray light correction matrix is used to correct the original spectrum obtained by the spectrometer to be calibrated, resulting in the corrected spectrum.
2. The stray light correction method for a spectrometer according to claim 1, characterized in that, When the number of wavelengths M output by the tunable light source is not equal to the number of wavelengths N in the wavelength domain of the spectrometer to be calibrated, linear interpolation is performed along the wavelength direction output by the tunable light source to obtain N stray light distribution functions corresponding to N wavelengths in the wavelength domain of the spectrometer to be calibrated, and an N×N stray light distribution matrix is generated from the N stray light distribution functions. The wavelength of the tunable light source output is within the wavelength range of the spectrometer to be calibrated.
3. The stray light correction method for a spectrometer according to claim 1, characterized in that, Removing idler frequencies from the stray light distribution matrix includes: Using the law of conservation of energy, the theoretical idler wavelength corresponding to each signal wavelength is determined based on the pump light wavelength and signal light wavelength used by the tunable light source. Based on the theoretical idler wavelength, the initial search range of the idler peak is determined; Within the initial search range, locate the peak position of the idler frequency light wave; Based on the peak position of the idler light, the idler light region is extracted; Interpolate the idler light region along the main diagonal of the stray light distribution matrix to obtain the stray light distribution matrix after removing the idler light; If there is no peak within the initial search interval, adjust the initial search interval.
4. The stray light correction method for a spectrometer according to claim 3, characterized in that, Before selecting the corresponding interpolation method based on the width of the idler frequency optical region, the width of the idler frequency optical region along the main diagonal direction is calculated, including: If the width of the idler light region is less than or equal to the first pixel number threshold, then linear interpolation is used; If the width of the idler frequency region is between the first pixel number threshold and the second pixel number threshold, then cubic spline interpolation is used, where the first pixel number threshold is less than the second pixel number threshold. If the width of the idler light region is greater than or equal to the second pixel number threshold, then the stray light distribution matrix is decomposed into singular values, and the singular values corresponding to the preset proportion of energy are retained to reconstruct the low-rank matrix. The value of the corresponding idler light region in the reconstructed low-rank matrix is used as the ideal value of the idler light region.
5. A stray light correction method for a spectrometer according to claim 3, characterized in that, The method for determining the initial search interval of the idler frequency peak includes: utilizing the energy conservation relationship The theoretical idler wavelength is calculated. Based on the pixel size corresponding to the resolution of the spectrometer to be calibrated, the pixel size range corresponding to at least one resolution on both sides of the theoretical idler wavelength is selected as the initial search interval, with the theoretical idler wavelength as the center. Wherein, λ0 represents the pump light wavelength used by the tunable light source, λ s λ represents the wavelength of the signal light. d This indicates the wavelength of the idler frequency light.
6. The stray light correction method for a spectrometer according to claim 3, characterized in that, The initial search interval is adjusted based on the number of peaks within it, including: Count the number of peaks within the initial search interval; Adjust the range of the initial search interval based on the statistical results until the number of peaks in the adjusted search interval is 1. If the number of peaks is greater than 1, the initial search interval is narrowed; if the number of peaks is less than 1, the initial search interval is expanded until the number of peaks in the adjusted search interval is equal to 1. If the number of peaks is equal to 1, then the peaks in the initial search interval are idler frequency light peaks.
7. The stray light correction method for a spectrometer according to claim 3, characterized in that, When the idler light output from the same pump light wavelength used by the tunable light source overlaps with the signal light, the idler light peak is separated to obtain the idler light peak position.
8. A stray light correction method for a spectrometer according to claim 5, characterized in that, Calculate the deviation between the wavelength corresponding to the idler light peak located in the initial search interval and the theoretical idler light wavelength. If the deviation is greater than the preset deviation threshold of the spectrometer resolution, readjust the initial search interval until the deviation is not greater than the preset deviation threshold of the spectrometer resolution. The preset deviation threshold is a preset multiple of the spectrometer resolution.
9. A stray light correction system for a spectrometer, used to perform the stray light correction method for a spectrometer according to any one of claims 1-8, characterized in that, include: The spectral line spread function acquisition module controls a tunable light source that simultaneously outputs only signal light and idler light to output laser light at preset wavelength intervals. The laser light output by the tunable light source is acquired by a spectrometer to be calibrated to obtain the spectral line spread function at multiple wavelengths. The stray light distribution module calculates the stray light distribution matrix based on the spectral line diffusion function at each wavelength. The stray light is the signal in the region remaining after removing the signal in the peak region from the spectral line diffusion function at each wavelength. The stray light distribution function is formed by removing the signal in the peak region from the spectral line diffusion function at each wavelength. The stray light distribution matrix is formed by interpolating the stray light distribution function at each wavelength in the wavelength domain of the spectrometer to be calibrated. The idler light removal module removes idler light from the stray light distribution matrix to obtain a stray light distribution matrix after removing idler light; wherein, the idler light is the signal corresponding to the signal light in the output laser of the tunable light source within the region where the stray light distribution matrix is located; The correction matrix analysis module is used to calculate the stray light correction matrix using the stray light distribution matrix after removing idler light and an identity matrix of the same size as the stray light distribution matrix; The stray light correction calculation module uses the stray light correction matrix to correct the original spectrum obtained by the spectrometer to be corrected, and obtains the corrected spectrum.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the stray light correction method as described in any one of claims 1-8.
Citation Information
Patent Citations
Stray light correction method of spectrograph
CN101813519B
Spectrometer stray light correction method based on optical filter
CN121855692A
