def CircularMaskGrid(gridSize, diameter=None):
    """
    Return a square grid with ones inside and zeros outside a given 
    diameter circle
    """
    if diameter is None: diameter=gridSize
    return np.less_equal(RadiusGrid(gridSize),diameter/2.0)
def CircularMaskGrid ( gridSize , diameter = None ) : if diameter is None : diameter = gridSize return np . less_equal ( RadiusGrid ( gridSize ) , diameter / 2.0 )
Return a square grid with ones inside and zeros outside a given 
    diameter circle