Pnull = fltarr(100000) ; this is the interpolated density of null points
zzz = findgen(100)/2. ;Height array
zz = findgen(100000L)/2000. ;Height array for interpolation
gzz = interpol(gz,zzz,zz,/spline) ; interpolating g(z)
qq = interpol(q,zzz,zz,/spline) ; interpolating q(z)
for i = 3000L,99999L do begin ;
Pnull[i]=gzz[i]*(qq[i])^3
endfor
tot_nulls = int_tabulated(zz,pnull) ; column density of nulls
end