Package: pymser
pyMSERA Python library to apply theMarginal Standard Error Rule (MSER)for transient regime detection and truncation on Grand Canonical Monte Carlo adsorption simulations.DependenciesNumPyis the fundamental package for scientific computing with Python.SciPyis a collection of fundamental algorithms for scientific computing in Python.statsmodelsis a python module that provides classes and functions for the estimation of many different statistical models, as well as for conducting statistical tests, and statistical data exploration.pyTorchis an open source machine learning framework that uses tensor computations and automatic differentiation on GPU and CPU.Developer tipsThese tips are not mandatory, but they are a sure way of helping you develop the code while maintaining consistency with the current style, structure and formatting choices.Coding style guideWe recommend these tools to ensure code style compatibility.autopep8automatically formats Python code to conform to the PEP8 style guide.Flake8is your tool for style guide enforcement.InstallationOption 1: Usingsetup.pyClonepymserrepository if you haven't done it yet.Go topymser's root folder, there you will findsetup.pyfile, and run the command below:pythonsetup.pyinstallOption 2: Using pip/pipenv to install from Pypi.orgIf you intend to usepipenv, please add the following to yourPipfile:[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pymser = "*"If you intend to usepip, please run the command below:pipinstallpymserOption 3: Using pip to install directly from the GitHub repoYou can runpipinstallgit+https://github.com/IBM/pymser.gitand then you will be prompted to enter your GitHub username and password/access token.If you already have a SSH key configured, you can runpipinstallgit+ssh://git@github.com/IBM/pymser.gitOption 4: Using pip/pipenv to install from ArtifactoryLog into Artifactory and access your user profile. There you will find your API key and username. Then export your credentials as environment variables for later use in the installation process.exportARTIFACTORY_USERNAME=username@email.comexportARTIFACTORY_ACCESS_TOKEN=your-access-tokenexportARTIFACTORY_URL=your-artifactory-urlIf you intend to usepipenv, please add the following to yourPipfile:[[source]]
url = "https://$ARTIFACTORY_USERNAME:$ARTIFACTORY_ACCESS_TOKEN@$ARTIFACTORY_URL"
verify_ssl = true
name = "artifactory"

[packages]
pymser = {version="*", index="artifactory"}If you intend to usepip, please run the command below:pipinstallpymser--extra-index-url=https://$ARTIFACTORY_USERNAME:$ARTIFACTORY_ACCESS_TOKEN@$ARTIFACTORY_URLUsage exampleThis is a small example of how to use our package:>>>importpymser>>>importpandasaspd>>>>>># Reads the example file using pandas>>>df=pd.read_csv('example_data/Cu-BTT_500165.0_198.000000.csv')>>>>>># Apply the MSER to get the index of the start of equilibrated data>>>results=pymser.equilibrate(df['mol/kg'],LLM=False,batch_size=1,ADF_test=True,uncertainty='uSD',print_results=True)pyMSEREquilibrationResults==============================================================================Startofequilibrateddata:13368of48613Totalequilibratedsteps:35245(72.50%)Equilibrated:YesAverageoverequilibrateddata:22.4197±0.1905Numberofuncorrelatedsamples:22.3Autocorrelationtime:1579.0==============================================================================AugmentedDickey-FullerTest==============================================================================Teststatisticforobservable:-3.926148246630434P-valueforobservable:0.001850619485090052Thenumberoflagsused:46ThenumberofobservationsusedfortheADFregression:35198CutoffMetrics:1%:-3.430536|Thedataisstationarywith99%confidence5%:-2.861622|Thedataisstationarywith95%confidence10%:-2.566814|Thedataisstationarywith90%confidenceYou can also access ourtutorial.Python package deploymentDeploying to ArtifactoryWe have an automated CI/CD pipeline running on TravisCI that takes every singlegit pushevent and executes the build/test/deploy instructions in the.travis.yml. If you are deployingmasterorreleasebranches, a Python package will be generated and published to a private Pypi registry on Artifactory.Deploying to PypiWe have an automated CI/CD pipeline running on TravisCI that takes every singlegit pushevent and executes the build/test/deploy instructions in the.travis.yml. If you are deployingmainbranch, a Python package will be generated and published to Pypi.org registry.