Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pygwinc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gwinc
pygwinc
Commits
1b39c15a
There was a problem fetching the pipeline summary.
Commit
1b39c15a
authored
6 years ago
by
Lee McCuller
Browse files
Options
Downloads
Plain Diff
Merge branch 'setuppy' of git.ligo.org:lee-mcculler/pygwinc into setuppy
parents
bd2132bc
3cf91677
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!9
Setuppy
Pipeline
#
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+18
-10
18 additions, 10 deletions
README.md
gwinc/gwinc.py
+3
-3
3 additions, 3 deletions
gwinc/gwinc.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
22 additions
and
14 deletions
README.md
+
18
−
10
View file @
1b39c15a
...
...
@@ -9,18 +9,19 @@
`pygwinc`
creates noise budgets based on detector descriptions
provided in either .yml or .mat files (see below). Once the detector
description is loaded, the noise budget can be calculated with the
`gwinc`
command:
description is loaded, the noise budget can be calculated and plotted:
```
python
>>>
import
gwinc
>>>
import
numpy
as
np
>>>
ifo
=
gwinc
.
load_ifo
(
'
aLIGO
'
)
>>>
freq
=
np
.
logspace
(
1
,
3
,
1000
)
>>>
score
,
data
,
ifo
=
gwinc
.
gwinc
(
freq
,
ifo
)
>>>
ifo
=
gwinc
.
load_ifo
(
'
aLIGO
'
)
>>>
ifo
=
gwinc
.
precompIFO
(
ifo
)
>>>
noises
=
gwinc
.
noise_calc
(
ifo
,
freq
)
>>>
gwinc
.
plot_noise
(
ifo
,
noises
)
```
A
convenience function
to plot the resulting noise budget is included
:
Or the
`gwinc`
convenience function
can be used to handle it all
:
```
>>>
gwinc.plot_noise(data
)
>>>
score, data, ifo = gwinc.gwinc(freq, ifo, plot=True
)
```
...
...
@@ -71,9 +72,9 @@ YAML .yaml format, the original MATLAB gwinc .mat format, or even from
a MATLAB .m file.
`pygwinc`
includes .yaml detector descriptions for
various detectors:
*
gwinc/ifo/aLIGO.yaml
*
gwinc/ifo/A+.yaml
*
gwinc/ifo/Voyager.yaml
*
[
aLIGO.yaml
](
https://git.ligo.org/gwinc/pygwinc/blob/master/
gwinc/ifo/aLIGO.yaml
)
*
[
A+.yaml
](
https://git.ligo.org/gwinc/pygwinc/blob/master/
gwinc/ifo/A+.yaml
)
*
[
Voyager.yaml
](
https://git.ligo.org/gwinc/pygwinc/blob/master/
gwinc/ifo/Voyager.yaml
)
## comparison with MATLAB gwinc
...
...
@@ -88,7 +89,14 @@ a local installation of MATLAB and it's python interface (at
e.g. /opt/matlab/python/lib/python3.6/site-packages) you can run the
comparison as so:
$ GWINCPATH=/path/to/gwinc PYTHONPATH=/opt/matlab/python/lib/python3.6/site-packages python3 -m gwinc.test -p aLIGO
$ export GWINCPATH=/path/to/gwinc
$ export PYTHONPATH=/opt/matlab/python/lib/python3.6/site-packages
$ python3 -m gwinc.test -p aLIGO
This will produce a summary page of the various noise spectra that
differ between matgwinc and pygwinc.
Latest comparison plots from continuous integration:
*
[
aLIGO comparison
](
https://gwinc.docs.ligo.org/pygwinc/aLIGO_test.png
)
*
[
A+ comparison
](
https://gwinc.docs.ligo.org/pygwinc/A+_test.png
)
This diff is collapsed.
Click to expand it.
gwinc/gwinc.py
+
3
−
3
View file @
1b39c15a
...
...
@@ -106,7 +106,7 @@ def noise_calc(ifo, f):
return
noises
def
gwinc
(
freq
,
ifoin
,
source
=
None
,
fig
=
False
,
PRfixed
=
True
):
def
gwinc
(
freq
,
ifoin
,
source
=
None
,
plot
=
False
,
PRfixed
=
True
):
"""
Calculate strain noise budget for a specified interferometer model.
Argument `freq` is the frequency array for which the noises will
...
...
@@ -117,7 +117,7 @@ def gwinc(freq, ifoin, source=None, fig=False, PRfixed=True):
the detector to several potential gravitational wave
sources.
If `
fig
` is
specified
a plot of the budget will be created.
If `
plot
` is
True
a plot of the budget will be created.
Returns tuple of (score, noises, ifo)
...
...
@@ -146,7 +146,7 @@ def gwinc(freq, ifoin, source=None, fig=False, PRfixed=True):
# --------------------------------------------------------
# output graphics
if
fig
:
if
plot
:
# Report input parameters
if
ifo
.
Optics
.
Type
==
'
DualCarrier_new
'
:
#include the case for Dual carrier
finesseA
=
2
*
pi
/
ifo
.
Optics
.
ITM
.
TransmittanceD1
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
1b39c15a
...
...
@@ -13,7 +13,7 @@ setup_args = dict(
url
=
'
https://git.ligo.org/gwinc/pygwinc
'
,
author
=
'
LIGO Laboratory
'
,
author_email
=
'
jrollins@ligo.caltech.edu
'
,
description
=
"
Gravitation Wave Interferometer Noi
c
e Calculator
"
,
description
=
"
Gravitation Wave Interferometer Noi
s
e Calculator
"
,
license
=
'
Copyright 2017 LIGO Laboratory
'
,
install_requires
=
[
'
numpy
'
,
...
...
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