diff --git a/osc.c b/osc.c index 93f50240e..5574dc9b0 100644 --- a/osc.c +++ b/osc.c @@ -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++) diff --git a/oscplot.c b/oscplot.c index 87bcd5194..1103e20b7 100644 --- a/oscplot.c +++ b/oscplot.c @@ -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;