def get_edge_resolution(pixel_x, width, distance, wavelength):
    'Calculate EdgeResolution'
    from math import sin, atan
    if (abs(DISTANCE(distance)) > 0.0):
        rad = ((0.5 * float(FLOAT2(pixel_x))) * int(width))
        return (FLOAT1(wavelength) / (2 * sin((0.5 * atan((rad / DISTANCE(distance)))))))
    else:
        return 0.0
Calculate EdgeResolution
def get_edge_resolution(pixel_x, width, distance, wavelength):
    
    from math import sin, atan
    if (abs(DISTANCE(distance)) > 0.0):
        rad = ((0.5 * float(FLOAT2(pixel_x))) * int(width))
        return (FLOAT1(wavelength) / (2 * sin((0.5 * atan((rad / DISTANCE(distance)))))))
    else:
        return 0.0