Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
R
research-projects-RIT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Richard O'Shaughnessy
research-projects-RIT
Commits
8f726ccb
Commit
8f726ccb
authored
Jan 21, 2019
by
Richard O'Shaughnessy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generate*psd : used in test cases, needed to be upgraded to modern code
parent
2d88c23c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
MonteCarloMarginalizeCode/data/generate_aligo_psd
MonteCarloMarginalizeCode/data/generate_aligo_psd
+7
-7
MonteCarloMarginalizeCode/data/generate_iligo_psd
MonteCarloMarginalizeCode/data/generate_iligo_psd
+5
-7
No files found.
MonteCarloMarginalizeCode/data/generate_aligo_psd
View file @
8f726ccb
...
...
@@ -4,18 +4,16 @@ import lalsimulation
from
glue.ligolw
import
utils
from
pylal.series
import
make_psd_xmldoc
from
pylal.xlal.datatypes.ligotimegps
import
LIGOTimeGPS
from
pylal.xlal.datatypes.real8frequencyseries
import
REAL8FrequencySeries
from
pylal.xlal.datatypes.lalunit
import
LALUnit
from
lal.series
import
make_psd_xmldoc
import
lal
from
optparse
import
OptionParser
optp
=
OptionParser
()
optp
.
add_option
(
"-n"
,
"--nyquist"
,
type
=
float
,
default
=
2048.0
,
help
=
"Set the nyquist frequency of the PSD. Default is 2048 Hz."
)
optp
.
add_option
(
"-d"
,
"--delta-f"
,
type
=
float
,
default
=
1.0
/
16
,
help
=
"Set frequency bin size in Hz. Default is 1/16 Hz."
)
optp
.
add_option
(
"-f"
,
"--low-frequency"
,
type
=
float
,
default
=
0.0
,
help
=
"Set the low frequency in Hz of the output PSD. Default is zero."
)
#optp.add_option( "--ifo", type=str, default="H1", help="Set the low frequency in Hz of the output PSD. Default is zero.")
opts
,
args
=
optp
.
parse_args
()
# Generate iLIGO PSD
...
...
@@ -26,10 +24,12 @@ psd = numpy.array(map(lalsimulation.SimNoisePSDaLIGOZeroDetHighPower, f))
psd
[
0
]
=
0
# Generate the frequency series
epoch
=
LIGOTimeGPS
(
0.0
)
epoch
=
lal
.
LIGOTimeGPS
(
0.0
)
psddict
=
{}
d
=
opts
.
ifo
for
d
in
[
"H1"
,
"L1"
,
"V1"
]:
psd_s
=
REAL8FrequencySeries
(
name
=
"aLIGO PSD"
,
epoch
=
epoch
,
f0
=
f0
,
deltaF
=
df
,
sampleUnits
=
LALUnit
(
""
),
data
=
psd
)
psd_s
=
lal
.
CreateREAL8FrequencySeries
(
name
=
d
,
epoch
=
epoch
,
f0
=
f0
,
deltaF
=
df
,
sampleUnits
=
"s"
,
length
=
len
(
psd
))
psd_s
.
data
.
data
=
psd
psddict
[
d
]
=
psd_s
xmldoc
=
make_psd_xmldoc
(
psddict
)
...
...
MonteCarloMarginalizeCode/data/generate_iligo_psd
View file @
8f726ccb
...
...
@@ -4,11 +4,8 @@ import lalsimulation
from
glue.ligolw
import
utils
from
pylal.series
import
make_psd_xmldoc
from
pylal.xlal.datatypes.ligotimegps
import
LIGOTimeGPS
from
pylal.xlal.datatypes.real8frequencyseries
import
REAL8FrequencySeries
from
pylal.xlal.datatypes.lalunit
import
LALUnit
from
lal.series
import
make_psd_xmldoc
import
lal
from
optparse
import
OptionParser
...
...
@@ -26,10 +23,11 @@ psd = numpy.array(map(lalsimulation.SimNoisePSDiLIGOSRD, f))
psd
[
0
]
=
0
# Generate the frequency series
epoch
=
LIGOTimeGPS
(
0.0
)
epoch
=
lal
.
LIGOTimeGPS
(
0.0
)
psddict
=
{}
for
d
in
[
"H1"
,
"L1"
,
"V1"
]:
psd_s
=
REAL8FrequencySeries
(
name
=
"iLIGO PSD"
,
epoch
=
epoch
,
f0
=
f0
,
deltaF
=
df
,
sampleUnits
=
LALUnit
(
""
),
data
=
psd
)
psd_s
=
lal
.
CreateREAL8FrequencySeries
(
name
=
d
,
epoch
=
epoch
,
f0
=
f0
,
deltaF
=
df
,
sampleUnits
=
"s"
,
length
=
len
(
psd
))
psd_s
.
data
.
data
=
psd
psddict
[
d
]
=
psd_s
xmldoc
=
make_psd_xmldoc
(
psddict
)
...
...
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