def __init__(self, shape=None, zrange=None, laser_wavelength=<NUM_LIT>, zslab=<NUM_LIT:0.>,<EOL>zscale=<NUM_LIT:1.0>, kfki=<NUM_LIT>, n2n1=<NUM_LIT>/<NUM_LIT>, alpha=<NUM_LIT>, polar_angle=<NUM_LIT:0.>,<EOL>pxsize=<NUM_LIT>, support_factor=<NUM_LIT:2>, normalize=False, sigkf=<NUM_LIT:0.0>,<EOL>nkpts=None, cutoffval=None, measurement_iterations=None,<EOL>k_dist='<STR_LIT>', use_J1=True, sph6_ab=None, global_zscale=False,<EOL>cutbyval=False, cutfallrate=<NUM_LIT>, cutedgeval=<NUM_LIT>,<EOL>*args, **kwargs):
super(ExactPinholeConfocalPSF, self).__init__(shape=shape,<EOL>zrange=zrange, laser_wavelength=laser_wavelength, zslab=zslab,<EOL>zscale=zscale, kfki=kfki, n2n1=n2n1, alpha=alpha, pxsize=<EOL>pxsize, polar_angle=polar_angle, support_factor=support_factor,<EOL>normalize=normalize, sigkf=sigkf, nkpts=nkpts, cutoffval=<EOL>cutoffval, measurement_iterations= measurement_iterations,<EOL>k_dist=k_dist, use_J1=use_J1, sph6_ab=sph6_ab, global_zscale=<EOL>global_zscale, cutbyval=cutbyval, cutfallrate=cutfallrate,<EOL>cutedgeval=cutedgeval, *args, **kwargs)<EOL>
PSF for a pinhole confocal microscopes that can be used with the
peri framework.  Calculates the spatially varying point spread
function for confocal microscopes and allows them to be applied to
images as a convolution.

This PSF assumes that the z extent is large compared to the image size
and so calculates the local PSF for every z layer in the image.

Parameters
----------
shape : tuple
    Shape of the image in (z,y,x) pixel numbers (to be deprecated)

zrange : tuple
    range of z pixels over which we should calculate the psf, good pixels
    being zrange[0] <= z <= zrange[1]. currently must be set to the interior
    of the image, so [state.pad, state.image.shape[0] - state.pad]

laser_wavelength : float
    wavelength of light in um of the incoming laser light

zslab : float
    Pixel position of the optical interface where 0 is the edge of the
    image in the z direction

zscale : float
    Scaling of the z pixel size, so that each pixel is located at
    zscale*(z - zint), such that the interface does not move with zscale

kfki : float
    Ratio of outgoing to incoming light wavevectors, 2\pi/\lambda

n2n1 : float
    Ratio of the index mismatch across the optical interface. For typical
    glass with glycerol/water 80/20 mixture this is 1.4/1.518

alpha : float
    Aperture of the lens in radians, set by arcsin(n2n1)?

polar_angle : float
    the angle of the light polarization with respect to the scanning axis

pxsize : float
    the size of a xy pixel in um, defaults to cohen group size 0.125 um

support_factor : integer
    size of the support

normalize : boolean
    if True, use the normalization as calculated by the PSF instead of
    unit normalization

sigkf : float
    Width of wavelengths to use in the polychromatic psf, None is
    monochromatic. Values for kfki = kfki +- sigkf, unitless

nkpts : integer
    number of integration points to use for the polychromatic psf

cutoffval : float
    Percentage of peak psf value to cutoff using a 3-axis
    exp(-(r-r0)**4) function where r0 is determined by cutoffval. A
    good value for this is the bit depth of the camera, or possibly the
    SNR, so 1/2**8 or 1/50.

measurement_iterations : int
    number of interations used when trying to find the center of mass
    of the psf in a certain slice

k_dist : str
    Eithe ['gaussian', 'gamma'] which control the wavevector
    distribution for the polychromatic detection psf. Default
    is Gaussian.

use_J1 : boolean
    Which hdet confocal model to use. Set to True to include the
    J1 term corresponding to a large-NA focusing lens, False to
    exclude it. Default is True

cutbyval : boolean
    If True, cuts the PSF based on the actual value instead of the
    position associated with the nearest value.

cutfallrate : float
    The relative value of the cutoffval over which to damp the
    remaining values of the psf. 0.3 seems a good fit now.

cutedgeval : float
    The value with which to determine the edge of the psf, typically
    taken around floating point, 1e-12

Notes:
    a = ExactLineScanConfocalPSF((64,)*3)
    psf, (z,y,x) = a.psf_slice(1., size=51)
    imshow((psf*r**4)[:,:,25], cmap='bone')