Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@

LyoPRONTO is an open-source user-friendly tool to simulate and optimize freezing and primary drying in lyophilizers written using Python.

# Installation

Install this code directly from GitHub with `pip`:
```bash
pip install git+https://github.com/LyoHUB/LyoPRONTO
```

# Authors
Original authors: Gayathri Shivkumar, Petr S. Kazarin and Alina A. Alexeenko.
Maintained and updated by Isaac S. Wheeler.

# Interactive Simulation
A web-based GUI is available for this software at http://lyopronto.geddes.rcac.purdue.edu.
A web-based GUI is available for this software at https://lyopronto.geddes.rcac.purdue.edu or https://lyopronto2.geddes.rcac.purdue.edu

# How to Use This Code Directly
Construct a YAML file with all the necessary inputs (see YAML files under `test_data` of this repository for examples), then run a Python script like the following:
Expand Down
241 changes: 241 additions & 0 deletions docs/examples/design_space_PD.ipynb

Large diffs are not rendered by default.

71 changes: 69 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,71 @@
# LyoPRONTO: Getting Started
# LyoPRONTO

LyoPRONTO is an open-source user-friendly tool to simulate and optimize freezing and primary drying in lyophilizers written using Python.

## Installation

Install this code directly from GitHub with `pip`:
```bash
pip install git+https://github.com/LyoHUB/LyoPRONTO
```

## Authors
Original authors: Gayathri Shivkumar, Petr S. Kazarin and Alina A. Alexeenko.
Maintained and updated by Isaac S. Wheeler.

## Interactive Simulation
A web-based GUI is available for this software at https://lyopronto.geddes.rcac.purdue.edu or https://lyopronto2.geddes.rcac.purdue.edu.

## How to Use This Code Directly
Construct a YAML file with all the necessary inputs (see YAML files under `test_data` of this repository for examples), then run a Python script like the following:
```python
import time

import lyopronto as lp

# get time for recording simulation results
current_time = time.strftime("%y%m%d_%H%M", time.localtime())

yaml_fname = "your_dir/cycle_setup.yaml" # Fill in with your filename and appropriate location

# Read in simulation inputs
inputs = lp.read_inputs(yaml_fname)
# Execute the simulation
output = lp.execute_simulation(inputs)

# Record the simulation inputs, outputs, and figures
lp.save_inputs(inputs, current_time)
lp.save_csv(output, inputs, current_time)
lp.generate_visualizations(output, inputs, current_time)
```
This will generate a record of both inputs and outputs each time you execute the file, so you can edit the original YAML and rerun the script without worrying about losing prior values of the inputs.

See also documentation examples online [here](https://lyohub.github.io/LyoPRONTO/dev/examples/knownRp_PD/) and [here](https://lyohub.github.io/LyoPRONTO/dev/examples/unknownRp_PD/)

The original method for running this code, as illustrated in a video tutorial
[on LyoHUB's YouTube channel](https://youtu.be/DI-Gz0pBI0w),
is to download this repository, edit the script `main.py` in its root directory, then run that script from the command line (in the same directory):
```
python main.py
```
Files listing the inputs and outputs will be generated in the current directory, along with some plots of temperature, pressure, and drying progress vs. time.


## Citation
G. Shivkumar, P. S. Kazarin, A. D. Strongrich, & A. A. Alexeenko, "LyoPRONTO: An Open-Source Lyophilization PRocess OptimizatioN TOol", AAPS PharmSciTech (2019) 20: 328.

The noted paper is open access, and can be found [here](https://link.springer.com/article/10.1208/s12249-019-1532-7).

## Licensing

Copyright (C) 2019, Gayathri Shivkumar, Petr S. Kazarin, Alina A. Alexeenko, and Isaac S. Wheeler.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

By request, this software may also be distributed under the terms of the GNU Lesser General Public License (LGPL); for permission, contact the authors or maintainer.

See also [the web-based GUI](http://lyopronto.geddes.rcac.purdue.edu), and the 2019 [video tutorial](https://www.youtube.com/watch?v=DI-Gz0pBI0w).

2 changes: 1 addition & 1 deletion docs/tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ See also the video tutorial at https://www.youtube.com/watch?v=DI-Gz0pBI0w.
## Newer approach: YAML Input Format

LyoPRONTO accepts inputs as a YAML file, loaded via `read_inputs(filename)` and executed with `execute_simulation(inputs)`.
The expected keys, values, etc. are fully specified with all units and constraints in the [full reference](reference.md#input-yaml-specification). The keys are also exemplified in the example notebooks, with a set of dictionaries that are put together into a `sim_setup` dictionary for each example.
The expected keys, values, etc. are fully specified with all units and constraints in the [full reference](yaml_inputs.md). The keys are also exemplified in the example notebooks, with a set of dictionaries that are put together into a `sim_setup` dictionary for each example.

With a YAML file for your inputs, the high-level workflow is as simple as this:

Expand Down
2 changes: 1 addition & 1 deletion lyopronto/calc_unknownRp.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def dry(vial, product, ht, Pchamber, Tshelf, time, Tbot_exp):
Tbot_exp (np.ndarray): Array of expected bottom temperatures at each time step.

Returns:
tuple[np.ndarray, np.ndarray]: A tuple containing:
(tuple[np.ndarray, np.ndarray]): A tuple containing:
output_saved (np.ndarray): Saved output data for each time step, including time, sublimation temperature, bottom temperature, shelf temperature, chamber pressure, sublimation rate, and percent dried.
product_res (np.ndarray): Calculated product resistance data, including time, cake length, and product resistance.
"""
Expand Down
7 changes: 4 additions & 3 deletions lyopronto/design_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ def dry(vial,product,ht,Pchamber,Tshelf,dt,eq_cap,nVial):
nVial (int): Number of vials in the load, used for equipment capability calculation

Returns:
ndarray: table of results for shelf isotherms
ndarray: table of results for product isotherms
ndarray: table of results for equipment capability curve
(tuple[ndarray, ndarray, ndarray]): A tuple containing:
- table of results for shelf isotherms
- table of results for product isotherms
- table of results for equipment capability curve

The first two returns have 5 rows corresponding to:
- Maximum product temperature [degC]
Expand Down
Loading
Loading