This python code takes in current voltage data and extracts of useful parameters such as the reverse saturation current, diode quality factor, series and shunt resistances by iteratively solving the non-ideal diode equation and fitting it directly to the data. The initial parameters can be given as inputs along with the temperature. It also outputs the uncertainties by calculating the covariance matrix.