3
$\begingroup$

How to simulate the radial coronograph "speckle-noise" in this image?

3 exoplanets

The 3 circled objects are exoplanets. Their star has been blocked out by a coronagraph, resulting in optical noise known as "speckles".

I am interested in generating the noise (the grainy stuff).

It has to look similar (for the purpose of training a Neural Network to ignore it)

I am looking for ideas about how to generating such speckle noise in Mathematica.


Here is one approach using the Fourier transform of random phasors. The trouble is that the speckle elements are not radially oriented in a circle like the image above.

(* Program for Simulating Speckle Formation by Free Space Propagation*)

n = 2^8;
(* Linear dimension of the nxn array to be used.*)

k = 2^2;
(*number of samples (in one dimension) per speckle. *)

start = Table[E^(I 2 \[Pi] * Random[]), {n/k}, {n/k}];
(*generate an n/k \[Times] n/k array of random phasors *)

scatterArray = PadRight[start, {n, n}];
(*pad the phasr array with zeros*)

(*the scattering spot is a square of size n/k\[Times]n/k  *)
speckleField = Fourier[scatterArray];

(* Find the FFT of the padded array *)
(*this is the speckle field in the observation plane*)
speckleIntensity = Abs[speckleField]^2;

(*find the intensity of the observed speckle field*)
ListDensityPlot[speckleIntensity]

enter image description here

could I stretch it into a circle? Or print it on the side of a cone and view it from above?

$\endgroup$
1
$\begingroup$

You are on the right path. After you generate your noise field, you can mask it with a circular function. For example, I used a modified Gaussian function to create the mask:

decay = 20; (* Customizable decay factor *)
decayExp = 1/4; (* Customizable decay exponent *)
mask = Table[
   Exp[-N[((decay x/n)^2 + (decay y/n)^2)]^(decayExp)],
   {y, -n/2, n/2 - 1}, {x, -n/2, n/2 - 1}];

Then you multiply your field with the mask and plot it:

speckleIntensityMasked = speckleIntensity*mask;

ListDensityPlot[speckleIntensityMasked, 
 RegionFunction -> ((#1 - n/2)^2 + (#2 - n/2)^2 >= (n/4)^2 &), 
 PlotRange -> All]

masked density plot

| improve this answer | |
$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.