I am new to python and what I am trying to do is write an algorithm to solve for the 4 unknown parameters in the Rodbard Equation where we are relating a grayscale value measured using ImageJ to optical density calibration discs. This equation is nonlinear and is written as y = c*((x-a)/(d-x))^(1/b) where a, b, c, and d are unknown. I have the values of x and y for four point (176.5, 0), (161.333, 0.1), (66.1667, 0.9), and (40.833, 2.5). Below, I have posted my attempt to solve for these 4 unknowns. Any help to point me in the right direction would be greatly appreciated!
import scipy.optimize as opt
def f(a, b, c, d):
0 == [c * ((176.5 - a)/(d - 176.5))**(1/b)]
0.1 == [c * ((161.333 - a)/(d - 161.333))**(1/b)]
0.9 == [c * ((66.1667 - a)/(d - 66.1667))**(1/b)]
2.5 == [c * ((40.833 - a)/(d - 40.833))**(1/b)]
return f
opt.curve_fit(a, b, c, d)
print a
print b
print c
print d