function [instr_mag,dmag] = jasnost(x,y,r)    %[x,y] - pozicia centra, r - polomer v manhattenskej metrike
load m44.dat
n = (2*r+1)^2;
intensity = sum(sum(m44(x-r:x+r,y-r:y+r)))-1722*n;
dI = sqrt(n)*197;
instr_mag = -2.5*log10(intensity);
dmag = 2.5*log10(intensity+dI)+instr_mag;
end

