function A = hotspin_I_vs_phi( sx, sy, sz, step1, step2, sensor_direction)
% calculate components of I during specimen rotation at the specified sensor location and direction:
% * step1, step2 angle range
% * sx, sy, sz:  position of sensor
% * sensor_direction: 1=sensor x-driection, 2=sensor y-direction, 3=sensor z-direction

% clear A
A=[];

% get X values
X = step1:step2;

% calc Y values for each step
for phi=X
    I = hotspin_I( sx, sy, sz, hotspin_step2rad( phi));
    A=[A;I(sensor_direction,:)];
end