mirror of
https://github.com/Athemis/pyKinetics.git
synced 2025-04-05 22:56:02 +00:00
Add legend to linear fits
This commit is contained in:
parent
36ef5b8909
commit
c8d7b192fa
1 changed files with 8 additions and 8 deletions
|
@ -48,12 +48,10 @@ class Replicate():
|
||||||
self.logger.info(msg.format(round(r_squared, 4)))
|
self.logger.info(msg.format(round(r_squared, 4)))
|
||||||
self.logger.info(' slope: {}'.format(slope))
|
self.logger.info(' slope: {}'.format(slope))
|
||||||
if slope < 0:
|
if slope < 0:
|
||||||
self.logger.warning(' Slope is negative. Will use absolute '
|
self.logger.info(' Slope is negative. Will use absolute '
|
||||||
'value for further calculations!')
|
'value for further calculations!')
|
||||||
self.logger.info(' intercept: {}'.format(slope))
|
self.logger.info(' intercept: {}'.format(slope))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return {'slope': slope,
|
return {'slope': slope,
|
||||||
'intercept': intercept,
|
'intercept': intercept,
|
||||||
'r_value': r_value,
|
'r_value': r_value,
|
||||||
|
@ -95,8 +93,8 @@ class Measurement():
|
||||||
self.logger.info('Average slope: {} ± {}'.format(self.avg_slope,
|
self.logger.info('Average slope: {} ± {}'.format(self.avg_slope,
|
||||||
self.avg_slope_err))
|
self.avg_slope_err))
|
||||||
if self.avg_slope < 0:
|
if self.avg_slope < 0:
|
||||||
self.logger.warning('Avererage slope is negative. Will use '
|
self.logger.info('Avererage slope is negative. Will use '
|
||||||
'absolute value for further calculations!')
|
'absolute value for further calculations!')
|
||||||
self.logger.info('-----')
|
self.logger.info('-----')
|
||||||
|
|
||||||
def get_results(self):
|
def get_results(self):
|
||||||
|
@ -150,8 +148,10 @@ class Experiment():
|
||||||
if self.fit_to_replicates:
|
if self.fit_to_replicates:
|
||||||
for r in m.replicates:
|
for r in m.replicates:
|
||||||
self.raw_kinetic_data['x'].append(m.concentration)
|
self.raw_kinetic_data['x'].append(m.concentration)
|
||||||
self.raw_kinetic_data['y'].append(np.absolute(r.fitresult['slope']))
|
self.raw_kinetic_data['y'].append(
|
||||||
self.raw_kinetic_data['yerr'].append(r.fitresult['std_err'])
|
np.absolute(r.fitresult['slope']))
|
||||||
|
self.raw_kinetic_data['yerr'].append(
|
||||||
|
r.fitresult['std_err'])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# extract relevant data for kinetics calculation
|
# extract relevant data for kinetics calculation
|
||||||
|
|
Loading…
Add table
Reference in a new issue