mirror of
https://github.com/Athemis/pyKinetics.git
synced 2025-04-12 01:21:52 +00:00
Reformat code using yapf
This commit is contained in:
parent
781c6ccb55
commit
c7a8525410
2 changed files with 22 additions and 22 deletions
|
@ -41,6 +41,7 @@ class ExperimentHelper():
|
|||
|
||||
Provides plotting and data output functionality for libkinetics.Experiment.
|
||||
"""
|
||||
|
||||
def __init__(self, experiment, logger):
|
||||
self.exp = experiment
|
||||
self.logger = logger
|
||||
|
@ -118,9 +119,7 @@ class ExperimentHelper():
|
|||
writer = csv.writer(csvfile, dialect='excel-tab')
|
||||
writer.writerow(['LINEAR FITS'])
|
||||
writer.writerow([])
|
||||
writer.writerow(['concentration',
|
||||
'avg. slope',
|
||||
'slope std_err',
|
||||
writer.writerow(['concentration', 'avg. slope', 'slope std_err',
|
||||
'replicates (slope, intercept and r_squared)'])
|
||||
for m in exp.measurements:
|
||||
row = [m.concentration, m.avg_slope, m.avg_slope_err]
|
||||
|
@ -135,21 +134,18 @@ class ExperimentHelper():
|
|||
self.logger.debug(' Writing Michaelis-Menten results.')
|
||||
writer.writerow(['MICHAELIS-MENTEN KINETICS'])
|
||||
writer.writerow(['', 'value', 'std'])
|
||||
writer.writerow(['vmax', exp.mm['vmax'],
|
||||
exp.mm['vmax_err']])
|
||||
writer.writerow(['Kprime', exp.mm['Km'],
|
||||
exp.mm['Km_err']])
|
||||
writer.writerow(['vmax', exp.mm['vmax'], exp.mm['vmax_err']])
|
||||
writer.writerow(['Kprime', exp.mm['Km'], exp.mm['Km_err']])
|
||||
if exp.hill:
|
||||
self.logger.debug(' Writing Hill results.')
|
||||
writer.writerow([])
|
||||
writer.writerow(['HILL KINETICS'])
|
||||
writer.writerow(['', 'value', 'std'])
|
||||
writer.writerow(['vmax', exp.hill['vmax'],
|
||||
exp.hill['vmax_err']])
|
||||
exp.hill['vmax_err']])
|
||||
writer.writerow(['Kprime', exp.hill['Kprime'],
|
||||
exp.hill['Kprime_err']])
|
||||
writer.writerow(['h', exp.hill['h'],
|
||||
exp.hill['h_err']])
|
||||
writer.writerow(['h', exp.hill['h'], exp.hill['h_err']])
|
||||
|
||||
|
||||
def parse_arguments():
|
||||
|
|
|
@ -372,11 +372,13 @@ class Experiment():
|
|||
self.logger.info(' v_max: {} ± {}'.format(vmax, perr[0]))
|
||||
self.logger.info(' Km: {} ± {}'.format(Km, perr[1]))
|
||||
|
||||
return {'vmax': np.float(vmax),
|
||||
'Km': np.float(Km),
|
||||
'vmax_err': np.float(perr[0]),
|
||||
'Km_err': np.float(perr[1]),
|
||||
'x': x}
|
||||
return {
|
||||
'vmax': np.float(vmax),
|
||||
'Km': np.float(Km),
|
||||
'vmax_err': np.float(perr[0]),
|
||||
'Km_err': np.float(perr[1]),
|
||||
'x': x
|
||||
}
|
||||
|
||||
def do_hill_kinetics(self):
|
||||
"""
|
||||
|
@ -420,10 +422,12 @@ class Experiment():
|
|||
self.logger.info(' K_prime: {} ± {}'.format(Kprime, perr[1]))
|
||||
self.logger.info(' h: {} ± {}'.format(h, perr[2]))
|
||||
|
||||
return {'vmax': np.float(vmax),
|
||||
'Kprime': np.float(Kprime),
|
||||
'vmax_err': np.float(perr[0]),
|
||||
'Kprime_err': np.float(perr[1]),
|
||||
'h_err': np.float(perr[2]),
|
||||
'h': np.float(h),
|
||||
'x': x}
|
||||
return {
|
||||
'vmax': np.float(vmax),
|
||||
'Kprime': np.float(Kprime),
|
||||
'vmax_err': np.float(perr[0]),
|
||||
'Kprime_err': np.float(perr[1]),
|
||||
'h_err': np.float(perr[2]),
|
||||
'h': np.float(h),
|
||||
'x': x
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue