CN116933056A - Method and system for determining characteristic peak area of Raman spectrum without deducting Raman background - Google Patents
Method and system for determining characteristic peak area of Raman spectrum without deducting Raman background Download PDFInfo
- Publication number
- CN116933056A CN116933056A CN202310908925.5A CN202310908925A CN116933056A CN 116933056 A CN116933056 A CN 116933056A CN 202310908925 A CN202310908925 A CN 202310908925A CN 116933056 A CN116933056 A CN 116933056A
- Authority
- CN
- China
- Prior art keywords
- index
- raman
- peak
- characteristic peak
- points
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000001069 Raman spectroscopy Methods 0.000 title claims abstract description 219
- 238000001237 Raman spectrum Methods 0.000 title claims abstract description 84
- 238000000034 method Methods 0.000 title claims abstract description 72
- 230000008569 process Effects 0.000 claims description 29
- 230000003595 spectral effect Effects 0.000 claims description 16
- 238000004364 calculation method Methods 0.000 claims description 11
- 238000001514 detection method Methods 0.000 abstract description 20
- 238000001228 spectrum Methods 0.000 abstract description 7
- 230000000694 effects Effects 0.000 abstract description 5
- 238000004422 calculation algorithm Methods 0.000 abstract description 4
- 238000000605 extraction Methods 0.000 abstract description 2
- 230000006870 function Effects 0.000 description 57
- 238000012360 testing method Methods 0.000 description 13
- 238000002474 experimental method Methods 0.000 description 8
- 230000008901 benefit Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000126 substance Substances 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 239000003344 environmental pollutant Substances 0.000 description 1
- 229910001385 heavy metal Inorganic materials 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000000447 pesticide residue Substances 0.000 description 1
- 231100000719 pollutant Toxicity 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 238000004445 quantitative analysis Methods 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/62—Systems in which the material investigated is excited whereby it emits light or causes a change in wavelength of the incident light
- G01N21/63—Systems in which the material investigated is excited whereby it emits light or causes a change in wavelength of the incident light optically excited
- G01N21/65—Raman scattering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N2201/00—Features of devices classified in G01N21/00
- G01N2201/12—Circuits of general importance; Signal processing
- G01N2201/129—Using chemometrical methods
Landscapes
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Data Mining & Analysis (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Health & Medical Sciences (AREA)
- Pathology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- General Health & Medical Sciences (AREA)
- Biochemistry (AREA)
- Analytical Chemistry (AREA)
- Chemical & Material Sciences (AREA)
- Artificial Intelligence (AREA)
- Immunology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Spectrometry And Color Measurement (AREA)
Abstract
A method and a system for determining the peak area of a Raman spectrum characteristic without deducting the Raman background belong to the technical field of Raman spectrum detection and spectrum data characteristic extraction. The method aims to solve the problems that the effect of an automatic background subtraction algorithm is large in difference and non-uniform in parameters when the peak area of the spectrum characteristic is calculated in the existing quantitative detection system based on the Raman method, and the influence of subjective factors of manually subtracting the background is large. The method comprises the steps of firstly determining accurate center peak position information of a characteristic peak, calculating accurate coordinates of intersection points at two sides of the characteristic peak based on a set confidence peak position ratio p value, then calculating horizontal distance between the center peak position and the two intersection points, moving from a left intersection point to two sides, calculating accurate coordinates of tangential points at two sides of the characteristic peak based on the horizontal distance, and finally calculating the area of a region surrounded by a connecting line of a Raman characteristic peak and the two tangential points based on the coordinates of the left tangential point and the right tangential point. The method is used for determining the characteristic peak area of the Raman spectrum.
Description
Technical Field
The invention belongs to the technical field of Raman spectrum detection and spectrum data feature extraction, and particularly relates to a method and a system for calculating a feature peak area without deducting Raman spectrum background interference.
Background
The Raman spectrum technology has the advantages of extremely high detection sensitivity, simple and rapid detection flow, lower detection cost, capability of providing a fingerprint spectrum of a substance to be detected and the like, and has become the preferred technical scheme of a plurality of detection analysis instruments. The Raman spectrum instrument is widely applied to various fields such as food pesticide residue detection, water environment heavy metal ion detection, environmental biological pollutant detection and the like.
The Raman spectrum data contains fingerprint information of the object to be detected, and qualitative detection of the object to be detected is relatively easy through a Raman method; however, the actual detection needs not only to confirm the kind of the object to be detected, but also to realize quantitative detection of the object to be detected, and thus, it is necessary to obtain the characteristic information related to the concentration of the object to be detected from the raman spectrum. At present, quantitative detection of an object to be detected is realized by a Raman spectrum technology, and the quantitative detection is realized mainly by establishing a corresponding relation between the Raman spectrum characteristic peak area of the object to be detected and the substance concentration. The calculation of the peak area needs to avoid the background interference of the Raman spectrum, but the actually obtained Raman spectrum contains unpredictable background information, and the characteristic peak area of the Raman spectrum cannot be directly calculated by the existing method. At present, the characteristic peak area of the Raman spectrum is calculated by firstly subtracting the background interference of the Raman spectrum in various modes, such as polynomial fitting, punishment self-adaptive partial least square fitting and other algorithms to automatically subtract the background information of the spectrum or manually subtract the background information of the spectrum, and then calculating the characteristic peak area to realize quantitative detection.
However, the effect difference of the automatic background interference deduction method is large, and fitting parameters adopted for the same background interference are sometimes inconsistent; the manual background interference deduction method is greatly influenced by subjective factors of experimenters, and the existing method for calculating the peak area of the characteristic peak of the Raman spectrum is not completely reasonable. Therefore, a method for calculating the characteristic peak area without interference of the background information of the Raman spectrum and without background subtraction is developed, and the method has an important promoting effect on improving the stability and the reliability of a Raman spectrum quantitative detection system.
Disclosure of Invention
The invention aims to solve the problems that the effect of an automatic background deduction algorithm is large in difference and nonuniform in parameters when the peak-to-peak area of the spectrum characteristic is calculated in the existing quantitative detection system based on the Raman method, and the influence of subjective factors of manually deducting the background is large, so that the problem of poor result accuracy is caused.
The method for determining the peak area of the characteristic peak of the Raman spectrum without deducting the Raman background comprises the following steps:
s1, calculating accurate center peak position information of a characteristic peak:
firstly, reading the whole Raman spectrum data, and respectively storing the raman shift and intensity in an array x and an array y; raman shift is raman shift, intensity is raman intensity;
Then, based on the Raman frequency shift of the characteristic peak to be extracted and the searching range of the central peak position, determining the maximum value of Raman intensity in the sequence length of the searching range of the central peak position, and taking the maximum value as the accurate central peak position of the characteristic peak to be extracted, wherein the corresponding index value is the central peak position index value center_peak_raman_shift_index;
s2, calculating accurate coordinates of intersection points on two sides of the characteristic peak based on a set confidence peak position ratio p value, wherein the intersection points are reference points determined based on the confidence peak position ratio p value; the process for calculating the accurate coordinates of the intersection points at the two sides of the characteristic peak comprises the following steps:
s21, acquiring a left-right intersection point range of a characteristic peak, namely a peak searching range search_peak_length;
step S22, setting the initial values of left and right intersection point index values xlnum_index and xrnum_index to be equal to the accurate center peak index value determined in the step S1;
step S23, calculating index values of the left intersection point and the right intersection point respectively leftwards and rightwards based on the central peak position:
step S231, searching for a sequence length of a left intersection point to be search_peak_length/2;
when y [ xlnum_index ] > (1-p) ×y [ center_peak_raman_shift_index ], each time the left intersection point x [ xlnum_index ] moves leftwards by one step length, namely the index value is reduced by 1, judging whether the x [ xlnum_index ] is in the sequence length range of the left intersection point at the moment, if so, continuing to move leftwards to search the intersection point;
Where x [ xlnum_index ] represents a raman shift corresponding to the index xlnum_index, y [ xlnum_index ] represents a raman intensity corresponding to the index xlnum_index, and y [ center_peak_raman_shift_index ] represents a raman intensity corresponding to the index center_peak_raman_shift_index;
stopping when y [ xlnum_index ] < = (1-p) [ center_peak_raman_shift_index ] or at the moment x [ xlnum_index ] has exceeded the sequence length range of the left intersection point, wherein xlnum_index is the left intersection point index value;
step S232, searching a right intersection point, wherein the sequence length is search_peak_length/2;
when y [ xrnum_index ] > (1-p) ×y [ center_peak_raman_shift_index ], each right intersection point x [ xrnum_index ] moves one step length to the right, namely an index value is added with 1, judging whether the x [ xrnum_index ] is in the range of the sequence length of the right intersection point at the moment, if so, continuing to move to the right to find the intersection point;
stopping when y [ xrnum_index ] < = (1-p) [ center_peak_raman_shift_index ] or at the moment x [ xrnum_index ] exceeds the sequence length range of the right intersection point, wherein xrnum_index is the index value of the right intersection point;
step S3, calculating accurate coordinates of tangential points of two sides of the characteristic peak based on the intersection points of the two sides of the characteristic peak, wherein the specific process comprises the following steps:
Step S31, calculating the horizontal distance Deltax between the center peak position and the two intersection points L 、△x R ;
Step S32, the starting values of the left and right tangent point coordinate index values xllnum_index and xrrnnum_index are respectively equal to xlnum_index and xrnum_index; the left and right tangent points are left and right end points for calculating the peak area of the characteristic peak of the Raman spectrum;
step S33, left tangent point x [ xllnum_index ]]Each time shifting one step to the left, i.e. the index value is subtracted by 1, when x [ xllnum_index]=x[center_peak_raman_shift_index]-(1/p)*△x L When the characteristic peak left tangent point index value xllnum_index is found;
step S34, right tangent point x [ xrrnum_index ]]Each time moving one step to the right, i.e. the cableThe index value is increased by 1 when x [ xrrnum_index ]]=x[center_peak_raman_shift_index]+(1/p)*△x R When the characteristic peak right tangential point index value xrrnum_index is found;
in the step S35, the coordinates of the left and right tangent points are (x [ xllnum_index ], y [ xllnum_index ]), (x [ xrrnum_index ], y [ xrrnum_index ]);
and S4, calculating the area of an area surrounded by the Raman characteristic peak and the connecting line of the two tangent points based on the coordinates of the left tangent point and the right tangent point.
Further, the process of determining the maximum value of the raman intensity within the length of the central peak search range sequence comprises the following steps:
firstly, obtaining a step length divis of raman shift, and then determining a maximum value of Raman intensity within the searching range sequence length of the central peak position according to the step length divis, and taking the maximum value as an accurate central peak position of a characteristic peak to be extracted.
Further, the process of calculating the area of the area surrounded by the Raman characteristic peak and the connecting line of the two tangent points based on the coordinates of the left tangent point and the right tangent point comprises the following steps:
step S41, taking the left tangent point of the characteristic peak as a starting point, and taking the Raman intensity values y [ xllnum_index ] of two adjacent points]、y[xllnum_index+1]Calculating the area of each small trapezoid by taking the Raman step length as high for the upper bottom and the lower bottom until reaching the right tangent point to cut off, and marking the sum of the areas of the small trapezoids as S Total (S) ;
Step S42, determining the area S of the Raman background based on the left and right tangent points of the characteristic peak Back of body ;
Step S43, S Total (S) Subtracting S Back of body The obtained area is the peak area of the Raman characteristic peak.
Further, determining the area S of the Raman background based on the left and right tangential points of the characteristic peak Back of body The process of (1) comprises the following steps:
raman intensity value y [ xllnum_index ] at right and left tangential points of characteristic peak]、y[xrrnum_index]For the upper and lower bottoms, the horizontal distance between the two tangent points is high, and the calculated area of the trapezoid is recorded as S Back of body I.e. the area of the raman background.
A system for determining peak areas of raman spectral features without subtracting raman background, comprising:
center peak position information determination unit: the specific process for calculating the accurate center peak position information of the characteristic peak comprises the following steps:
firstly, reading the whole Raman spectrum data, and respectively storing the raman shift and intensity in an array x and an array y; raman shift is raman shift, intensity is raman intensity;
Then, based on the Raman frequency shift of the characteristic peak to be extracted and the searching range of the central peak position, determining the maximum value of Raman intensity in the sequence length of the searching range of the central peak position, and taking the maximum value as the accurate central peak position of the characteristic peak to be extracted, wherein the corresponding index value is the central peak position index value center_peak_raman_shift_index;
characteristic peak both sides intersection point determining unit: calculating accurate coordinates of intersection points on two sides of the characteristic peak based on a set confidence peak position ratio p value, wherein the intersection points are reference points determined based on the confidence peak position ratio p value; the process for calculating the accurate coordinates of the intersection points at the two sides of the characteristic peak comprises the following steps:
s21, acquiring a left-right intersection point range of a characteristic peak, namely a peak searching range search_peak_length;
s22, setting the initial values of left and right intersection point index values xlnum_index and xrnum_index to be equal to the accurate center peak position index value;
step S23, calculating index values of the left intersection point and the right intersection point respectively leftwards and rightwards based on the central peak position:
step S231, searching for a sequence length of a left intersection point to be search_peak_length/2;
when y [ xlnum_index ] > (1-p) ×y [ center_peak_raman_shift_index ], each time the left intersection point x [ xlnum_index ] moves leftwards by one step length, namely the index value is reduced by 1, judging whether the x [ xlnum_index ] is in the sequence length range of the left intersection point at the moment, if so, continuing to move leftwards to search the intersection point;
Where x [ xlnum_index ] represents a raman shift corresponding to the index xlnum_index, y [ xlnum_index ] represents a raman intensity corresponding to the index xlnum_index, and y [ center_peak_raman_shift_index ] represents a raman intensity corresponding to the index center_peak_raman_shift_index;
stopping when y [ xlnum_index ] < = (1-p) [ center_peak_raman_shift_index ] or at the moment x [ xlnum_index ] has exceeded the sequence length range of the left intersection point, wherein xlnum_index is the left intersection point index value;
step S232, searching a right intersection point, wherein the sequence length is search_peak_length/2;
when y [ xrnum_index ] > (1-p) ×y [ center_peak_raman_shift_index ], each right intersection point x [ xrnum_index ] moves one step length to the right, namely an index value is added with 1, judging whether the x [ xrnum_index ] is in the range of the sequence length of the right intersection point at the moment, if so, continuing to move to the right to find the intersection point;
stopping when y [ xrnum_index ] < = (1-p) [ center_peak_raman_shift_index ] or at the moment x [ xrnum_index ] exceeds the sequence length range of the right intersection point, wherein xrnum_index is the index value of the right intersection point;
characteristic peak both sides tangential point determining unit: the accurate coordinates of tangential points on two sides of the characteristic peak are calculated based on the intersection points on two sides of the characteristic peak, and the specific process comprises the following steps:
Step S31, calculating the horizontal distance Deltax between the center peak position and the two intersection points L 、△x R ;
Step S32, the starting values of the left and right tangent point coordinate index values xllnum_index and xrrnnum_index are respectively equal to xlnum_index and xrnum_index; the left and right tangent points are left and right end points for calculating the peak area of the characteristic peak of the Raman spectrum;
step S33, left tangent point x [ xllnum_index ]]Each time shifting one step to the left, i.e. the index value is subtracted by 1, when x [ xllnum_index]=x[center_peak_raman_shift_index]-(1/p)*△x L When the characteristic peak left tangent point index value xllnum_index is found;
step S34, right tangent point x [ xrrnum_index ]]Each time shifted one step to the right, i.e. the index value is increased by 1, when x [ xrrnum_index ]]=x[center_peak_raman_shift_index]+(1/p)*△x R When the characteristic peak right tangential point index value xrrnum_index is found;
in the step S35, the coordinates of the left and right tangent points are (x [ xllnum_index ], y [ xllnum_index ]), (x [ xrrnum_index ], y [ xrrnum_index ]);
raman characteristic peak area calculation unit: and calculating the area of an area surrounded by the Raman characteristic peak and the connecting line of the two tangent points based on the coordinates of the left tangent point and the right tangent point.
Further, the process of determining the maximum value of the raman intensity within the length of the central peak search range sequence comprises the following steps:
firstly, obtaining a step length divis of raman shift, and then determining a maximum value of Raman intensity within the searching range sequence length of the central peak position according to the step length divis, and taking the maximum value as an accurate central peak position of a characteristic peak to be extracted.
Further, the process of calculating the area of the area surrounded by the Raman characteristic peak and the connecting line of the two tangent points based on the coordinates of the left tangent point and the right tangent point comprises the following steps:
step S41, taking the left tangent point of the characteristic peak as a starting point, and taking the Raman intensity values y [ xllnum_index ] of two adjacent points]、y[xllnum_index+1]Calculating the area of each small trapezoid by taking the Raman step length as high for the upper bottom and the lower bottom until reaching the right tangent point to cut off, and marking the sum of the areas of the small trapezoids as S Total (S) ;
Step S42, determining the area S of the Raman background based on the left and right tangent points of the characteristic peak Back of body ;
Step S43, S Total (S) Subtracting S Back of body The obtained area is the peak area of the Raman characteristic peak.
Further, determining the area S of the Raman background based on the left and right tangential points of the characteristic peak Back of body The process of (1) comprises the following steps:
raman intensity value y [ xllnum_index ] at right and left tangential points of characteristic peak]、y[xrrnum_index]For the upper and lower bottoms, the horizontal distance between the two tangent points is high, and the calculated area of the trapezoid is recorded as S Back of body I.e. the area of the raman background.
A computer storage medium having stored therein at least one instruction loaded and executed by a processor to implement the method of determining a raman spectral feature peak area without subtracting a raman background.
An apparatus for determining a raman spectral feature peak area without a subtracted raman background, the apparatus comprising a processor and a memory having stored therein at least one instruction loaded and executed by the processor to implement the method for determining a raman spectral feature peak area without a subtracted raman background.
The invention has the beneficial effects that:
1. in the process of automatically calculating the peak area of the characteristic peak of the Raman spectrum, the method does not need to deduct the background information of the Raman spectrum. Compared with the existing method for calculating the peak area of the Raman characteristic peak, the method has the advantages that the problems that the effect difference of the automatic background deduction algorithm is large, parameters are not uniform, and the influence of subjective factors of manual background deduction is large are avoided.
2. The method introduces two optimizable parameters of the confidence peak position ratio and the intersection point range, and ensures the accuracy of calculating the Raman peak area. Under the interference of different background function parameters and different background function combinations, the calculated change of the area ratio of the background characteristic to the background characteristic is lower than 5% for the Raman characteristic peaks with different half peak widths and different intensities.
3. The method can improve the stability and reliability of quantitative analysis of the Raman detection system on the basis of not changing the Raman instrument.
Drawings
FIG. 1 is a schematic diagram of a method for determining the peak area of a characteristic peak of a Raman spectrum without subtracting a Raman background.
FIG. 2 is a graph of simulated Raman spectrum with simultaneous superposition of four backgrounds, namely, background-free simulated Raman spectrum, gaussian function, sigmoid function, exponential function, and Ploynombial function, under the condition that the background intensity is smaller than the Raman signal intensity in the test of the invention; in the figure, the round dots are the accurate center peak position, the intersection points of the two sides and the tangential point positions of the two sides of the characteristic peak obtained by calculation.
FIG. 3 is a simulated Raman spectrum with simultaneous superposition of four backgrounds, namely, a background-free simulated Raman spectrum, a Gaussian function, a Sigmoid function, an Exponential function and a Ploynombial function, under the condition that the intensity of the second background of the test is larger than the intensity of the Raman signal; in the figure, the round dots are the accurate center peak position, the intersection points of the two sides and the tangential point positions of the two sides of the characteristic peak obtained by calculation.
FIG. 4 is a simulated Raman spectrum with simultaneous superposition of the background-free simulated Raman spectrum and four backgrounds of Gaussian function, sigmoid function, expungal function, and ploynomic function under the condition that the intensity of the three backgrounds of the test is equal to that of part of Raman signals and is larger than that of the rest of Raman signals; in the figure, the round dots are the accurate center peak position, the intersection points of the two sides and the tangential point positions of the two sides of the characteristic peak obtained by calculation.
Detailed Description
According to the input peak position of the characteristic peak to be extracted, calculating the accurate center peak position coordinate of the characteristic peak to be extracted; then searching range sequence length parameters according to the input confidence peak position ratio and the left and right intersection points, and calculating to obtain left and right intersection point coordinate values; further, calculating to obtain coordinates of left and right tangential points of the characteristic peak to be extracted; and finally, calculating the area of a region formed by the connecting line of the two tangential points and the Raman characteristic peak, namely finishing the calculation of the characteristic peak area.
Through verification, the method provided by the invention has the advantage that the area ratio change of the extracted background and background-free characteristic is lower than 5% for the raman spectrum signals with different types and different parameter background combined interferences.
The invention is further illustrated by the following examples, which are given to illustrate the invention but not to limit the scope thereof, in conjunction with the drawings and the detailed description.
The first embodiment is as follows: the present embodiment will be described with reference to figure 1,
the method for determining the peak area of the characteristic peak of the Raman spectrum without deducting the Raman background comprises the following steps:
s1, calculating accurate center peak position information of a characteristic peak:
s11, reading the whole Raman spectrum data, and respectively storing the raman shift and intensity in an array x and an array y; raman shift is raman shift, intensity is raman intensity;
Step S12, determining a Raman frequency shift of a characteristic peak to be extracted and a searching range of a central peak position;
step S13, determining a Raman intensity maximum value in the sequence length of the central peak position searching range based on the Raman frequency shift of the characteristic peak to be extracted and the central peak position searching range, wherein the Raman intensity maximum value is used as the accurate central peak position of the characteristic peak to be extracted, and the corresponding index value is the central peak position index value center_peak_raman_shift_index;
the process of determining the maximum value of the raman intensity within the length of the central peak search range sequence comprises the following steps:
firstly, obtaining a step length divis of raman shift, and then determining a maximum value of Raman intensity within the searching range sequence length of the central peak position according to the step length divis, and taking the maximum value as an accurate central peak position of a characteristic peak to be extracted.
S2, calculating accurate coordinates of intersection points on two sides of the characteristic peak based on a set confidence peak position ratio p value, wherein the intersection points are reference points determined based on the confidence peak position ratio p value; the process for calculating the accurate coordinates of the intersection points at the two sides of the characteristic peak comprises the following steps:
s21, acquiring a left-right intersection point range of a characteristic peak, namely a peak searching range search_peak_length;
s22, setting the initial values of left and right intersection point index values xlnum_index and xrnum_index to be equal to the accurate center peak position index value;
Step S23, calculating index values of the left intersection point and the right intersection point respectively leftwards and rightwards based on the central peak position:
in step S231, the sequence length of searching the left intersection point is search_peak_length/2, that is, half of the peak searching range, when y [ xlnum_index ] > (1-p) ×y [ center_peak_raman_shift_index ], each time the left intersection point x [ xlnum_index ] moves one step to the left, that is, the index value is subtracted by 1, it is determined whether the x [ xlnum_index ] at this time is within the sequence length range of the left intersection point, if so, the left movement is continued to search the intersection point.
Where x [ xlnum_index ] represents the raman shift corresponding to the index xlnum_index, y [ xlnum_index ] represents the raman intensity corresponding to the index xlnum_index, and y [ center_peak_raman_shift_index ] represents the raman intensity corresponding to the index center_peak_raman_shift_index;
the index value is a mapping (similar to addressing of a computer) of the abscissa of the raman spectrum, and corresponds to coordinate values one by one, and the index value is increased/decreased by 1, and then the abscissa corresponds to a step length which is shifted right/left, and the index value can be adjusted to control the abscissa and the ordinate simultaneously, so that the relationship between the index value and the abscissa can be understood by the following examples:
abscissa Raman shift: 400. 401, 402, 403, 404, 405
Ordinate Raman intensity: 50. 70, 90, 100, 120, 150
Index: 1. 2, 3, 4, 5, 6
Current abscissa x [3] =402, corresponding y [3] =90; when moving one step to the right, i.e. the index value is 3+1=4, there must be x [4] =403, and the corresponding y [4] =100.
Stopping when y [ xlnum_index ] < = (1-p) [ center_peak_raman_shift_index ] or at the moment x [ xlnum_index ] has exceeded the sequence length range of the left intersection point, wherein xlnum_index is the left intersection point index value;
step S232, finding that the sequence length of the right intersection point is search_peak_length/2, namely half of the peak finding range, when y [ xrnum_index ] > (1-p) ×y [ center_peak_raman_shift_index ], moving the right intersection point x [ xrnum_index ] by one step length to the right, namely adding 1 to the index value, and judging whether the x [ xrnum_index ] is in the sequence length range of the right intersection point at the moment, if so, continuing to move to the right to find the intersection point.
When y [ xrnum_index ] < = (1-p) [ center_peak_raman_shift_index ] or x [ xrnum_index ] at the moment exceeds the sequence length range of the right intersection point, stopping, wherein xrnum_index is the index value of the right intersection point.
Step S3, calculating accurate coordinates of tangential points at two sides of the characteristic peak:
Step S31, calculating the horizontal distance Deltax between the center peak position and the two intersection points L 、△x R ;
Step S32, the starting values of the left and right tangent point coordinate index values xllnum_index and xrrnnum_index are respectively equal to xlnum_index and xrnum_index; the left and right tangent points are left and right end points for calculating the peak area of the characteristic peak of the Raman spectrum;
step S33, left tangent point x [ xllnum_index ]]Each time shifted one step to the left, i.e. the index value is subtracted1 when x [ xllnum_index ]]=x[center_peak_raman_shift_index]-(1/p)*△x L When the characteristic peak left tangent point index value xllnum_index is found;
step S34, right tangent point x [ xrrnum_index ]]Each time shifted one step to the right, i.e. the index value is increased by 1, when x [ xrrnum_index ]]=x[center_peak_raman_shift_index]+(1/p)*△x R When the characteristic peak right tangential point index value xrrnum_index is found;
in the step S35, the coordinates of the left and right tangent points are (x [ xllnum_index ], y [ xllnum_index ]), (x [ xrrnum_index ], y [ xrrnum_index ]).
S4, calculating the area of an area surrounded by the connecting line of the Raman characteristic peak and the two tangent points:
step S41, taking the left tangent point of the characteristic peak as a starting point, and taking the Raman intensity values y [ xllnum_index ] of two adjacent points]、y[xllnum_index+1]Calculating the area of each small trapezoid by taking the Raman step length as high for the upper bottom and the lower bottom until reaching the right tangent point to cut off, and marking the sum of the areas of the small trapezoids as S Total (S) ;
Step S42, using the Raman intensity value y [ xllnum_index ] of the right and left tangent points of the characteristic peak ]、y[xrrnum_index]For the upper and lower bottoms, the horizontal distance between the two tangent points is high, and the calculated area of the trapezoid is recorded as S Back of body I.e. the area of the raman background;
step S43, S Total (S) Subtracting S Back of body The obtained area is the peak area of the Raman characteristic peak.
It should be noted that, in the method for determining the peak area of the raman spectrum characteristic peak without subtracting the raman background of the present invention, the non-subtracted raman background refers to a mode that the raman background needs to be subtracted in advance in the existing calculation method of the raman spectrum characteristic peak area, that is, the subtraction is not required according to the existing background subtraction mode, and does not refer to an area where the raman background does not need to be subtracted in the present invention.
The second embodiment is as follows:
the present embodiment is a system for determining a peak area of a raman spectrum characteristic peak without subtracting a raman background, the system is a program corresponding to the method for determining a peak area of a raman spectrum characteristic peak without subtracting a raman background in the specific embodiment, and the system includes:
center peak position information determination unit: the specific process for calculating the accurate center peak position information of the characteristic peak comprises the following steps:
firstly, reading the whole Raman spectrum data, and respectively storing the raman shift and intensity in an array x and an array y; raman shift is raman shift, intensity is raman intensity;
Then, based on the Raman frequency shift of the characteristic peak to be extracted and the searching range of the central peak position, determining the maximum value of Raman intensity in the sequence length of the searching range of the central peak position, and taking the maximum value as the accurate central peak position of the characteristic peak to be extracted, wherein the corresponding index value is the central peak position index value center_peak_raman_shift_index;
characteristic peak both sides intersection point determining unit: calculating accurate coordinates of intersection points on two sides of the characteristic peak based on a set confidence peak position ratio p value, wherein the intersection points are reference points determined based on the confidence peak position ratio p value; the process for calculating the accurate coordinates of the intersection points at the two sides of the characteristic peak comprises the following steps:
s21, acquiring a left-right intersection point range of a characteristic peak, namely a peak searching range search_peak_length;
s22, setting the initial values of left and right intersection point index values xlnum_index and xrnum_index to be equal to the index value of the accurate center peak position;
step S23, calculating index values of the left intersection point and the right intersection point respectively leftwards and rightwards based on the central peak position:
step S231, searching for a sequence length of a left intersection point to be search_peak_length/2;
when y [ xlnum_index ] > (1-p) ×y [ center_peak_raman_shift_index ], each time the left intersection point x [ xlnum_index ] moves leftwards by one step length, namely the index value is reduced by 1, judging whether the x [ xlnum_index ] is in the sequence length range of the left intersection point at the moment, if so, continuing to move leftwards to search the intersection point;
Where x [ xlnum_index ] represents a raman shift corresponding to the index xlnum_index, y [ xlnum_index ] represents a raman intensity corresponding to the index xlnum_index, and y [ center_peak_raman_shift_index ] represents a raman intensity corresponding to the index center_peak_raman_shift_index;
stopping when y [ xlnum_index ] < = (1-p) [ center_peak_raman_shift_index ] or at the moment x [ xlnum_index ] has exceeded the sequence length range of the left intersection point, wherein xlnum_index is the left intersection point index value;
step S232, searching a right intersection point, wherein the sequence length is search_peak_length/2;
when y [ xrnum_index ] > (1-p) ×y [ center_peak_raman_shift_index ], each right intersection point x [ xrnum_index ] moves one step length to the right, namely an index value is added with 1, judging whether the x [ xrnum_index ] is in the range of the sequence length of the right intersection point at the moment, if so, continuing to move to the right to find the intersection point;
stopping when y [ xrnum_index ] < = (1-p) [ center_peak_raman_shift_index ] or at the moment x [ xrnum_index ] exceeds the sequence length range of the right intersection point, wherein xrnum_index is the index value of the right intersection point;
characteristic peak both sides tangential point determining unit: the accurate coordinates of tangential points on two sides of the characteristic peak are calculated based on the intersection points on two sides of the characteristic peak, and the specific process comprises the following steps:
Step S31, calculating the horizontal distance Deltax between the center peak position and the two intersection points L 、△x R ;
Step S32, the starting values of the left and right tangent point coordinate index values xllnum_index and xrrnnum_index are respectively equal to xlnum_index and xrnum_index; the left and right tangent points are left and right end points for calculating the peak area of the characteristic peak of the Raman spectrum;
step S33, left tangent point x [ xllnum_index ]]Each time shifting one step to the left, i.e. the index value is subtracted by 1, when x [ xllnum_index]=x[center_peak_raman_shift_index]-(1/p)*△x L When the characteristic peak left tangent point index value xllnum_index is found;
step S34, right tangent point x [ xrrnum_index ]]Each time shifted one step to the right, i.e. the index value is increased by 1, when x [ xrrnum_index ]]=x[center_peak_raman_shift_index]+(1/p)*△x R When the characteristic peak right tangential point index value xrrnum_index is found;
in the step S35, the coordinates of the left and right tangent points are (x [ xllnum_index ], y [ xllnum_index ]), (x [ xrrnum_index ], y [ xrrnum_index ]);
raman characteristic peak area calculation unit: the area of an area surrounded by a Raman characteristic peak and a connecting line of the two tangent points is calculated based on coordinates of the left tangent point and the right tangent point, and the specific process comprises the following steps:
step S41, taking the left tangent point of the characteristic peak as a starting point, and taking the Raman intensity values y [ xllnum_index ] of two adjacent points]、y[xllnum_index+1]Calculating the area of each small trapezoid by taking the Raman step length as high for the upper bottom and the lower bottom until reaching the right tangent point to cut off, and marking the sum of the areas of the small trapezoids as S Total (S) ;
Step S42, using the Raman intensity value y [ xllnum_index ] of the right and left tangent points of the characteristic peak]、y[xrrnum_index]For the upper and lower bottoms, the horizontal distance between the two tangent points is high, and the calculated area of the trapezoid is recorded as S Back of body I.e. the area of the raman background;
step S43, S Total (S) Subtracting S Back of body The obtained area is the peak area of the Raman characteristic peak.
And a third specific embodiment:
the embodiment is a computer storage medium having at least one instruction stored therein, the at least one instruction being loaded and executed by a processor to implement the method for determining a raman spectral feature peak area without subtracting a raman background.
It should be understood that the instructions comprise a computer program product, software, or computerized method corresponding to any of the methods described herein; the instructions may be used to program a computer system, or other electronic device. Computer storage media may include readable media having instructions stored thereon and may include, but is not limited to, magnetic storage media, optical storage media; magneto-optical storage media include read-only memory ROM, random-access memory RAM, erasable programmable memory (e.g., EPROM and EEPROM), and flash memory layers, or other types of media suitable for storing electronic instructions.
The specific embodiment IV is as follows:
the embodiment is an apparatus for determining a peak area of a raman spectrum characteristic peak without subtracting a raman background, the apparatus includes a processor and a memory, it should be understood that any apparatus including the processor and the memory described in the present invention may include other units, modules for performing display, interaction, processing, control, and other functions through signals or instructions;
the memory stores at least one instruction that is loaded and executed by the processor to implement the method for determining the peak-to-peak area of the characteristic raman spectrum without subtracting the raman background.
Examples
Since the actually collected raman spectrum background peaks are irregular and unpredictable, raman spectrum data which does not contain any background interference cannot be obtained. For Raman spectrum data with background interference, the background is subtracted by adopting the existing method, and the characteristic peak area is calculated as the standard peak area, so that the beneficial effect of the invention is not reasonable. Therefore, the invention adopts a common method of Raman spectrum simulation to superimpose a plurality of Lorentzian peaks to generate background-free Raman spectrum data.
The Raman background signal is generated by a Gaussian function, a Sigmoid function, an Exponential function and a Ploynomic function singly or in combination, and the background interference and the simulated Raman spectrum data are superimposed to obtain the Raman spectrum data containing the background and different types and parameters.
The following examples are used to verify the benefits of the present invention:
in the embodiment, the optimizable parameters used for calculating the peak areas of different characteristic peaks of the same simulated Raman spectrum are consistent, and only the central peak position information of the characteristic peak to be calculated is changed; and comparing the peak area change with or without background interference, only changing the background function combination, and not changing the background function parameters and the optimizable parameters.
Test one: calculating the raman peak area when the background signal intensity is smaller than the raman signal intensity is accomplished according to the following steps:
the simulated raman spectrum parameters generated by this test are as follows: raman center positions are 544, 739, 1009, 1329, 1690, respectively, raman half-widths are 36, 25, 30, 33, 57, respectively, raman peak areas are 7200, 6020, 9589, 10345, 11300, respectively, and raman step sizes are 0.1.
The background function parameters for this experiment are as follows: the Gaussian parameters are 1000, 128, 550; the Sigmoid parameters are 830, 25 and 100; the Exponential parameter is 21; the Ploynomial parameter was 20.
Step S1, calculating accurate center peak position information of a characteristic peak to be extracted, wherein the specific steps are as follows:
step S11, respectively storing raman shift and intensity of the generated Raman spectrum in an array x and an array y; in particular, raman spectra containing different background interferences can be generated by changing the combination of different types of background functions;
Step S12, inputting characteristic peaks to be extracted, wherein the characteristic peaks to be extracted input in the test are 535, 750, 1000, 1320 and 1700 respectively, and the searching range of the input center peak position is set to be 80;
step S13, searching the maximum value of Raman intensity in the length of the input center peak position sequence to be extracted, and taking the maximum value as the accurate center peak position of the characteristic peak to be extracted, wherein the index value is a center peak position index value center_peak_raman_shift_index, and the specific steps are as follows:
the raman shift step length of the simulated raman spectrum is 0.1, the sequence length of the central peak position searching range is 80, the maximum value of the raman intensity in 40 sequence length ranges around the input central peak position is searched and used as an accurate central peak position, and the corresponding index value is an accurate central peak position index value.
S2, calculating coordinates of left and right intersection points of the central peak position of the characteristic peak to be extracted, wherein the specific steps are as follows:
step S21, the test sets the length parameter of the left and right intersection point searching range sequence as 200, the confidence peak position ratio of the background-free Raman spectrum as 0.9, and the confidence peak position ratio of the background-free Raman spectrum as 0.35;
step S22, making the initial values of the index values xlnum_index and xrnum_index of the left intersection point and the right intersection point equal to the central peak index value determined in the step S13;
Step S23, respectively determining index values of two intersection points leftwards and rightwards according to a calculation formula, wherein the specific steps are as follows:
in step S231, the sequence length range of finding the left intersection point is half of the sequence length parameters of the left and right intersection point finding ranges set in step S21, when y [ xlnum_index ] > (1-p) ×y [ center_peak_raman_shift_index ], the left intersection point x [ xlnum_index ] is moved one step to the left each time, that is, the index value is subtracted by 1, and it is determined whether the x [ xlnum_index ] at this time is within the set left intersection point sequence length range, if so, the left movement is continued to find the intersection point. Stopping when y [ xlnum_index ] < = (1-p) [ center_peak_raman_shift_index ] or at the moment x [ xlnum_index ] has exceeded the sequence length range of the left intersection point, wherein xlnum_index is the left intersection point index value;
step S232, finding the sequence length of the right intersection point to be half of the sequence length parameters of the left and right intersection point finding range set in step S21, when y [ xrnum_index ] > (1-p) ×y [ center_peak_raman_shift_index ], moving the right intersection point x [ xrnum_index ] one step length to the right each time, namely adding 1 to the index value, and judging whether the x [ xrnum_index ] at the moment is within the sequence length range of the set right intersection point, if so, continuing to move to the right to find the intersection point. When y [ xrnum_index ] < = (1-p) [ center_peak_raman_shift_index ] or x [ xrnum_index ] at the moment exceeds the sequence length range of the right intersection point, stopping, wherein xrnum_index is the index value of the right intersection point.
Step S3, calculating left and right tangential point coordinates of the central peak position of the characteristic peak to be extracted, wherein the specific steps are as follows:
step S31, calculating the horizontal distance Deltax between the peak position of the center to be extracted and the two intersection points L 、△x R ;
Step S32, the starting values of the coordinate index values xllnum_index and xrrnnum_index of the left and right tangent points are respectively equal to xlnum_index and xrnum_index;
step S33, left tangent point x [ xllnum_index ]]Each time shifting one step to the left, i.e. the index value is subtracted by 1, when x [ xllnum_index]=x[center_peak_raman_shift_index]-(1/p)*△x L When the characteristic peak left tangent point index value xllnum_index is found;
step S34, right tangent point x [ xrrnum_index ]]Each time shifted one step to the right, i.e. the index value is increased by 1, when x [ xrrnum_index ]]=x[center_peak_raman_shift_index]+(1/p)*△x R When the characteristic peak right tangential point index value xrrnum_index is found;
in step S35, the coordinates of the left and right tangent points are (x [ xllnum_index ], y [ xllnum_index ]), (x [ xrrnum_index ], y [ xrrnum_index ]).
Step S4, calculating the peak area of the characteristic peak to be extracted, wherein the specific steps are as follows:
step S41, taking the left tangent point of the characteristic peak as a starting point, and taking the Raman intensity values y [ xllnum_index ] of two adjacent points]、y[xllnum_index+1]For the upper bottom and the lower bottom, the Raman step length divis is high, the area of each small trapezoid is calculated until reaching the right tangent point to be cut off, and the sum of the areas of the small trapezoids is recorded as S Total (S) ;
Step S42, using the Raman intensity value y [ xllnum_index ] corresponding to the right and left tangent points of the characteristic peak]、y[xrrnum_index]For the upper and lower bottoms, the horizontal distance between the two tangent points is high, and the calculated area of the Raman background is recorded as S Back of body ;
Step S43, S Total (S) Subtracting S Back of body The obtained area is the peak area of the Raman characteristic peak.
FIG. 2 is a graph of simulated Raman spectrum and a graph of non-background simulated Raman spectrum superimposed with four background functions at the same time under the condition that the background intensity is smaller than the Raman signal intensity, wherein the round points in the graph are the accurate center peak position, the intersection points on two sides and the tangential point positions on two sides of the characteristic peak calculated by the invention;
table 1 is a statistical chart of the calculated background-to-background feature area ratio of different feature peaks for different background function combinations under the condition that the background intensity is smaller than the raman signal intensity.
TABLE 1
Note that: the raman spectral background is generated by four functions, where G represents a Gaussian function, S represents a Sigmoid function, E represents an expungal function, and P represents a ploynomic function; letter combinations indicate that the spectral background is formed by corresponding function combinations
As can be seen from the results of fig. 2 and table 1, under the condition that the background intensity is smaller than the raman signal intensity, the area ratio of the calculated background to the background-free characteristic is less than 5% for raman characteristic peaks with different half peak widths and different intensities under the interference of different background function parameters and different background function combinations.
And (2) testing II: the raman peak area was calculated when the background signal intensity was greater than the raman signal intensity, and the difference between this experiment and experiment one was:
the background function parameters used in this experiment are as follows: the Gaussian parameters are 400, 739, 1000; the Sigmoid parameters are 530, 100 and 500; the Exponential parameter is 300; the Ploynomial parameter was 200.
S21, the length parameter of the left and right intersection point searching range sequence is 140, the confidence peak position ratio of the background-free Raman spectrum is set to be 0.93, and the confidence peak position ratio of the background-free Raman spectrum is set to be 0.67; the other steps and parameters were the same as in test one.
FIG. 3 is a graph of simulated Raman spectrum and a graph of non-background simulated Raman spectrum superimposed with four background functions at the same time under the condition that the intensity of the second background is greater than that of the Raman signal, wherein the round points in the graph are the accurate center peak position, the intersection points on two sides and the tangential point positions on two sides of the characteristic peak calculated by the invention;
table 2 is a statistical graph of the area ratio of the background to the non-background characteristic of different calculated characteristic peaks for different background function combinations under the condition that the intensity of the second background of the test is larger than the intensity of the raman signal.
TABLE 2
Note that: the raman spectral background is generated by four functions, where G represents a Gaussian function, S represents a Sigmoid function, E represents an expungal function, and P represents a ploynomic function; letter combinations indicate that the spectral background is formed by corresponding function combinations
As can be seen from the results of fig. 3 and table 2, under the condition that the background intensity is greater than the raman signal intensity and the interference of different background function parameters and different background function combinations, the area ratio of the calculated background to the background-free characteristic is less than 5% for raman characteristic peaks with different half peak widths and different intensities.
And (3) test III: the background signal intensity is equal to part of the raman signal intensity and is larger than the rest of the raman signal intensity, and the difference between the experiment and the experiment one is that:
the simulated raman spectral parameters for this experiment are as follows: the raman center positions are 544, 739, 1009, 1329 and 1690, the raman half-peak widths are 20, 30, 38, 50 and 42, the raman peak areas are 17600, 29800, 26589, 20345 and 10000, respectively, and the raman step size is 0.1.
The background function parameters for this experiment are as follows: the Gaussian parameters are 2400, 750, 800; the Sigmoid parameters are 600, 260 and 1000; the Exponential parameter is 100; the Ploynomial parameter was 200.
S21, the length parameter of the left and right intersection point searching range sequence is 120, the confidence peak position ratio of the background-free Raman spectrum is set to be 0.88, and the confidence peak position ratio of the background-free Raman spectrum is set to be 0.6; the remaining steps and parameters were the same as those of test one.
FIG. 4 is a graph of simulated Raman spectrum and non-background simulated Raman spectrum superimposed with four background functions under the condition that the intensity of the three background is equal to that of part of Raman signal and is larger than that of the rest Raman signal, wherein the round dots in the graph are the accurate center peak position, the intersection points on two sides and the tangential point positions of the characteristic peak calculated by the invention;
table 3 is a statistical graph of the calculated background-to-background feature area ratio of different feature peaks for different background function combinations under the condition that the intensity of the three backgrounds is equal to the intensity of part of raman signals and is larger than the intensity of the rest of raman signals.
TABLE 3 Table 3
Note that: the raman spectral background is generated by four functions, where G represents a Gaussian function, S represents a Sigmoid function, E represents an expungal function, and P represents a ploynomic function; letter combinations indicate that the spectral background is formed by corresponding function combinations
As can be seen from the results of fig. 4 and table 3, under the condition that the background intensity is equivalent to part of raman signal intensity and is greater than the rest of raman signal intensity, the area ratio of the calculated background to the background-free characteristic is less than 5% for raman characteristic peaks with different half peak widths and different intensities under the interference of different background function parameters and different background function combinations.
From the three test results, the invention can calculate that the area ratio of different characteristic peaks with and without backgrounds is less than 5% under the condition that the confidence peak position ratio parameter and the left and right intersection point range parameter do not need to be changed under the interference of different background function parameters and different background function combinations. The method has low calculation result difference, is not influenced by subjective factors, is superior to other methods for calculating the Raman peak area at the present stage, and has important promotion effect on improving the stability and reliability of a Raman spectrum quantitative detection system.
Claims (10)
1. The method for determining the peak area of the characteristic peak of the Raman spectrum without subtracting the Raman background is characterized by comprising the following steps:
s1, calculating accurate center peak position information of a characteristic peak:
firstly, reading the whole Raman spectrum data, and respectively storing the raman shift and intensity in an array x and an array y; raman shift is raman shift, intensity is raman intensity;
then, based on the Raman frequency shift of the characteristic peak to be extracted and the searching range of the central peak position, determining the maximum value of Raman intensity in the sequence length of the searching range of the central peak position, and taking the maximum value as the accurate central peak position of the characteristic peak to be extracted, wherein the corresponding index value is the central peak position index value center_peak_raman_shift_index;
S2, calculating accurate coordinates of intersection points on two sides of the characteristic peak based on a set confidence peak position ratio p value, wherein the intersection points are reference points determined based on the confidence peak position ratio p value; the process for calculating the accurate coordinates of the intersection points at the two sides of the characteristic peak comprises the following steps:
s21, acquiring a left-right intersection point range of a characteristic peak, namely a peak searching range search_peak_length;
step S22, setting the initial values of left and right intersection point index values xlnum_index and xrnum_index to be equal to the accurate center peak index value determined in the step S1;
step S23, calculating index values of the left intersection point and the right intersection point respectively leftwards and rightwards based on the central peak position:
step S231, searching for a sequence length of a left intersection point to be search_peak_length/2;
when y [ xlnum_index ] > (1-p) ×y [ center_peak_raman_shift_index ], each time the left intersection point x [ xlnum_index ] moves leftwards by one step length, namely the index value is reduced by 1, judging whether the x [ xlnum_index ] is in the sequence length range of the left intersection point at the moment, if so, continuing to move leftwards to search the intersection point;
where x [ xlnum_index ] represents a raman shift corresponding to the index xlnum_index, y [ xlnum_index ] represents a raman intensity corresponding to the index xlnum_index, and y [ center_peak_raman_shift_index ] represents a raman intensity corresponding to the index center_peak_raman_shift_index;
Stopping when y [ xlnum_index ] < = (1-p) [ center_peak_raman_shift_index ] or at the moment x [ xlnum_index ] has exceeded the sequence length range of the left intersection point, wherein xlnum_index is the left intersection point index value;
step S232, searching a right intersection point, wherein the sequence length is search_peak_length/2;
when y [ xrnum_index ] > (1-p) ×y [ center_peak_raman_shift_index ], each right intersection point x [ xrnum_index ] moves one step length to the right, namely an index value is added with 1, judging whether the x [ xrnum_index ] is in the range of the sequence length of the right intersection point at the moment, if so, continuing to move to the right to find the intersection point;
stopping when y [ xrnum_index ] < = (1-p) [ center_peak_raman_shift_index ] or at the moment x [ xrnum_index ] exceeds the sequence length range of the right intersection point, wherein xrnum_index is the index value of the right intersection point;
step S3, calculating accurate coordinates of tangential points of two sides of the characteristic peak based on the intersection points of the two sides of the characteristic peak, wherein the specific process comprises the following steps:
step S31, calculating the horizontal distance Deltax between the center peak position and the two intersection points L 、△x R ;
Step S32, the starting values of the left and right tangent point coordinate index values xllnum_index and xrrnnum_index are respectively equal to xlnum_index and xrnum_index; the left and right tangent points are left and right end points for calculating the peak area of the characteristic peak of the Raman spectrum;
Step S33, left tangent point x [ xllnum_index ]]Each time shifting one step to the left, i.e. the index value is subtracted by 1, when x [ xllnum_index]=x[center_peak_raman_shift_index]-(1/p)*△x L When the characteristic peak left tangent point index value xllnum_index is found;
step S34, right tangent point x [ xrrnum_index ]]Each time shifted one step to the right, i.e. the index value is increased by 1, when x [ xrrnum_index ]]=x[center_peak_raman_shift_index]+(1/p)*△x R When the characteristic peak right tangential point index value xrrnum_index is found;
in the step S35, the coordinates of the left and right tangent points are (x [ xllnum_index ], y [ xllnum_index ]), (x [ xrrnum_index ], y [ xrrnum_index ]);
and S4, calculating the area of an area surrounded by the Raman characteristic peak and the connecting line of the two tangent points based on the coordinates of the left tangent point and the right tangent point.
2. The method for determining peak areas of raman spectrum features without subtracting raman background according to claim 1 wherein the process of determining the maximum value of raman intensity within the length of the central peak finding range sequence comprises the steps of:
firstly, obtaining a step length divis of raman shift, and then determining a maximum value of Raman intensity within the searching range sequence length of the central peak position according to the step length divis, and taking the maximum value as an accurate central peak position of a characteristic peak to be extracted.
3. The method for determining the peak area of a characteristic peak of a raman spectrum without subtracting a raman background according to claim 1 or 2, wherein the process of calculating the area of a region surrounded by a raman characteristic peak and a line connecting two tangent points based on the coordinates of the two tangent points comprises the following steps:
Step S41, taking the left tangent point of the characteristic peak as a starting point, and taking the Raman intensity values y [ xllnum_index ] of two adjacent points]、y[xllnum_index+1]Calculating the area of each small trapezoid by taking the Raman step length as high for the upper bottom and the lower bottom until reaching the right tangent point to cut off, and marking the sum of the areas of the small trapezoids as S Total (S) ;
Step S42, determining the area S of the Raman background based on the left and right tangent points of the characteristic peak Back of body ;
Step S43, S Total (S) Subtracting S Back of body The obtained area is the peak area of the Raman characteristic peak.
4. The method for determining the peak area of a characteristic peak of a Raman spectrum without subtracting the Raman background as recited in claim 3, wherein the area S of the Raman background is determined based on the tangential points of the characteristic peak Back of body The process of (1) comprises the following steps:
raman intensity value y [ xllnum_index ] at right and left tangential points of characteristic peak]、y[xrrnum_index]For the upper and lower bottoms, the horizontal distance between the two tangent points is high, and the calculated area of the trapezoid is recorded as S Back of body I.e. the area of the raman background.
5. A system for determining peak areas of raman spectral features without subtracting raman background, comprising:
center peak position information determination unit: the specific process for calculating the accurate center peak position information of the characteristic peak comprises the following steps:
firstly, reading the whole Raman spectrum data, and respectively storing the raman shift and intensity in an array x and an array y; raman shift is raman shift, intensity is raman intensity;
Then, based on the Raman frequency shift of the characteristic peak to be extracted and the searching range of the central peak position, determining the maximum value of Raman intensity in the sequence length of the searching range of the central peak position, and taking the maximum value as the accurate central peak position of the characteristic peak to be extracted, wherein the corresponding index value is the central peak position index value center_peak_raman_shift_index;
characteristic peak both sides intersection point determining unit: calculating accurate coordinates of intersection points on two sides of the characteristic peak based on a set confidence peak position ratio p value, wherein the intersection points are reference points determined based on the confidence peak position ratio p value; the process for calculating the accurate coordinates of the intersection points at the two sides of the characteristic peak comprises the following steps:
s21, acquiring a left-right intersection point range of a characteristic peak, namely a peak searching range search_peak_length;
s22, setting the initial values of left and right intersection point index values xlnum_index and xrnum_index to be equal to the accurate center peak position index value;
step S23, calculating index values of the left intersection point and the right intersection point respectively leftwards and rightwards based on the central peak position:
step S231, searching for a sequence length of a left intersection point to be search_peak_length/2;
when y [ xlnum_index ] > (1-p) ×y [ center_peak_raman_shift_index ], each time the left intersection point x [ xlnum_index ] moves leftwards by one step length, namely the index value is reduced by 1, judging whether the x [ xlnum_index ] is in the sequence length range of the left intersection point at the moment, if so, continuing to move leftwards to search the intersection point;
Where x [ xlnum_index ] represents a raman shift corresponding to the index xlnum_index, y [ xlnum_index ] represents a raman intensity corresponding to the index xlnum_index, and y [ center_peak_raman_shift_index ] represents a raman intensity corresponding to the index center_peak_raman_shift_index;
stopping when y [ xlnum_index ] < = (1-p) [ center_peak_raman_shift_index ] or at the moment x [ xlnum_index ] has exceeded the sequence length range of the left intersection point, wherein xlnum_index is the left intersection point index value;
step S232, searching a right intersection point, wherein the sequence length is search_peak_length/2;
when y [ xrnum_index ] > (1-p) ×y [ center_peak_raman_shift_index ], each right intersection point x [ xrnum_index ] moves one step length to the right, namely an index value is added with 1, judging whether the x [ xrnum_index ] is in the range of the sequence length of the right intersection point at the moment, if so, continuing to move to the right to find the intersection point;
stopping when y [ xrnum_index ] < = (1-p) [ center_peak_raman_shift_index ] or at the moment x [ xrnum_index ] exceeds the sequence length range of the right intersection point, wherein xrnum_index is the index value of the right intersection point;
characteristic peak both sides tangential point determining unit: the accurate coordinates of tangential points on two sides of the characteristic peak are calculated based on the intersection points on two sides of the characteristic peak, and the specific process comprises the following steps:
Step S31, calculating the horizontal distance Deltax between the center peak position and the two intersection points L 、△x R ;
Step S32, the starting values of the left and right tangent point coordinate index values xllnum_index and xrrnnum_index are respectively equal to xlnum_index and xrnum_index; the left and right tangent points are left and right end points for calculating the peak area of the characteristic peak of the Raman spectrum;
step S33, left tangent point x [ xllnum_index ]]Each time shifting one step to the left, i.e. the index value is subtracted by 1, when x [ xllnum_index]=x[center_peak_raman_shift_index]-(1/p)*△x L When the characteristic peak left tangent point index value xllnum_index is found;
step S34, right tangent point x [ xrrnum_index ]]Each time shifted one step to the right, i.e. the index value is increased by 1, when x [ xrrnum_index ]]=x[center_peak_raman_shift_index]+(1/p)*△x R When the characteristic peak right tangential point index value xrrnum_index is found;
in the step S35, the coordinates of the left and right tangent points are (x [ xllnum_index ], y [ xllnum_index ]), (x [ xrrnum_index ], y [ xrrnum_index ]);
raman characteristic peak area calculation unit: and calculating the area of an area surrounded by the Raman characteristic peak and the connecting line of the two tangent points based on the coordinates of the left tangent point and the right tangent point.
6. The system for determining peak areas of features of a raman spectrum without subtracting raman background according to claim 5 wherein the process of determining the maximum value of raman intensity within the length of the central peak position search range sequence comprises the steps of:
Firstly, obtaining a step length divis of raman shift, and then determining a maximum value of Raman intensity within the searching range sequence length of the central peak position according to the step length divis, and taking the maximum value as an accurate central peak position of a characteristic peak to be extracted.
7. The system for determining the peak area of a characteristic peak of a raman spectrum without subtracting a raman background according to claim 5 or 6, wherein the process of calculating the area of a region surrounded by a raman characteristic peak and a line connecting two tangential points based on coordinates of the left tangential point and the right tangential point comprises the following steps:
step S41, taking the left tangent point of the characteristic peak as a starting point, and taking the Raman intensity values y [ xllnum_index ] of two adjacent points]、y[xllnum_index+1]Calculating the area of each small trapezoid by taking the Raman step length as high for the upper bottom and the lower bottom until reaching the right tangent point to cut off, and marking the sum of the areas of the small trapezoids as S Total (S) ;
Step S42, determining the area S of the Raman background based on the left and right tangent points of the characteristic peak Back of body ;
Step S43, S Total (S) Subtracting S Back of body The obtained area is the peak area of the Raman characteristic peak.
8. The system for determining the peak area of a characteristic peak of a raman spectrum without subtracting the raman background according to claim 7, wherein the area S of the raman background is determined based on the tangential points of the characteristic peak Back of body The process of (1) comprises the following steps:
raman intensity value y [ xllnum_index ] at right and left tangential points of characteristic peak ]、y[xrrnum_index]For the upper and lower bottoms, the horizontal distance between the two tangent points is high, and the calculated area of the trapezoid is recorded as S Back of body I.e. the area of the raman background.
9. A computer storage medium having stored therein at least one instruction loaded and executed by a processor to implement the method of determining raman spectral feature peak areas without subtracting raman background according to any one of claims 1 to 4.
10. An apparatus for determining a raman spectral feature peak area without a subtracted raman background, the apparatus comprising a processor and a memory having stored therein at least one instruction loaded and executed by the processor to implement the method for determining a raman spectral feature peak area without a subtracted raman background as claimed in any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310908925.5A CN116933056B (en) | 2023-07-24 | 2023-07-24 | Method and system for determining characteristic peak area of Raman spectrum without deducting Raman background |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310908925.5A CN116933056B (en) | 2023-07-24 | 2023-07-24 | Method and system for determining characteristic peak area of Raman spectrum without deducting Raman background |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116933056A true CN116933056A (en) | 2023-10-24 |
CN116933056B CN116933056B (en) | 2024-06-21 |
Family
ID=88387491
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310908925.5A Active CN116933056B (en) | 2023-07-24 | 2023-07-24 | Method and system for determining characteristic peak area of Raman spectrum without deducting Raman background |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116933056B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101291616A (en) * | 2005-10-04 | 2008-10-22 | 如新国际股份有限公司 | Raman instrument for measuring weak signals in the presence of strong background fluorescence |
CN104215623A (en) * | 2013-05-31 | 2014-12-17 | 欧普图斯(苏州)光学纳米科技有限公司 | Multi-industry detection-oriented laser Raman spectrum intelligent identification method and system |
CN112712108A (en) * | 2020-12-16 | 2021-04-27 | 西北大学 | Raman spectrum multivariate data analysis method |
CN113109317A (en) * | 2021-03-26 | 2021-07-13 | 中国科学院西安光学精密机械研究所 | Raman spectrum quantitative analysis method and system based on background subtraction extraction peak area |
US20210270742A1 (en) * | 2020-02-28 | 2021-09-02 | Virginia Tech Intellectual Properties, Inc. | Peak-preserving and enhancing baseline correction methods for raman spectroscopy |
-
2023
- 2023-07-24 CN CN202310908925.5A patent/CN116933056B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101291616A (en) * | 2005-10-04 | 2008-10-22 | 如新国际股份有限公司 | Raman instrument for measuring weak signals in the presence of strong background fluorescence |
CN104215623A (en) * | 2013-05-31 | 2014-12-17 | 欧普图斯(苏州)光学纳米科技有限公司 | Multi-industry detection-oriented laser Raman spectrum intelligent identification method and system |
US20210270742A1 (en) * | 2020-02-28 | 2021-09-02 | Virginia Tech Intellectual Properties, Inc. | Peak-preserving and enhancing baseline correction methods for raman spectroscopy |
CN112712108A (en) * | 2020-12-16 | 2021-04-27 | 西北大学 | Raman spectrum multivariate data analysis method |
CN113109317A (en) * | 2021-03-26 | 2021-07-13 | 中国科学院西安光学精密机械研究所 | Raman spectrum quantitative analysis method and system based on background subtraction extraction peak area |
Non-Patent Citations (1)
Title |
---|
朱倩;程明霄;丁妍;李时伟;林锦国;: "基于拉曼光谱CCD信号的谱峰识别技术研究", 传感器与微系统, no. 12, 20 December 2012 (2012-12-20), pages 12 - 15 * |
Also Published As
Publication number | Publication date |
---|---|
CN116933056B (en) | 2024-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11493447B2 (en) | Method for removing background from spectrogram, method of identifying substances through Raman spectrogram, and electronic apparatus | |
US8139833B2 (en) | Analyzing large data sets using a computer system | |
CN107153848A (en) | Instrument image automatic identifying method based on OpenCV | |
US7515769B2 (en) | Mapping-data analyzing method and apparatus | |
JP3581149B2 (en) | Method and apparatus for identifying an object using a regular sequence of boundary pixel parameters | |
Chen et al. | Gas chromatography‐ion mobility spectrometry detection of odor fingerprint as markers of rapeseed oil refined grade | |
JP2011191222A (en) | Mass analysis data processing method and apparatus | |
CN105551034B (en) | The preprocess method and device of a kind of image identification of DNA sequencing | |
CN113222913A (en) | Circuit board defect detection positioning method and device and storage medium | |
GB2221754A (en) | Digital image processing system | |
JP2006275952A (en) | Pattern evaluation method, pattern alignment method, and program | |
CN116385380A (en) | Defect detection method, system, equipment and storage medium based on depth characteristics | |
CN113902668B (en) | Thread region extraction method and system for pedal thread identification | |
TWI493168B (en) | A method computer program and system to analyze mass spectra | |
CN116933056B (en) | Method and system for determining characteristic peak area of Raman spectrum without deducting Raman background | |
CN117726621B (en) | Gene sequencing base quality assessment method, product, equipment and medium based on deep learning | |
CN113707219B (en) | Analytical method and system for analyzing nucleic acid amplification reactions | |
CN110738641B (en) | Image processing and KELM based qualitative detection method for concentration of medical reagent | |
EP3561718A1 (en) | Method for identifying raman spectrogram, and electronic device | |
US5904822A (en) | Methods and apparatus for analyzing electrophoresis gels | |
US20130114875A1 (en) | Methods and Apparatus for Image Analysis Using Profile Weighted Intensity Features | |
JP2020153864A (en) | Chromatograph data processing device, data processing method and chromatography | |
US20100046813A1 (en) | Systems and Methods of Analyzing Two Dimensional Gels | |
JP4379913B2 (en) | Image quality inspection device | |
CN115684316B (en) | Smell recognition method of bionic electronic nose based on MOS gas sensor array |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |