@@ -159,7 +159,7 @@ shown below:
159
159
from scipy.optimize import curve_fit
160
160
161
161
result = CDMS.get_species_table()
162
- mol = result[result['tag '] == 28503] #do not include signs of TAG for this
162
+ mol = result[result['TAG '] == 28503] #do not include signs of TAG for this
163
163
keys = [k for k in mol.keys() if 'lg' in k]
164
164
temp = np.array([float(k.split('(')[-1].split(')')[0]) for k in keys])
165
165
part = list(mol[keys][0])
@@ -234,9 +234,9 @@ We can then compare linear interpolation to the fitted interpolation above:
234
234
.. doctest-remote-data ::
235
235
236
236
>>> interp_Q = np.interp(x, temp, 10 ** part)
237
- >>> pl .plot(x, (10 ** y- interp_Q)/ 10 ** y)
238
- >>> pl .xlabel(" Temperature" )
239
- >>> pl .ylabel(" Fractional difference between linear and fitted" )
237
+ >>> plt .plot(x, (10 ** y- interp_Q)/ 10 ** y)
238
+ >>> plt .xlabel(" Temperature" )
239
+ >>> plt .ylabel(" Fractional difference between linear and fitted" )
240
240
241
241
.. plot ::
242
242
:context:
@@ -257,9 +257,9 @@ We can then compare linear interpolation to the fitted interpolation above:
257
257
part = np.array([tryfloat(x) for x in mol[keys][0]])
258
258
param, cov = curve_fit(f, temp[np.isfinite(part)], part[np.isfinite(part)])
259
259
interp_Q = np.interp(x, temp, 10**part)
260
- pl .plot(x, (10**y-interp_Q)/10**y)
261
- pl .xlabel("Temperature")
262
- pl .ylabel("Fractional difference between linear and fitted")
260
+ plt .plot(x, (10**y-interp_Q)/10**y)
261
+ plt .xlabel("Temperature")
262
+ plt .ylabel("Fractional difference between linear and fitted")
263
263
264
264
265
265
Linear interpolation is a good approximation, in this case, for any moderately
0 commit comments