def METHOD_NAME(WCT, p1, p2, minWCT, maxWCT):
    WCTnew = WCT.copy()
    # find representative dCell for this area
    ind = np.nonzero( (xEdge>p1[0]) * (xEdge<p2[0]) * (yEdge>p1[1]) * (yEdge<p1[2]) )[0]
    dCell = dcEdge[ind].mean()
    print(f"using dCell={dCell}")
    mask = (WCT<maxWCT) * (floatMask==1) * (xCell>(p1[0]-2*dCell)) * (xCell<(p2[0]+2*dCell)) * (yCell>(p1[1]-2*dCell)) * (yCell<(p2[1]+2*dCell))
    ind = np.nonzero(mask==1)[0]
    length = ( (p2[0]-p1[0])**2 + (p2[1]-p1[1])**2 )**0.5 # length along flowline
    m1 = (p2[1]-p1[1]) / (p2[0]-p1[0]) # xy slope of flowline
    b1 = p1[1] - m1*p1[0] # y int of flowline
    print(f'# cells={len(ind)}, length={length}, m={m1}')
    m2 = -1.0/m1 # slope of all transverse lines
    for c in ind:
        # find width and center at this position
        b2 = yCell[c] - m2 * xCell[c]  # y int of transverse line
        dist2orthogline = np.absolute(m2*xCell + -1*yCell + b2) / (m2**2 + (-1)**2)**0.5
        ind2 = np.nonzero((mask==1) * (dist2orthogline<(1.5*dCell)))[0] # get the points within a certain distance of the orthog line
        dist2centerline = np.absolute(m1*xCell[ind2] + -1*yCell[ind2] + b1) / (m1**2 + (-1)**2)**0.5
        #dist2centerline = np.absolute( (p2[0]-p1[0]) * (p1[1] - yCell[ind2]) - (p1[0]-xCell[ind2])*(p2[1]-p1[1])) / ( (p2[0]-p1[0])**2 + (p2[1]-p1[1])**2)**0.5
        dist2centerline *= np.sign((m1*xCell[ind2]+b1) - yCell[ind2]) # make signed distance, assuming NE direction
        print(dist2centerline)
        width = dist2centerline.max()-dist2centerline.min()
        # find frac x along center line
        # first need intersection of longit. and ortho lines
        xint = (b2-b1)/(m1-(-1.0/m1))
        mag = (xint-p1[0]) / (p2[0]-p1[0]) * (maxWCT-minWCT) + minWCT
        widthOrgnIdx = ind2[np.argmin(dist2centerline)] #idx of westmost
        widthOrgn = (xCell[widthOrgnIdx], yCell[widthOrgnIdx]) # position of westmost
        widthEndIdx = ind2[np.argmax(dist2centerline)] #idx of westmost
        widthEnd = (xCell[widthEndIdx], yCell[widthEndIdx]) # position of westmost
        widthMidpt = ((widthOrgn[0]+widthEnd[0])/2.0, (widthOrgn[1]+widthEnd[1])/2.0)
        print(xCell[c], yCell[c], widthOrgn)
        #dist2Orgn = ((widthOrgn[0]-xCell[c])**2 + (widthOrgn[1]-yCell[c])**2)**0.5
        #fracWidth = (dist2Orgn  / (width) - 0.5) * 2.0 # [-1,1] range
        dist2Mid = ((widthMidpt[0]-xCell[c])**2 + (widthMidpt[1]-yCell[c])**2)**0.5
        fracWidth = dist2Mid  / (0.5*(width+2*dCell))  # [-1,1] range
        fracWidth = min(fracWidth, 0.95)
        print(f'found {len(ind2)} points along this orthogonal; width={width}; fracWidth={fracWidth}, mag={mag}')
        z = mag * (-1.0 * fracWidth**2 + 1.0)
        WCTnew[c] = max(z, WCT[c])  # don't make WCT thinner than the original
        print(f'old z={WCT[c]}, new z={z}')
    return WCTnew