OpticalFit can take a file object directly