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
Merge requests
!105
Resolve "Error when using orbit files v2.0"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Error when using orbit files v2.0"
82-error-when-using-orbit-files-v2-0
into
master
Overview
1
Commits
6
Pipelines
6
Changes
1
Merged
Jean-Baptiste Bayle
requested to merge
82-error-when-using-orbit-files-v2-0
into
master
3 years ago
Overview
1
Commits
6
Pipelines
6
Changes
1
Expand
Closes
#82 (closed)
Fix the issue with orbit files v2.0
Avoid printing multiple warnings for orbit files in a development version
Add unit tests for various orbit files
Edited
3 years ago
by
Jean-Baptiste Bayle
0
0
Merge request reports
Viewing commit
940c109e
Show latest version
1 file
+
5
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
940c109e
Fix a bug with orbit files v2.0
· 940c109e
Jean-Baptiste Bayle
authored
3 years ago
lisainstrument/instrument.py
+
5
−
4
Options
@@ -587,23 +587,24 @@ class Instrument:
# Prepare common interpolation method
times
=
orbitf
.
attrs
[
'
t0
'
]
+
np
.
arange
(
orbitf
.
attrs
[
'
size
'
])
*
orbitf
.
attrs
[
'
dt
'
]
interpolate
=
lambda
data
,
t
:
InterpolatedUnivariateSpline
(
times
,
data
,
ext
=
'
raise
'
)(
t
)
index
=
{
'
12
'
:
0
,
'
23
'
:
1
,
'
31
'
:
2
,
'
13
'
:
3
,
'
32
'
:
4
,
'
21
'
:
5
}
link_index
=
{
'
12
'
:
0
,
'
23
'
:
1
,
'
31
'
:
2
,
'
13
'
:
3
,
'
32
'
:
4
,
'
21
'
:
5
}
sc_index
=
{
'
1
'
:
0
,
'
2
'
:
1
,
'
3
'
:
2
}
# Interpolate necessary orbital quantities,
# show a helpful error message if orbit file is too short
try
:
logger
.
debug
(
"
Interpolating proper pseudo-ranges
"
)
dataset
=
orbitf
[
'
tcb/ltt
'
]
if
self
.
orbit_dataset
==
'
tcb/ltt
'
else
orbitf
[
'
tps/ppr
'
]
self
.
pprs
=
ForEachMOSA
(
lambda
mosa
:
interpolate
(
dataset
[:,
index
[
mosa
]],
self
.
physics_t
))
self
.
pprs
=
ForEachMOSA
(
lambda
mosa
:
interpolate
(
dataset
[:,
link_
index
[
mosa
]],
self
.
physics_t
))
logger
.
debug
(
"
Interpolating proper pseudo-range derivatives
"
)
dataset
=
orbitf
[
'
tcb/d_ltt
'
]
if
self
.
orbit_dataset
==
'
tcb/ltt
'
else
orbitf
[
'
tps/d_ppr
'
]
self
.
d_pprs
=
ForEachMOSA
(
lambda
mosa
:
interpolate
(
dataset
[:,
index
[
mosa
]],
self
.
physics_t
))
self
.
d_pprs
=
ForEachMOSA
(
lambda
mosa
:
interpolate
(
dataset
[:,
link_
index
[
mosa
]],
self
.
physics_t
))
logger
.
debug
(
"
Interpolating proper time deviation from TCB
"
)
if
self
.
orbit_dataset
==
'
tcb/ltt
'
:
self
.
tps_proper_time_deviations
=
ForEachSC
(
lambda
sc
:
0
)
else
:
dataset
=
orbitf
[
'
tcb/delta_tau
'
]
self
.
tps_proper_time_deviations
=
ForEachSC
(
lambda
sc
:
interpolate
(
dataset
[:,
sc
-
1
],
self
.
physics_t
))
self
.
tps_proper_time_deviations
=
ForEachSC
(
lambda
sc
:
interpolate
(
dataset
[:,
sc
_index
[
sc
]
],
self
.
physics_t
))
except
ValueError
as
error
:
logger
.
error
(
"
Missing orbit information at
\n
%s
"
,
self
.
physics_t
)
raise
ValueError
(
"
missing orbit information, use longer orbit file or adjust sampling
"
)
from
error
Loading