A method and electronic device for mass spectrum classification measurement
Through singular value decomposition and polynomial fitting, adjusting the shape of the template spectrum, combined with the tuning of the distance difference sequence, the shortcomings of spectral matching and redshift measurement in the existing technology are solved, and the spectral classification and red are achieved with high accuracy and high reliability Shift measurement.
Patent Information
- Application Number
- CN202411604304.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-12
AI Technical Summary
The prior art has shortcomings in spectral shape adjustment, reliability evaluation of matching results, physical interpretability and redshift measurement accuracy, and it is difficult to meet the needs of modern astronomy for high accuracy, reliability analysis and classification of large-scale spectral data.
Dynamically adjust the spectral shape of the template spectrum through singular value decomposition, combine polynomial fitting and distance difference sequence tuning to improve the accuracy and reliability of the matching results, and obtain high-precision redshift values through Gaussian fitting.
It significantly improves the accuracy and reliability of spectral matching, reduces the possibility of mismatch, improves the accuracy of redshift measurements, and provides clear physical credibility.
Smart Images

Figure CN119128670B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of astrometry, spectral measurement and redshift measurement, and more specifically, to a mass spectral classification measurement method and electronic equipment. Background Art
[0002] With the rapid development of modern astronomy, spectral data has become an important tool for studying various astrophysical phenomena in the universe. Driven by large-scale sky survey projects such as SDSS (Sloan Digital Sky Survey) and LAMOST (Guo Shoujing Telescope), astronomers have obtained a large amount of astronomical spectral data. These data cover a variety of celestial body types such as stars, galaxies, and quasars, and are the core basis for classification, redshift measurement, and other physical parameter research in the field of astronomy.
[0003] Traditional spectral template matching methods usually face several challenges. First, due to differences in observation conditions and instruments, the continuous spectrum part of the measured spectrum has large uncertainties and is difficult to directly match with the standard template. This weakens the importance of spectral line features during the matching process, thereby reducing the accuracy of the match. Traditional methods often use simple scaling or translation operations when adjusting the shape of the template continuous spectrum, which cannot fully reflect the changes in the complex spectral shape, thus affecting the final matching effect.
[0004] Secondly, after obtaining the best matching template, conventional template matching methods usually find it difficult to quantitatively evaluate the accuracy of the matching results. This lack of reliable confidence assessment makes it impossible to guarantee the credibility of the matching results when faced with celestial bodies with complex spectral shapes and high diversity. Especially for redshift measurements, conventional methods can usually only give results at grid points, and the accuracy is limited by the density of the grid, which is difficult to meet the needs of high-precision astronomical research.
[0005] In recent years, with the rapid development of machine learning and data mining technology, more and more studies have begun to try to classify spectra and measure parameters through data-driven methods. However, these methods often require a large amount of training data, and the physical interpretability of their results is poor. Therefore, how to improve the accuracy and reliability of spectral matching while retaining physical interpretability remains an urgent problem to be solved.
[0006] Therefore, existing technologies still have major deficiencies in aspects such as spectral shape adjustment, confidence assessment of matching results, and high-precision redshift measurement, and are unable to meet the needs of modern astronomy for high-precision, reliable analysis and classification of large-scale spectral data. Summary of the invention
[0007] In view of this, the present invention provides a massive spectral classification measurement method and electronic equipment, which are used to solve technical problems such as insufficient spectral shape adjustment, lack of reliability assessment of matching results, poor physical interpretability, and limited redshift measurement accuracy.
[0008] One aspect of the present invention provides a massive spectrum classification measurement method, comprising: for each spectrum to be measured in a plurality of spectrums to be measured, using singular value decomposition to dynamically adjust the spectral shape of each template spectrum to obtain a plurality of adjusted template spectra, wherein the spectral shape of the adjusted template spectrum is the same as the spectral shape of the spectrum to be measured; determining a distance difference sequence of the spectrum to be measured according to the plurality of adjusted template spectra and the spectrum to be measured, wherein the distance difference sequence includes the distance difference between the flow value at each redshift value on each adjusted template spectrum and the flow value of the spectrum to be measured, and the distance differences are arranged in order from small to large; tuning the distance difference sequence to obtain a classification result of the spectrum to be measured, a target redshift value and a tuned distance difference sequence; when the classification result meets a confidence condition, determining a plurality of distance differences to be fitted from the tuned distance difference sequence according to the classification result; fitting the plurality of distance differences to be fitted to obtain a redshift error of the spectrum to be measured, wherein the redshift error is used to characterize the matching error of the target redshift value.
[0009] According to an embodiment of the present invention, singular value decomposition is used to dynamically adjust the spectral shape of each template spectrum to obtain multiple adjusted template spectra, including: determining a target matrix based on the template spectrum, wherein the number of rows of the target matrix is the same as the spectral length of the template spectrum; performing singular value decomposition on the product of the target matrix and the transposed matrix of the target matrix to obtain a left singular matrix and a right singular matrix; determining multiple spectral adjustment coefficients based on the left singular matrix, the right singular matrix, the target matrix and the spectrum to be measured; and obtaining the adjusted template spectrum based on the multiple spectral adjustment coefficients and the target matrix.
[0010] According to an embodiment of the present invention, the method also includes: when the classification result does not meet the confidence condition, determining the polynomial fitting form corresponding to the template spectrum according to the type of template spectrum; for each template spectrum, determining the flow median of the spectrum to be measured and the template spectrum in multiple bands; using the multiple flow medians of the spectrum to be measured to perform polynomial fitting to obtain a first polynomial for the spectrum to be measured; using the multiple flow medians of the template spectrum to perform polynomial fitting to obtain a second polynomial for the template spectrum; based on the difference between the first polynomial and the second polynomial, determining multiple spectral adjustment coefficients for the second polynomial; for the template spectrum corresponding to the second polynomial, adjusting the spectral shape of the template spectrum corresponding to the second polynomial according to the multiple spectral adjustment coefficients and the second polynomial to obtain an adjusted template spectrum.
[0011] According to an embodiment of the present invention, the distance difference is a chi-square distance, and the method further includes: determining a redshift value range and a redshift value step for the adjusted template spectrum according to the type of the adjusted template spectrum; wherein, starting from the boundary of the redshift value range, a redshift value of the adjusted template spectrum is obtained by moving a redshift value step within the redshift value range, so as to calculate the chi-square distance between each redshift value on the adjusted template spectrum and the corresponding redshift value in the spectrum to be measured.
[0012] According to an embodiment of the present invention, a distance difference sequence is tuned to obtain a classification result of a spectrum to be measured, a target redshift value and a tuned distance difference sequence, including: obtaining a plurality of spectral adjustment coefficients of a first adjusted template spectrum corresponding to a distance difference located at the first position in the distance difference sequence; determining a spectral direction of the first adjusted template spectrum according to the positive or negative spectral adjustment coefficient corresponding to the highest-order term in the plurality of spectral adjustment coefficients; when the spectral direction characterizes that the first adjusted template spectrum is upside down and the remaining spectral adjustment coefficients in the plurality of spectral adjustment coefficients are all positive, tuning the distance difference sequence according to the type of the adjusted template spectrum corresponding to a first preset number of distance differences in the distance difference sequence to obtain a tuned distance difference sequence; determining the type of the second adjusted template spectrum corresponding to the distance difference located at the first position in the tuned distance difference sequence as the classification result, and determining the corresponding redshift value as the target redshift value.
[0013] According to an embodiment of the present invention, the method also includes: when the type of the first adjusted template spectrum is not the target type, determining the number of target types according to the type of the adjusted template spectrum corresponding to the first second preset number of distance differences in the distance difference sequence; when the number of target types is greater than a quantity threshold, tuning the distance difference sequence to obtain a tuned distance difference sequence; determining the redshift value corresponding to the first distance difference in the tuned distance difference sequence as the target redshift value, and determining the classification result as the target type.
[0014] According to an embodiment of the present invention, the method also includes: calculating the difference between two adjacent distance differences in the distance difference sequence; when the difference satisfies the difference condition, tuning the distance difference sequence to obtain an optimized distance difference sequence; determining the type of the second adjusted template spectrum corresponding to the first distance difference in the tuned distance difference sequence as the classification result, and determining the corresponding redshift value as the target redshift value.
[0015] According to an embodiment of the present invention, a plurality of distance differences to be fitted are determined from a tuned distance difference sequence according to a classification result, including: determining a third adjusted template spectrum corresponding to the classification result; determining the minimum distance difference between the third adjusted template spectrum and the spectrum to be measured from the tuned distance difference sequence; and determining, in the third adjusted template spectrum, a plurality of distance differences that are a third preset number before and a third preset number after the minimum distance difference.
[0016] According to an embodiment of the present invention, fitting multiple distance differences to be fitted to obtain the redshift error of the spectrum to be measured includes: fitting multiple distance differences to be fitted to obtain a Gaussian function, wherein the Gaussian function includes multiple fitting coefficients; and determining the redshift error based on the fitting coefficient, the measurement error and the fitting error.
[0017] Another aspect of the present invention provides a massive spectrum classification measurement device for implementing the method described above.
[0018] Another aspect of the present invention provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above method.
[0019] Another aspect of the present invention provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.
[0020] Another aspect of the present invention provides a computer program product, the computer program product comprising computer executable instructions, the instructions being used to implement the method as described above when being executed.
[0021] The embodiment of the present invention uses a spectral shape adjustment method of singular value decomposition to make the shape of the template spectrum more consistent with the shape of the spectrum to be measured, effectively enhancing the matching accuracy of the spectral line features, thereby improving the accuracy of the overall matching. By tuning the distance difference sequence, the confidence of the matching result is significantly improved, ensuring that the final matching result has high reliability, especially in the matching process of complex spectra, effectively reducing the possibility of mismatching. By selecting multiple distance differences from the neighborhood of the minimum distance difference for fitting, a redshift value with higher accuracy than the grid point is obtained, which significantly improves the accuracy of the redshift measurement, and provides clear physical credibility through error estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0023] Figure 1An exemplary system architecture to which the method and apparatus for mass spectral classification measurement of the present invention can be applied is shown.
[0024] Figure 2 A flow chart of a method for mass spectrum classification measurement according to an embodiment of the present invention is shown.
[0025] Figure 3 A schematic diagram of a spectrum to be measured, a template spectrum, and an adjusted template spectrum according to an embodiment of the present invention is shown.
[0026] Figure 4 A schematic diagram of a spectrum to be measured in five bands according to an embodiment of the present invention is shown.
[0027] Figure 5 A mass spectrum classification measurement method according to a specific embodiment of the present invention is shown.
[0028] Figure 6 A block diagram of a massive spectrum classification measurement device according to an embodiment of the present invention is shown.
[0029] Figure 7 A block diagram of an electronic device 700 suitable for implementing a mass spectrum classification measurement method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0030] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.
[0031] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0032] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0033] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0034] The existing spectral template matching technology has the following main disadvantages:
[0035] 1. Insufficient adjustment of spectral shape. Existing spectral template matching methods usually use the chi-square minimization method to find the best matching result between the measured spectrum and the template spectrum. However, since the shape of the spectral continuum is affected by factors such as observation conditions and instrument response, there is a large difference in shape between the measured spectrum and the template spectrum. In order to overcome this problem, existing methods mostly adjust the shape of the template spectrum through simple scaling or translation, but this method is too rough and difficult to cope with complex spectral shape changes, resulting in low matching accuracy, especially in celestial bodies with complex spectral shapes, the possibility of mismatch is relatively high.
[0036] 2. Lack of reliability assessment of results. Traditional spectral matching methods lack quantitative assessment of the accuracy of the results after the matching is completed, which makes it difficult to guarantee the reliability of the matching results. This makes the matching results lack credibility when facing highly diverse spectral data, especially when the spectral signal-to-noise ratio is low or the spectral features are not obvious, the risk of misclassification and parameter measurement is high.
[0037] 3. The accuracy of redshift measurement is limited. Existing redshift measurement methods usually use grid search, and the accuracy of the redshift value is limited by the density of grid points. In order to improve the accuracy, the grid density needs to be increased, but this will significantly increase the amount of calculation and time overhead, especially when processing large-scale data, the efficiency is difficult to meet the needs. In addition, the redshift measurement results of traditional methods lack sophisticated error estimates and are difficult to provide reliable physical interpretations.
[0038] 4. Low computational efficiency. Since traditional methods rely on template matching and point-by-point grid search, the computational efficiency is low. Especially when processing massive sky survey spectral data, the computation time is too long and it is difficult to meet the needs of large-scale and efficient data processing. This has become a major bottleneck of existing technologies when real-time analysis or fast processing is required.
[0039] In addition, machine learning and deep learning methods have been introduced into spectral classification and parameter measurement. These methods have shown great advantages in dealing with nonlinear relationships and complex data features. However, data-driven methods require a large amount of labeled data for training and are insufficient in terms of physical interpretability. Especially in the application of high-precision redshift measurement, existing machine learning methods have not yet been able to provide sufficient reliability and physical interpretation.
[0040] It can be seen that the existing technology lacks an accurate, efficient, and less computing resource-intensive method for classifying massive spectral measurements.
[0041] To this end, an embodiment of the present invention provides a mass spectrum classification measurement method: for each spectrum to be measured in a plurality of spectrums to be measured, singular value decomposition is used to dynamically adjust the spectral shape of each template spectrum to obtain a plurality of adjusted template spectra, wherein the spectral shape of the adjusted template spectrum is the same as the spectral shape of the spectrum to be measured; according to the plurality of adjusted template spectra and the spectrum to be measured, a distance difference sequence of the spectrum to be measured is determined, wherein the distance difference sequence includes the distance difference between each redshift value on each adjusted template spectrum and the corresponding redshift value in the spectrum to be measured, and the distance differences are arranged in order from small to large; the distance difference sequence is tuned to obtain the classification result of the spectrum to be measured, the target redshift value and the tuned distance difference sequence; when the classification result meets the confidence condition, a plurality of distance differences to be fitted are determined from the tuned distance difference sequence according to the classification result; a plurality of distance differences to be fitted are fitted to obtain the redshift error of the spectrum to be measured, wherein the redshift error is used to characterize the matching error of the target redshift value. Thus, the embodiment of the present invention can solve the above four shortcomings in a targeted manner.
[0042] Figure 1 An exemplary system architecture for the mass spectrum classification measurement method and device of the present invention is shown. Figure 1 As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0043] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers, etc. The server 105 may be a server that provides various services, for example, executing the above-mentioned mass spectrum classification measurement method, and feeding back the final results to the first terminal device 101, the second terminal device 102, and the third terminal device 103 used by the user.
[0044] It should be noted that the mass spectrum classification measurement method provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the mass spectrum classification measurement device provided in the embodiment of the present invention can generally be set in the server 105. Alternatively, the mass spectrum classification measurement method provided in the embodiment of the present invention can also be executed by the first terminal device 101, the second terminal device 102, and the third terminal device 103. Accordingly, the mass spectrum classification measurement device provided in the embodiment of the present invention can also be set in the first terminal device 101, the second terminal device 102, and the third terminal device 103.
[0045] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0046] Figure 2 A flow chart of a method for mass spectrum classification measurement according to an embodiment of the present invention is shown.
[0047] like Figure 2 As shown, the method 200 includes operations S210 to S250.
[0048] In operation S210, singular value decomposition is used to dynamically adjust the spectral shape of each template spectrum to obtain a plurality of adjusted template spectra, wherein the spectral shape of the adjusted template spectrum is the same as the spectral shape of the spectrum to be measured.
[0049] In operation S220, a distance difference sequence of the spectrum to be measured is determined according to the multiple adjusted template spectra and the spectrum to be measured, wherein the distance difference sequence includes the distance difference between the flow value at each redshift value on each adjusted template spectrum and the flow value of the spectrum to be measured, and the distance differences are arranged in ascending order.
[0050] In operation S230, the distance difference sequence is optimized to obtain a classification result of the spectrum to be measured, a target redshift value, and an optimized distance difference sequence.
[0051] In operation S240 , when the classification result satisfies the confidence condition, a plurality of distance differences to be fitted are determined from the optimized distance difference sequence according to the classification result.
[0052] In operation S250, a plurality of distance differences to be fitted are fitted to obtain a redshift error of the spectrum to be measured, wherein the redshift error is used to characterize a matching error of a target redshift value.
[0053] In actual use, since the spectral flow calibration of the actual measurement instrument is not necessarily accurate, the continuous spectrum shape of the spectrum will be affected by the measurement instrument, which in turn affects the accuracy of spectral classification. Therefore, before performing template matching, the continuous spectrum shape of the template must first be changed so that the spectrum shape of the spectrum to be measured is consistent with that of the template spectrum, that is, the continuous spectrum shape is consistent. As a result, when performing template matching later, the spectral lines in the spectrum occupy the largest proportion.
[0054] In the embodiment of the present invention, each type of celestial spectrum corresponds to a template spectrum. The types of spectra include three categories: stars, galaxies and quasars. The subcategories of spectra include A1, F3, G8, etc. The letters in front represent the type of celestial body. Among them, stars include main sequence stars (O / B / A / F / G / K / M) and special types of stars (carbon stars, white dwarfs, etc.). Each main sequence star type is divided into 10 subcategories, represented by numbers 0-9.
[0055] According to an embodiment of the present invention, singular value decomposition (SVD) is an important matrix decomposition in linear algebra, and singular value decomposition is closely related to the eigenvalue problem. Therefore, the spectral shape of the template spectrum can be adjusted by singular value decomposition, so that the spectral shape of the adjusted template spectrum is the same as that of the spectrum to be measured. At this time, the proportion of spectral lines in the adjusted template spectrum increases, which can improve the accuracy of subsequent template matching.
[0056] After adjusting the template spectrum, the similarity between the spectrum to be tested and the adjusted template spectrum can be measured by calculating the distance difference between the flow value at each red shift value in the adjusted template spectrum and the corresponding flow value in the spectrum to be tested.
[0057] Each adjusted template spectrum corresponds to multiple redshift values within a certain redshift value range. For example, for the spectrum template of a star, the selected redshift value range is [-0.004, +0.004], and a redshift value can be obtained at each redshift step, such as -0.0040, -0.0038, -0.0036... In the distance difference sequence, there are multiple distance differences between each adjusted template spectrum and the spectrum to be measured, and the distance difference sequence includes multiple distance differences between all adjusted template spectra and the spectrum to be measured.
[0058] For example, several smaller distance differences in the distance difference sequence may be distance differences between different adjusted template spectra and the spectrum to be measured, or may be distance differences between flow values at different redshift values on the same adjusted template spectrum and the spectrum to be measured.
[0059] In one embodiment, the distance difference may be calculated using a variety of distance measurement algorithms.
[0060] For example, at a redshift value of -0.0004, the chi-square distance between the flow value of the adjusted template spectrum and the flow value of the spectrum to be measured can be calculated, and the calculated chi-square distance is used as the distance difference at the redshift value of -0.0004.
[0061] According to an embodiment of the present invention, the smaller the distance difference is, the closer the adjusted template spectrum to which the distance difference belongs is to the spectrum to be measured, and the classification result of the spectrum to be measured is the type of the adjusted template spectrum. It should be noted that the operation of adjusting the template spectrum does not change the type of the template spectrum, and the adjusted template spectrum is of the same type as the template spectrum.
[0062] In order to ensure the accuracy of the classification result, after obtaining the distance difference sequence, the arrangement order of multiple distance differences in the distance difference sequence can be optimized to obtain an optimized distance difference sequence. Then, the classification result and the target redshift value corresponding to the classification result are determined according to the new arrangement order of the distance differences in the optimized distance difference sequence.
[0063] For example, the redshift value corresponding to the smallest distance difference in the tuned distance difference sequence may be used as the target redshift value, and the type of the tuned template spectrum to which the smallest distance difference belongs may be used as the classification result.
[0064] According to an embodiment of the present invention, a confidence calculation program can be used to estimate the confidence of the classification result. If the confidence is greater than or equal to a certain threshold, such as 80%, it indicates that the spectral shape is relatively accurate, and the classification result meets the confidence condition and can be regarded as a valid classification result. Afterwards, multiple distance differences are selected from the tuned template spectrum to which the smallest distance difference belongs as the distance differences to be fitted, and the multiple distance differences to be fitted are fitted to obtain the redshift error of the spectrum to be measured.
[0065] According to an embodiment of the present invention, when selecting the distance difference to be fitted, the minimum distance difference is included; then, preferably several redshift values are selected from the vicinity of the redshift value where the minimum distance difference is located, and the distance differences at the positions of the above several redshift values are used as the distance differences to be fitted.
[0066] For example, if the distance difference is a chi-square distance, the distance difference to be fitted includes the minimum chi-square distance and a plurality of distance differences to be fitted in its neighborhood.
[0067] According to an embodiment of the present invention, a plurality of distance differences to be fitted may be fitted into a function of a preset type, and the redshift error and the final redshift value may be calculated using the fitting coefficient of the fitting function.
[0068] The embodiment of the present invention uses a spectral shape adjustment method of singular value decomposition to make the shape of the template spectrum more consistent with the shape of the spectrum to be measured, effectively enhancing the matching accuracy of the spectral line features, thereby improving the accuracy of the overall matching and improving the classification accuracy. By tuning the distance difference sequence, the confidence of the matching result is significantly improved, ensuring that the final matching result has high reliability, especially in the matching process of complex spectra, effectively reducing the possibility of mismatching. By selecting multiple distance differences from the neighborhood of the minimum distance difference for fitting, a redshift value with higher accuracy than the grid point is obtained, which significantly improves the accuracy of the redshift measurement, and provides clear physical credibility through error estimation.
[0069] According to an embodiment of the present invention, for operation S210, singular value decomposition is used to dynamically adjust the spectral shape of each template spectrum to obtain multiple adjusted template spectra, including: determining a target matrix based on the template spectrum, wherein the number of rows of the target matrix is the same as the spectral length of the template spectrum; performing singular value decomposition on the product of the target matrix and the transposed matrix of the target matrix to obtain a left singular matrix and a right singular matrix; determining multiple spectral adjustment coefficients based on the left singular matrix, the right singular matrix, the target matrix and the spectrum to be measured; and obtaining the adjusted template spectrum based on the multiple spectral adjustment coefficients and the target matrix.
[0070] In an illustrative embodiment, the target matrix may be an m×n matrix, wherein the first column may be a template spectrum; the matrix values of the next n-1 columns are obtained by calculating the template spectrum according to a polynomial of a predetermined degree, and the degree of the polynomials of two adjacent columns differs by one.
[0071] For example, the target matrix A can be A=(f, y 0 , y 1 , y 2 , y 3 ), where f is the template spectrum, y 0 is a zero-degree polynomial y of the same length as the template spectrum 0 =x 0 , that is, all y 0 The values are all 1; 1 is a polynomial of degree 1, that is, y 1 =x;y 2 and 3 are polynomials of degree 2 and 3, that is, y 2 =x 2 and 3 =x3 .
[0072] For the target matrix A, the transposed matrix of the target matrix A is A T , for AA T Perform singular value decomposition, i.e. AA T =U∑V T , U and V are the left singular matrix and the right singular matrix respectively. Afterwards, c=V / ∑U can be calculated using the left singular matrix U, the right singular matrix V, the target matrix A and the vector spec of the spectrum to be measured T (A×spec), A×c is the adjusted template spectrum.
[0073] In this embodiment, c after singular value decomposition of the 5-column matrix includes 5 spectrum adjustment coefficients, which are respectively used as coefficients of each column of the polynomial.
[0074] Figure 3 A schematic diagram of a spectrum to be measured, a template spectrum, and an adjusted template spectrum according to an embodiment of the present invention is shown.
[0075] like Figure 3 As shown, the horizontal axis is the wavelength and the vertical axis is the flow value. The three spectra from bottom to top are spectrum 1, spectrum 2 and spectrum 3, which are respectively a template spectrum of a certain type, a spectrum to be measured of the same type, and an adjusted template spectrum obtained by adjusting the spectral shape of the template spectrum. It can be seen that before the shape adjustment, the spectral shapes of spectrum 1 and spectrum 2 are quite different; after the shape adjustment, the spectral shapes of spectrum 3 and spectrum 2 are basically the same.
[0076] According to an embodiment of the present invention, the distance difference in the distance difference sequence is a chi-square distance. Before performing operation S220, the method further includes: determining a redshift value range and a redshift value step for the adjusted template spectrum according to the type of the adjusted template spectrum; wherein, starting from the boundary of the redshift value range, a redshift value of the adjusted template spectrum is obtained by moving a redshift value step within the redshift value range, so as to calculate the chi-square distance between each redshift value on the adjusted template spectrum and the corresponding redshift value in the spectrum to be measured.
[0077] For various types of spectral templates, various redshift value ranges and various redshift value steps can be selected. Therefore, after adjusting the spectral shape of the template spectrum and before calculating the distance difference, it is necessary to first determine the redshift value range and redshift value step of each adjusted template.
[0078] When the spectral template is a star, the selected redshift value range is [-0.004, +0.004], and the redshift value step is 0.0002. When the spectral template is a galaxy, the redshift value range is [-0.0017, +1], and the step is 0.0007. When the spectral template is a quasar, the redshift value range to be measured is [-0.0033, +7], and the step is 0.003.
[0079] Thus, in operation S220, for the template spectrum of the star, the chi-square distance between the flow value of the adjusted template spectrum and the flow value of the spectrum to be measured can be calculated at -0.0040, -0.0038, -0.0036 ... 0 ... 0.0036, 0.0038, 0.0040. . Other templates are similar and will not be described here. After the distance difference calculations for all templates and all redshift values are completed, all the results are arranged in a row from small to large to obtain a distance difference sequence. Afterwards, the distance difference sequence can be optimized to obtain the classification results of the spectrum to be measured, the target redshift value, and the optimized distance difference sequence.
[0080] When the classification result meets the confidence condition, the classification result is relatively reliable. When the classification result does not meet the confidence condition, even if the classification result is obtained, the shape of the adjusted continuous spectrum may not be accurate, so the polynomial fitting method is used to readjust the spectral shape of the template spectrum.
[0081] According to an embodiment of the present invention, the method also includes: when the classification result does not meet the confidence condition, determining the polynomial fitting form corresponding to the template spectrum according to the type of template spectrum; for each template spectrum, determining the flow median of the spectrum to be measured and the template spectrum in multiple bands; using the multiple flow medians of the spectrum to be measured to perform polynomial fitting to obtain a first polynomial of the spectrum to be measured; using the multiple flow medians of the template spectrum to perform polynomial fitting to obtain a second polynomial of the template spectrum; based on the difference between the first polynomial and the second polynomial, determining multiple spectral adjustment coefficients for the second polynomial; for the template spectrum corresponding to the second polynomial, adjusting the spectral shape of the template spectrum corresponding to the second polynomial according to the multiple spectral adjustment coefficients and the second polynomial to obtain an adjusted template spectrum.
[0082] Specifically, five bands of u, g, r, i, and z are selected. Figure 4 FIG. 4 is a schematic diagram showing a spectrum to be measured in five bands according to an embodiment of the present invention. Figure 4 As shown, the horizontal axis is the wavelength and the vertical axis is the flow value. From left to right, the five colors are the wavelength ranges of the five bands of ugriz, such as 3280~3850 angstroms, 4030~5330 angstroms, 5600~6760 angstroms, 6900~8160 angstroms, and 8200~9860 angstroms.
[0083] For each template spectrum, the median of the flow values of each template spectrum in the five bands, i.e., the flow median, is calculated; similarly, the flow median of the spectrum to be measured in the five bands is calculated. Thus, for each spectrum, one point is selected in each band, and a total of five points are selected. For each spectrum, these five points are used to perform polynomial fitting, and the first polynomial of the spectrum to be measured and the second polynomial of the template spectrum are obtained respectively.
[0084] In one embodiment, before determining the median flow rate, the spectrum is smoothed using a Gaussian filter with a width of 20 angstroms to avoid the influence of noise values.
[0085] According to an embodiment of the present invention, different polynomials are used for polynomial fitting for different types of template spectra. Specifically, for stars, a third-order polynomial is used to fit the continuous spectrum; for galaxies and quasars, a second-order polynomial is used for fitting.
[0086] For the first polynomial and the second polynomial obtained by fitting, the spectrum adjustment coefficient of the second polynomial is generated by comparing the difference between the first polynomial and the second polynomial, and the spectrum adjustment coefficient is superimposed on the polynomial coefficient of the second polynomial, so that the spectrum shape of the template spectrum corresponding to the second polynomial can be adjusted to obtain the adjusted template spectrum. Each spectrum adjustment coefficient can be superimposed on a polynomial of each degree. Afterwards, similar to the above, the distance difference sequence is recalculated based on the adjusted template spectrum and the spectrum to be measured.
[0087] The embodiment of the present invention adjusts the spectral shape by combining singular value decomposition and polynomial fitting, which can further ensure that the shapes of the template spectrum and the spectrum to be measured are more consistent, effectively enhance the matching accuracy of the spectral line features, and improve the accuracy of the overall matching.
[0088] In one embodiment, for operation S230, the distance difference sequence is tuned to obtain the classification result of the spectrum to be measured, the target redshift value and the tuned distance difference sequence, including: for the first adjusted template spectrum corresponding to the distance difference located at the first position in the distance difference sequence, a plurality of spectral adjustment coefficients of the first adjusted template spectrum are obtained; according to the positive and negative of the spectral adjustment coefficient corresponding to the highest-order term in the plurality of spectral adjustment coefficients, the spectral direction of the first adjusted template spectrum is determined; when the spectral direction characterizes that the first adjusted template spectrum is upside down and the remaining spectral adjustment coefficients in the plurality of spectral adjustment coefficients are all positive, the distance difference sequence is tuned according to the type of the adjusted template spectrum corresponding to the first first preset number of distance differences in the distance difference sequence to obtain the tuned distance difference sequence; the type of the second adjusted template spectrum corresponding to the distance difference located at the first position in the tuned distance difference sequence is determined as the classification result, and the corresponding redshift value is determined as the target redshift value.
[0089] Regardless of whether singular value decomposition or polynomial fitting is used, the adjusted template spectrum will eventually obtain multiple spectral adjustment coefficients. 0 , y 1 , y 2 , y 3 Each of them corresponds to a spectral adjustment coefficient, for a total of 5 spectral adjustment coefficients; under polynomial fitting, the 0th, 1st, 2nd, and 3rd order polynomials of the stellar template each use a spectral adjustment coefficient, for a total of 4; the 0th, 1st, and 2nd order polynomials of the galaxy and quasar template each use a spectral adjustment coefficient, for a total of 3.
[0090] In one embodiment, the spectrum adjustment coefficient may be used to tune the distance difference sequence to obtain an optimized distance difference sequence.
[0091] Taking the five spectral adjustment coefficients obtained by singular value decomposition and the chi-square distance as an example, they are arranged from high to low in terms of frequency. , , , , For the sake of distinction, the adjusted template spectrum with the minimum chi-square distance in the distance difference sequence is called the first adjusted template spectrum. If the spectral adjustment coefficient of the highest order term of the first adjusted template spectrum A negative value indicates that after the shape is adjusted, the spectral direction of the first adjusted template spectrum is reversed; otherwise, it is not reversed. If the template spectrum after the first adjustment is negative , , , If they are all positive numbers, and the difference between the type of the first adjusted template spectrum and the four adjusted template spectra below it does not exceed 10 spectral subtypes, the first adjusted template spectrum is moved to the end of the distance difference sequence.
[0092] It should be noted here that several consecutive distance differences in the distance difference sequence may belong to the same template spectrum. The tuning here is based on the template spectrum, starting from the first position in the distance difference sequence, until a total of 5 types of adjusted template spectra are found, and the judgment is made based on the type differences of the 5 types of template spectra. When the gap does not exceed 10 spectral subtypes, all distance differences belonging to the first adjusted template spectrum are adjusted to the end of the distance difference sequence to obtain the tuned distance difference sequence. At this time, the first preset number is related to the specific chi-square distance value in the distance difference sequence.
[0093] Finally, the type of the second adjusted template corresponding to the first distance difference in the optimized distance difference sequence is determined as the classification result, and the corresponding redshift value is determined as the target redshift value.
[0094] In another embodiment, operation S230 includes: when the type of the first adjusted template spectrum is not the target type, determining the number of target types according to the type of the adjusted template spectrum corresponding to the first second preset number of distance differences in the distance difference sequence; when the number of target types is greater than a quantity threshold, tuning the distance difference sequence to obtain a tuned distance difference sequence; determining the redshift value corresponding to the first distance difference in the tuned distance difference sequence as the target redshift value, and determining the classification result as the target type.
[0095] For example, the target type may be a star. If the first adjusted template spectrum is not a star, proceed from the first position in the distance difference sequence until 10 types of adjusted template spectra are found. If the number of stars in these 10 spectra is greater than a threshold value, such as 7, the spectrum to be tested is considered to be a star, and the non-star adjusted template spectrum is moved to the end.
[0096] It can be understood that when the adjusted template spectrum of the non-star is moved to the end, the chi-square distance at the first position in the distance difference sequence after tuning must be calculated based on the star template and the spectrum to be measured, and the classification result is a star. At this time, the redshift value corresponding to the distance difference (minimum chi-square distance) at the first position in the distance difference sequence after tuning is determined as the target redshift value. At this time, the second preset number is related to the specific chi-square distance value in the distance difference sequence.
[0097] In yet another embodiment, operation S230 further includes: calculating a difference between two adjacent distance differences in the distance difference sequence; optimizing the distance difference sequence to obtain an optimized distance difference sequence when the difference satisfies a differential condition; and determining the type of the second adjusted template spectrum corresponding to the first distance difference in the optimized distance difference sequence as a classification result, and determining the corresponding redshift value as a target redshift value.
[0098] For example, taking chi-square distance as the distance difference, after calculating the difference between two adjacent chi-square distances, if the difference between several adjacent chi-square distances is less than 1% of a certain chi-square distance, and the type of the template to which the multiple chi-square distances used to calculate the above differences belong is within the preset type range, it is considered that the difference meets the difference condition, and the difference of this part of the difference is not caused by the spectral line in the spectrum. The above multiple chi-square distances are moved to the distance difference sequence to obtain the optimized distance difference sequence. The preset type range can be 5 spectral subtype ranges.
[0099] In addition, at least two of the above tuning methods can be used to obtain a tuned distance difference sequence, and the type of the second adjusted template corresponding to the first distance difference in the tuned distance difference sequence is determined as the classification result, and the corresponding redshift value is determined as the target redshift value.
[0100] The embodiments of the present invention introduce multiple criteria to tune the distance difference sequence to evaluate and screen the template matching results, significantly improving the matching confidence and ensuring that the final matching results have high reliability, especially in the matching process of complex spectra, effectively reducing the possibility of mismatching. In addition, when defining the criteria, attention is paid to the interpretability of physical characteristics. By analyzing the physical characteristics such as spectral line intensity and width, it is ensured that the matching results are not only mathematically accurate, but also physically reasonable, and can provide physically meaningful results for astronomical research.
[0101] According to an embodiment of the present invention, for operation S240, a plurality of distance differences to be fitted are determined from the tuned distance difference sequence according to the classification result, including: determining a third adjusted template spectrum corresponding to the classification result; determining the minimum distance difference between the third adjusted template spectrum and the spectrum to be measured from the tuned distance difference sequence; and determining, in the third adjusted template spectrum, a plurality of distance differences that are a third preset number before and a third preset number after the minimum distance difference.
[0102] In this embodiment, the distance difference at the first position in the tuned distance difference sequence is the minimum distance difference under the confidence condition, and is the minimum distance difference under a reliable classification result. Therefore, after determining the classification result (the type of spectrum to be measured), multiple distance differences at each redshift value on the third adjusted template spectrum of this type can be determined from the tuned distance difference sequence. For the above multiple distance differences, multiple distance differences in the neighborhood of the minimum distance difference are selected to form multiple distance differences to be fitted with the minimum distance difference.
[0103] For example, taking the distance difference as the chi-square distance, in determining the minimum chi-square distance After that, determine the minimum chi-square distance neighborhood, that is, the minimum chi-square distance There are 5 redshift step points before and after. Then, the chi-square distances corresponding to the 5 redshift values before and after and the minimum chi-square distance are selected as the distance differences to be fitted, that is, a total of 11 chi-square distances.
[0104] According to an embodiment of the present invention, for the multiple distance differences to be fitted obtained in operation S240, the multiple distance differences to be fitted are fitted through operation S250. Specifically, fitting the multiple distance differences to be fitted to obtain the redshift error of the spectrum to be measured includes: fitting the multiple distance differences to be fitted to obtain a Gaussian function, wherein the Gaussian function includes multiple fitting coefficients; and determining the redshift error according to the fitting coefficient, the measurement error and the fitting error.
[0105] Still taking the 11 chi-square distances obtained above as an example, these 11 chi-square distances are used to fit a Gaussian function in the form of the following formula (1):
[0106] (1)
[0107] The minimum value of the Gaussian function g(x) is the minimum chi-square distance, that is , , where z 0 is the best matching redshift value obtained at the grid point, that is, the target redshift value, z is the final redshift value under the current Gaussian fitting, is the minimum chi-square distance, A 0 ~A 4 are the fitting coefficients obtained after fitting the Gaussian function.
[0108] The redshift error z is determined based on the fitting coefficient, measurement error and fitting error. err Please refer to the following formula (2):
[0109] (2)
[0110] Among them, p err is the fitting error, yerr is the measurement error, A 0 and A 2 is the fitting coefficient obtained above, and lg is the logarithmic function.
[0111] The fitting error can be 1 of the Gaussian function g(x) Uncertainty can be obtained through covariance calculation; measurement error is given by the measuring instrument and may include shooting error, alignment error, calculation error, response error, etc. during measurement.
[0112] In addition, the redshift error obtained by annotation is inaccurate if the following situations occur: 1. The extreme point of the fitted Gaussian function is at the endpoint; 2. The number of chi-square distances used for calculation is less than 3; 3. A straight line is fitted or the fitting is unsuccessful.
[0113] The embodiments of the present invention take into account that template matching is calculated at grid points, which will cause the redshift values to be distributed at the positions of the grid points, and the redshift measurement accuracy is inaccurate. In order to obtain more accurate redshift values and redshift errors, the embodiments of the present invention obtain redshift values with higher accuracy than grid points by performing Gaussian fitting in the minimum chi-square neighborhood, significantly improving the accuracy of redshift measurement, and providing clear physical credibility through error estimation.
[0114] The classification and measurement method of massive spectra provided by the present invention is applicable to spectra of various types of celestial bodies, such as stars, galaxies, quasars and the like. It has strong versatility and broad application prospects, and can meet the needs of classification and redshift measurement of different celestial bodies and massive spectra.
[0115] Figure 5 A mass spectrum classification measurement method according to a specific embodiment of the present invention is shown.
[0116] like Figure 5 As shown, SVD is used to dynamically adjust the spectral shape of each template spectrum according to the spectrum to be measured, and the adjusted template spectrum is obtained, such as the galaxy template, quasar template, and star template in the figure. The redshift value range of the galaxy template is -0.0017≤z≤1, and the step length is ≈0.0007; the redshift value range of the quasar template is -0.0033≤z≤7, and the step length is ≈0.0003; the redshift value range of the star template is -0.004≤z≤0.004, and the step length is ≈0.0002. The chi-square distance is calculated at each redshift value , and follow In the case of not meeting the criteria, the distance difference sequence is optimized using multiple criteria, and the best matching result is eliminated and then the distance difference sequence is optimized according to Sorting is performed to obtain the tuned distance difference sequence until the criterion is met. If the criterion is met, the confidence level is determined. If the confidence level is met, the redshift value and redshift error are fitted to obtain the classification and redshift measurement results. If the confidence level is not met, the adjusted template spectrum is regenerated through polynomial fitting and classified.
[0117] The present invention relates to a mass spectrum classification measurement method, which aims to accurately classify and measure the redshift of mass celestial body spectra with high precision. The traditional template matching method has difficulties in adjusting the spectral shape, resulting in the inability to give full play to the weight of the spectral line features and limiting the matching accuracy. The present invention dynamically adjusts the continuous spectrum shape of the template spectrum by combining singular value decomposition (SVD) and polynomial fitting, so that the shape of the spectrum to be measured is highly consistent with that of the template spectrum, thereby enhancing the influence of the spectral line features in the matching. In addition, by performing Gaussian fitting on the minimum chi-square value neighborhood, high-precision redshift values and error estimates are obtained, which significantly improves the physical credibility of the matching results. The present invention introduces several criteria to optimize the matching results, including the judgment of template shape changes, the screening of template types, and the analysis of chi-square value sequences, to ensure the reliability and accuracy of the matching results. The method is suitable for the analysis of large-scale astronomical survey spectral data and can provide high-precision data support for astronomical research.
[0118] Figure 6 FIG. 4 is a block diagram of a mass spectrum classification measurement device according to an embodiment of the present invention. Figure 6 As shown, the mass spectrum classification measurement device 600 includes an adjustment module 610, a first determination module 620, an optimization module 630, a second determination module 640 and a fitting module 650. For each of the multiple spectra to be measured:
[0119] The adjustment module 610 is used to dynamically adjust the spectral shape of each template spectrum by using singular value decomposition to obtain a plurality of adjusted template spectra, wherein the spectral shape of the adjusted template spectrum is the same as the spectral shape of the spectrum to be measured.
[0120] The first determination module 620 is used to determine a distance difference sequence of the spectrum to be measured based on multiple adjusted template spectra and the spectrum to be measured, wherein the distance difference sequence includes the distance difference between the flow value at each redshift value on each adjusted template spectrum and the flow value of the spectrum to be measured, and the distance differences are arranged in ascending order.
[0121] The tuning module 630 is used to tune the distance difference sequence to obtain the classification result of the spectrum to be measured, the target redshift value and the tuned distance difference sequence.
[0122] The second determination module 640 is used to determine a plurality of distance differences to be fitted from the optimized distance difference sequence according to the classification result when the classification result satisfies the confidence condition.
[0123] The fitting module 650 is used to fit a plurality of distance differences to be fitted to obtain a redshift error of the spectrum to be measured, wherein the redshift error is used to characterize a matching error of a target redshift value.
[0124] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware, and firmware, or by a proper combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be executed.
[0125] It should be noted that the device part in the embodiment of the present invention corresponds to the method part in the embodiment of the present invention. The description of the device part specifically refers to the method part, which will not be repeated here.
[0126] Figure 7 A block diagram of an electronic device 700 suitable for implementing a mass spectrum classification measurement method according to an embodiment of the present invention is shown. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0127] like Figure 7 As shown, the electronic device 700 according to an embodiment of the present invention includes a processor 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory ROM 702 or the program loaded from the storage part 708 to the random access memory RAM 703. The processor 701 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0128] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present invention by executing the programs in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present invention by executing the programs stored in the one or more memories.
[0129] According to an embodiment of the present invention, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the input / output (I / O) interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.
[0130] According to an embodiment of the present invention, the method flow according to an embodiment of the present invention can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present invention are executed. According to an embodiment of the present invention, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0131] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.
[0132] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device.
[0133] For example, according to an embodiment of the present invention, the computer-readable storage medium may include the ROM 702 and / or the RAM 703 described above and / or one or more memories other than the ROM 702 and the RAM 703 .
[0134] An embodiment of the present invention also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method provided by the embodiment of the present invention. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the method provided by the embodiment of the present invention.
[0135] When the computer program is executed by the processor 701, the above functions defined in the system / device of the embodiment of the present invention are executed. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0136] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0137] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0138] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments of the present invention can be combined and / or combined in various ways, even if such a combination or combination is not explicitly recorded in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features recorded in the various embodiments of the present invention can be combined and / or combined in various ways. All these combinations and / or combinations fall within the scope of the present invention.
[0139] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination advantageously. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.
Claims
1. A mass spectrum classification measurement method, characterized in that: The method comprises: for each of a plurality of spectra to be measured, Using singular value decomposition, dynamically adjusting the spectral shape of each template spectrum to obtain a plurality of adjusted template spectra, wherein the spectral shape of the adjusted template spectrum is the same as the spectral shape of the spectrum to be measured; Determine a distance difference sequence of the spectrum to be measured according to the plurality of adjusted template spectra and the spectrum to be measured, wherein the distance difference sequence includes the distance difference between the flow value at each redshift value on each adjusted template spectrum and the flow value of the spectrum to be measured, and the distance differences are arranged in ascending order; The distance difference sequence is optimized to obtain the classification result of the spectrum to be measured, the target redshift value and the optimized distance difference sequence; In the case where the classification result satisfies the confidence condition, determining a plurality of distance differences to be fitted from the optimized distance difference sequence according to the classification result; Fitting a plurality of the distance differences to be fitted to obtain a redshift error of the spectrum to be measured, wherein the redshift error is used to characterize a matching error of the target redshift value; The method utilizes singular value decomposition to dynamically adjust the spectral shape of each template spectrum to obtain multiple adjusted template spectra, including: Determine a target matrix according to the template spectrum, wherein the number of rows of the target matrix is the same as the spectrum length of the template spectrum; Performing singular value decomposition on the product of the target matrix and the transposed matrix of the target matrix to obtain a left singular matrix and a right singular matrix; Determining a plurality of spectrum adjustment coefficients according to the left singular matrix, the right singular matrix, the target matrix and the spectrum to be measured; Obtaining the adjusted template spectrum according to the plurality of spectrum adjustment coefficients and the target matrix; The step of optimizing the distance difference sequence to obtain the classification result of the spectrum to be measured, the target redshift value and the optimized distance difference sequence includes: For a first adjusted template spectrum corresponding to a first distance difference in the distance difference sequence, obtaining a plurality of spectrum adjustment coefficients of the first adjusted template spectrum; Determining the spectral direction of the first adjusted template spectrum according to the positive or negative value of the spectral adjustment coefficient corresponding to the highest-order term among the plurality of spectral adjustment coefficients; In a case where the spectral direction characterizes that the first adjusted template spectrum is upside down, and the remaining spectral adjustment coefficients in the plurality of spectral adjustment coefficients are all positive, the distance difference sequence is optimized according to the type of the adjusted template spectrum corresponding to the first preset number of distance differences in the distance difference sequence to obtain the optimized distance difference sequence; Determine the type of the second adjusted template spectrum corresponding to the first distance difference in the optimized distance difference sequence as the classification result, and determine the corresponding redshift value as the target redshift value; In a case where the type of the first adjusted template spectrum is not the target type, determining the number of the target type according to the types of the adjusted template spectra corresponding to the first second preset number of distance differences in the distance difference sequence; When the number of the target type is greater than the number threshold, optimizing the distance difference sequence to obtain the optimized distance difference sequence; The redshift value corresponding to the first distance difference in the optimized distance difference sequence is determined as the target redshift value, and the classification result is determined as the target type.
2. The method according to claim 1, characterized in that The method further comprises: In the case that the classification result does not satisfy the confidence condition, determining a polynomial fitting form corresponding to the template spectrum according to the type of the template spectrum; For each of the template spectrum, determining the flow median values of the spectrum to be measured and the template spectrum in multiple bands; Performing polynomial fitting using a plurality of flow medians of the spectrum to be measured to obtain a first polynomial of the spectrum to be measured; Performing polynomial fitting using a plurality of the flow medians of the template spectrum to obtain a second polynomial of the template spectrum; determining a plurality of spectrum adjustment coefficients for the second polynomial according to a difference between the first polynomial and the second polynomial; For the template spectrum corresponding to the second polynomial, the spectrum shape of the template spectrum corresponding to the second polynomial is adjusted according to the plurality of spectrum adjustment coefficients and the second polynomial to obtain the adjusted template spectrum.
3. The method according to claim 1, characterized in that The distance difference is a chi-square distance, and the method further comprises: Determining a redshift value range and a redshift value step size for the adjusted template spectrum according to the type of the adjusted template spectrum; Wherein, starting from the boundary of the redshift value range, a redshift value of the adjusted template spectrum is obtained by moving one redshift value step within the redshift value range, so as to calculate the chi-square distance between each redshift value on the adjusted template spectrum and the corresponding redshift value in the spectrum to be measured.
4. The method according to claim 1, characterized in that The method further comprises: Calculating a difference between two adjacent distance differences in the distance difference sequence; When the difference satisfies the difference condition, the distance difference sequence is optimized to obtain the optimized distance difference sequence; The type of the second adjusted template spectrum corresponding to the first distance difference in the optimized distance difference sequence is determined as the classification result, and the corresponding redshift value is determined as the target redshift value.
5. The method according to claim 1, characterized in that: The step of determining a plurality of distance differences to be fitted from the optimized distance difference sequence according to the classification result includes: Determining a third adjusted template spectrum corresponding to the classification result; Determine the minimum distance difference between the third adjusted template spectrum and the spectrum to be measured from the tuned distance difference sequence; In the third adjusted template spectrum, a plurality of distance differences that are a third preset number of times before and a third preset number of times after the minimum distance difference are determined.
6. The method according to claim 5, characterized in that The step of fitting the plurality of distance differences to be fitted to obtain the redshift error of the spectrum to be measured comprises: Fitting a plurality of the distance differences to be fitted to obtain a Gaussian function, wherein the Gaussian function includes a plurality of fitting coefficients; The redshift error is determined according to the fitting coefficient, the measurement error and the fitting error.
7. An electronic device comprising: one or more processors; a memory for storing one or more programs, It is characterized in that when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Astronomical cruising data processing method and system and storage medium
CN110175313A
Ultraviolet spectrum denoising method, system and equipment based on wavelet transform and optimized singular value decomposition, and medium
CN116541657A