% function scaled_data = Abs_Scat(data, flux, time, ADUperXray, Spec_to_Phos, X_Lambda) % % Converts an I=data(:,2) versus Q=data(:,1) plot into absolute units of % dI/dOmega = fraction of X-rays per unit solid angle scattered into angle theta. % % Returns scaled_data(:,1) = Angle % scaled_data(:,2) = dI/dOmega for that value of theta % % Inputs % data(:,j) ==> Scattering Data % flux --> X-rays per second incident on sample % time --> Length of exposure in seconds. % ADUperXray --> ADU counts per Xray at the detector % Spec_to_Phos --> Distance from detector to sample in pixels % X_Lambda --> Wavelength of X-rays in Angstrom function scaled_data = Abs_Scat(data, flux, time, ADUperXray, Spec_to_Phos, X_Lambda) scaled_data(:,1) = 2 * asin ( data(:,1) * X_Lambda / (4*pi) ); scaled_data(:,2) = data(:,2) * (Spec_to_Phos*Spec_to_Phos) / (ADUperXray * flux * time); scaled_data(:,2) = scaled_data(:,2) ./ (cos( scaled_data(:,1)).*cos( scaled_data(:,1) ));