An astronomical energy spectrum fitting method based on Bayesian inference

By using Bayesian inference algorithm and photon timing energy spectrum fitting model in astronomical energy spectrum analysis, the problems of instability and low efficiency in the existing technology are solved, and more efficient and accurate astronomical energy spectrum fitting is achieved.

CN119202629BActive Publication Date: 2025-06-27NANJING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411730950.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-06-27
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

The existing astronomical energy spectrum analysis tool Xspec has problems such as local algorithms that lead to instability in fitting, sensitive initial parameter values, low fitting efficiency and only supporting single-dimensional models, which is difficult to meet the needs of astronomical data analysis.

Method used

The astronomical energy spectrum fitting method based on Bayesian inference is used to construct a photon timing energy spectrum fitting model, and during the iteration process under Bayesian inference, the degree of consistency between the observation energy paths of the detectors in each band and the fitting model is calculated, and the parameter group is optimized to obtain the optimal fitting model.

Benefits of technology

It significantly improves the accuracy and stability of astronomical energy spectrum fitting, enhances the working efficiency of the fitting algorithm, supports multi-dimensional and multi-band models, and provides richer statistical characteristics and parameter uncertainty quantification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202629B_ABST
    Figure CN119202629B_ABST
Patent Text Reader

Abstract

The present invention relates to an astronomical energy spectrum fitting method based on Bayesian inference. By applying an astronomical spectrometer, first, a photon time-series energy spectrum fitting model for describing the photon time-series energy spectrum of an astronomical source is constructed. Then, based on the iteration of the parameter group under Bayesian inference, the sum of the fitting statistics that statistically characterize the degree of coincidence between the calculated value and the observed value is obtained by combining the calculated value of the photon time-series energy spectrum fitting model at a specific moment for each group of detectors in each band in a single iteration with the observed value. With the convergence of the sum of the fitting statistics as the goal, the best photon time-series energy spectrum fitting model is constructed, and the photon time-series energy spectrum of the astronomical source is obtained by fitting. The scheme design integrates an energy spectrum fitting architecture and a Bayesian inference algorithm. By improving the algorithm performance and combining a more general energy spectrum fitting architecture, the working efficiency of the energy spectrum fitting algorithm is optimized and improved, and the accuracy of astronomical energy spectrum fitting is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for fitting astronomical energy spectra based on Bayesian inference, belonging to the technical field of astronomical band fitting. Background Art

[0002] Xspec is one of the most widely used technologies in the field of high-energy astronomical energy spectrum analysis and fitting. Xspec provides a rich library of physical models and can perform fitting analysis on various astronomical X-ray and γ-ray energy spectrum data. Its main technical features include.

[0003] (1) Parameter estimation algorithm.

[0004] 1) Xspec by default uses the Levenberg-Marquardt algorithm. The Levenberg-Marquardt algorithm is an iterative optimization algorithm commonly used for nonlinear least squares problems. It is a combination of the Gauss-Newton method and the gradient descent method. Its advantages are that it is applicable to linear and nonlinear models, does not require analytical operations, but gradually approaches the optimal parameters through iterative optimization. Its disadvantage is that it is sensitive to the initial parameter values and may fall into a local optimal solution.

[0005] 2) Xspec supports the use of the MCMC (Markov Chain Monte Carlo) sampling algorithm for parameter exploration.

[0006] (2) Energy spectrum fitting architecture.

[0007] 1) Xspec supports joint analysis of multi-band (X and γ-ray) energy spectra.

[0008] 2) Xspec has a large number of commonly used one-dimensional (frequency domain) astronomical energy spectrum models built in.

[0009] Although Xspec is a very widely used tool in the field of astronomical energy spectrum analysis at present, it still has many limitations.

[0010] (1) Limitations of the parameter estimation algorithm.

[0011] 1) The Levenberg-Marquardt algorithm is a local algorithm. The fitting process may fall into a local minimum and fail to find the global best fit, and the fitting effect depends on the setting of the initial model parameters. This results in poor reliability of Xspec, and its fitting results lack sufficient stability and repeatability.

[0012] 2) The MCMC sampling algorithm in Xspec has a slow convergence rate and is not efficient for fitting complex multi-dimensional parameter spaces.

[0013] (2) Limitations of the energy spectrum fitting architecture.

[0014] 1) Xspec only supports traditional single - dimensional models, that is, the model is only a function of energy . However, the energy spectra of many celestial sources exhibit time - evolution phenomena. Therefore, the model fitting architecture needs to support multi - dimensional models to model the time - evolution characteristics of astronomical phenomena.

[0015] 2) Although Xspec supports user - defined models, the difficulty of integration and use is relatively large, resulting in weak scalability. Summary of the Invention

[0016] The technical problem to be solved by the present invention is to provide an astronomical energy spectrum fitting method based on Bayesian inference, which adopts a more advanced Bayesian inference algorithm and a more general energy spectrum fitting architecture, significantly improves key indicators, and better meets the needs of astronomical data analysis.

[0017] The present invention adopts the following technical solutions to solve the above - mentioned technical problems: The present invention designs an astronomical energy spectrum fitting method based on Bayesian inference, applies an astronomical spectrometer, and fits the astronomical spectral observation data according to the following steps A to B to obtain the photon time - series energy spectrum of the celestial source;

[0018] Step A. Construct a photon time - series energy spectrum fitting model that includes a parameter group and is used to describe the photon time - series energy spectrum of the celestial source, and then enter Step B;

[0019] Step B. Based on the iteration of the parameter group under Bayesian inference, use the photon time - series energy spectrum fitting model corresponding to the parameter group in a single iteration to calculate the calculated values of the observed energy channels of each group of detectors in each band at a specific moment in the photon time - series energy spectrum fitting model, and combine the observed values of the observed energy channels of each group of detectors in each band at a specific moment in the photon time - series energy spectrum. Statistically sum up the fitting statistics that characterize the degree of agreement between the calculated values and the observed values for each group of detectors in each band. With the convergence of the sum of the fitting statistics as the goal, obtain the optimal parameter group , and form the best photon time - series energy spectrum fitting model, that is, fit to obtain the photon time - series energy spectrum of the celestial source.

[0020] As a preferred technical solution of the present invention: In Step A, construct a photon time - series energy spectrum fitting model that includes a parameter group and is used to describe the photon time - series energy spectrum of the celestial source , where represents energy, represents time.

[0021] As a preferred technical solution of the present invention, step B includes the following steps B1 to B4;

[0022] Step B1. Based on the preset initial values of the parameters in the parameter group update the photon time-series energy spectrum fitting model for all bands and enter step B2;

[0023] Step B2. For each group of detectors in each band, according to the following formula:

[0024]

[0025] calculate the calculated value of the photon time-series energy spectrum fitting model at a specific moment of the observed energy channels of each group of detectors in each band, where , , represents the number of bands, , represents the number of groups of detectors, represents the photon time-series energy spectrum fitting model in the th band, represents the incident energy channel of the th group of detectors in the th band corresponding energy range, represents the observed energy channel of the th group of detectors in the th band, represents the observed energy channel of the th group of detectors in the th band at a specific moment of the photon time-series energy spectrum fitting model, represents the instrument response of the th group of detectors in the th band, that is, the effective detection area of the th group of detectors in the th band; then enter step B3;

[0026] Step B3. Based on the observed values of the photon time-series energy spectrum of the observed energy channels of each group of detectors in each band obtained by astronomical spectrometer observations , according to the following formula:

[0027]

[0028] statistical sum of the fitting statistics representing the degree of agreement between the calculated value and the observed value for each group of detectors in each band , where represents the th observation energy channel of the th group of detectors at the specific moment of the photon time series energy spectrum, represents the th characterization calculation value of the th group of detectors at the and the goodness-of-fit statistic of the agreement between the observed values; then proceed to step B4;

[0029] Step B4. Determine whether it converges. If so, obtain the sum of the minimum goodness-of-fit statistics under multiple iterations corresponding parameter group , that is, the optimal parameter group, to form the best photon time series energy spectrum fitting model; otherwise, based on Bayesian inference, update the values of the parameters in the parameter group and return to step B2.

[0030] As a preferred technical solution of the present invention: Based on Bayesian inference, in the step B1, based on the preset prior distribution of the parameter group , set the initial values of each parameter and update the photon time series energy spectrum fitting model, where represents the photon time series energy spectrum fitting model for all bands ;

[0031] In the step B3, based on the sum of the goodness-of-fit statistics , calculate and obtain the likelihood function according to , where represents the observed values of the photon time series energy spectrum of all detectors for all bands , represents the photon time series energy spectrum fitting model under the parameter group and the probability of obtaining the observed values of the photon time series energy spectrum;

[0032] In the step B4, apply the sampler of Bayesian inference. Based on not converging, the sampler updates the values of the parameters in the parameter group according to the prior distribution and the likelihood function and returns to step B2; based on converging, the sampler is based on the prior distribution under multiple iterations, the likelihood function , combined with Bayesian evidence , that is, the photon timing energy spectrum fitting model in the prior distribution to obtain the observed value of the photon timing energy spectrum of the total probability, according to the following formula:

[0033]

[0034] to obtain the posterior distribution , represents the current understanding of each parameter in the parameter group of the photon timing energy spectrum fitting model based on the observed value of the photon timing energy spectrum. The sum of the minimum fitting statistics corresponding to the posterior distribution is the optimal parameter group. of the parameter group is the optimal parameter group.

[0035] As a preferred technical solution of the present invention: The sampler of Bayesian inference is a tool for implementing Bayesian inference using a computer language, which is based on the Markov chain-Monte Carlo algorithm or the nested sampling algorithm.

[0036] As a preferred technical solution of the present invention: In step B3, if the statistical distribution of the observed value of the photon timing energy spectrum conforms to the chi-square ( ) distribution, then the calculation formula of the sum of the fitting statistics is updated as follows:

[0037]

[0038] where, represents the observed energy channel of the th group of detectors in the th band at time the observation error of the photon timing energy spectrum.

[0039] As a preferred technical solution of the present invention: In step B4, based on the best photon timing energy spectrum fitting model, according to , calculate the goodness of fit, which characterizes the degree of explanation of the best photon timing energy spectrum fitting model for the observed value of the photon timing energy spectrum. Among them, represents the difference between the total number of observed energy channels of all detectors in all bands and the total number of parameters in the parameter group .

[0040] The astronomical energy spectrum fitting method based on Bayesian inference of the present invention, compared with the prior art by adopting the above technical solutions, has the following technical effects:

[0041] The present invention designs an astronomical energy spectrum fitting method based on Bayesian inference. By applying an astronomical spectrometer, a photon time-series energy spectrum fitting model for describing the photon time-series energy spectrum of an astronomical source is first constructed, and then based on the parameter group Under the iteration of Bayesian inference, the calculated values of the observed energy channels of each group of detectors in each band at a specific moment in the photon time-series energy spectrum fitting model are combined with the observed values, and the sum of the fitting statistics characterizing the degree of coincidence between the calculated values and the observed values is statistically calculated. With the convergence of the sum of the fitting statistics as the goal, the best photon time-series energy spectrum fitting model is constructed, and the photon time-series energy spectrum of the astronomical source is obtained by fitting. The scheme design integrates the energy spectrum fitting architecture and the Bayesian inference algorithm. By improving the algorithm performance and combining a more general energy spectrum fitting architecture, the working efficiency of the energy spectrum fitting algorithm is optimized and improved, and the accuracy of astronomical energy spectrum fitting is improved;

[0042] The astronomical energy spectrum fitting method based on Bayesian inference designed by the present invention provides sufficient stability and accuracy for the implementation and application of the scheme through the improvement of the algorithm performance; and the involved general model architecture can easily be compatible with multi-dimensional models, multi-band models, and user-defined models. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a schematic framework diagram of the astronomical energy spectrum fitting method based on Bayesian inference designed by the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0044] The following further details the specific implementation manners of the present invention in conjunction with the accompanying drawings of the specification.

[0045] Regarding the detection of the celestial body energy spectrum, although a spectrometer is used in astronomy to measure the energy spectrum of an astronomical source, what the spectrometer actually obtains is not the true photon energy spectrum , but the photon count within the detector observation energy channel (abbreviated as energy channel) , and the detector response characterizes the effective area of the detector, which is proportional to the probability of detecting photons belonging to the incident energy channel in the observation energy channel , where and respectively correspond to the energy ranges and , and the formula is described as follows:

[0046]

[0047] It should be noted that in the time-domain astrophysical process, the true spectrum of the astronomical source is a function of time, but the existing traditional astronomical energy spectrum fitting techniques do not consider the time dependence of the celestial body energy spectrum.

[0048] And in the application, regarding the principle of energy spectrum fitting, the most important purpose of celestial body energy spectrum detection is to deduce the true photon energy spectrum of the celestial body source. Ideally, in the case of known observed spectrum and detector response , the true energy spectrum can be deduced by inverse-solving formula (1). . However, unfortunately, this is generally impossible because such inversion is often non-unique and unstable.

[0049] Regarding the above analysis, the present invention designs an astronomical energy spectrum fitting method based on Bayesian inference, applying an astronomical spectrometer, specifically as Figure 1 shown, performing the following steps A to B to fit the astronomical spectrum observation data to obtain the photon time series energy spectrum of the celestial body source.

[0050] Step A. Construct a photon time series energy spectrum fitting model that includes a parameter group and is used to describe the photon time series energy spectrum of the celestial body source , and enter step B; where represents energy, represents time.

[0051] Step B. Based on the iteration of the parameter group under Bayesian inference, using the photon time series energy spectrum fitting model corresponding to the parameter group in a single iteration, calculate the calculated values of the observed energy channels of each group of detectors in each band at a specific moment in the photon time series energy spectrum fitting model, and combine the observed values of the observed energy channels of each group of detectors in each band at a specific moment in the photon time series energy spectrum. Statistically sum up the fitting statistics that characterize the degree of coincidence between the calculated values and the observed values for each group of detectors in each band, and aiming at the convergence of the sum of the fitting statistics, obtain the optimal parameter group , and form the best photon time series energy spectrum fitting model, that is, fit to obtain the photon time series energy spectrum of the celestial body source.

[0052] In the actual application of the above step B, the following steps B1 to B4 are specifically designed and executed.

[0053] Step B1. Based on Bayesian inference, according to the preset prior distribution of the parameter group , set the initial values of each parameter, update the photon time series energy spectrum fitting model in all bands, and enter step B2; where represents the photon time series energy spectrum fitting model in all bands.

[0054] Step B2. For each group of detectors in each band, calculate the calculated value of the photon time series energy spectrum fitting model at a specific time

[0055]

[0056] for the observed energy channels of each group of detectors in each band according to the following formula: The calculated value of the photon time series energy spectrum fitting model , where , represents the number of bands, , represents the number of groups of detectors, represents the photon time series energy spectrum fitting model in the th band, represents the incident energy channel of the th group of detectors in the corresponding energy range, represents the observed energy channel of the th group of detectors in the th band, represents the observed energy channel of the th group of detectors in the th band at a specific time The calculated value of the photon time series energy spectrum fitting model, represents the instrument response of the th group of detectors in the th band, that is, the effective detection area of the th group of detectors in the th band; then enter Step B3.

[0057] Step B3. Based on the observed values of the photon time series energy spectrum of the observed energy channels of each group of detectors in each band obtained by the astronomical spectrometer at a specific time , calculate the sum of the fitting statistics representing the degree of agreement between the calculated value and the observed value for each group of detectors in each band according to the following formula:

[0058]

[0059] ; where , represents the observed energy channel of the th group of detectors in the th band at a specific time The observed value of the photon time series energy spectrum, represents the calculated value representing the th group of detectors in the th band The goodness-of-fit statistic between the and the observed values.

[0060] In the application, if the statistical distribution of the observed values of the photon time-series energy spectrum conforms to the chi-square ( ), the sum of the goodness-of-fit statistics is updated with the following formula:

[0061]

[0062] where represents the observed energy channel of the th group of detectors in the th band at time and the observation error of the photon time-series energy spectrum.

[0063] Based on the obtained sum of the goodness-of-fit statistics and according to , the likelihood function is calculated, where represents the observed values of the photon time-series energy spectrum of all detectors in all bands , represents the photon time-series energy spectrum fitting model and the probability of obtaining the observed values of the photon time-series energy spectrum under the parameter group ; then proceed to step B4.

[0064] Step B4. Determine whether it converges. If converges, apply the sampler of Bayesian inference. The sampler, based on the prior distribution and the likelihood function under multiple iterations, combined with the Bayesian evidence , that is, the total probability of the photon time-series energy spectrum fitting model obtaining the observed values of the photon time-series energy spectrum under the prior distribution , according to the following formula:

[0065]

[0066] obtain the posterior distribution , represents the current understanding of each parameter in the parameter group of the photon time-series energy spectrum fitting model based on the observed values of the photon time-series energy spectrum . The minimum sum of the goodness-of-fit statistics corresponding to the posterior distribution ​ Parameter group is the optimal parameter group, which constitutes the best photon timing energy spectrum fitting model. That is, in further applications, the photon timing energy spectrum of the celestial source can be obtained by fitting through the best photon timing energy spectrum fitting model.

[0067] And in further analysis, based on the best photon timing energy spectrum fitting model, according to , the goodness of fit is calculated. The goodness of fit characterizes the degree of explanation of the best photon timing energy spectrum fitting model for the observed values of the photon timing energy spectrum. Among them, represents the difference between the total number of observed energy channels of all detectors in all bands and the total number of parameters in the parameter group .

[0068] If does not converge, apply the sampler of Bayesian inference. Based on Bayesian inference, the sampler updates the values of each parameter in the parameter group and the likelihood function according to the prior distribution , and returns to step B2.

[0069] In practical applications, the sampler of Bayesian inference here is a tool for implementing Bayesian inference using computer language, which is based on the Markov chain-Monte Carlo algorithm or the nested sampling algorithm.

[0070] To solve the limitations of Xspec in the energy spectrum fitting architecture, the above design scheme innovates the fitting architecture and realizes the following two points in the technical solution of the energy spectrum fitting architecture:

[0071] In the field of time-domain astrophysics, the energy spectra of many celestial sources show time-evolution phenomena. Therefore, the energy spectrum fitting architecture of the present invention considers the multi-dimensional (frequency domain and time domain) characteristics of the energy spectra of celestial sources, and can model the evolution characteristics of the energy spectra of celestial sources over time by supporting multi-dimensional models ;

[0072] The radiation energy spectra of many celestial sources have different characteristics in different bands. Therefore, when performing joint fitting of multi-band energy spectra, different theoretical models need to be adopted for energy spectra in different bands. Based on the above requirements, the present invention expands the formula as follows:

[0073]

[0074] Simultaneously support the joint fitting of multi-energy spectra and multi-models, and a more general form of the energy spectrum fitting architecture.

[0075] The present invention design involves Bayesian inference and the application of a Bayesian inference downsampler. Among them, regarding Bayesian inference, in the process of energy spectrum fitting, how to obtain the best fit by minimizing the fitting statistic is the most important and difficult step. Ideally, the minimum fitting statistic can be found by traversing each point in the multi-dimensional parameter space. However, unfortunately, this is generally not advisable because this method will greatly waste computing resources. Especially when the number of parameters is large, the required computing resources are extremely high. Therefore, various fitting algorithms have been developed, such as the Levenberg-Marquardt algorithm used by Xspec. However, this iterative optimization algorithm is sensitive to the initial value and is prone to falling into local optimal solutions.

[0076] Given the high dimensionality and high complexity of physical models in astronomy, the above-mentioned disadvantages will be further amplified. The present invention uses the Bayesian inference algorithm for astronomical energy spectrum fitting. Bayesian inference is based on Bayes' theorem and updates the posterior distribution of parameters by combining the prior distribution of parameters, observational data, and likelihood probability. That is, Bayes' theorem is as follows:

[0077]

[0078] Application of Bayesian inference in energy spectrum fitting: In order to embed Bayesian inference into the above energy spectrum fitting framework, the following three elements are involved:

[0079] Sampler: The sampler is a tool for implementing Bayes' theorem using computer language and is the most core element. Currently, samplers can be divided into two categories: one is based on the Markov chain Monte Carlo algorithm, such as the Python module emcee. The Markov chain Monte Carlo algorithm constructs a Markov chain whose stationary distribution is the posterior distribution of the parameters to be estimated. Then, the initial state is selected, and the Markov chain moves from one state to the next through the transition probability of the Markov chain until the samples of the Markov chain converge to the stationary distribution. The other category is based on the nested sampling algorithm, such as the Fortran module Multinest. The nested sampling algorithm generates a set of initial samples, then filters the samples according to the likelihood value threshold and regenerates the samples under new constraints, gradually compressing the sampling space and increasing the likelihood value threshold. When the improvement of the likelihood value or the compression of the sampling space reaches the predetermined convergence condition, the iteration is terminated. Finally, the model evidence and posterior analysis are calculated using the samples of each iteration. Both samplers only require the prior function and the likelihood function and generate posterior samples of the parameters. Therefore, they can be indistinguishable in the application of energy spectrum fitting.

[0080] Prior function: The prior function is used to define the prior distribution of all parameters to be estimated and returns the current parameter values The prior distribution of parameters is generally a uniform distribution, a normal distribution, etc.

[0081] Likelihood function: The likelihood function defines and returns the model for the probability of observing the data under the parameters . The relationship between the likelihood value and the goodness-of-fit statistic is . Generally, the goodness-of-fit statistics include chi-square (assuming the observed data is Gaussian distributed), cstat (assuming both the observed data and noise are Poisson distributed), pgstat (assuming the observed data is Poisson distributed and the noise is Gaussian distributed), and so on.

[0082] The application of Bayesian inference has the following advantages:

[0083] (1) Correctly handle the noise and uncertainty of astronomical observation data;

[0084] (2) Incorporate prior knowledge, which can integrate the prior knowledge of astronomers into the parameter estimation process;

[0085] (3) High flexibility, suitable for various complex models and high-dimensional parameter spaces;

[0086] (4) Quantify parameter uncertainty, and the posterior distribution provides uncertainty information for parameter estimation;

[0087] (5) Quantify model evidence and can easily perform model comparison.

[0088] The astronomical energy spectrum fitting method based on Bayesian inference designed by the present invention applies an astronomical spectrometer. First, a photon time-series energy spectrum fitting model for describing the photon time-series energy spectrum of an astronomical source is constructed. Then, based on the iteration of the parameter group under Bayesian inference, the sum of the goodness-of-fit statistics that statistically characterize the degree of agreement between the calculated value and the observed value is combined with the observed value, taking the sum of the calculated values of the observed energy channels of each group of detectors in each band at a specific moment in the photon time-series energy spectrum fitting model in a single iteration. With the convergence of the sum of the goodness-of-fit statistics as the goal, the best photon time-series energy spectrum fitting model is constructed, and the photon time-series energy spectrum of the astronomical source is fitted. The scheme design integrates the energy spectrum fitting architecture and the Bayesian inference algorithm. By improving the algorithm performance and combining a more general energy spectrum fitting architecture, the working efficiency of the energy spectrum fitting algorithm is optimized and improved, and the accuracy of astronomical energy spectrum fitting is improved.

[0089] In the design, by improving the algorithm performance, sufficient stability and accuracy are provided for the implementation and application of the scheme; and the involved general model architecture can easily be compatible with multi-dimensional models, multi-band models, and user-defined models; among them, a general form of the energy spectrum fitting architecture is proposed and implemented, that is , which simultaneously supports the joint fitting of multi-energy spectra and multi-models, can better characterize the multi-band characteristics of celestial sources. In addition, the energy spectrum fitting architecture proposed by the present invention also supports multi-dimensional (time domain + frequency domain) models , so as to be able to model the evolution characteristics of the energy spectrum of celestial sources over time.

[0090] In addition, regarding the designed energy spectrum fitting algorithm, the Levenberg-Marquardt algorithm used by Xspec is a local algorithm. The fitting process may fall into a local minimum and fail to find the global best fit, and the fitting effect depends on the setting of the initial model parameters. However, the present invention adopts the Bayesian inference algorithm, which does not depend on the initial parameters, can obtain the global steady-state solution, is applicable to various complex models and high-dimensional parameter spaces, and provides richer statistical characteristics such as parameter uncertainty and model evidence.

[0091] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those of ordinary skill in the art, various changes can be made without departing from the gist of the present invention.

Claims

1. An astronomical energy spectrum fitting method based on Bayesian inference, characterized in that: Using an astronomical spectrometer, according to the following steps A to B, the astronomical spectrum observation data is fitted to obtain the photon time series energy spectrum of the celestial source; Step A. constructing a photon time-series energy spectrum fitting model including a parameter group θ and used to describe the time-series energy spectrum of celestial source photons, and proceeding to step B; Step B. Based on the iteration of the parameter group θ under Bayesian inference, the photon time series energy spectrum fitting model corresponding to the parameter group θ under a single iteration is used to calculate the calculated value of the photon time series energy spectrum fitting model of each group of detectors in each band at a specific moment, and combined with the observed value of the photon time series energy spectrum of each group of detectors in each band at a specific moment, the sum of the fitting statistics representing the degree of agreement between the calculated value and the observed value of each group of detectors in each band is calculated, and the convergence of the sum of the fitting statistics is taken as the goal to obtain the optimal parameter group θ, constitute the optimal photon time series energy spectrum fitting model, that is, the photon time series energy spectrum of the celestial source is obtained by fitting; The above step B includes the following steps B1 to B4; Step B1. Based on the preset initial values ​​of each parameter in the parameter group θ, update the photon time series energy spectrum fitting model M(E, t, θ) in all bands, and enter step B2; wherein E represents energy and t represents time; Step B2. For each group of detectors in each band, use the following formula: Calculate the calculated value D' of the photon time series energy spectrum fitting model at a specific time t for each group of detectors in each band n,g (I n,g ,t), where 1≤n≤N, N represents the number of bands, 1≤g≤G, G represents the number of detector groups, and M n (E, t, θ) represents the photon time series energy spectrum fitting model in the nth band, represents the incident energy channel J of the g-th group of detectors in the n-th band n,g The corresponding energy range, I n,g represents the observation energy channel of the g-th group of detectors in the n-th band, D' n,g (I n,g ,t) represents the observation energy channel I of the g-th group of detectors in the n-th band n,g The calculated value of the photon time series energy spectrum fitting model at a specific time t, R n,g (I n,g ,J n,g ) represents the instrument response of the g-th group of detectors in the n-th band, that is, the effective detection area of ​​the g-th group of detectors in the n-th band; then proceeds to step B3; Step B3. The observed value D of the photon time series energy spectrum of each group of detectors in each band at a specific time t is obtained based on the observation of the astronomical spectrometer n,g (I n,g ,t), according to the following formula: The sum of the fitting statistics S of the degree of agreement between the calculated values ​​and the observed values ​​of each group of detectors in each band is calculated, where D n,g (I n,g ,t) represents the observation energy channel I of the g-th group of detectors in the n-th band n,g The observed value of the photon time series energy spectrum at a specific time t, S n,g (D n,g (I n,g ,t),D' n,g (I n,g , t )) represents the calculated value D' of the g-th detector in the n-th band n,g (I n,g ,t) and the observed value D n,g (I n,g ,t) the fitting statistics of the goodness of fit between them; then proceed to step B4; Step B4. Determine whether S converges. If so, obtain the parameter group θ corresponding to the sum S of the minimum fitting statistics under multiple iterations, that is, the optimal parameter group, which constitutes the optimal photon time series energy spectrum fitting model; otherwise, based on Bayesian inference, update the value of each parameter in the parameter group θ and return to step B2.

2. The astronomical energy spectrum fitting method based on Bayesian inference according to claim 1, characterized in that: In step A, a photon time-series energy spectrum fitting model M(E, t, θ) is constructed, which includes a parameter group θ and is used to describe the time-series energy spectrum of celestial source photons, wherein E represents energy and t represents time.

3. The astronomical energy spectrum fitting method based on Bayesian inference according to claim 1, characterized in that: Based on Bayesian inference, in step B1, based on the preset prior distribution P(θ|M) of the parameter group θ, the initial value of each parameter is set, and the photon time series energy spectrum fitting model is updated, where M represents the photon time series energy spectrum fitting model M(E, t, θ) in all bands; In the step B3, based on the sum of the fitting statistics S, the likelihood function P(D|θ,M) is calculated according to lnP(D|θ,M)=-0.5×S, wherein D represents the observed value D(I,t) of the photon time series energy spectrum of all detectors in all bands, and D(D|θ,M) represents the probability that the photon time series energy spectrum fitting model M(E,t,θ) can obtain the observed value D(I,t) of the photon time series energy spectrum under the parameter group θ; In the step B4, a sampler using Bayesian inference is applied. Based on the non-convergence of S, the sampler updates the values ​​of each parameter in the parameter group θ according to the prior distribution P(θ|M) and the likelihood function P(D|θ,M), and returns to step B2. Based on the convergence of S, the sampler obtains the total probability of the observed value D(I,t) of the photon time series energy spectrum under the prior distribution P(θ|M) based on the prior distribution P(θ|M) and the likelihood function P(D|θ,M) under multiple iterations, combined with the Bayesian evidence P(D|M), that is, the photon time series energy spectrum fitting model M(E,t,θ) under the prior distribution P(θ|M), according to the following formula: The posterior distribution P(θ|D,M) is obtained. P(θ|D,M) represents the observed value D(I,t) based on the photon time series energy spectrum. The current understanding of each parameter in the parameter group θ of the photon time series energy spectrum fitting model M(E,t,θ) is obtained. The parameter group θ with the minimum sum of fitting statistics S corresponding to the posterior distribution P(θ|D,M) is the optimal parameter group.

4. The astronomical energy spectrum fitting method based on Bayesian inference according to claim 3, characterized in that: The Bayesian inference sampler is a tool that implements Bayesian inference using computer language, which is based on the Markov Chain-Monte Carlo algorithm or the nested sampling algorithm.

5. The astronomical energy spectrum fitting method based on Bayesian inference according to claim 1, characterized in that: In step B3, if the statistical distribution of the observed values ​​of the photon time series energy spectrum conforms to the chi-square 2 distribution, the calculation formula of the sum of the fitting statistics S is updated as follows: Among them, σ n,g (I n,g ,t) represents the observation energy channel I of the g-th group of detectors in the n-th band n,g The observation error of the photon time series energy spectrum at time t.

6. The astronomical energy spectrum fitting method based on Bayesian inference according to claim 1, characterized in that: In step B4, based on the optimal photon time series energy spectrum fitting model, the goodness of fit is calculated according to S / ν, which characterizes the degree of explanation of the observed values ​​of the photon time series energy spectrum by the optimal photon time series energy spectrum fitting model, wherein v represents the difference between the total number of observed energy channels of all detectors in all bands and the total number of parameters in the parameter group θ.

Citation Information

Patent Citations

  • Noise estimation method for astronomical time sequence signal

    CN111863016A

  • Atmospheric density tomography scanning detection method, computer equipment and storage medium

    CN114966875A