From 8ae1de1e63855b2a14e87f2240dd578e9ab5db38 Mon Sep 17 00:00:00 2001 From: Aaron Viets <aaron.viets@ligo.org> Date: Wed, 13 Jan 2021 14:23:45 -0800 Subject: [PATCH] lal_stdev: bug fix for mode type --- gstlal-calibration/gst/lal/gstlal_stdev.c | 34 ++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/gstlal-calibration/gst/lal/gstlal_stdev.c b/gstlal-calibration/gst/lal/gstlal_stdev.c index 052b26e5a0..4985ae0ed5 100644 --- a/gstlal-calibration/gst/lal/gstlal_stdev.c +++ b/gstlal-calibration/gst/lal/gstlal_stdev.c @@ -58,6 +58,38 @@ #include <gstlal_stdev.h> +/* + * ============================================================================ + * + * Custom Types + * + * ============================================================================ + */ + + +/* + * mode enum + */ + + +GType gstlal_stdev_mode_get_type(void) { + + static GType type = 0; + + if(!type) { + static GEnumValue values[] = { + {GSTLAL_STDEV_ABSOLUTE, "GSTLAL_STDEV_ABSOLUTE", "Compute the absolute uncertainty"}, + {GSTLAL_STDEV_RELATIVE, "GSTLAL_STDEV_RELATIVE", "Compute the relative uncertainty"}, + {0, NULL, NULL} + }; + + type = g_enum_register_static("GSTLAL_STDEV_MODE", values); + } + + return type; +} + + /* * ============================================================================ * @@ -833,7 +865,7 @@ static void gstlal_stdev_class_init(GSTLALStDevClass *klass) { g_param_spec_enum( "mode", "Standard Deviation Mode", - "Whether to compute the absolute or relative error", + "Whether to compute the absolute or relative uncertainty", GSTLAL_STDEV_MODE, GSTLAL_STDEV_ABSOLUTE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT -- GitLab