=== Step 1: Use GstLAL in your python script === * Include the following part in your python script to use GstLAL {{{#!python import sys import gi gi.require_version('Gst', '1.0') from gi.repository import GObject, Gst GObject.threads_init() Gst.init(None) from gstlal import pipeparts as pp from gstlal import calibration_parts as cp from gstlal import simplehandler from gstlal import datasource }}} * Initialize your pipeline {{{#!python pipeline = Gst.Pipeline(name=pname) mainloop = GObject.MainLoop() handler = simplehandler.Handler(mainloop, pipeline) }}} * Put your pipeline description {{{ ... }}} * Run your pipeline where you need to specify gps_start_time and gps_end_time {{{#!python print >>sys.stderr, "seeking GPS start and stop times ..." if pipeline.set_state(Gst.State.READY) != Gst.StateChangeReturn.SUCCESS: raise RuntimeError("pipeline failed to enter READY state") datasource.pipeline_seek_for_gps(pipeline, gps_start_time, gps_end_time) print >>sys.stderr, "setting pipeline state to playing ..." if pipeline.set_state(Gst.State.PLAYING) != Gst.StateChangeReturn.SUCCESS: raise RuntimeError("pipeline failed to enter PLAYING state") else: print >>sys.stderr, "set to playing successfully" print >>sys.stderr, "running pipeline ..." mainloop.run() if pipeline.set_state(Gst.State.NULL) != Gst.StateChangeReturn.SUCCESS: raise RuntimeError("pipeline could not be set to NULL") }}} * [[KAGRA/Subgroups/CAL/GstLAL/tutorials/step2|(Next) Step 2: Dump lock flags from a frame cache file]] * [[KAGRA/Subgroups/CAL/GstLAL/tutorials/step0|(Prev) Step 0: Make a frame cache file]] * [[KAGRA/Subgroups/CAL/GstLAL/tutorials|Tutorials]]