function [long_ratio, short_ratio]  = ScalingRatioByMoments(d_array_moving,d_array_target)

% scaling factors from moments

long_moment_moving = mean(d_array_moving(:,1),1);
short_moment_moving = mean(mean(d_array_moving(:,2:3),2));

long_moment_target = mean(d_array_target(:,1),1);
short_moment_target = mean(mean(d_array_target(:,2:3),2));

ratio_1 = long_moment_target/long_moment_moving;
ratio_2 = (short_moment_target - long_moment_target/2)/(short_moment_moving - long_moment_moving/2);

long_ratio = (ratio_1^(-2/10))*(ratio_2^(4/10));
short_ratio = (ratio_1^(3/10))*(ratio_2^(-1/10));