Skip to content

Commit

Permalink
Osc: Fix the cross-correlation transform.
Browse files Browse the repository at this point in the history
     It was taking the channel arguments in the wrong order.
  • Loading branch information
dNechita committed Apr 22, 2014
1 parent 23c32be commit 8ee841c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions osc.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,8 @@ void cross_correlation_transform_function(Transform *tr, gboolean init_transform
return;
}
for (i = 0; i < axis_length; i++) {
settings->signal_a[i] = i_0[i] + I * q_0[i];
settings->signal_b[i] = i_1[i] + I * q_1[i];
settings->signal_a[i] = q_0[i] + I * i_0[i];
settings->signal_b[i] = q_1[i] + I * i_1[i];
}
xcorr(settings->signal_a, settings->signal_b, settings->xcorr_data, axis_length);
for (i = 0; i < 2 * axis_length - 1; i++)
Expand Down
2 changes: 1 addition & 1 deletion oscplot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ static void channels_transform_assignment(GtkTreeModel *model,
else if (!prm->ch_4th_ref)
prm->ch_4th_ref = ch_ref;
else
add_transform_to_list(prm->plot, ch_ref, prm->ch_pair_ref, prm->ch_3rd_ref, prm->ch_4th_ref, CROSS_CORRELATION_TRANSFORM, settings);
add_transform_to_list(prm->plot, prm->ch_pair_ref, prm->ch_3rd_ref, prm->ch_4th_ref, ch_ref, CROSS_CORRELATION_TRANSFORM, settings);
}
default:
break;
Expand Down

0 comments on commit 8ee841c

Please sign in to comment.