def METHOD_NAME(app_mag, photom_offset, bg_val, fps, ang_vel, gauss_sigma, steps=50, \
    saturation_point=255):
    def _costFunc(mag_app_unsaturated, params):
        mag_app = params[0]
        # Compute the unsatured magnitude
        _, mag_app_saturated = simulateSaturation(mag_app_unsaturated, *params)
        # Compute the residuals
        return abs(mag_app - mag_app_saturated)
    # Numerically find the position angle
    res = scipy.optimize.minimize(_costFunc, [-1], args=([app_mag, photom_offset, bg_val, fps, ang_vel, \
        gauss_sigma, steps, saturation_point]), method='Nelder-Mead')
    # ## TEST
    # simulateSaturation(res.x[0], app_mag, photom_offset, bg_val, fps, ang_vel, \
    #     gauss_sigma, steps, saturation_point, show_plot=True)
    return res.x[0]