Message Boards Message Boards

How to define a Gaussian spectrum at a certain wavelength?

Posted 2 years ago

Hello

I have a Transmission function:

Manipulate[Plot[1/(1+(\[Pi]*\[Sqrt]R)/(1-R)* Sin[(2 \[Pi]
 /\[Lambda])*L]^2), {\[Lambda], 2.60*^-7, 2.70*^-7} ,PlotRange -> {0,
1},AxesLabel -> {"Wavelength [nm]", "Transmission"}], {R, 0.85, 0.99},
 {L, 0.00001, 0.001}]

and now I want to define a Gaussian spectrum which fits in on of those Transmission peaks. Additionally, this gaussian spectrum should be tunable by its wavelength.

How can this be done?

With this, I cannot change the axis on which the Gaussian distribution is plotted:

Plot[Table[  PDF[NormalDistribution[\[Mu], 1],\[Lambda]], {\[Mu],
{0.2}}], {\[Lambda], -260*^-9, 300*^-9},PlotRange -> {0, 1}]

Regards,

POSTED BY: Karl S
4 Replies

Hello Karl,

1) I suggest that you rescale your problem to get rid of these nasty powers of ten. You can plot your problem from 2.5 to 2.8 rembering to apply a factor of 10^(-7) later on.

2) What do you mean by gaussian function? A normal distribution has an area of 1, so if you make it narrow it has to become high, meaning it is becoming much grater than 1.

3) If you want a general Exp[ - x^2 ] - function you should provide directly for amplitude, width and position.

I changed your code a bit which could give you a hint how to achieve what I think you want to do.

Manipulate[
 Plot[
  {
   aa Exp[-bb (\[Lambda] - x0)^2],
   1/(1 + (\[Pi]*\[Sqrt]R)/(1 - R)*
       Sin[(2 \[Pi]/\[Lambda])*L]^2)}, {\[Lambda], 2.60*^-7, 
   2.70*^-7}, PlotRange -> {0, 1}, 
  AxesLabel -> {"Wavelength [nm]", "Transmission"}],
 {R, 0.85, 0.99},
 {L, 0.00001, 0.001},
 {{aa, .5}, 0, 1},
 {{x0, 2.65 10^(-7)}, 2.6 10^(-7), 2.7 10^(-7)},
 {bb, 10^(18), 10^(19)}]
POSTED BY: Hans Dolhaine
Posted 2 years ago
Manipulate[Plot[{1/(1+(\[Pi]*\[Sqrt]R)/(1-R)* Sin[(2 \[Pi] /\[Lambda])*L]^2)*E0 E^-(1/2(\[Lambda] - \[Lambda]0)^2/\[Sigma]^2)}, {\[Lambda], 260, 270} ,PlotRange -> {0, 1},AxesLabel -> {"Wavelength [nm]", "Transmission"}], {R, 0.85, 0.99}, {L, 0.1*^6, 1*^6}, {\[Sigma], 0.01, 1}, {\[Lambda]0, 258, 265}, {E0, 1, 1}]
POSTED BY: Karl S
Posted 2 years ago

Ok I found the answer for question 2.

Manipulate[Plot[{1/(1+(\[Pi]*\[Sqrt]R)/(1-R)* Sin[(2 \[Pi] /\[Lambda])*L]^2),1/(\[Sigma] \[Sqrt](2\[Pi]))E0 E^-(1/2(\[Lambda] - \[Lambda]0)^2/\[Sigma]^2)}, {\[Lambda], 260, 270} ,PlotRange -> {0, 1},AxesLabel -> {"Wavelength [nm]", "Transmission"}], {R, 0.85, 0.99}, {L, 0.1*^6, 1*^6}, {\[Sigma], 0.01, 1}, {\[Lambda]0, 258, 265}, {E0, 1, 1}]

enter image description here

POSTED BY: Karl S
Posted 2 years ago

Ok I have tried something:

I have defined a gaussian:

Manipulate[Plot[1/(1+(\[Pi]*\[Sqrt]R)/(1-R)* Sin[(2 \[Pi] /\[Lambda])*L]^2), {\[Lambda], 260, 270} ,PlotRange -> {0, 1},AxesLabel -> {"Wavelength [nm]", "Transmission"}], {R, 0.85, 0.99}, {L, 0.1*^6, 1*^6}]
Manipulate[Plot[1/(\[Sigma] \[Sqrt](2\[Pi]))E0 E^-(1/2(\[Lambda] - \[Lambda]0)^2/\[Sigma]^2) , {\[Lambda],260, 270}, PlotRange -> {0, 2}], {\[Sigma], 0.01, 1}, {\[Lambda]0, 258, 265}, {E0, 1,}]

The result looks like this: see attachment

  1. Why can the gaussian function be over 1. (1 should be the maximum value)
  2. How can both plots be implemented into one figure?
  3. How can the FWHM of the gaussian function be calculated (even while changing the sigma)?
  4. How can the result of the product of the gaussian function and one transmission peak be calculated and displayed in a third figure?

Regards

Attachment

Attachments:
POSTED BY: Karl S
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract