adding mode to skycoord_to_pixel