Coherent parameter testing method, electronic device, and program product
By employing a two-stage sampling mechanism, using a first preset step size for coarse sampling and a second preset step size for fine sampling, the contradiction between computational efficiency and accuracy in coherent parameter testing is resolved, thus achieving efficient coherent parameter measurement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN HAIFEITONG OPTOELECTRONICS TECH CO LTD
- Filing Date
- 2025-06-12
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, coherent parameter testing presents a trade-off between computational efficiency and accuracy when measuring over a wide dynamic range. Fixed-step sampling methods result in wasted computational resources and excessive computational load.
A two-stage sampling mechanism is adopted. First, coarse sampling is performed with a first preset step size to lock the approximate region of the main peak. Then, fine sampling is performed with a second preset step size smaller than the first step size to obtain high-resolution optical path difference sampling points. The coherence parameters are determined by combining the preset parameter calculation strategy.
It achieves a balance between computational efficiency and measurement accuracy, avoids computational redundancy caused by traditional single-step long sampling, ensures accurate extraction of detailed features such as edge mode slope, and is suitable for wide-range measurement.
Smart Images

Figure CN120820302B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically, to a coherence parameter testing method, electronic device, and program product. Background Technology
[0002] In the fields of optical communication, optical sensing, and precision measurement, accurate testing of coherence parameters is a core element in evaluating light source quality and optimizing system performance. As high-speed fiber optic communication systems develop towards wider spectrum and higher modulation rates, higher requirements are placed on the characterization accuracy of light source coherence characteristics. Especially in cutting-edge applications such as 5G transmission and quantum communication, even slight deviations in parameters such as coherence length and side-mode slope will directly affect the system's bit error rate and transmission distance.
[0003] In existing technologies, coherence parameter testing commonly employs a fixed-step optical path difference sampling method. A typical approach involves scanning the entire preset optical path difference range at uniform intervals to obtain a discretized coherence intensity distribution, then calculating the coherence length based on a threshold truncation method, or determining side-mode characteristics through peak detection. To ensure accurate main peak localization, this approach often requires a small global sampling step size. However, in wide dynamic range measurement scenarios, this leads to an exponential increase in the number of sampling points, resulting in wasted computational resources. For example, when both narrow-linewidth main peaks and weak side modes exist simultaneously, the fixed-step approach struggles to balance global search efficiency with local feature capture accuracy.
[0004] Therefore, the traditional coherent parameter testing method has an inherent contradiction between computational efficiency and accuracy when measuring a wide range of parameters using a single-step long sampling mechanism. That is, although high-density global sampling can improve the accuracy of main peak positioning, it will significantly increase the computational load of Fourier transform. Summary of the Invention
[0005] In view of this, the purpose of this application is to provide a coherent parameter testing method, electronic device and program product, which can improve the problem of excessive computation in the traditional coherent parameter testing method, which uses a fixed sampling step size to sample optical path difference.
[0006] To achieve the above technical objectives, the technical solution adopted in this application is as follows:
[0007] In a first aspect, embodiments of this application provide a method for testing coherence parameters, the method comprising:
[0008] Acquire spectral data, which includes multiple spectral wavelength sampling points and light intensity data corresponding to each wavelength sampling point;
[0009] Based on the spectral data, optical path difference sampling is performed on the spectral data with a first preset step size to obtain multiple optical path difference sampling points, which are used as the first sampling point set.
[0010] Based on the spectral data and the first set of sampling points, optical path difference sampling is performed on the spectral data with a second preset step size to obtain multiple optical path difference sampling points, which are used as the second set of sampling points. The second preset step size is smaller than the first preset step size.
[0011] Based on the spectral data and the second set of sampling points, the coherence parameters corresponding to the spectral data are determined using a preset parameter calculation strategy, and these parameters are used as the test results.
[0012] In conjunction with the first aspect, in some alternative implementations, acquiring spectral data includes:
[0013] Obtain the plurality of spectral wavelength sampling points and the initial light intensity corresponding to each wavelength sampling point;
[0014] The initial light intensity is converted to a unit to obtain the converted initial light intensity, which is used as the light intensity data:
[0015]
[0016] In the formula, This represents the initial light intensity after conversion. This represents the initial light intensity.
[0017] In conjunction with the first aspect, in some optional embodiments, based on the spectral data, optical path difference sampling is performed on the spectral data according to a first preset step size to obtain multiple optical path difference sampling points, which serve as a first sampling point set, including:
[0018] Obtain the preset global sampling range;
[0019] Within the preset global sampling range, optical path difference sampling is performed on the spectral data based on the first preset step size to obtain the first sampling point set, as shown below:
[0020]
[0021] In the formula, Denotes the first set of sampling points. This represents the minimum value within the preset global sampling range. This represents the maximum value within the preset global sampling range. Indicates the first preset step size. This indicates the number of points sampled.
[0022] In conjunction with the first aspect, in some optional implementations, based on the spectral data and the first sampling point set, optical path difference sampling is performed on the spectral data according to a second preset step size to obtain multiple optical path difference sampling points, which serve as a second sampling point set, including:
[0023] Based on the first set of sampling points, the maximum value in the coherence intensity distribution of the spectral data is determined as the position of the main peak of the coherence intensity distribution:
[0024]
[0025] In the formula, Indicates the location of the main peak. Denotes the first set of sampling points. This represents the coherence intensity distribution corresponding to the first set of sampling points;
[0026] Obtain a preset local sampling range centered on the main peak position;
[0027] Within the preset local sampling range, the spectral data is sampled by optical path difference based on the second preset step size to obtain the second sampling point set, as shown below:
[0028]
[0029] In the formula, Represents the second set of sampling points. Indicates the location of the main peak. Indicates the preset local sampling range. This indicates the second preset step size, which is smaller than the first preset step size. The number of points sampled.
[0030] In conjunction with the first aspect, in some optional embodiments, the coherence parameters include coherence length and side-mode slope;
[0031] Based on the spectral data and the second sampling point set, and through a preset parameter calculation strategy, the coherence parameters corresponding to the spectral data are determined as the test results, including:
[0032] Based on the light intensity data in the spectral data and the second sampling point set, determine the target coherence intensity corresponding to the spectral data;
[0033] Based on the target coherence intensity and the second set of sampling points, the coherence length is determined using a preset coherence length calculation strategy.
[0034] Based on the target coherence intensity and the second sampling point set, the side-mode slope is determined using a preset side-mode slope calculation strategy.
[0035] In conjunction with the first aspect, in some optional implementations, determining the target coherence intensity corresponding to the spectral data based on the light intensity data in the spectral data and the second sampling point set includes:
[0036] Based on the light intensity data and the second set of sampling points, determine the coherence intensity corresponding to the spectral data:
[0037]
[0038] In the formula, Indicates coherence intensity. Indicates the dimension of spectral data. Represents light intensity data. The imaginary unit, Represents the second set of sampling points.
[0039] The coherence intensity is normalized to obtain the normalized coherence intensity, which is then used as the target coherence intensity.
[0040]
[0041] In the formula, Indicates the target coherence strength. Indicates the coherence intensity.
[0042] In conjunction with the first aspect, in some optional implementations, the coherence length is determined based on the target coherence intensity and the second sampling point set, using a preset coherence length calculation strategy, including:
[0043] Obtain the initial threshold parameter;
[0044] The first left boundary and the first right boundary are determined based on the initial threshold parameter;
[0045] Determine the initial coherence length based on the first left boundary and the first right boundary:
[0046]
[0047] In the formula, Indicates the initial coherence length. Indicates the first left boundary. Indicates the first right boundary;
[0048] Based on the initial coherence length and the position of the main peak in the coherence intensity distribution of the spectral data, determine the attenuation slope of the main peak:
[0049]
[0050] In the formula, This indicates the slope of the main peak decay. Indicates the location of the main peak. Represents the coherence intensity function;
[0051] Based on the main peak attenuation slope, determine the target threshold:
[0052]
[0053] In the formula, Indicates the target threshold. This represents the initial threshold parameter. Indicates the attenuation factor. This indicates the slope of the main peak attenuation.
[0054] The second left boundary and the second right boundary are determined based on the target threshold.
[0055] The coherence length is determined based on the second left boundary and the second right boundary:
[0056]
[0057] In the formula, Indicates the coherence length. Indicates the second left boundary. Indicates the second right boundary.
[0058] In conjunction with the first aspect, in some optional implementations, the side-mode slope is determined based on the target coherence intensity and the second sampling point set, using a preset side-mode slope calculation strategy, including:
[0059] In the second set of sampling points, the optical path difference sampling points whose target coherence intensity meets a preset condition are identified as the side-mode peak location points. The preset condition is expressed as follows:
[0060]
[0061] In the formula, Indicates optical path difference sampling point The target coherence strength;
[0062] For each of the side-mode peak locations, the slope of the side-mode peak location is determined based on the target coherence intensity corresponding to the adjacent optical path difference sampling points of the side-mode peak location:
[0063]
[0064] In the formula, ;
[0065] The maximum value of the slope at all edge mode peak locations is determined and taken as the edge mode slope.
[0066] Secondly, embodiments of this application also provide an electronic device, which includes a processor and a memory coupled to each other. The memory stores a computer program, and when the computer program is executed by the processor, the electronic device performs the above-described method.
[0067] Thirdly, embodiments of this application also provide a computer program product, including a computer program that implements the above-described method when executed by a processor.
[0068] The invention employing the above technical solution has the following advantages:
[0069] In the technical solution provided in this application, spectral data is first acquired, and then optical path difference sampling is performed on the spectral data based on a first preset step size to obtain multiple optical path difference sampling points, which serve as the first sampling point set. Then, based on the spectral data and the first sampling point set, optical path difference sampling is performed on the spectral data based on a second preset step size to obtain multiple optical path difference sampling points, which serve as the second sampling point set. The second preset step size is smaller than the first preset step size. Finally, based on the spectral data and the second sampling point set, the coherence parameters corresponding to the spectral data are determined through a preset parameter calculation strategy, which serves as the test result. Thus, through a two-stage sampling mechanism of coarse sampling with a first preset step size and fine sampling with a second preset step size, the first-stage coarse sampling quickly locks the approximate region of the main peak, while the second-stage fine sampling performs high-resolution sampling within a local area. This avoids the computational redundancy caused by traditional single-step-size sampling and ensures the accurate extraction of detailed features such as side-mode slopes, achieving a balance between computational efficiency and measurement accuracy. This improves upon the problem of excessive computation in traditional coherence parameter testing methods that use fixed sampling step sizes for optical path difference sampling in wide-range measurements. Attached Figure Description
[0070] This application can be further illustrated by the non-limiting embodiments given in the accompanying drawings. It should be understood that the following drawings only illustrate some embodiments of this application and should not be considered as limiting the scope. For those skilled in the art, other related drawings can be obtained from these drawings without any inventive effort.
[0071] Figure 1 A structural block diagram of an electronic device provided in an embodiment of this application.
[0072] Figure 2 This is a flowchart illustrating the coherence parameter testing method provided in the embodiments of this application.
[0073] Icons: 100 - Electronic device; 101 - Processor; 102 - Memory. Detailed Implementation
[0074] The present application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that similar or identical parts are referred to by the same reference numerals in the drawings or description. Implementations not shown or described in the drawings are forms known to those skilled in the art. In the description of this application, terms such as "first" and "second" are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0075] Please refer to Figure 1 This application provides an electronic device 100 that may include a processor 101 and a memory 102. The memory 102 stores a computer program, which, when executed by the processor 101, enables the electronic device 100 to perform the corresponding steps in the following coherent parameter testing method.
[0076] In this embodiment, the processor 101 can be an integrated circuit chip with signal processing capabilities. The processor 101 can be a general-purpose processor. For example, the processor 101 can be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0077] The memory 102 can be, but is not limited to, random access memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, etc. In this embodiment, the memory 102 can be used to store spectral data, a first preset step size, a first sampling point set, a second preset step size, a second sampling point set, a preset parameter calculation strategy, test results, etc. Of course, the memory 102 can also be used to store programs, which the processor 101 executes after receiving an execution instruction.
[0078] Understandable, Figure 1 The electronic device 100 shown is only a schematic diagram; the electronic device 100 may also include components that are more... Figure 1 More components are shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.
[0079] In this embodiment, the electronic device 100 can be a personal computer, laptop, cloud server, etc., and this embodiment takes a personal computer as an example. It is used to acquire spectral data and, based on the spectral data, performs optical path difference sampling on the spectral data according to a first preset step size, obtaining multiple optical path difference sampling points as a first sampling point set. Then, based on the spectral data and the first sampling point set, performs optical path difference sampling on the spectral data according to a second preset step size, obtaining multiple optical path difference sampling points as a second sampling point set, where the second preset step size is smaller than the first preset step size. Finally, based on the spectral data and the second sampling point set, and through a preset parameter calculation strategy, determines the coherence parameters corresponding to the spectral data, which are used as the test results.
[0080] Please refer to Figure 2 This application also provides a coherence parameter testing method, which can be applied to the aforementioned electronic device 100, and the electronic device 100 executes or implements the steps of the method. The coherence parameter testing method may include the following steps:
[0081] Step 210: Obtain spectral data, which includes multiple spectral wavelength sampling points and light intensity data corresponding to each wavelength sampling point;
[0082] Step 220: Based on the spectral data, perform optical path difference sampling on the spectral data with a first preset step size to obtain multiple optical path difference sampling points, which are used as the first sampling point set;
[0083] Step 230: Based on the spectral data and the first sampling point set, perform optical path difference sampling on the spectral data with a second preset step size to obtain multiple optical path difference sampling points, which serve as the second sampling point set. The second preset step size is smaller than the first preset step size.
[0084] Step 240: Based on the spectral data and the second sampling point set, determine the coherence parameters corresponding to the spectral data using a preset parameter calculation strategy, and use this as the test result.
[0085] In the above implementation, spectral data is first acquired, and then optical path difference sampling is performed on the spectral data based on a first preset step size to obtain multiple optical path difference sampling points, which serve as the first sampling point set. Then, based on the spectral data and the first sampling point set, optical path difference sampling is performed on the spectral data based on a second preset step size to obtain multiple optical path difference sampling points, which serve as the second sampling point set. The second preset step size is smaller than the first preset step size. Finally, based on the spectral data and the second sampling point set, the coherence parameters corresponding to the spectral data are determined using a preset parameter calculation strategy, which serves as the test result. Thus, through a two-stage sampling mechanism of coarse sampling with a first preset step size and fine sampling with a second preset step size, the first-stage coarse sampling quickly locks the approximate region of the main peak, while the second-stage fine sampling performs high-resolution sampling within a local area. This avoids the computational redundancy caused by traditional single-step-size sampling and ensures the accurate extraction of detailed features such as side-mode slopes, achieving a balance between computational efficiency and measurement accuracy. This improves upon the problem of excessive computation in traditional coherence parameter testing methods that use fixed sampling step sizes for optical path difference sampling in wide-range measurements.
[0086] The steps of the coherence parameter testing method will be explained in detail below:
[0087] In step 210, acquiring spectral data may include:
[0088] Obtain the plurality of spectral wavelength sampling points and the initial light intensity corresponding to each wavelength sampling point;
[0089] The initial light intensity is converted to a unit to obtain the converted initial light intensity, which is used as the light intensity data:
[0090] (1)
[0091] In the formula, This represents the initial light intensity after conversion. This represents the initial light intensity.
[0092] In this embodiment, N spectral wavelength sampling points are first obtained. (Unit: nm, n = 1, 2, ..., N), covering the effective spectral width of the light source. The initial light intensity at each wavelength sampling point is measured directly using a spectrometer. (Unit: dBm). Then, the unit of the initial light intensity is converted to the linear unit mW using equation (1) to ensure the numerical stability of subsequent calculations.
[0093] In this embodiment, the acquisition of wavelength sampling points and initial light intensity can be done during the testing phase, where the user pre-inputs and stores the data in the memory 102 of the electronic device 100, and then retrieves it based on instructions issued by the user through the processor 101 in subsequent related parameter calculations; alternatively, it can be done during the application phase, where the data is measured in real time and sent to the processor 101 for subsequent sampling and related parameter calculations. No specific limitations are placed on the method of acquiring wavelength sampling points and initial light intensity here.
[0094] Thus, by using the light intensity unit conversion formula from the logarithmic domain to the linear domain in equation (1), the influence of differences in the original data format of the measurement equipment on subsequent calculations can be effectively eliminated. Standardization ensures the comparability of spectral data from different sources, provides a unified benchmark for multi-device collaborative testing and data fusion, and improves the environmental adaptability of the method.
[0095] In step 220, based on the spectral data, optical path difference sampling is performed on the spectral data according to a first preset step size to obtain multiple optical path difference sampling points, which serve as a first sampling point set, and may include:
[0096] Obtain the preset global sampling range;
[0097] Within the preset global sampling range, optical path difference sampling is performed on the spectral data based on the first preset step size to obtain the first sampling point set, as shown below:
[0098] (2)
[0099] In the formula, Denotes the first set of sampling points. This represents the minimum value within the preset global sampling range. This represents the maximum value within the preset global sampling range. Indicates the first preset step size. This indicates the number of points sampled.
[0100] In this embodiment, the preset global sampling range and the first preset step size can be flexibly set according to user needs. For example, the preset global sampling range... It can be [-20000, 20000] μm, [-15000, 15000] μm, etc., with the first preset step size. It can be 100μm, 200μm, etc.
[0101] In this embodiment, optical path difference sampling is performed on the spectral data within a preset global sampling range to obtain... A set of optical path difference sampling points is used as the first sampling point set.
[0102] In step 230, based on the spectral data and the first sampling point set, optical path difference sampling is performed on the spectral data according to a second preset step size to obtain multiple optical path difference sampling points, which serve as the second sampling point set. This set may include:
[0103] Based on the first set of sampling points, the maximum value in the coherence intensity distribution of the spectral data is determined as the position of the main peak of the coherence intensity distribution: (3)
[0104] In the formula, Indicates the location of the main peak. Denotes the first set of sampling points. This represents the coherence intensity distribution corresponding to the first set of sampling points;
[0105] Obtain a preset local sampling range centered on the main peak position;
[0106] Within the preset local sampling range, the spectral data is sampled by optical path difference based on the second preset step size to obtain the second sampling point set, as shown below:
[0107] (4)
[0108] In the formula, Represents the second set of sampling points. Indicates the location of the main peak. Indicates the preset local sampling range. This indicates the second preset step size, which is smaller than the first preset step size. The number of points sampled.
[0109] In this embodiment, the preset local sampling range and the second preset step size can be flexibly set according to user needs. The preset local sampling range can be understood as the neighborhood range of the main peak. By adjusting The value can be used to adjust the size of the preset local sampling range, for example, It can be 400μm, 450μm, 500μm, etc.; second preset step size It can be a value smaller than the first preset step size, such as 0.1μm, 0.5μm, or 1μm.
[0110] In this embodiment, firstly, based on the first set of sampling points, the maximum value of the coherence intensity of the first set of sampling points is determined as the main peak position using equation (3). Then, based on the second preset step size, optical path difference sampling is performed within a preset local sampling range centered on the main peak position using equation (4) to obtain... A high-density sampling point is used as the second sampling point set.
[0111] Thus, a hierarchical sampling framework is established by coarsely sampling the range of the global sample and dynamically adjusting the range of the local sample. The coarse sampling stage quickly covers the possible distribution range of the main peak, while the fine sampling stage performs a high-density focused scan centered on the main peak. This prevents the omission of important feature regions and avoids oversampling of invalid regions, allowing computational resources to be concentrated on key data segments.
[0112] In step 240, the coherence parameters include coherence length and side mode slope;
[0113] Based on the spectral data and the second sampling point set, the coherence parameters corresponding to the spectral data are determined using a preset parameter calculation strategy. These parameters, as test results, may include:
[0114] Based on the light intensity data in the spectral data and the second sampling point set, determine the target coherence intensity corresponding to the spectral data;
[0115] Based on the target coherence intensity and the second set of sampling points, the coherence length is determined using a preset coherence length calculation strategy.
[0116] Based on the target coherence intensity and the second sampling point set, the side-mode slope is determined using a preset side-mode slope calculation strategy.
[0117] In this embodiment, determining the target coherence intensity corresponding to the spectral data based on the light intensity data in the spectral data and the second sampling point set may include:
[0118] Based on the light intensity data and the second set of sampling points, determine the coherence intensity corresponding to the spectral data:
[0119] (5)
[0120] In the formula, Indicates coherence intensity. Indicates the dimension of spectral data. Represents light intensity data. The imaginary unit, Represents the second set of sampling points;
[0121] The coherence intensity is normalized to obtain the normalized coherence intensity, which is then used as the target coherence intensity.
[0122] (6)
[0123] In the formula, Indicates the target coherence strength. Indicates the coherence intensity.
[0124] In this embodiment, after obtaining the second sampling point set by finely sampling the spectral data using the second preset step size, the second sampling point set is obtained by using equation (5). The optical path difference (μm) and wavelength (nm) are unified to one-thousandth of a micrometer unit to ensure the accuracy of phase calculation. The coherence intensity corresponding to the second sampling point set is determined by equation (5) to reflect the energy distribution of the interference signal as the optical path difference changes. Then, the coherence intensity is normalized by equation (6) to eliminate the influence of the absolute power of the light source and focus on the relative intensity distribution to obtain the target coherence intensity.
[0125] Thus, by constructing a normalized coherence intensity calculation model and eliminating the interference of light source power fluctuations on the test results through maximizing amplitude normalization, the shape of the coherence intensity distribution curve reflects only the spectral purity characteristics and is independent of the absolute light intensity, ensuring the robustness of the embodiments of this application under low signal-to-noise ratio conditions.
[0126] In this embodiment, determining the coherence length based on the target coherence intensity and the second sampling point set using a preset coherence length calculation strategy may include:
[0127] Obtain the initial threshold parameter;
[0128] The first left boundary and the first right boundary are determined based on the initial threshold parameter;
[0129] Determine the initial coherence length based on the first left boundary and the first right boundary:
[0130] (7)
[0131] In the formula, Indicates the initial coherence length. Indicates the first left boundary. Indicates the first right boundary;
[0132] Based on the initial coherence length and the position of the main peak in the coherence intensity distribution of the spectral data, determine the attenuation slope of the main peak:
[0133] (8)
[0134] In the formula, This indicates the slope of the main peak decay. Indicates the location of the main peak. Represents the coherence intensity function;
[0135] Based on the main peak attenuation slope, determine the target threshold:
[0136] (9)
[0137] In the formula, Indicates the target threshold. This represents the initial threshold parameter. Indicates the attenuation factor. This indicates the slope of the main peak attenuation.
[0138] The second left boundary and the second right boundary are determined based on the target threshold.
[0139] The coherence length is determined based on the second left boundary and the second right boundary:
[0140] (10)
[0141] In the formula, Indicates the coherence length. Indicates the second left boundary. Indicates the second right boundary.
[0142] In this embodiment, the initial threshold parameter can be flexibly set according to user needs, such as 0.4, 0.5, etc. This embodiment takes 0.5 as an example.
[0143] In this embodiment, the left and right boundaries (i.e., the first left boundary and the first right boundary) are first determined from the second sampling point set using an initial threshold parameter. The determination method is as follows: the first optical path difference sampling point and the last optical path difference sampling point in the second sampling point set whose target coherence intensity is greater than or equal to the initial threshold parameter are respectively taken as the first left boundary and the first right boundary, as shown below:
[0144] (11)
[0145] (12)
[0146] In the formula, , These represent the first left boundary and the first right boundary, respectively. Indicates the initial threshold parameter;
[0147] Then, the initial coherence length is determined using equation (7), and the main peak attenuation slope is determined using equation (8) based on the initial coherence length. Then, based on the main peak attenuation slope, the initial threshold parameter is dynamically adjusted using equation (9) to obtain the target threshold. Wherein, when the main peak attenuation slope is steep (i.e.... At that time, the target threshold Noise interference can be suppressed by the target threshold; when the slope of the main peak attenuation is gentle (i.e. When the target threshold is reached, This maintains versatility. After determining the target threshold, the second left boundary and the second right boundary are determined by the target threshold (the determination method is the same as that of the first left boundary and the first right boundary, and will not be repeated here), and the final coherence length is calculated by equation (10).
[0148] Thus, an adaptive coherence length algorithm based on dynamically adjusting the threshold according to the attenuation slope of the main peak is adopted. A two-stage boundary detection mechanism (initial threshold division and dynamic threshold optimization) is introduced to effectively overcome the boundary misjudgment problem of the traditional fixed threshold method in asymmetric attenuation scenarios, and significantly improve the adaptability of the coherence length calculation results to changes in the light source line shape.
[0149] In this embodiment, determining the side-mode slope based on the target coherence intensity and the second sampling point set using a preset side-mode slope calculation strategy may include:
[0150] In the second set of sampling points, the optical path difference sampling points whose target coherence intensity meets a preset condition are identified as the side-mode peak location points. The preset condition is expressed as follows:
[0151] (13)
[0152] In the formula, Indicates optical path difference sampling point The target coherence strength;
[0153] For each of the side-mode peak locations, the slope of the side-mode peak location is determined based on the target coherence intensity corresponding to the adjacent optical path difference sampling points of the side-mode peak location:
[0154] (14)
[0155] In the formula, ;
[0156] The maximum value of the slope at all edge mode peak locations is determined and taken as the edge mode slope.
[0157] Understandably, this embodiment is used to calculate the slope of the side modulus. In practical applications, it is necessary to first exclude the neighborhood where the main peak is located. The range of the neighborhood where the main peak is located can be flexibly set according to user needs, for example... , etc.
[0158] In this embodiment, after excluding the neighborhood of the main peak, the second set of sampling points is filtered by equation (13), and the optical path difference sampling points that satisfy equation (13) are taken as the side mode peak positions. This represents the number of edge mode peak locations. Then, for each edge mode peak location, the slope of the edge mode peak location is determined by equation (14). Finally, the maximum value of the slopes of all edge mode peak locations is taken as the edge mode slope.
[0159] Thus, by designing screening conditions for edge mode peak locations and slope calculation rules, the true edge mode peaks are accurately identified through intensity comparison of adjacent points. Decibels are used to enhance the contrast of weak edge mode features, and a maximum slope extraction strategy is employed to eliminate noise interference, ensuring that the calculated edge mode slope truly reflects the sharpness of the spectral sidebands of the light source.
[0160] Understandably, in practical applications, coherence parameters can also include the slope of the main peak. The slope of the main peak can be calculated by first determining the neighborhood of the main peak, and then directly calculating the slope of each optical path difference sampling point in the neighborhood of the main peak using equation (14), and taking the maximum value of the slope of all optical path difference sampling points in the neighborhood of the main peak as the slope of the main peak.
[0161] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the electronic device 100 described above can be referred to the corresponding process of each step in the aforementioned method, and will not be repeated here.
[0162] This application also provides a computer program product, including a computer program that, when executed by processor 101, implements the above-described coherent parameter testing method.
[0163] Based on the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by hardware or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as a personal computer, server, or network device, etc.) to execute the methods described in the various implementation scenarios of this application.
[0164] In summary, this application provides a method, electronic device, and program product for testing coherence parameters. In this technical solution, spectral data is first acquired, and then optical path difference sampling is performed on the spectral data based on a first preset step size to obtain multiple optical path difference sampling points, which serve as a first sampling point set. Then, based on the spectral data and the first sampling point set, optical path difference sampling is performed on the spectral data based on a second preset step size to obtain multiple optical path difference sampling points, which serve as a second sampling point set. The second preset step size is smaller than the first preset step size. Finally, based on the spectral data and the second sampling point set, the coherence parameters corresponding to the spectral data are determined using a preset parameter calculation strategy, and this is taken as the test result. Thus, through a two-stage sampling mechanism of coarse sampling with a first preset step size and fine sampling with a second preset step size, the first-stage coarse sampling quickly locks the approximate region of the main peak, while the second-stage fine sampling performs high-resolution sampling within a local range. This avoids the computational redundancy caused by traditional single-step sampling and ensures the accurate extraction of detailed features such as the slope of the side modes, achieving a balance between computational efficiency and measurement accuracy. This improves upon the problem of excessive computation in traditional coherent parameter testing methods that use fixed sampling step sizes for optical path difference sampling in wide-range measurements.
[0165] In the embodiments provided in this application, it should be understood that the disclosed methods can also be implemented in other ways. The method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or part of code, which includes one or more executable instructions for implementing a specified logical function. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0166] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for testing coherence parameters, characterized in that, The method includes: Acquire spectral data, which includes multiple spectral wavelength sampling points and light intensity data corresponding to each wavelength sampling point; Based on the spectral data, optical path difference sampling is performed on the spectral data with a first preset step size to obtain multiple optical path difference sampling points, which are used as the first sampling point set. Based on the spectral data and the first set of sampling points, optical path difference sampling is performed on the spectral data with a second preset step size to obtain multiple optical path difference sampling points, which are used as the second set of sampling points. The second preset step size is smaller than the first preset step size. Based on the spectral data and the second set of sampling points, the coherence parameters corresponding to the spectral data are determined using a preset parameter calculation strategy, and these parameters are used as the test results. Specifically, based on the spectral data and the first sampling point set, optical path difference sampling is performed on the spectral data according to a second preset step size to obtain multiple optical path difference sampling points, which serve as the second sampling point set, including: Based on the first set of sampling points, the maximum value in the coherence intensity distribution of the spectral data is determined as the position of the main peak of the coherence intensity distribution: ; In the formula, Indicates the location of the main peak. Denotes the first set of sampling points. This represents the coherence intensity distribution corresponding to the first set of sampling points; Obtain a preset local sampling range centered on the main peak position; Within the preset local sampling range, the spectral data is sampled by optical path difference based on the second preset step size to obtain the second sampling point set, as shown below: ; In the formula, Represents the second set of sampling points. Indicates the location of the main peak. Indicates the preset local sampling range. This indicates the second preset step size, which is smaller than the first preset step size. The number of points sampled.
2. The method according to claim 1, characterized in that, Acquire spectral data, including: Obtain the plurality of spectral wavelength sampling points and the initial light intensity corresponding to each wavelength sampling point; The initial light intensity is converted to a unit to obtain the converted initial light intensity, which is used as the light intensity data: ; In the formula, This represents the initial light intensity after conversion. This represents the initial light intensity.
3. The method according to claim 1, characterized in that, Based on the spectral data, optical path difference sampling is performed on the spectral data according to a first preset step size to obtain multiple optical path difference sampling points, which serve as a first sampling point set, including: Obtain the preset global sampling range; Within the preset global sampling range, optical path difference sampling is performed on the spectral data based on the first preset step size to obtain the first sampling point set, as shown below: ; In the formula, Denotes the first set of sampling points. This represents the minimum value within the preset global sampling range. This represents the maximum value within the preset global sampling range. Indicates the first preset step size. This indicates the number of points sampled.
4. The method according to claim 1, characterized in that, The coherence parameters include coherence length and side modulus slope; Based on the spectral data and the second sampling point set, and through a preset parameter calculation strategy, the coherence parameters corresponding to the spectral data are determined as the test results, including: Based on the light intensity data in the spectral data and the second sampling point set, determine the target coherence intensity corresponding to the spectral data; Based on the target coherence intensity and the second set of sampling points, the coherence length is determined using a preset coherence length calculation strategy. Based on the target coherence intensity and the second sampling point set, the side-mode slope is determined using a preset side-mode slope calculation strategy.
5. The method according to claim 4, characterized in that, Based on the light intensity data in the spectral data and the second sampling point set, the target coherence intensity corresponding to the spectral data is determined, including: Based on the light intensity data and the second set of sampling points, determine the coherence intensity corresponding to the spectral data: ; In the formula, Indicates coherence intensity. Indicates the dimension of spectral data. Represents light intensity data. The imaginary unit, Represents the second set of sampling points; The coherence intensity is normalized to obtain the normalized coherence intensity, which is then used as the target coherence intensity. ; In the formula, Indicates the target coherence strength. Indicates the coherence intensity.
6. The method according to claim 4, characterized in that, Based on the target coherence intensity and the second sampling point set, the coherence length is determined using a preset coherence length calculation strategy, including: Obtain the initial threshold parameter; The first left boundary and the first right boundary are determined based on the initial threshold parameter; Determine the initial coherence length based on the first left boundary and the first right boundary: ; In the formula, Indicates the initial coherence length. Indicates the first left boundary. Indicates the first right boundary; Based on the initial coherence length and the position of the main peak in the coherence intensity distribution of the spectral data, determine the attenuation slope of the main peak: ; In the formula, This indicates the slope of the main peak decay. Indicates the location of the main peak. Represents the coherence intensity function; Based on the main peak attenuation slope, determine the target threshold: ; In the formula, Indicates the target threshold. This represents the initial threshold parameter. Indicates the attenuation factor. This indicates the slope of the main peak attenuation; The second left boundary and the second right boundary are determined based on the target threshold. The coherence length is determined based on the second left boundary and the second right boundary: ; In the formula, Indicates the coherence length. Indicates the second left boundary. Indicates the second right boundary.
7. The method according to claim 4, characterized in that, Based on the target coherence intensity and the second sampling point set, the side-mode slope is determined using a preset side-mode slope calculation strategy, including: In the second set of sampling points, the optical path difference sampling points whose target coherence intensity meets a preset condition are identified as the side-mode peak location points. The preset condition is expressed as follows: ; In the formula, Indicates the optical path difference sampling point The target coherence strength; For each of the side-mode peak locations, the slope of the side-mode peak location is determined based on the target coherence intensity corresponding to the adjacent optical path difference sampling points of the side-mode peak location: ; In the formula, ; The maximum value of the slope at all edge mode peak locations is determined and taken as the edge mode slope.
8. An electronic device, characterized in that, The electronic device includes a processor and a memory coupled together, the memory storing a computer program that, when executed by the processor, causes the electronic device to perform the method as described in any one of claims 1-7.
9. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1-7.
Citation Information
Patent Citations
White light interference three-dimensional reconstruction method based on undersampling and Hilbert transform
CN116105624A