Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gstlal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Duncan Macleod
gstlal
Commits
94871415
Commit
94871415
authored
6 years ago
by
Aaron Viets
Browse files
Options
Downloads
Patches
Plain Diff
gstlal-calibration examples: edited plotting script so that it works.
parent
519c5b3d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gstlal-calibration/examples/L1_GDS_CALCS_comparison_plots
+11
-7
11 additions, 7 deletions
gstlal-calibration/examples/L1_GDS_CALCS_comparison_plots
with
11 additions
and
7 deletions
gstlal-calibration/examples/L1_GDS_CALCS_comparison_plots
+
11
−
7
View file @
94871415
#!/usr/bin/env python
import
matplotlib
matplotlib
.
use
(
'
Agg
'
)
from
gwpy.timeseries
import
TimeSeriesDict
from
gwpy.timeseries
import
TimeSeries
import
glob
from
math
import
pi
from
gwpy.plotter
import
BodePlot
import
numpy
from
optparse
import
OptionParser
,
Option
from
glue
import
datafind
parser
=
OptionParser
()
...
...
@@ -23,14 +27,14 @@ start_time = int(options.gps_start_time)
end_time
=
int
(
options
.
gps_end_time
)
# Grab CALCS data
calcs_data
=
TimeSeries
Dict
.
read
(
options
.
raw_frame_cache
,
channels
=
[
'
%s:%
S
'
%
(
options
.
ifo
,
options
.
calcs_channel_name
]
,
start
=
start_time
,
end
=
end_time
)
calcs_data
=
TimeSeries
.
read
(
options
.
raw_frame_cache
,
'
%s:%
s
'
%
(
options
.
ifo
,
options
.
calcs_channel_name
)
,
start
_time
,
end_time
)
# grab GDS/DCS data
gds_data
=
TimeSeries
Dict
.
read
(
options
.
gds_frame_cache
,
channels
=
[
"
%s:%s
"
%
(
options
.
ifo
,
options
.
gds_channel_name
)
]
,
start
=
start_time
,
end
=
end_time
)
gds_data
=
TimeSeries
.
read
(
options
.
gds_frame_cache
,
"
%s:%s
"
%
(
options
.
ifo
,
options
.
gds_channel_name
),
start
_time
,
end_time
)
# make asds
calcs_asd
=
calcs_data
[
"
%s:%s
"
%
(
options
.
ifo
,
options
.
calcs_channel_name
)]
.
asd
(
4
,
2
)
gds_asd
=
gds_data
[
"
%s:%s
"
%
(
options
.
ifo
,
options
.
gds_channel_name
)]
.
asd
(
4
,
2
)
calcs_asd
=
calcs_data
.
asd
(
4
,
2
)
gds_asd
=
gds_data
.
asd
(
4
,
2
)
#dewhiten CALCS
calcs_asd
=
calcs_asd
.
filter
([
30
]
*
6
,
[
0.3
]
*
6
,
1e-12
/
4e3
)
...
...
@@ -45,11 +49,11 @@ ax.set_xlim(10,8192)
ax
.
set_ylim
(
1e-24
,
1e-16
)
plot
.
save
(
'
spectrum_comparison.png
'
)
diff
=
abs
(
calcs_asd
-
gds_asd
)
/
gds_asd
plot
=
diff
.
plot
(
label
=
"
Percent diff
CALCS
vs.
GDS
"
)
diff
=
calcs_asd
/
gds_asd
plot
=
diff
.
plot
(
label
=
"
ASD ratio
CALCS
/
GDS
"
,
logy
=
False
)
ax
=
plot
.
gca
()
ax
.
set_ylabel
=
'
Strain [Hz$^{-1/2}$]
'
ax
.
set_xlabel
=
'
Frequency [Hz]
'
ax
.
set_xlim
(
10
,
5000
)
ax
.
set_ylim
(
0
,
0.5
)
ax
.
set_ylim
(
0
.7
,
1.3
)
plot
.
save
(
'
CALCS_GDS_residual.png
'
)
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