Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Heimann
grond
Commits
78ff366a
Commit
78ff366a
authored
May 08, 2017
by
Sebastian Heimann
Browse files
fits plot: improved plotting of time-shifted traces
parent
2842b108
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plot.py
View file @
78ff366a
...
@@ -86,6 +86,15 @@ def eigh_sorted(mat):
...
@@ -86,6 +86,15 @@ def eigh_sorted(mat):
return
evals
[
iorder
],
evecs
[:,
iorder
]
return
evals
[
iorder
],
evecs
[:,
iorder
]
def
make_norm_trace
(
a
,
b
,
exponent
):
tmin
=
max
(
a
.
tmin
,
b
.
tmin
)
tmax
=
min
(
a
.
tmax
,
b
.
tmax
)
c
=
a
.
chop
(
tmin
,
tmax
,
inplace
=
False
)
bc
=
b
.
chop
(
tmin
,
tmax
,
inplace
=
False
)
c
.
set_ydata
(
num
.
abs
(
c
.
get_ydata
()
-
bc
.
get_ydata
())
**
exponent
)
return
c
class
GrondModel
(
object
):
class
GrondModel
(
object
):
def
__init__
(
self
,
**
kwargs
):
def
__init__
(
self
,
**
kwargs
):
self
.
listeners
=
[]
self
.
listeners
=
[]
...
@@ -1001,14 +1010,12 @@ def draw_fits_figures(ds, model, plt):
...
@@ -1001,14 +1010,12 @@ def draw_fits_figures(ds, model, plt):
spec
.
ydata
*=
w
spec
.
ydata
*=
w
if
result
.
tshift
is
not
None
and
result
.
tshift
!=
0.0
:
if
result
.
tshift
is
not
None
and
result
.
tshift
!=
0.0
:
result
.
filtered_syn
.
shift
(
result
.
tshift
)
#
result.filtered_syn.shift(result.tshift)
result
.
processed_syn
.
shift
(
result
.
tshift
)
result
.
processed_syn
.
shift
(
result
.
tshift
)
dtrace
=
result
.
processed_syn
.
copy
()
dtrace
=
make_norm_trace
(
dtrace
.
set_ydata
(
result
.
processed_syn
,
result
.
processed_obs
,
(
problem
.
norm_exponent
)
(
result
.
processed_syn
.
get_ydata
()
-
result
.
processed_obs
.
get_ydata
())
**
2
))
target_to_result
[
target
]
=
result
target_to_result
[
target
]
=
result
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment