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
.
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")
$ Rscript main_fits.R testcase/userinput.json
Key parameters in .json file:
specfile
: sectra filepeaksequence
: list of peaks or profiles to be fitted in sequencelimitcCOH
: limit estimated moles[carboxylic COH] to be less than or equal to estimated moles[carboxylic CO]. carboxylic CO must appear before carboxylic COH in peaksequence
Outputs:
fitpars.csv
pkareas.csv
$ Rscript plot_fits.R testcase/userinput.json
Key parameters in .json file:
specfile
: sectra fileOutputs:
specfits.pdf
$ Rscript conv_areas.R testcase/userinput.json
Key parameters in .json file:
abscoef
: (optional) json file of absorption coefficientsOutputs:
moles.csv
: micromoles per collection surface area