CurveFitterLibraries
Classes and methods for fitting growth curves
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
GrowthCurveLibrary.GrowthCurve Class Reference

This class represents growth data for one strain. More...

Inheritance diagram for GrowthCurveLibrary.GrowthCurve:

Classes

struct  GrowthRateInUse
 The growth rate currently fit for this guy More...
 
struct  MaximumGrowthRate
 

Public Member Functions

void SetHandPicked ()
 Indicate that the data fit has been manually selected. More...
 
double HoursTillODReached (double ODValue)
 Uses the parameters from the exponential fit to determine when a specific Y value is reached. More...
 
string __repr__ ()
 
override string ToString ()
 
void RecreateFitAfterChange ()
 
 GrowthCurve (string name, DateTime[] timeValues, double[] odvalues)
 
void FitData ()
 Function fits data, should be called everytime the fit changes More...
 
void CallOutliers ()
 
void GetResiduals (bool JustFittedValues, out List< double > Times, out List< double > Residuals)
 
void SetFittedRangeFromIndexes (List< int > Indexes)
 
void SetFittedRange (int startindex, int endindex)
 
void SetFittedODRange (double startOD, double endOD, bool ODMustIncrease=true)
 Naive implementation, currently just goes from the value above the OD value and then grabs it while it is increasing More...
 
void SetFittedODRangeFromPercent (double startOD, double PercentOfMaxOD)
 
void ChangeODPoint (double xval, double yval)
 Attempts to fit or unfit a point that is selected by it's x,y value More...
 
void RemoveFirstPointAsBlank ()
 
void RemoveSecondPointAsBlank ()
 
void RemoveAverageOfFirstThreePointsAsBlank ()
 
void RemoveBlank (double Blank)
 
void OutputDebugFile (string Fname)
 
void CreateGrowthDataList (DateTime[] Times, double[] ODs)
 
void OnPropertyChange (PropertyChangedEventArgs e)
 

Public Attributes

bool SuspendRefit = false
 Indicates that the curve should not notify of events or attempt to refit data More...
 
const double BAD_DATA_VALUE = -999
 Some constants related to the values. More...
 
const bool USE_EXPONENTIAL_FITTING = true
 
const double DEFAULTOD_MAX = 0.18
 
const double DEFAULT_MAX_GROWTH_RATE = 10000
 
LinearFit LinFit
 
ExponentialFit ExpFit
 
OffSetExponentialFit OffSetExp
 
GroupFitter GroupFit
 
MixtureErrorModelClass MixtureErrorModel
 
QuadraticLinearRegression QuadModel
 
LogisticModel LogisticModel
 
MaximumGrowthRate MaxGrowthRate
 
DateTime BaseTime
 Start time of OD readings. More...
 
int TransferNumber
 
string Population
 
int ExpID
 
dynamic FreeSpace
 
double[] SlopeChange
 Holds the doubling time between each pair of points, poorly named variable More...
 
double[] XvaluesForSlope
 
bool ValidDataSet
 Determines if the data is valid for fitting or not. More...
 

Properties

List< GrowthDataPointDataPoints [get]
 Just in case it wasn't clear that this class is inherited from a list, this returns itself More...
 
double GroupFitGrowthRate [get]
 
double GroupFitInitPop [get]
 
GrowthRateInUse GrowthRate [get, set]
 
List< FitPointFittedValues [get]
 
List< FitPointFittedLogValues [get]
 
List< FitPointFittedResidualValues [get]
 
double HighestODValue [get]
 
string DataSetName [get, set]
 Name of the dataset (usually a well name). More...
 
List< FitPointSlopeValues [get]
 
bool LinearModelFitted [get]
 
bool ExpModelFitted [get]
 
double[] ODValues [get]
 
double[] TimeValues_As_Double [get]
 Time in hours since the start of the collecting More...
 
DateTime[] Times [get]
 
double[] LogODValues [get]
 
double[] OutlierXValues [get]
 
double[] OutlierYValues [get]
 
double[] FittedXValues [get]
 
double[] FittedLogYValues [get]
 
double[] FittedYValues [get]
 

Events

PropertyChangedEventHandler PropertyChanged
 

Detailed Description

This class represents growth data for one strain.

Constructor & Destructor Documentation

GrowthCurveLibrary.GrowthCurve.GrowthCurve ( string  name,
DateTime[]  timeValues,
double[]  odvalues 
)

Member Function Documentation

string GrowthCurveLibrary.GrowthCurve.__repr__ ( )
void GrowthCurveLibrary.GrowthCurve.CallOutliers ( )
void GrowthCurveLibrary.GrowthCurve.ChangeODPoint ( double  xval,
double  yval 
)

Attempts to fit or unfit a point that is selected by it's x,y value

Parameters
xvalTime as Double in Hours
yvalLog OD
Returns
void GrowthCurveLibrary.GrowthCurve.CreateGrowthDataList ( DateTime[]  Times,
double[]  ODs 
)
void GrowthCurveLibrary.GrowthCurve.FitData ( )

Function fits data, should be called everytime the fit changes

void GrowthCurveLibrary.GrowthCurve.GetResiduals ( bool  JustFittedValues,
out List< double >  Times,
out List< double >  Residuals 
)
double GrowthCurveLibrary.GrowthCurve.HoursTillODReached ( double  ODValue)

Uses the parameters from the exponential fit to determine when a specific Y value is reached.

Parameters
ODValue
Returns
void GrowthCurveLibrary.GrowthCurve.OnPropertyChange ( PropertyChangedEventArgs  e)
void GrowthCurveLibrary.GrowthCurve.OutputDebugFile ( string  Fname)
void GrowthCurveLibrary.GrowthCurve.RecreateFitAfterChange ( )
void GrowthCurveLibrary.GrowthCurve.RemoveAverageOfFirstThreePointsAsBlank ( )
void GrowthCurveLibrary.GrowthCurve.RemoveBlank ( double  Blank)
void GrowthCurveLibrary.GrowthCurve.RemoveFirstPointAsBlank ( )
void GrowthCurveLibrary.GrowthCurve.RemoveSecondPointAsBlank ( )
void GrowthCurveLibrary.GrowthCurve.SetFittedODRange ( double  startOD,
double  endOD,
bool  ODMustIncrease = true 
)

Naive implementation, currently just goes from the value above the OD value and then grabs it while it is increasing

Parameters
startOD
minOD
void GrowthCurveLibrary.GrowthCurve.SetFittedODRangeFromPercent ( double  startOD,
double  PercentOfMaxOD 
)
void GrowthCurveLibrary.GrowthCurve.SetFittedRange ( int  startindex,
int  endindex 
)
void GrowthCurveLibrary.GrowthCurve.SetFittedRangeFromIndexes ( List< int >  Indexes)
void GrowthCurveLibrary.GrowthCurve.SetHandPicked ( )

Indicate that the data fit has been manually selected.

override string GrowthCurveLibrary.GrowthCurve.ToString ( )

Member Data Documentation

const double GrowthCurveLibrary.GrowthCurve.BAD_DATA_VALUE = -999

Some constants related to the values.

DateTime GrowthCurveLibrary.GrowthCurve.BaseTime

Start time of OD readings.

const double GrowthCurveLibrary.GrowthCurve.DEFAULT_MAX_GROWTH_RATE = 10000
const double GrowthCurveLibrary.GrowthCurve.DEFAULTOD_MAX = 0.18
ExponentialFit GrowthCurveLibrary.GrowthCurve.ExpFit
int GrowthCurveLibrary.GrowthCurve.ExpID
dynamic GrowthCurveLibrary.GrowthCurve.FreeSpace
GroupFitter GrowthCurveLibrary.GrowthCurve.GroupFit
LinearFit GrowthCurveLibrary.GrowthCurve.LinFit
LogisticModel GrowthCurveLibrary.GrowthCurve.LogisticModel
MaximumGrowthRate GrowthCurveLibrary.GrowthCurve.MaxGrowthRate
MixtureErrorModelClass GrowthCurveLibrary.GrowthCurve.MixtureErrorModel
OffSetExponentialFit GrowthCurveLibrary.GrowthCurve.OffSetExp
string GrowthCurveLibrary.GrowthCurve.Population
QuadraticLinearRegression GrowthCurveLibrary.GrowthCurve.QuadModel
double [] GrowthCurveLibrary.GrowthCurve.SlopeChange

Holds the doubling time between each pair of points, poorly named variable

bool GrowthCurveLibrary.GrowthCurve.SuspendRefit = false

Indicates that the curve should not notify of events or attempt to refit data

int GrowthCurveLibrary.GrowthCurve.TransferNumber
const bool GrowthCurveLibrary.GrowthCurve.USE_EXPONENTIAL_FITTING = true
bool GrowthCurveLibrary.GrowthCurve.ValidDataSet

Determines if the data is valid for fitting or not.

double [] GrowthCurveLibrary.GrowthCurve.XvaluesForSlope

Property Documentation

List<GrowthDataPoint> GrowthCurveLibrary.GrowthCurve.DataPoints
get

Just in case it wasn't clear that this class is inherited from a list, this returns itself

string GrowthCurveLibrary.GrowthCurve.DataSetName
getset

Name of the dataset (usually a well name).

bool GrowthCurveLibrary.GrowthCurve.ExpModelFitted
get
List<FitPoint> GrowthCurveLibrary.GrowthCurve.FittedLogValues
get
double [] GrowthCurveLibrary.GrowthCurve.FittedLogYValues
get
List<FitPoint> GrowthCurveLibrary.GrowthCurve.FittedResidualValues
get
List<FitPoint> GrowthCurveLibrary.GrowthCurve.FittedValues
get
double [] GrowthCurveLibrary.GrowthCurve.FittedXValues
get
double [] GrowthCurveLibrary.GrowthCurve.FittedYValues
get
double GrowthCurveLibrary.GrowthCurve.GroupFitGrowthRate
get
double GrowthCurveLibrary.GrowthCurve.GroupFitInitPop
get
GrowthRateInUse GrowthCurveLibrary.GrowthCurve.GrowthRate
getset
double GrowthCurveLibrary.GrowthCurve.HighestODValue
get
bool GrowthCurveLibrary.GrowthCurve.LinearModelFitted
get
double [] GrowthCurveLibrary.GrowthCurve.LogODValues
get
double [] GrowthCurveLibrary.GrowthCurve.ODValues
get
double [] GrowthCurveLibrary.GrowthCurve.OutlierXValues
get
double [] GrowthCurveLibrary.GrowthCurve.OutlierYValues
get
List<FitPoint> GrowthCurveLibrary.GrowthCurve.SlopeValues
get
DateTime [] GrowthCurveLibrary.GrowthCurve.Times
get
double [] GrowthCurveLibrary.GrowthCurve.TimeValues_As_Double
get

Time in hours since the start of the collecting

Event Documentation

PropertyChangedEventHandler GrowthCurveLibrary.GrowthCurve.PropertyChanged

The documentation for this class was generated from the following file: