我想生成一个二维高斯模型,其中磁通分布在给定半径上。从理论上,我发现了高斯模型的总积分通量。现在,我想对其进行成像,以使总通量在半径r的高斯模型内分布。如果我将半径r内的通量求和,则它应与总积分通量相同。下面我给出了我的代码-
import numpy as np
(xx,yy) = (512,512) # size of an array
r=100 # r is the 2D gaussian radius
A = 100 * (1/r)**2 # A is the peak flux; 100 is the total integrated flux
xc=xx/2.; yc=yy/2. # centre of 2D Gaussian
circle=zeros((xx,yy)) # Empty array
for i in range(xx):
for j in range(yy):
circle[j,i]= A*exp(-((i-xc)/r)**2.0 - ((j-yc)/r)**2.0)
将峰值通量除以高斯的立体角以在高斯范围内散布峰值通量是否正确?