def norm_array(Array, Minval=0.001):
    """Normalise array by largest abs value if >Minval (avoids trying to renormalise zero array)"""
    greatest = 0.0
    flatarray = Array.flat
    for i in range(len(flatarray)):
        if abs(flatarray[i]) > abs(greatest):
            greatest = flatarray[i]
    if abs(greatest) > Minval:
        newarray = Array / greatest
    else:
        newarray = Array
    return newarray