0
$\begingroup$

I want to generate a 2D Gaussian model with flux spread out for a given radius. From theory, I found out that the total integrated flux of a Gaussian model. Now I want to image it such that total flux is spread out within the Gaussian model of radius r. If I sum the flux within radius r, it should be same as the total integrated flux. Below I have given my code-

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) 

Is this correct to divide the peak flux by solid angle of the Gaussian to spread out the peak flux within Gaussian?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.