Skip to content

Commit 3feb89d

Browse files
committed
Updated function names to use the lasted version of the API
1 parent 9a5ea92 commit 3feb89d

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

article/notebooks/article_tables.ipynb

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
{
2121
"cell_type": "code",
22-
"execution_count": 25,
22+
"execution_count": 3,
2323
"metadata": {},
2424
"outputs": [],
2525
"source": [
@@ -29,13 +29,13 @@
2929
"import statsmodels.api as sm\n",
3030
"import numpy as np\n",
3131
"\n",
32-
"from pseudobatch import pseudobatch_transform_pandas, preprocess_gaseous_species\n",
32+
"from pseudobatch import pseudobatch_transform_pandas, hypothetical_concentration\n",
3333
"from pseudobatch.datasets._dataloaders import _prepare_simulated_dataset"
3434
]
3535
},
3636
{
3737
"cell_type": "code",
38-
"execution_count": 26,
38+
"execution_count": 4,
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [
@@ -54,7 +54,7 @@
5454
},
5555
{
5656
"cell_type": "code",
57-
"execution_count": 27,
57+
"execution_count": 5,
5858
"metadata": {},
5959
"outputs": [],
6060
"source": [
@@ -75,7 +75,7 @@
7575
},
7676
{
7777
"cell_type": "code",
78-
"execution_count": 28,
78+
"execution_count": 6,
7979
"metadata": {},
8080
"outputs": [],
8181
"source": [
@@ -109,7 +109,7 @@
109109
},
110110
{
111111
"cell_type": "code",
112-
"execution_count": 29,
112+
"execution_count": 7,
113113
"metadata": {},
114114
"outputs": [],
115115
"source": [
@@ -130,7 +130,7 @@
130130
},
131131
{
132132
"cell_type": "code",
133-
"execution_count": 30,
133+
"execution_count": 8,
134134
"metadata": {},
135135
"outputs": [],
136136
"source": [
@@ -163,7 +163,7 @@
163163
},
164164
{
165165
"cell_type": "code",
166-
"execution_count": 31,
166+
"execution_count": 9,
167167
"metadata": {},
168168
"outputs": [],
169169
"source": [
@@ -181,7 +181,7 @@
181181
},
182182
{
183183
"cell_type": "code",
184-
"execution_count": 32,
184+
"execution_count": 10,
185185
"metadata": {},
186186
"outputs": [
187187
{
@@ -222,7 +222,7 @@
222222
},
223223
{
224224
"cell_type": "code",
225-
"execution_count": 33,
225+
"execution_count": 11,
226226
"metadata": {},
227227
"outputs": [
228228
{
@@ -257,27 +257,28 @@
257257
"metadata": {},
258258
"source": [
259259
"## Calculate CO2 yield\n",
260-
"Most of the CO2 evaporates from the bioreactor, thus is is not removed through sample withdrawal. However as we will see we do not obtain a good estimate of the yield coefficient using the raw data here either. \n",
260+
"Most of the CO2 evaporates from the bioreactor, thus is not removed through sample withdrawal. However as we will see we do not obtain a good estimate of the yield coefficient using the raw data here either. \n",
261261
"\n",
262-
"Measurements of CO2 are usually obtained through an off-gas analyzer that analyze the amount of CO2 passing through. To obtain the correct estimate, we need to preprocess these measurements in to a hypothetical liquid concentration as if the CO2 molecules did not evaporate. We can do this using the function `preprocess_gaseous_species()` and then pseudo batch transform the preprocessed data.\n",
262+
"Measurements of CO2 are usually obtained through an off-gas analyzer that analyze the amount of CO2 passing through. To obtain the correct estimate, we need to preprocess these measurements in to a hypothetical liquid concentration as if the CO2 molecules did not evaporate. We can do this using the function `hypothetical_concentration()` and then pseudo batch transform the preprocessed data.\n",
263263
"\n",
264264
"The preprocessing assumes that the amount of CO2 in the liquid is neglectable compared to the accumulated product of CO2. We believe that this is often true in real fermentation processes. For testing purposes and simplification, the simulated fedbatch process assumes that all CO2 evaporates instantly after production."
265265
]
266266
},
267267
{
268268
"cell_type": "code",
269-
"execution_count": 34,
269+
"execution_count": 13,
270270
"metadata": {},
271271
"outputs": [],
272272
"source": [
273-
"fedbatch_df_measurements_only['preprocessed_CO2'] = preprocess_gaseous_species(\n",
274-
" accumulated_amount_of_gaseous_species=fedbatch_df_measurements_only['m_CO2_gas'].values,\n",
275-
" reactor_volume=fedbatch_df_measurements_only['v_Volume'],\n",
276-
" sample_volume=fedbatch_df_measurements_only['sample_volume']\n",
273+
"fedbatch_df_measurements_only['hypothetical_c_CO2'] = hypothetical_concentration(\n",
274+
" metabolised_amount=fedbatch_df_measurements_only['m_CO2_gas'].to_numpy(),\n",
275+
" reactor_volume=fedbatch_df_measurements_only['v_Volume'].to_numpy(),\n",
276+
" sample_volume=fedbatch_df_measurements_only['sample_volume'].to_numpy()\n",
277277
")\n",
278+
"\n",
278279
"fedbatch_df_measurements_only['c_CO2_pseudo'] = pseudobatch_transform_pandas(\n",
279280
" df=fedbatch_df_measurements_only,\n",
280-
" measured_concentration_colnames=['preprocessed_CO2'],\n",
281+
" measured_concentration_colnames=['hypothetical_c_CO2'],\n",
281282
" reactor_volume_colname='v_Volume',\n",
282283
" accumulated_feed_colname='v_Feed_accum',\n",
283284
" concentration_in_feed=[0],\n",
@@ -294,7 +295,7 @@
294295
},
295296
{
296297
"cell_type": "code",
297-
"execution_count": 35,
298+
"execution_count": 14,
298299
"metadata": {},
299300
"outputs": [
300301
{
@@ -334,7 +335,7 @@
334335
},
335336
{
336337
"cell_type": "code",
337-
"execution_count": 36,
338+
"execution_count": 15,
338339
"metadata": {},
339340
"outputs": [],
340341
"source": [
@@ -353,7 +354,7 @@
353354
},
354355
{
355356
"cell_type": "code",
356-
"execution_count": 37,
357+
"execution_count": 16,
357358
"metadata": {},
358359
"outputs": [],
359360
"source": [
@@ -371,7 +372,7 @@
371372
},
372373
{
373374
"cell_type": "code",
374-
"execution_count": 38,
375+
"execution_count": 17,
375376
"metadata": {},
376377
"outputs": [
377378
{
@@ -437,7 +438,7 @@
437438
"mu 0.10 0.05 (0.45) 0.10 (-0.00)"
438439
]
439440
},
440-
"execution_count": 38,
441+
"execution_count": 17,
441442
"metadata": {},
442443
"output_type": "execute_result"
443444
}

0 commit comments

Comments
 (0)