def calculate_linescan_ilm_psf(y,z, polar_angle=<NUM_LIT:0.>, nlpts=<NUM_LIT:1>,<EOL>pinhole_width=<NUM_LIT:1>, use_laggauss=False, **kwargs):
if use_laggauss:<EOL><INDENT>x_vals, wts = calc_pts_lag()<EOL><DEDENT>else:<EOL><INDENT>x_vals, wts = calc_pts_hg()<EOL><DEDENT>xg, yg, zg = [np.zeros( list(y.shape) + [x_vals.size] ) for a in range(<NUM_LIT:3>)]<EOL>hilm = np.zeros(xg.shape)<EOL>for a in range(x_vals.size):<EOL><INDENT>xg[...,a] = x_vals[a]<EOL>yg[...,a] = y.copy()<EOL>zg[...,a] = z.copy()<EOL><DEDENT>y_pinhole, wts_pinhole = np.polynomial.hermite.hermgauss(nlpts)<EOL>y_pinhole *= np.sqrt(<NUM_LIT:2>)*pinhole_width<EOL>wts_pinhole /= np.sqrt(np.pi)<EOL>for yp, wp in zip(y_pinhole, wts_pinhole):<EOL><INDENT>rho = np.sqrt(xg*xg + (yg-yp)*(yg-yp))<EOL>phi = np.arctan2(yg,xg)<EOL>hsym, hasym = get_hsym_asym(rho,zg,get_hdet = False, **kwargs)<EOL>hilm += wp*(hsym + np.cos(<NUM_LIT:2>*(phi-polar_angle))*hasym)<EOL><DEDENT>for a in range(x_vals.size):<EOL><INDENT>hilm[...,a] *= wts[a]<EOL><DEDENT>return hilm.sum(axis=-<NUM_LIT:1>)*<NUM_LIT><EOL>
Calculates the illumination PSF for a line-scanning confocal with the
confocal line oriented along the x direction.

Parameters
----------
    y : numpy.ndarray
        The y points (in-plane, perpendicular to the line direction)
        at which to evaluate the illumination PSF, in units of 1/k.
        Arbitrary shape.
    z : numpy.ndarray
        The z points (optical axis) at which to evaluate the illum-
        ination PSF, in units of 1/k. Must be the same shape as `y`
    polar_angle : Float, optional
        The angle of the illuminating light's polarization with
        respect to the line's orientation along x. Default is 0.
    pinhole_width : Float, optional
        The width of the geometric image of the line projected onto
        the sample, in units of 1/k. Default is 1. The perfect line
        image is assumed to be a Gaussian. If `nlpts` is set to 1,
        the line will always be of zero width.
    nlpts : Int, optional
        The number of points to use for Hermite-gauss quadrature over
        the line's width. Default is 1, corresponding to a zero-width
        line.
    use_laggauss : Bool, optional
        Set to True to use a more-accurate sinh'd Laguerre-Gauss
        quadrature for integration over the line's length (more accurate
        in the same amount of time). Default is False for backwards
        compatibility.  FIXME what did we do here?

Other Parameters
----------------
    alpha : Float, optional
        The acceptance angle of the lens, on (0,pi/2). Default is 1.
    zint : Float, optional
        The distance of the len's unaberrated focal point from the
        optical interface, in units of 1/k. Default is 100.
    n2n1 : Float, optional
        The ratio n2/n1 of the index mismatch between the sample
        (index n2) and the optical train (index n1). Must be on
        [0,inf) but should be near 1. Default is 0.95

Returns
-------
    hilm : numpy.ndarray
        The line illumination, of the same shape as y and z.