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
66c3ddd4
Commit
66c3ddd4
authored
1 month ago
by
Wolfgang Kastaun
Browse files
Options
Downloads
Patches
Plain Diff
Fix typo in shift inversion docstring, and describe algorithm
parent
81ac3eff
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lisainstrument/shift_inversion_numpy.py
+30
-1
30 additions, 1 deletion
lisainstrument/shift_inversion_numpy.py
with
30 additions
and
1 deletion
lisainstrument/shift_inversion_numpy.py
+
30
−
1
View file @
66c3ddd4
...
...
@@ -79,7 +79,7 @@ class ShiftInverseNumpy: # pylint: disable=too-few-public-methods
It will be computed for locations
$ u_l = u_0 + l \Delta u $ regularly spaced with respect to the
$u$-coordinate, i.e. the output will be the sequence
$ \hat{S}_l = u_l -
\hat{S}
(u_l) $.
$ \hat{S}_l = u_l -
v
(u_l) $.
Currently, we restrict to the special case where $u_k = v_k$,
i.e. $v_0 = u_0$ and $\Delta u = \Delta v$.
...
...
@@ -169,6 +169,35 @@ class ShiftInverseNumpy: # pylint: disable=too-few-public-methods
The output sample locations are not returned, but are implicitly
equal to the input ones, meaning $ v_l = u_l $.
The algorithm works using fixed point iteration
$ \hat{S}_l^{n+1} = f(l,\hat{S}_l^{n}) $,
where
$ f(l,d) = I[v_k, S_k](v_l - d) $, and $I[v_k, S_k]$ is a
function obtained by interpolating the samples $v_k, S_k$,
approximating $I[v_k, S_k](v) \approx S(v) $.
On the technical level, the interpolation operator is implemented
using shifts directly, with an interface of the form
$I[S_k](d_l) \approx S(v_l + d_l)$.
If the iteration converges, it converges to a solution
$ \bar{S}_l = f(l,\bar{S}_l) \approx S(v_l - \bar{S}_l) = S(u_l - \bar{S}_l)$,
where we used the implicit convention that $u_l = v_l$.
This equation fulfilled for $\bar{S}_l $ is indeed the one that
needs to be fulfilled for the desired quantity $\hat{S}_l$, which
can be shown as follows:
$u_l = u(v(u_l)) = S(v(u_l)) + v(u_l)$ and hence
$\hat{S}_l = u_l - v(u_l) = S(v(u_l)) = S(u_l - \hat{S}_l).
This shows that the iteration converges to the correct solution if
it converges.
The initial value is $ \hat{S}_l^0 = S_l $.
The iteration is repeated until
$ \max_l |\hat{S}_l^{n+1} - \hat{S}_l^{n} | < \epsilon $,
where $\epsilon$ is the tolerance specified when constructing
the operator.
Arguments:
shift: 1D numpy array with shifts of the coordinate transform [s]
...
...
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