fixed problem in get_pixel_threshold in api.py