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
354e2f7e
Commit
354e2f7e
authored
6 years ago
by
Ryan Michael Magee
Browse files
Options
Downloads
Patches
Plain Diff
Changed to set logic in function group_T050017_filename_from_T050017_files
parent
7d26f033
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-inspiral/python/inspiral_pipe.py
+3
-8
3 additions, 8 deletions
gstlal-inspiral/python/inspiral_pipe.py
with
3 additions
and
8 deletions
gstlal-inspiral/python/inspiral_pipe.py
+
3
−
8
View file @
354e2f7e
...
...
@@ -425,12 +425,7 @@ def group_T050017_filename_from_T050017_files(cache_entries, extension, path = N
files from H1 and template bank files from L1.
"""
# Check that every file has same observatory.
observatories
=
[
cache_entries
[
0
].
observatory
]
for
entry
in
cache_entries
[
1
:]:
if
entry
.
observatory
==
observatories
[
0
]:
break
observatories
.
append
(
entry
.
observatory
)
observatories
=
''
.
join
(
sorted
(
list
(
set
([
cache_entry
.
observatory
for
cache_entry
in
cache_entries
]))))
split_description
=
cache_entries
[
0
].
description
.
split
(
'
_
'
)
min_bin
=
[
x
for
x
in
split_description
[:
2
]
if
x
.
isdigit
()]
max_bin
=
[
x
for
x
in
cache_entries
[
-
1
].
description
.
split
(
'
_
'
)[:
2
]
if
x
.
isdigit
()]
...
...
@@ -448,14 +443,14 @@ def group_T050017_filename_from_T050017_files(cache_entries, extension, path = N
# all of the DIST_STATS files from a given background bin and
# then CREATE_PRIOR_DIST_STATS files which are not generated
# for specific bins
return
T050017_filename
(
''
.
join
(
observatories
)
,
cache_entries
[
0
].
description
,
seg
,
extension
,
path
=
path
)
return
T050017_filename
(
observatories
,
cache_entries
[
0
].
description
,
seg
,
extension
,
path
=
path
)
elif
min_bin
and
max_bin
and
min_bin
!=
max_bin
:
if
split_description
[
1
].
isdigit
():
description_base
=
split_description
[
2
:]
else
:
description_base
=
split_description
[
1
:]
# Files from different bins, thus segments must be same
return
T050017_filename
(
''
.
join
(
observatories
)
,
'
_
'
.
join
([
min_bin
,
max_bin
]
+
description_base
),
seg
,
extension
,
path
=
path
)
return
T050017_filename
(
observatories
,
'
_
'
.
join
([
min_bin
,
max_bin
]
+
description_base
),
seg
,
extension
,
path
=
path
)
else
:
print
>>
sys
.
stderr
,
"
ERROR: first and last file of cache file do not match known pattern, cannot name group file under T050017 convention.
\n
File 1: %s
\n
File 2: %s
"
%
(
cache_entries
[
0
].
path
,
cache_entries
[
-
1
].
path
)
raise
ValueError
...
...
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