Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GstLAL
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
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
lscsoft
GstLAL
Commits
e89f2c1b
Commit
e89f2c1b
authored
3 years ago
by
Patrick Godwin
Browse files
Options
Downloads
Patches
Plain Diff
gstlal_fake_frames_workflow: fix issues with padding, frame naming scheme
parent
85756f22
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!41
DAG Workflow Overhaul + OSG DAG support
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gstlal/bin/gstlal_fake_frames_workflow
+1
-0
1 addition, 0 deletions
gstlal/bin/gstlal_fake_frames_workflow
gstlal/python/config/__init__.py
+21
-19
21 additions, 19 deletions
gstlal/python/config/__init__.py
gstlal/python/dags/layers/io.py
+23
-19
23 additions, 19 deletions
gstlal/python/dags/layers/io.py
with
45 additions
and
38 deletions
gstlal/bin/gstlal_fake_frames_workflow
+
1
−
0
View file @
e89f2c1b
...
...
@@ -30,6 +30,7 @@ parser.add_argument("-c", "--config", help="Sets the path to read configuration
# load config
args
=
parser
.
parse_args
()
config
=
Config
.
load
(
args
.
config
)
config
.
create_time_bins
(
start_pad
=
0
,
overlap
=
0
,
one_ifo_only
=
True
)
# create dag
dag
=
DAG
(
config
)
...
...
This diff is collapsed.
Click to expand it.
gstlal/python/config/__init__.py
+
21
−
19
View file @
e89f2c1b
...
...
@@ -150,29 +150,31 @@ class Config:
start_pad
=
512
,
overlap
=
512
,
min_instruments
=
1
,
one_ifo_only
=
False
,
one_ifo_length
=
(
3600
*
8
)
):
self
.
time_boundaries
=
segutil
.
split_segments_by_lock
(
self
.
ifos
,
self
.
segments
,
self
.
span
)
self
.
time_bins
=
segmentlistdict
()
for
span
in
self
.
time_boundaries
:
analysis_segs
=
segutil
.
analysis_segments
(
self
.
ifos
,
self
.
segments
,
span
,
start_pad
=
start_pad
,
overlap
=
overlap
,
min_instruments
=
min_instruments
,
one_ifo_length
=
one_ifo_length
,
)
self
.
time_bins
.
extend
(
analysis_segs
)
self
.
one_ifo_time_bins
=
segmentlistdict
()
for
span
in
self
.
time_boundaries
:
time_bin
=
segmentlistdict
()
for
ifo
,
segs
in
self
.
segments
.
items
():
segs
=
segs
&
segmentlist
([
span
])
time_bin
[
ifo
]
=
segutil
.
split_segments
(
segs
,
one_ifo_length
,
start_pad
)
self
.
one_ifo_time_bins
.
extend
(
time_bin
)
if
not
one_ifo_only
:
for
span
in
self
.
time_boundaries
:
analysis_segs
=
segutil
.
analysis_segments
(
self
.
ifos
,
self
.
segments
,
span
,
start_pad
=
start_pad
,
overlap
=
overlap
,
min_instruments
=
min_instruments
,
one_ifo_length
=
one_ifo_length
,
)
self
.
time_bins
.
extend
(
analysis_segs
)
else
:
for
span
in
self
.
time_boundaries
:
time_bin
=
segmentlistdict
()
for
ifo
,
segs
in
self
.
segments
.
items
():
ifo_key
=
frozenset
([
ifo
])
segs
=
segs
&
segmentlist
([
span
])
time_bin
[
ifo_key
]
=
segutil
.
split_segments
(
segs
,
one_ifo_length
,
start_pad
)
self
.
time_bins
.
extend
(
time_bin
)
@staticmethod
def
to_ifo_list
(
ifos
):
...
...
This diff is collapsed.
Click to expand it.
gstlal/python/dags/layers/io.py
+
23
−
19
View file @
e89f2c1b
...
...
@@ -28,19 +28,18 @@ def create_frames_layer(config, dag, psd_cache):
requirements
=
{
"
request_cpus
"
:
2
,
"
request_memory
"
:
2000
,
**
config
.
condor
.
submit
}
layer
=
Layer
(
"
gstlal_fake_frames
"
,
requirements
=
requirements
)
frame_cache
=
DataCache
.
generate
(
DataType
.
FRAMES
,
config
.
ifos
,
config
.
one_ifo_
time_bins
)
frame_cache
=
DataCache
.
generate
(
DataType
.
FRAMES
,
config
.
ifo
_combo
s
,
config
.
time_bins
,
create_dirs
=
False
)
# if given a single PSD, assign this to all times
if
len
(
psd_cache
)
==
1
:
psds
=
{
span
:
psd_cache
for
span
in
config
.
time_bins
}
psds
=
{
key
:
psd_cache
for
key
in
frame_cache
.
groupby
(
"
ifo
"
,
"
time
"
).
keys
()
}
else
:
psds
=
psd_cache
.
groupby
(
"
time
"
)
psds
=
psd_cache
.
groupby
(
"
ifo
"
,
"
time
"
)
# set options
common_opts
=
[
Option
(
"
data-source
"
,
"
frames
"
),
Option
(
"
frame-segments-name
"
,
config
.
source
.
frame_segments_name
),
Option
(
"
frame-segments-file
"
,
config
.
source
.
frame_segments_file
),
Option
(
"
data-find-server
"
,
config
.
source
.
data_find_server
),
]
if
config
.
frames
.
injections
:
...
...
@@ -56,24 +55,29 @@ def create_frames_layer(config, dag, psd_cache):
if
config
.
frames
.
frames_per_file
:
common_opts
.
append
(
Option
(
"
output-frames-per-file
"
,
config
.
frames
.
frames_per_file
))
for
(
ifo
,
span
),
frames
in
frame_cache
.
groupby
(
"
ifo
"
,
"
time
"
).
items
():
for
(
ifo_combo
,
span
),
frames
in
frame_cache
.
groupby
(
"
ifo
"
,
"
time
"
).
items
():
ifos
=
config
.
to_ifo_list
(
ifo_combo
)
start
,
end
=
span
frame_opts
=
[
Option
(
"
gps-start-time
"
,
int
(
start
)),
Option
(
"
gps-end-time
"
,
int
(
end
)),
Option
(
"
channel-name
"
,
f
"
{
ifo
}
=
{
config
.
source
.
channel_name
[
ifo
]
}
"
),
Option
(
"
frame-type
"
,
f
"
{
ifo
}
=
{
config
.
source
.
frame_type
[
ifo
]
}
"
),
Option
(
"
output-frame-type
"
,
f
"
{
ifo
}
=
{
config
.
frames
.
output_frame_type
[
ifo
]
}
"
),
Option
(
"
output-channel-name
"
,
f
"
{
ifo
}
=
{
config
.
frames
.
output_channel_name
[
ifo
]
}
"
)
]
frame_opts
.
extend
(
common_opts
)
for
ifo
in
ifos
:
frame_opts
=
[
Option
(
"
gps-start-time
"
,
int
(
start
)),
Option
(
"
gps-end-time
"
,
int
(
end
)),
Option
(
"
channel-name
"
,
f
"
{
ifo
}
=
{
config
.
source
.
channel_name
[
ifo
]
}
"
),
Option
(
"
frame-type
"
,
f
"
{
ifo
}
=
{
config
.
source
.
frame_type
[
ifo
]
}
"
),
Option
(
"
output-channel-name
"
,
f
"
{
ifo
}
=
{
config
.
frames
.
output_channel_name
[
ifo
]
}
"
),
Option
(
"
output-frame-type
"
,
f
"
{
ifo
}
_
{
config
.
frames
.
output_frame_type
[
ifo
]
}
"
),
]
frame_opts
.
extend
(
common_opts
)
layer
+=
Node
(
arguments
=
frame_opts
,
inputs
=
Option
(
"
whiten-reference-psd
"
,
psds
[
span
].
files
),
outputs
=
Option
(
"
output-path
"
,
config
.
frames
.
get
(
"
output_path
"
,
os
.
getcwd
()))
)
layer
+=
Node
(
arguments
=
frame_opts
,
inputs
=
[
Option
(
"
whiten-reference-psd
"
,
psds
[(
ifo_combo
,
span
)].
files
),
Option
(
"
frame-segments-file
"
,
config
.
source
.
frame_segments_file
),
],
outputs
=
Option
(
"
output-path
"
,
config
.
frames
.
get
(
"
output_path
"
,
"
frames
"
))
)
dag
.
attach
(
layer
)
return
frame_cache
...
...
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