コード例 #1
0
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from clase_gestionar_datos import Gestionar_datos
from scipy.stats import sem

excel = Gestionar_datos()

##Leer datos de excel
ph_kinetics = excel.leer_excel(
    'D:\Cindy\Ingeniería\Maestría\Resultados\R2L\Summup data.xlsx',
    'Culture pH')
time = excel.crear_lista(ph_kinetics, 'Monitoring time (days)', 1, 6)

##ARL
day0_kinetics = ph_kinetics.iloc[1]
arl0_kinetics = np.array(list(day0_kinetics.loc[['ARL', 'ARL.1', 'ARL.2']]))
arl0_kinetics_mean = np.mean(arl0_kinetics)
arl0_kinetics_sem = sem(arl0_kinetics)

day3_kinetics = phday0_kinetics = ph_kinetics.iloc[2]
arl3_kinetics = np.array(list(day3_kinetics.loc[['ARL', 'ARL.1', 'ARL.2']]))
arl3_kinetics_mean = np.mean(arl3_kinetics)
arl3_kinetics_sem = sem(arl3_kinetics)

day6_kinetics = phday0_kinetics = ph_kinetics.iloc[3]
arl6_kinetics = np.array(list(day6_kinetics.loc[['ARL', 'ARL.1', 'ARL.2']]))
arl6_kinetics_mean = np.mean(arl6_kinetics)
arl6_kinetics_sem = sem(arl6_kinetics)

day9_kinetics = phday0_kinetics = ph_kinetics.iloc[4]
y_lim = (0, 180)
x_lim = (0, 12)
batch1_color = '#6A6A6A'
batch2_color = '#9D9D9D'
batch3_color = '#D7D7D7'
treatments = ['DW', 'DW1', 'DW2', 'DW3', 'DW4', 'DW5']
barwidth = 0.25
error_kw = {"elinewidth": 0.5, 
            "capsize": 2, 
            "capthick": 0.5, 
            "barsabove": True,
            }

##Instanciar clases 
lienzo = Crear_lienzo(10, 6, 0.5, 0.5)
excel = Gestionar_datos()
graficar = Graficar(11, 11, 14, 12, 12, 10)

##Crear lienzo del gráfico
fig = lienzo.crear_figura()

##Leer excel
spiralization_dataframe = excel.leer_excel('D:\Cindy\Ingeniería\Maestría\Resultados\R2L\Summup data.xlsx', 'Spiralization_triplicate')

##Arrays lote 1

##ARL Lote 1
arl1_day12 = excel.crear_array(spiralization_dataframe, 'ARL_12', 0, 20)
arl_prom_1 = np.average(arl1_day12)
arlsd_1 = np.std(arl1_day12, ddof=sample_sd)
arlsem_1 = sem(arl1_day12)
コード例 #3
0
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import Figure
import matplotlib.pylab as pylab
from scipy.stats import sem

from clase_gestionar_datos import Gestionar_datos
from clase_graficar import Graficar
from clase_crear_lienzo import Crear_lienzo

##Instancias de clases
excel = Gestionar_datos()
lienzo = Crear_lienzo(12, 6, 0.1, 0.3)
graficar = Graficar(15, 15, 13, 13, 13, 11)

##Varibles comunes
treatments = ['S0', 'S1', 'S2', 'S3', 'S4', 'S5']
barwidth = 0.25
batch1_color = '#6A6A6A'
batch2_color = '#9D9D9D'
batch3_color = '#D7D7D7'

#Leer datos de excel
pmax_df = excel.leer_excel(
    'D:\Cindy\Ingeniería\Maestría\Resultados\R2L\Summup data.xlsx', 'pmax')
batch = pmax_df['Batch']
pmax = pmax_df.drop(columns=['Batch'])

# pmax_arl = np.array(list(pmax['ARL']))
# pmax_arl_mean = np.mean(pmax_arl)
コード例 #4
0
import matplotlib as mpl 
from matplotlib.pyplot import Figure
import matplotlib.pylab as pylab
from clase_crear_lienzo import Crear_lienzo
from clase_gestionar_datos import Gestionar_datos
from clase_graficar import Graficar

#Variables comunes
days = [3, 6, 9, 12]
sample_sd = 1
y_lim = (0, 800)
x_lim = (0, 12)

##Instanciar clases 
lienzo = Crear_lienzo(15, 6, 0.5, 0.5)
excel = Gestionar_datos()
graficar = Graficar(11, 11, 14, 12, 12, 10)

##Crear lienzo del gráfico
fig = lienzo.crear_figura()


##Leer excel
length_dataframe = excel.leer_excel('D:\Cindy\Ingeniería\Maestría\Resultados\R2L\Summup data.xlsx', 'Length_triplicate')

##Arrays lote 1

##ARL Lote 1
arl1_day3 = excel.crear_array(length_dataframe, 'ARL_3', 0, 20)
arl1_day6 = excel.crear_array(length_dataframe, 'ARL_6', 0, 20)
arl1_day9 = excel.crear_array(length_dataframe, 'ARL_9', 0, 20)
marker_edge = '#002060'
marker_linewidth = 0.2
marker_size = 100
ylim = (100, 600)
xlim = (1.25, 1.9)
ypad = 9
xpad = 4
marker_scatter = 'o'
marker_dispersion = 's'
line_style = '--'
norm_nitrogen = mpl.colors.Normalize(vmin=0, vmax=7)
norm_phosphorus = mpl.colors.Normalize(vmin=0, vmax=0.5)

#Instanciar clases
lienzo = Crear_lienzo(15, 5, 0.5, 0.2)
excel = Gestionar_datos()
graficar = Graficar(12, 12, 12, 10, 10, 15)

##Crear lienzo del gráfico
fig = lienzo.crear_figura()

##Leer excel
length_data = excel.leer_excel(
    'D:\Cindy\Ingeniería\Maestría\Resultados\R2L\AnalisisN-P-C-12.xlsx',
    'Graph data length')

##Data
carbon = np.array(excel.crear_lista(length_data, 'total carbon', 0, 15))
carbon_nitrogen = np.array(
    excel.crear_lista(length_data, 'nitrogen_carbon', 0, 15))
carbon_phosphorus = np.array(
marker_edge = '#002060'
marker_linewidth = 0.2
marker_size = 100
ylim = (80, 150)
xlim = (1.25, 1.9)
ypad = 9
xpad = 4
marker_scatter = 'o'
marker_dispersion = 's'
line_style = '--'
norm_nitrogen = mpl.colors.Normalize(vmin=0, vmax=7)
norm_phosphorus = mpl.colors.Normalize(vmin=0, vmax=0.5)

#Instanciar clases
lienzo = Crear_lienzo(15, 5, 0.5, 0.2)
excel = Gestionar_datos()
graficar = Graficar(12, 12, 12, 10, 10, 15)

##Crear lienzo del gráfico
fig = lienzo.crear_figura()

##Leer excel
spiralization_data = excel.leer_excel(
    'D:\Cindy\Ingeniería\Maestría\Resultados\R2L\AnalisisN-P-C-12.xlsx',
    'Graph data spiralization')

##Data
carbon = np.array(excel.crear_lista(spiralization_data, 'total carbon', 0, 16))
carbon_nitrogen = np.array(
    excel.crear_lista(spiralization_data, 'nitrogen_carbon', 0, 16))
carbon_phosphorus = np.array(
import numpy as np
from matplotlib import cm

#Variables comunes
line_color = 'black'
marker = 'o'
marker_edge = 'black'
marker_linewidth = 0.2
marker_size = 100
ylim = (0, 900)
ypad = 9
xpad = 4

#Instanciar clases 
lienzo = Crear_lienzo(15, 15, 0.6, 0.4)
excel = Gestionar_datos()
graficar = Graficar(13, 13, 16, 14, 12, 12)

##Crear lienzo del gráfico
fig = lienzo.crear_figura()

##Leer excel
correlacion_data = excel.leer_excel('D:\Cindy\Ingeniería\Maestría\Resultados\R2L\AnalisisN-P-C.xlsx', 'Graph data')

##Carbon data
carbon = excel.crear_lista(correlacion_data, 'Total carbon', 0, 15)
carbon_biomass = excel.crear_lista(correlacion_data, ' Biomass carbon', 0, 15)
carbon_nitrogen = excel.crear_lista(correlacion_data, 'Carbon_Nitrogen', 0, 15)
carbon_phosphorus = excel.crear_lista(correlacion_data, 'Carbon_Phosphorus', 0, 15)

##Nitrogen data
コード例 #8
0
from numpy.lib.arraypad import pad
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import Figure
import matplotlib.pylab as pylab
from clase_crear_lienzo import Crear_lienzo
from clase_gestionar_datos import Gestionar_datos
from clase_graficar import Graficar

#Instanciar clases
#lienzo = Crear_lienzo(10, 20, 0.6, 0.4)
lienzo = Crear_lienzo(30, 12, 0, 0)
graficar = Graficar(34, 34, 34, 32, 32, 2)
excel = Gestionar_datos()

#Parámetros comunes
ylim = (0, 1600)
ypad = 2
xpad = 7
xticks = [0, 3, 6, 9, 12]
yticks = [0, 200, 400, 600, 800, 1000, 1200, 1400, 1600]
font_size = 16
markersize = 13

##Crear lienzo del gráfico
# lienzo.largo_fig = 30
fig = lienzo.crear_figura(left=0.06, bottom=0.2, right=0.98, top=0.92)

##Leer excel
コード例 #9
0
marker_edge = '#002060'
marker_linewidth = 0.2
marker_size = 100
ylim = (20, 80)
xlim =(1.25, 1.9)
ypad = 9
xpad = 4
marker_scatter = 'o'
marker_dispersion = 's'
line_style = '--'
norm_nitrogen = mpl.colors.Normalize(vmin=0, vmax=7)
norm_phosphorus = mpl.colors.Normalize(vmin=0, vmax=0.5)

#Instanciar clases 
lienzo = Crear_lienzo(15, 5, 0.5, 0.2)
excel = Gestionar_datos()
graficar = Graficar(12, 12, 12, 10, 10, 15)

##Crear lienzo del gráfico
fig = lienzo.crear_figura()

##Leer excel
helix_data = excel.leer_excel('D:\Cindy\Ingeniería\Maestría\Resultados\R2L\AnalisisN-P-C-12.xlsx', 'Graph data helix')

##Data
carbon = np.array(excel.crear_lista(helix_data, 'total carbon', 0, 17))
carbon_nitrogen = np.array(excel.crear_lista(helix_data, 'nitrogen_carbon', 0, 17))
carbon_phosphorus = np.array(excel.crear_lista(helix_data, 'phosphorus_carbon', 0, 17))
carbon_helix = np.array(excel.crear_lista(helix_data, 'helix', 0, 17))
carbon_helix_average = np.array(excel.crear_lista(helix_data, 'helix average', 0, 17))
コード例 #10
0
y_lim_helix = (0, 100)
batch1_color = '#6A6A6A'
batch2_color = '#9D9D9D'
batch3_color = '#D7D7D7'
treatments = ['S0', 'S1', 'S2', 'S3', 'S4', 'S5']
barwidth = 0.25
error_kw = {
    "elinewidth": 0.5,
    "capsize": 2,
    "capthick": 0.5,
    "barsabove": True,
}

##Instanciar clases
lienzo = Crear_lienzo(15, 12, 0.2, 0.2)
excel = Gestionar_datos()
graficar = Graficar(11, 11, 14, 12, 12, 10)

##Crear lienzo del gráfico
fig = lienzo.crear_figura()

####################################Length##############################################
##Leer excel
length_dataframe = excel.leer_excel(
    'D:\Cindy\Ingeniería\Maestría\Resultados\R2L\Summup data.xlsx',
    'Length_triplicate')

##Arrays lote 1

##ARL Lote 1
s01_day12_length = excel.crear_array(length_dataframe, 'ARL_12', 0, 20)