Skip to content
Snippets Groups Projects
Commit f0c08260 authored by Aaron Viets's avatar Aaron Viets
Browse files

gstlal-calibration: new element lal_dqtukey that reads in a bit vector and...

gstlal-calibration:  new element lal_dqtukey that reads in a bit vector and outputs a stream that makes smooth transitions between zero and one based on the bit vector.
parent 765b0c8a
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,8 @@ lib@GSTPLUGINPREFIX@gstlalcalibration_la_SOURCES = \ ...@@ -16,7 +16,8 @@ lib@GSTPLUGINPREFIX@gstlalcalibration_la_SOURCES = \
gstlal_fccupdate.c gstlal_fccupdate.h \ gstlal_fccupdate.c gstlal_fccupdate.h \
gstlal_transferfunction.c gstlal_transferfunction.h \ gstlal_transferfunction.c gstlal_transferfunction.h \
gstlal_trackfrequency.c gstlal_trackfrequency.h \ gstlal_trackfrequency.c gstlal_trackfrequency.h \
gstlal_adaptivefirfilt.c gstlal_adaptivefirfilt.h gstlal_adaptivefirfilt.c gstlal_adaptivefirfilt.h \
gstlal_dqtukey.c gstlal_dqtukey.h
lib@GSTPLUGINPREFIX@gstlalcalibration_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS) lib@GSTPLUGINPREFIX@gstlalcalibration_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS)
lib@GSTPLUGINPREFIX@gstlalcalibration_la_CFLAGS = $(AM_CFLAGS) $(LAL_CFLAGS) $(GSTLAL_CFLAGS) $(gstreamer_CFLAGS) $(gstreamer_audio_CFLAGS) lib@GSTPLUGINPREFIX@gstlalcalibration_la_CFLAGS = $(AM_CFLAGS) $(LAL_CFLAGS) $(GSTLAL_CFLAGS) $(gstreamer_CFLAGS) $(gstreamer_audio_CFLAGS)
lib@GSTPLUGINPREFIX@gstlalcalibration_la_LDFLAGS = $(AM_LDFLAGS) $(LAL_LIBS) $(GSTLAL_LIBS) $(PYTHON_LIBS) $(gstreamer_LIBS) $(gstreamer_audio_LIBS) $(GSTLAL_PLUGIN_LDFLAGS) lib@GSTPLUGINPREFIX@gstlalcalibration_la_LDFLAGS = $(AM_LDFLAGS) $(LAL_LIBS) $(GSTLAL_LIBS) $(PYTHON_LIBS) $(gstreamer_LIBS) $(gstreamer_audio_LIBS) $(GSTLAL_PLUGIN_LDFLAGS)
This diff is collapsed.
/*
* Copyright (C) 2018 Aaron Viets <aaron.viets@ligo.org>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __GSTLAL_DQTUKEY_H__
#define __GSTLAL_DQTUKEY_H__
#include <glib.h>
#include <gst/gst.h>
#include <gst/base/gstbasetransform.h>
G_BEGIN_DECLS
#define GSTLAL_DQTUKEY_TYPE \
(gstlal_dqtukey_get_type())
#define GSTLAL_DQTUKEY(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GSTLAL_DQTUKEY_TYPE, GSTLALDQTukey))
#define GSTLAL_DQTUKEY_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GSTLAL_DQTUKEY_TYPE, GSTLALDQTukeyClass))
#define GST_IS_GSTLAL_DQTUKEY(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GSTLAL_DQTUKEY_TYPE))
#define GST_IS_GSTLAL_DQTUKEY_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GSTLAL_DQTUKEY_TYPE))
typedef struct _GSTLALDQTukey GSTLALDQTukey;
typedef struct _GSTLALDQTukeyClass GSTLALDQTukeyClass;
/*
* GSTLALDQTukey:
*/
struct _GSTLALDQTukey {
GstBaseTransform element;
/* stream info */
gint rate_in;
gint rate_out;
gint unit_size_in;
gint unit_size_out;
gboolean sign;
gint num_cycle_in;
gint num_cycle_out;
/* timestamp book-keeping */
GstClockTime t0;
guint64 offset0;
guint64 next_in_offset;
guint64 next_out_offset;
gboolean need_discont;
/* internal state */
enum gstlal_dqtukey_state {
START = 0,
ONES,
ZEROS,
RAMP_UP,
RAMP_DOWN,
DOUBLE_RAMP
} state;
gint64 ramp_up_index;
gint64 ramp_down_index;
gint64 num_leftover;
gint64 num_since_bad;
void *ramp;
/* properties */
guint32 required_on;
guint32 required_off;
guint32 required_on_xor_off;
gint64 transition_samples;
gboolean invert_window;
gboolean invert_control;
};
/*
* GSTLALDQTukeyClass:
* @parent_class: the parent class
*/
struct _GSTLALDQTukeyClass {
GstBaseTransformClass parent_class;
};
GType gstlal_dqtukey_get_type(void);
G_END_DECLS
#endif /* __GSTLAL_DQTUKEY_H__ */
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
#include <gstlal_transferfunction.h> #include <gstlal_transferfunction.h>
#include <gstlal_trackfrequency.h> #include <gstlal_trackfrequency.h>
#include <gstlal_adaptivefirfilt.h> #include <gstlal_adaptivefirfilt.h>
#include <gstlal_dqtukey.h>
/* /*
...@@ -97,6 +98,7 @@ static gboolean plugin_init(GstPlugin *plugin) ...@@ -97,6 +98,7 @@ static gboolean plugin_init(GstPlugin *plugin)
{"lal_transferfunction", GSTLAL_TRANSFERFUNCTION_TYPE}, {"lal_transferfunction", GSTLAL_TRANSFERFUNCTION_TYPE},
{"lal_trackfrequency", GSTLAL_TRACKFREQUENCY_TYPE}, {"lal_trackfrequency", GSTLAL_TRACKFREQUENCY_TYPE},
{"lal_adaptivefirfilt", GSTLAL_ADAPTIVEFIRFILT_TYPE}, {"lal_adaptivefirfilt", GSTLAL_ADAPTIVEFIRFILT_TYPE},
{"lal_dqtukey", GSTLAL_DQTUKEY_TYPE},
{NULL, 0}, {NULL, 0},
}; };
......
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