Add comment
This commit is contained in:
parent
0587b5fbe3
commit
719cd3050e
2 changed files with 19 additions and 13 deletions
|
@ -131,19 +131,25 @@ class Analyzer:
|
|||
Compute psd of the computed projection with current bench
|
||||
excitation
|
||||
"""
|
||||
result = zeros(
|
||||
len(
|
||||
interpolate_abciss(
|
||||
(self.movement.psd(), self.coupling[0].abs())
|
||||
)
|
||||
results = zeros(
|
||||
(
|
||||
len(self.coupling),
|
||||
len(
|
||||
interpolate_abciss(
|
||||
(self.movement.psd(), self.coupling[0].abs())
|
||||
)
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
# frequencies depends of psd result, which we do not have yet
|
||||
frequencies = zeros(len(result))
|
||||
frequencies = zeros(results.shape[1])
|
||||
|
||||
for index in range(len(self.coupling)):
|
||||
phase = (index + 1) * 4 * pi / (self.settings.wavelength*1e6)
|
||||
phase = (
|
||||
(index + 1) * 4 * pi / (self.settings.wavelength * 1e6)
|
||||
# * 1e6 sinon la courbe n'est plus du tout la même
|
||||
)
|
||||
|
||||
factor_n = (self.movement * phase).sin().psd().sqrt()
|
||||
coupling_n = self.coupling[0].abs()
|
||||
|
@ -157,14 +163,15 @@ class Analyzer:
|
|||
# no need to redefine it each time but simpler here
|
||||
frequencies = factor_n.x
|
||||
|
||||
result += (
|
||||
""" # from theoric equation
|
||||
results[index] = (
|
||||
sqrt(self.settings.scattering_factor[index])
|
||||
* self.settings.power_in
|
||||
/ self.settings.power_out
|
||||
* (coupling_n * factor_n + coupling_d * factor_d).y
|
||||
)
|
||||
"""
|
||||
result += (
|
||||
results[index] = ( # from matlab
|
||||
sqrt(self.settings.scattering_factor[index])
|
||||
* self.settings.wavelength
|
||||
/ (4 * pi)
|
||||
|
@ -172,11 +179,10 @@ class Analyzer:
|
|||
.sqrt()
|
||||
.y
|
||||
) ** 2
|
||||
"""
|
||||
|
||||
self.projection = Signal(
|
||||
frequencies,
|
||||
result,
|
||||
sum(results),
|
||||
self.settings,
|
||||
)
|
||||
return self.projection
|
||||
return self.projection.sqrt()
|
||||
|
|
|
@ -34,7 +34,7 @@ class Settings:
|
|||
|
||||
self.calib_bench = 1.15
|
||||
self.calib_mirror = 1.15
|
||||
self.scattering_factor = [1.3e-3, 1e-12] # parameter to change
|
||||
self.scattering_factor = [1.3e-4, 1e-16] # parameter to change
|
||||
self.vibration_frequency = 0.2
|
||||
|
||||
index = 0
|
||||
|
|
Loading…
Reference in a new issue