Skip to content

Commit

Permalink
enzyme kinetics tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
twallema committed Jul 19, 2024
1 parent 33919b5 commit 5c96143
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/enzyme_kinetics.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ if __name__ == '__main__':
# Update initial condition
model.initial_states.update(initial_states[i])
# Simulate model
out = model.sim(1600, N=n, draw_function=draw_fcn, samples=samples_dict)
out = model.sim(1600, N=n, draw_function=draw_fcn, draw_function_kwargs={'samples': samples_dict})
# Add 4% observational noise
out = add_gaussian_noise(out, 0.04, relative=True)
# Visualize
Expand Down
4 changes: 2 additions & 2 deletions tutorials/enzyme_kinetics/calibrate_intrinsic_kinetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# Define an initial condition
init_states = {'S': 46, 'A': 61, 'W': 37, 'Es': 0}
# Initialize model
model = PPBB_model(init_states,params)
model = PPBB_model(states=init_states, parameters=params)

###############
## Load data ##
Expand Down Expand Up @@ -153,7 +153,7 @@ def draw_fcn(parameters, samples):
# Update initial condition
model.initial_states.update(initial_states[i])
# Simulate model
out = model.sim(1600, N=n, draw_function=draw_fcn, samples=samples_dict)
out = model.sim(1600, N=n, draw_function=draw_fcn, draw_function_kwargs={'samples': samples_dict})
# Add 4% observational noise
out = add_gaussian_noise(out, 0.04, relative=True)
# Visualize
Expand Down
4 changes: 2 additions & 2 deletions tutorials/enzyme_kinetics/simulate_1D_PFR.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def draw_fcn(parameters, samples):
## Concentration profile ##
###########################

out = model.sim(end_sim, N=n, draw_function=draw_fcn, samples=samples_dict, processes=processes)
out = model.sim(end_sim, N=n, draw_function=draw_fcn, draw_function_kwargs={'samples': samples_dict}, processes=processes)
# Add 4% observational noise
out = add_gaussian_noise(out, 0.04, relative=True)
# Visualize
Expand Down Expand Up @@ -178,7 +178,7 @@ def draw_fcn(parameters, samples):
# Update model parameters
model.parameters.update({'kL_a': kL*a, 'D_ax': D_ax, 'delta_x': l/nx, 'u': u})
# Simulate
out_tmp = model.sim(end_sim, N=n, draw_function=draw_fcn, samples=samples_dict, processes=processes)
out_tmp = model.sim(end_sim, N=n, draw_function=draw_fcn, draw_function_kwargs={'samples': samples_dict}, processes=processes)
# Add 4% observational noise and store
out.append(add_gaussian_noise(out_tmp, 0.04, relative=True))

Expand Down

0 comments on commit 5c96143

Please sign in to comment.