Skip to content
Snippets Groups Projects
Commit 2b9bc70d authored by Patrick Godwin's avatar Patrick Godwin
Browse files

config/inspiral.py: calculate start padding for filtering using FFT length and...

config/inspiral.py: calculate start padding for filtering using FFT length and template duration. load SVD manifest upon initialization
parent a96acd0d
No related branches found
No related tags found
1 merge request!41DAG Workflow Overhaul + OSG DAG support
......@@ -31,7 +31,6 @@ parser.add_argument("-w", "--workflow", default="full", help="Sets the type of w
# load config
args = parser.parse_args()
config = Config.load(args.config)
config.load_svd_manifest(config.svd.manifest)
# create dag
dag = DAG(config)
......
......@@ -31,7 +31,6 @@ parser.add_argument("-w", "--workflow", default="inspiral", help="Sets the type
# load config
args = parser.parse_args()
config = Config.load(args.config)
config.load_svd_manifest(config.svd.manifest)
# create dag
dag = DAG(config)
......
......@@ -17,6 +17,8 @@
import json
from ligo.segments import segment
from gstlal.config import Config as BaseConfig
from gstlal.config import dotdict, replace_keys
......@@ -40,6 +42,17 @@ class Config(BaseConfig):
if "services" in kwargs:
self.services = dotdict(replace_keys(kwargs["services"]))
# load manifest
self.load_svd_manifest(self.svd.manifest)
# calculate start pad for filtering
max_duration = max(svd_bin["max_dur"] for svd_bin in self.svd.stats.bins.values())
self.filter.start_pad = 16 * self.psd.fft_length + max_duration
# create time bins
if self.span != segment(0, 0):
self.create_time_bins(start_pad=self.filter.start_pad)
def load_svd_manifest(self, manifest_file):
with open(manifest_file, "r") as f:
svd_stats = dotdict(replace_keys(json.load(f)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment