No project description provided
Project description
Positive Matrix Factorization in python
Handle PMF output from various format in handy pandas DataFrame and do lot of stuf with them.
Currently, only data from the EPA PMF5 is handle, from xlsx
or sql database output.
History
This project started because I needed to run several PMF for my PhD and also needed to run some computation on these results. The raw output of the EPA PMF5 software is a bit messy and hard to understand at a first glance, and copy/pasting xlsx file is not my taste... So I ended developping this tools for handling the tasks of maping the xlsx output to nice python objects, on which I can easily run some computation.
Since I needed to plot the results afterward, I also added some plot utilities in this package. It then has build in support for ploting :
- chemical profile (both absolute and normalized)
- species repartition among factor
- timeserie contribution (for all species and profiles)
- uncertainties plots (Bootstrap and DISP)
- seasonal contribution
- contribution of sources to polluted and normal days
- And a lot more!
Examples
The documentation has a lot of examples and figures, but here is a short summary:
from pyPMF.PMF import PMF
pmf = PMF(site="GRE-fr", reader="xlsx", BDIR="./")
# Read various output
pmf.read.read_base_profiles()
pmf.read.read_base_contributions()
pmf.read.read_constrained_profiles()
pmf.read.read_constrained_contributions()
# ... or simply :
pmf.read.read_all()
# The pmf has now different attributes associated
pmf.profiles # name of the different factors
pmf.species # name of the different species
pmf.dfcontrib_c # contribution dataframe of factors
pmf.dfprofile_c # chemical profile of factors
# ... and lot more
# plot the results
pmf.plot.plot_stacked_profiles()
# or use some utilities
pmf.to_cubic_meter(specie="Cu") # Contribution timeserie of the different factors to the Cu
pmf.to_relative_mass()
# ... and lot more
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyPMF-0.1.12.tar.gz
.
File metadata
- Download URL: pyPMF-0.1.12.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9889c7e1446245ef605a8e2bbe3a6217ea656873a4511a02108312d47df5a50 |
|
MD5 | a2e3c64c7fc3181ffe2ce0752cbb016c |
|
BLAKE2b-256 | 52756c56d99e1f2f7e80d0a88928fdca4cf6be0bbd396605b1acabc772b3edee |