classdef machineparam %MACHINEPARAM holds fixed paramaters for 3D print system % Flat field and Gasussian half width of DMD output % measured with DataRay system. Pixel pitch taken from % stated parameters properties pxIntensity % Centre intensity of a single pixel beam (W/cm^2) gaus2W % Gaussian half width of a single pixel beam (m) rhoX % Pixel pitch in X (m) rhoY % Pixel pitch in Y (m) rho % Square pixel pitch (i.e if rhoX =rhoY) (m) flatF % Flat field intensity (W/cm^2) end methods function flatF = getFlatF(self) centre = [self.rhoX * 9.5, self.rhoY * 9.5]; centreIntensity = 0; for i=1:20 for j=1:20 xPxCentre = self.rhoX * (i-0.5); yPxCentre = self.rhoY * (j-0.5); flag = abs((centre(2)-yPxCentre)./(centre(1)-xPxCentre))<=1; if flag alpha = centre(1) - xPxCentre; else alpha = centre(2) - yPxCentre; end distSq = ((centre(2)-xPxCentre)^2+(centre(1)-yPxCentre)^2); omega = self.gaus2W*(sqrt(distSq)/alpha); if alpha == 0 centreIntensity = centreIntensity + self.pxIntensity; else centreIntensity = centreIntensity + self.pxIntensity*exp(-(2/omega^2)*distSq); end end end flatF = centreIntensity; end end end