In [ ]:
#Import necessary modules

import impact as                             impt
import impact.plotting as                    implot
from impact.parsers import Parser as parser

In [ ]:
#SETTINGS FOR IMPACT. Change settings to alter calculations as required

#To determine if growth curve fitting is done
impt.settings.perform_curve_fit = True

#To determine the type curve to fit to OD600
impt.settings.fit_type = 'gompertz'

#To determine if outliers in a replicate trial should be discarded from plots.
impt.settings.outlier_cleaning_flag = True

#The maximum fraction of replicates that can be removed if outlier cleaning is allowed
impt.settings.max_fraction_replicates_to_remove = 0.25

#The threshold for outlier cleaning
impt.settings.std_deviation_cutoff=0.1

#To determine if calculations generate output while they are done.
impt.settings.verbose = False

#To determine if calculations are done automatically without the experiment.calculate() method
impt.settings.live_calculations = False

#To determine if a savgol filter is to be applied before plotting.
impt.settings.use_filtered_data = True

#To determine the number of continuous points for which biomass has to decrease to be considered to be in death phase.
impt.settings.death_phase_hyperparameter = 1

In [ ]:
#Enter the parser's name in data_format:. Accepted inputs: "tecan_OD", "tecan_OD_GFP_mCherry","spectromax_OD",
#"spectromax_OD", "default_titers

#Enter the plate type in plate_type:. Accepted inputs: "96 Wells", "48 Wells", "24 Wells". If data isn't in a plate format,
#ignore this field

#IMPORT FILE HERE. ADD PATH TO FILE IN "file_name:"

#Run all calculations

data_format=''
plate_type = ''
file_name = '.xlsx'
OD_data = parser.parse_raw_data(data_format=data_format,file_name=file_name,plate_type=plate_type)
expt = OD_data
expt.calculate()

In [ ]:
#Plot all measured quantities separated by strain/media in different plots. By default, impact will plot the data vs time
# for timecourse data. If you wish to plot a feature, replace 'None' with 'specific_productivity', 'od_normalized_data' or any
# other user defined feature.

feature = None
implot.time_course_smart_plot(expt=expt, feature=feature)

In [ ]:
#This gives a gompertz growth curve fit for each single trial along with the growth rates from the fit data.

implot.plot_growth_curve_fit(expt)
expt.growth_report
expt.growth_report_html

In [ ]:
#Plot all measured quantities separated by strain/media in different plots. By default, impact will plot the max value of data
# for timecourse data. If you wish to plot the max value of a feature, replace 'None' with 'specific_productivity',
#'od_normalized_data' or any other user defined feature.

feature = None
implot.time_course_analyte_value_smart_plot(expt=expt, feature=feature, value_to_plot='max')