function inv_sig_crit, zq ;Purpose: to determine the inverse sigma crit as a function of redshift ;Input: redshift ;Output: inv_sig_crit(z) ;This program is a function that provides the inv_sig_crit at a ;certain redshift. ;Calling Sequence: print,inv_sig_crit(z) ;must specify z as a variable or a single value ;To Plot: make z an array ;plot,z,inv_sig_crit(z) n=n_elements(zq) num=100 z=findgen(num)/(num-1)+0.001 P=rho_gal(z,/dif) sci_mean=fltarr(n) for i=0L, n-1 do begin zi=zq[i] sci=sigcritinv_w(z,zi) totP=total(P) sci_mean[i]=total(P*sci)/totP endfor return,sci_mean end