schubert
(Karl S)
October 18, 2021, 7:44am
1
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,
schubert
(Karl S)
October 18, 2021, 10:04am
2
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
Why can the gaussian function be over 1. (1 should be the maximum value)
How can both plots be implemented into one figure?
How can the FWHM of the gaussian function be calculated (even while changing the sigma)?
How can the result of the product of the gaussian function and one transmission peak be calculated and displayed in a third figure?
Regards
schubert
(Karl S)
October 18, 2021, 10:30am
3
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}]
schubert
(Karl S)
October 18, 2021, 4:34pm
4
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}]
hdolhaine
(Hans Dolhaine)
October 18, 2021, 8:26pm
5
Hello Karl,
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.
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.
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)}]