Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
pygwinc
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
31
Issues
31
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gwinc
pygwinc
Commits
c9d563e2
Commit
c9d563e2
authored
May 24, 2018
by
Lee McCuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added displacement plot option (default False)
parent
ac9a9d80
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
gwinc/__main__.py
gwinc/__main__.py
+3
-0
gwinc/plot.py
gwinc/plot.py
+14
-0
No files found.
gwinc/__main__.py
View file @
c9d563e2
...
...
@@ -54,6 +54,8 @@ parser.add_argument('--matlab', '-m', action='store_true',
help
=
"use MATLAB gwinc engine to calculate noises"
)
parser
.
add_argument
(
'--fom'
,
help
=
"calculate inspiral range for resultant spectrum ('func:param=val,param=val')"
)
parser
.
add_argument
(
'-D'
,
'--displacement'
,
action
=
'store_true'
,
default
=
False
,
dest
=
'displacement'
,
help
=
"supress adding displacement sensitivity axis"
)
group
=
parser
.
add_mutually_exclusive_group
()
group
.
add_argument
(
'--dump'
,
'-d'
,
dest
=
'dump'
,
action
=
'store_true'
,
help
=
"print IFO parameters to stdout and exit"
)
...
...
@@ -155,6 +157,7 @@ You may interact with plot using "plt." methods, e.g.:
plot_noise
(
noises
,
ax
=
ax
,
displacement
=
args
.
displacement
,
)
ax
.
set_title
(
title
)
fig
.
tight_layout
()
...
...
gwinc/plot.py
View file @
c9d563e2
...
...
@@ -63,6 +63,7 @@ STYLE_MAP = {
def
plot_noise
(
noises
,
ax
=
None
,
displacement
=
True
,
):
f
=
noises
[
'Freq'
]
...
...
@@ -70,6 +71,19 @@ def plot_noise(
fig
=
plt
.
figure
()
ax
=
fig
.
add_subplot
(
1
,
1
,
1
)
if
displacement
:
ax_d
=
ax
.
twinx
()
ax_d
.
set_yscale
(
'log'
)
def
convert_ax_h_to_d
(
ax
):
"""
Update second axis according with first axis.
"""
y1
,
y2
=
ax
.
get_ylim
()
ax_d
.
set_ylim
(
y1
*
4000
,
y2
*
4000
)
ax_d
.
figure
.
canvas
.
draw
()
ax
.
callbacks
.
connect
(
"ylim_changed"
,
convert_ax_h_to_d
)
ax_d
.
set_ylabel
(
u"Displacement [m/
\u221A
Hz]"
)
def
plot_dict
(
noises
):
#use sorted to force a consistent ordering
...
...
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