aboutsummaryrefslogtreecommitdiff
path: root/src/test-find-peaks.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test-find-peaks.c')
-rw-r--r--src/test-find-peaks.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test-find-peaks.c b/src/test-find-peaks.c
index dd3a9d8..5570619 100644
--- a/src/test-find-peaks.c
+++ b/src/test-find-peaks.c
@@ -176,6 +176,7 @@ void usage(void)
fprintf(stderr,"Usage: ./test-find-peaks [options] FILENAME\n");
fprintf(stderr," -n number of peaks to plot\n");
fprintf(stderr," --plot plot hough transform\n");
+ fprintf(stderr," --gtid only fit a single GTID\n");
fprintf(stderr," -h display this help message\n");
exit(1);
}
@@ -197,12 +198,16 @@ int main(int argc, char **argv)
int plot = 0;
int status;
double t0;
+ int32_t gtid = -1;
for (i = 1; i < argc; i++) {
if (strlen(argv[i]) >= 2 && !strncmp(argv[i], "--", 2)) {
if (!strcmp(argv[i]+2,"plot")) {
plot = 1;
continue;
+ } else if (!strcmp(argv[i]+2,"gtid")) {
+ gtid = atoi(argv[++i]);
+ continue;
}
} else if (argv[i][0] == '-') {
switch (argv[i][1]) {
@@ -327,6 +332,8 @@ int main(int argc, char **argv)
ev.run = bev.run;
ev.gtid = bev.gtr_id;
+ if (gtid > 0 && ev.gtid != gtid) continue;
+
rv = get_event(f,&ev,&b);
pos[0] = bmcvx.x;