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
Admin message
Gitlab has been updated. More info
here
and
there
.
Show more breadcrumbs
LISA Simulation
LISA Instrument
Commits
86425a9d
Commit
86425a9d
authored
4 years ago
by
Jean-Baptiste Bayle
Browse files
Options
Downloads
Patches
Plain Diff
Read orbits from orbit file by default
parent
74274e60
No related branches found
No related tags found
1 merge request
!32
Resolve "Automatically set t0 matching the t0 of orbits"
Pipeline
#109111
passed
4 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lisainstrument/instrument.py
+12
-4
12 additions, 4 deletions
lisainstrument/instrument.py
with
12 additions
and
4 deletions
lisainstrument/instrument.py
+
12
−
4
View file @
86425a9d
...
@@ -34,7 +34,7 @@ class Instrument:
...
@@ -34,7 +34,7 @@ class Instrument:
SCS
=
ForEachSC
.
indices
()
SCS
=
ForEachSC
.
indices
()
MOSAS
=
ForEachMOSA
.
indices
()
MOSAS
=
ForEachMOSA
.
indices
()
def
__init__
(
self
,
size
=
2592000
,
dt
=
1
/
4
,
t0
=
0
,
def
__init__
(
self
,
size
=
2592000
,
dt
=
1
/
4
,
t0
=
'
orbits
'
,
# Inter-spacecraft propagation
# Inter-spacecraft propagation
orbits
=
None
,
gws
=
None
,
glitches
=
None
,
interpolation
=
(
'
lagrange
'
,
31
),
orbits
=
None
,
gws
=
None
,
glitches
=
None
,
interpolation
=
(
'
lagrange
'
,
31
),
# Lasers
# Lasers
...
@@ -54,7 +54,7 @@ class Instrument:
...
@@ -54,7 +54,7 @@ class Instrument:
Args:
Args:
size: number of samples to generate
size: number of samples to generate
dt: sampling period [s]
dt: sampling period [s]
t0: initial time [s]
t0: initial time [s]
, or
'
orbits
'
to match that of the orbits
orbits: path to orbit file, or dictionary of scalars or time series for PPRs,
orbits: path to orbit file, or dictionary of scalars or time series for PPRs,
or None for default set of PPRs corresponding to static arms fit from Keplerian orbits
or None for default set of PPRs corresponding to static arms fit from Keplerian orbits
(from LISA Orbits v1.0) around t = 0
(from LISA Orbits v1.0) around t = 0
...
@@ -89,7 +89,7 @@ class Instrument:
...
@@ -89,7 +89,7 @@ class Instrument:
(
'
kaiser
'
, attenuation [dB], f1 [Hz], f2 [Hz]) with f1 < f2 the frequencies defining
(
'
kaiser
'
, attenuation [dB], f1 [Hz], f2 [Hz]) with f1 < f2 the frequencies defining
the transition band
the transition band
"""
"""
# pylint: disable=too-many-arguments,too-many-statements
# pylint: disable=too-many-arguments,too-many-statements
,too-many-locals,too-many-branches
logger
.
info
(
"
Initializing instrumental simulation
"
)
logger
.
info
(
"
Initializing instrumental simulation
"
)
self
.
git_url
=
'
https://gitlab.in2p3.fr/lisa-simulation/instrument
'
self
.
git_url
=
'
https://gitlab.in2p3.fr/lisa-simulation/instrument
'
self
.
version
=
meta
.
__version__
self
.
version
=
meta
.
__version__
...
@@ -98,7 +98,15 @@ class Instrument:
...
@@ -98,7 +98,15 @@ class Instrument:
# Measurement sampling
# Measurement sampling
self
.
size
=
int
(
size
)
self
.
size
=
int
(
size
)
self
.
dt
=
float
(
dt
)
self
.
dt
=
float
(
dt
)
self
.
t0
=
float
(
t0
)
if
t0
==
'
orbits
'
:
if
isinstance
(
orbits
,
str
):
logger
.
debug
(
"
Reading initial time from orbit file
'
%s
'"
,
orbits
)
with
h5py
.
File
(
orbits
,
'
r
'
)
as
orbitf
:
self
.
t0
=
float
(
orbitf
.
attrs
[
'
tau0
'
])
else
:
self
.
t0
=
0.0
else
:
self
.
t0
=
float
(
t0
)
self
.
fs
=
1
/
self
.
dt
self
.
fs
=
1
/
self
.
dt
logger
.
info
(
"
Computing measurement time vector (size=%s, dt=%s)
"
,
self
.
size
,
self
.
dt
)
logger
.
info
(
"
Computing measurement time vector (size=%s, dt=%s)
"
,
self
.
size
,
self
.
dt
)
self
.
t
=
self
.
t0
+
numpy
.
arange
(
self
.
size
,
dtype
=
numpy
.
float64
)
*
self
.
dt
self
.
t
=
self
.
t0
+
numpy
.
arange
(
self
.
size
,
dtype
=
numpy
.
float64
)
*
self
.
dt
...
...
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