function [Struct_new] = Direction45Degrees(Struct)
% function Direction45Degrees(Struct)
% Given a measurement days' Struct, pick up data with theta within -/+45
% degrees

temp_theta = Struct.SaltationSand.theta;
index_theta = intersect(find(temp_theta >= -45), find(temp_theta < 45));

OPC_ID = {'9284','9290','9281','9278','9287'};

% apply the index of N OPCs running
for i = 1:length(OPC_ID)
   for j = 1:7
      temp_x = Struct.(['OPC',OPC_ID{i}]).(['x_bin',num2str(j)]);
      temp_y = Struct.(['OPC',OPC_ID{i}]).(['y_fit_bin',num2str(j)]);
      temp_yerr = Struct.(['OPC',OPC_ID{i}]).(['yerr_fit_bin',num2str(j)]);
      
      Struct_new.(['OPC',OPC_ID{i}]).(['x_bin',num2str(j)]) = temp_x(index_theta);
      Struct_new.(['OPC',OPC_ID{i}]).(['y_fit_bin',num2str(j)]) = temp_y(index_theta);
      Struct_new.(['OPC',OPC_ID{i}]).(['yerr_fit_bin',num2str(j)]) = temp_yerr(index_theta);      
   end
   temp_z_z = Struct.(['OPC',OPC_ID{i}]).z;
   Struct_new.(['OPC',OPC_ID{i}]).z = temp_z_z(index_theta);    
end

Struct_new.SaltationSand.StartTimes = Struct.SaltationSand.StartTimes(index_theta);
Struct_new.SaltationSand.EndTimes = Struct.SaltationSand.EndTimes(index_theta);
Struct_new.SaltationSand.Q = Struct.SaltationSand.Q(index_theta);
Struct_new.SaltationSand.sigma_Q = Struct.SaltationSand.sigma_Q(index_theta);
Struct_new.SaltationSand.ustRe = Struct.SaltationSand.ustRe(index_theta);
Struct_new.SaltationSand.sigma_ustRe = Struct.SaltationSand.sigma_ustRe(index_theta);
Struct_new.SaltationSand.theta = Struct.SaltationSand.theta(index_theta);    

display('%--- function Direction45Degrees() complete ----%');

end