Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
L
lvcnrpy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
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
waveforms
lvcnrpy
Commits
f2b37d32
Commit
f2b37d32
authored
Jul 13, 2018
by
Edward Fauchon-Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rtn invalid dep for phase-sense if no data < 0M
parent
5a5b921b
Pipeline
#25147
passed with stage
in 2 minutes and 7 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
lvcnrpy/format/specs.py
lvcnrpy/format/specs.py
+3
-0
lvcnrpy/test/test_lvcnrcheck.py
lvcnrpy/test/test_lvcnrcheck.py
+26
-0
No files found.
lvcnrpy/format/specs.py
View file @
f2b37d32
...
@@ -924,6 +924,9 @@ class PhaseSense(InterfieldSpec):
...
@@ -924,6 +924,9 @@ class PhaseSense(InterfieldSpec):
# Determine sense from middle of pre-merger waveform
# Determine sense from middle of pre-merger waveform
phase
=
np
.
array
([
sim
[
'phase_l2_m2/X'
][:],
sim
[
'phase_l2_m2/Y'
][:]])
phase
=
np
.
array
([
sim
[
'phase_l2_m2/X'
][:],
sim
[
'phase_l2_m2/Y'
][:]])
t0
=
phase
[
0
][
0
]
*
(
3.0
/
4.0
)
t0
=
phase
[
0
][
0
]
*
(
3.0
/
4.0
)
if
t0
>=
0
:
self
.
invalidMsg
=
"no (2,2) phase before 0M"
return
err
.
InvalidInterfields
(
self
)
t1
=
t0
*
(
1.0
/
3.0
)
t1
=
t0
*
(
1.0
/
3.0
)
X
=
np
.
arange
(
t0
,
t1
,
0.1
)
X
=
np
.
arange
(
t0
,
t1
,
0.1
)
Y
=
IUS
(
*
phase
,
k
=
5
)(
X
)
Y
=
IUS
(
*
phase
,
k
=
5
)(
X
)
...
...
lvcnrpy/test/test_lvcnrcheck.py
View file @
f2b37d32
...
@@ -1898,3 +1898,29 @@ class TestPhaseSense(TestInterfield):
...
@@ -1898,3 +1898,29 @@ class TestPhaseSense(TestInterfield):
(
output
,
returncode
)
=
helper
.
lvcnrcheck
([
'-f'
,
'3'
,
self
.
f
.
name
],
returncode
=
True
)
(
output
,
returncode
)
=
helper
.
lvcnrcheck
([
'-f'
,
'3'
,
self
.
f
.
name
],
returncode
=
True
)
assert
output
.
strip
()
==
self
.
output
assert
output
.
strip
()
==
self
.
output
assert
returncode
==
1
assert
returncode
==
1
def
test_invalid_phase_zero_inspiral
(
self
):
self
.
setOutput
(
(
'- [INVALID FIELDS] phase-sense '
'(Field dependencies are invalid)'
))
nr
=
h5
.
File
(
self
.
f
.
name
)
nr
[
'phase_l2_m2'
][
'X'
][:]
-=
nr
[
'phase_l2_m2'
][
'X'
][
0
]
nr
.
close
()
(
output
,
returncode
)
=
helper
.
lvcnrcheck
([
'-f'
,
'3'
,
self
.
f
.
name
],
returncode
=
True
)
assert
output
.
strip
()
==
self
.
output
assert
returncode
==
1
def
test_invalid_phase_positive_inspiral
(
self
):
self
.
setOutput
(
(
'- [INVALID FIELDS] phase-sense '
'(Field dependencies are invalid)'
))
nr
=
h5
.
File
(
self
.
f
.
name
)
nr
[
'phase_l2_m2'
][
'X'
][:]
+=
10.0
-
nr
[
'phase_l2_m2'
][
'X'
][
0
]
nr
.
close
()
(
output
,
returncode
)
=
helper
.
lvcnrcheck
([
'-f'
,
'3'
,
self
.
f
.
name
],
returncode
=
True
)
assert
output
.
strip
()
==
self
.
output
assert
returncode
==
1
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