Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LISA Instrument
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LISA Simulation
LISA Instrument
Commits
ef37114a
Commit
ef37114a
authored
4 years ago
by
Jean-Baptiste Bayle
Browse files
Options
Downloads
Patches
Plain Diff
Optimize laser noise generation when using three lasers
parent
5fb14486
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2
Add instrument simulation
Pipeline
#102053
failed
4 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lisainstrument/instrument.py
+14
-11
14 additions, 11 deletions
lisainstrument/instrument.py
with
14 additions
and
11 deletions
lisainstrument/instrument.py
+
14
−
11
View file @
ef37114a
...
@@ -107,7 +107,7 @@ class Instrument:
...
@@ -107,7 +107,7 @@ class Instrument:
self
.
three_lasers
=
bool
(
three_lasers
)
self
.
three_lasers
=
bool
(
three_lasers
)
# Laser and modulation noise
# Laser and modulation noise
self
.
laser_asds
=
ForEach
MOSA
(
laser_asds
)
self
.
laser_asds
=
ForEach
SC
(
laser_asds
)
if
self
.
three_lasers
else
ForEachSC
(
laser_asds
)
self
.
modulation_asds
=
ForEachMOSA
(
modulation_asds
)
self
.
modulation_asds
=
ForEachMOSA
(
modulation_asds
)
self
.
modulation_fknees
=
ForEachMOSA
(
modulation_fknees
)
self
.
modulation_fknees
=
ForEachMOSA
(
modulation_fknees
)
self
.
modulation_freqs
=
ForEachMOSA
(
modulation_freqs
)
if
modulation_freqs
is
not
None
\
self
.
modulation_freqs
=
ForEachMOSA
(
modulation_freqs
)
if
modulation_freqs
is
not
None
\
...
@@ -351,7 +351,9 @@ class Instrument:
...
@@ -351,7 +351,9 @@ class Instrument:
self
.
local_carrier_offsets
=
self
.
offsets_freqs
self
.
local_carrier_offsets
=
self
.
offsets_freqs
logging
.
info
(
"
Computing carrier frequency fluctuations for local beams
"
)
logging
.
info
(
"
Computing carrier frequency fluctuations for local beams
"
)
self
.
local_carrier_fluctuations
=
self
.
laser_noises
self
.
local_carrier_fluctuations
=
ForEachMOSA
(
lambda
mosa
:
self
.
laser_noises
[
ForEachMOSA
.
sc
(
mosa
)]
if
self
.
three_lasers
else
self
.
laser_noises
[
mosa
]
)
logging
.
info
(
"
Computing upper sideband frequency offsets for local beams
"
)
logging
.
info
(
"
Computing upper sideband frequency offsets for local beams
"
)
self
.
local_usb_offsets
=
ForEachMOSA
(
lambda
mosa
:
self
.
local_usb_offsets
=
ForEachMOSA
(
lambda
mosa
:
...
@@ -360,8 +362,8 @@ class Instrument:
...
@@ -360,8 +362,8 @@ class Instrument:
logging
.
info
(
"
Computing upper sideband frequency fluctuations for local beams
"
)
logging
.
info
(
"
Computing upper sideband frequency fluctuations for local beams
"
)
self
.
local_usb_fluctuations
=
ForEachMOSA
(
lambda
mosa
:
self
.
local_usb_fluctuations
=
ForEachMOSA
(
lambda
mosa
:
self
.
laser_noises
[
mosa
]
+
self
.
modulation_freq
s
[
mosa
]
\
self
.
laser_noises
[
ForEachMOSA
.
sc
(
mosa
)
]
if
self
.
three_lasers
else
self
.
laser_noise
s
[
mosa
]
\
*
(
self
.
clock_noise_fluctuations
[
mosa
[
0
]]
+
self
.
modulation_noises
[
mosa
])
+
self
.
modulation_freqs
[
mosa
]
*
(
self
.
clock_noise_fluctuations
[
mosa
[
0
]]
+
self
.
modulation_noises
[
mosa
])
)
)
logging
.
info
(
"
Computing local timer deviations
"
)
logging
.
info
(
"
Computing local timer deviations
"
)
...
@@ -746,17 +748,18 @@ class Instrument:
...
@@ -746,17 +748,18 @@ class Instrument:
def
simulate_noises
(
self
):
def
simulate_noises
(
self
):
"""
Generate noise time series.
"""
"""
Generate noise time series.
"""
## Laser noise
## Laser noise
# TODO: optimize in case of three lasers
logging
.
info
(
"
Generating laser noise time series
"
)
logging
.
info
(
"
Generating laser noise time series
"
)
self
.
laser_noises
=
ForEachMOSA
(
lambda
mosa
:
noises
.
laser
(
self
.
physics_fs
,
self
.
physics_size
,
self
.
laser_asds
[
mosa
])
)
if
self
.
three_lasers
:
if
self
.
three_lasers
:
for
mosa
in
self
.
MOSAS
[:
3
]:
self
.
laser_noises
=
ForEachSC
(
lambda
sc
:
self
.
laser_noises
[
ForEachMOSA
.
adjacent
(
mosa
)]
=
self
.
laser_noises
[
mosa
]
noises
.
laser
(
self
.
physics_fs
,
self
.
physics_size
,
self
.
laser_asds
[
sc
])
)
else
:
self
.
laser_noises
=
ForEachMOSA
(
lambda
mosa
:
noises
.
laser
(
self
.
physics_fs
,
self
.
physics_size
,
self
.
laser_asds
[
mosa
])
)
## Clock noise
## Clock noise
# TODO: better optimize when clock_freqlindrifts and clock_freqquaddrifts == 0
# TODO: better optimize when clock_freqlindrifts and clock_freqquaddrifts == 0
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment