R package: APRLmpf

APRL (multi-)peak fitting tool. Resolves overlapping bands according to procedure and values described by Takahama, Johnson, and Russell, Aerosol Sci. Tech., 2013.

More generally, the purpose of this package is to provide a framework for

Subject to substantial modification. Keep up-to-date with git pull.

General Instructions

First, please see installation instructions for APRLspec, on which APRLmpf depends.

Install for R (replace {username} and {password} with account for which access to private repository is granted):

> devtools::install_git('https://{username}:{password}@gitlab.com/aprl/APRLmpf.git')

After installation, get a copy of example files (templates). To copy them into a new folder called “mpf” in your working directory:

$ cd /path/to/workingdir/
$ R -e "APRLspec::CopyPkgFiles('APRLmpf', 'example_files', 'mpf')"
$ cd mpf/

To copy them into an existing working directory (“.” as third argument) - e.g., the current one where you have used baseline correction scripts - you can optionally pass a prefix as the fourth argument to the CopyPkgFiles function:

$ cd /path/to/workingdir/
$ R -e "APRLspec::CopyPkgFiles('APRLmpf', 'example_files', '.', 'mpf')"

This will add a prefix to all the example files in this directory to prevent naming conflicts with files from other packages.

To uninstall, run the command in R:

> remove.packages("APRLmpf")

Fit peaks

$ Rscript main_fits.R testcase/userinput.json

Key parameters in .json file:


Plot fits

$ Rscript plot_fits.R testcase/userinput.json

Key parameters in .json file:


Apply Beer-Lambert law

$ Rscript conv_areas.R testcase/userinput.json

Key parameters in .json file:


Test cases

Future work