-
Notifications
You must be signed in to change notification settings - Fork 3
Installation
If you previously installed PeakPo
, you may already have this setup and therefore you may skip Step 1
and Step 2
and go to Step 3
just for an update. If you need to create a new environment, you may start from Step 2
.
Download Python
3.8 (version 3.9 not tested) from https://www.anaconda.com/distribution/ for your OS and install. The installation should be straightforward.
Conda
in Anaconda distribution provides you with virtual environment functionality: see here for detail. We will make a virtual environment for PeakPo
. This example is for Python
3.6.
-
Run
Terminal.app
(for Mac) orAnaconda powershell
(for Windows). All the commands below should be typed and run in the app. -
Create a
conda
environment forPeakPo
, for examplepkpo
:conda create --name pkpo python=3.8
(2021/05/01) For macos, we used to recommend:
conda create --name pkpo python=3.6.6
because of the segmentation fault 11 found fortk == 8.6.9
for that OS.
However, it appears that3.8
is fine for macos.Avoid Python version < 3.5, because they do not work with
pymatgen
. -
Switch to the new environment (in this example
pkpo
):conda activate pkpo
(Warning)
PeakPo
versions between 7.7.10 and 7.7.19,PeakPo
works only withmatplotlib
version = 2.1 andPyQt5
. In this case you should do:conda install matplotlib=2.1
.(Warning)
PeakPo
versions above 7.7.20 work only withmatplotlib
version 2.2.x.PeakPo
versions above 7.7.24 work only withmatplotlib
version 3 or higher. -
Install some necessary packages.
(a) for mac osx, windows, and linux
conda install -c conda-forge pyqt uncertainties pymatgen lmfit periodictable fabio xlwt conda install -c conda-forge matplotlib=3.3 qdarkstyle=2.7 statsmodels=0.10
(2021/05/01) If the command above fails, try to install modules one by one rather than once. For example,
conda install -c conda-forge pyqt
, etc.matplotlib >= 3.4
seems to have an incompatibility issue with PeakPo.(2021/05/01) I remove the restriction on macos for
tk=8.6.8
. Version higher than that inpython=3.6
used to cause segment fault. Now withtk=8.6.10
andpython=3.8
, I found no problem anymore.(b) If you have never used
PeakPo
before or yourdpp
files made in 2019 or later (environmentpkpo2019
):conda install -c conda-forge pyfai dill
If you have old
dpp
files, these files may not open properly with the environment created here. In this case, I suggest to create different environments with different versions ofpyfai
anddill
. In this case, by changing the environment you can still open olddpp
files.(b1) If you have
dpp
files made in 2017 or before, create an environmentpkpo2017
using Step 2-2 above and then install the packages below in the new environment.conda install -c conda-forge pyfai=0.14.2 dill=0.2.8.2
If the command above returns an error not finding any of these old version:
pip install pyfai=0.14.2 dill=0.2.8.2 --user
(b2) If you have
dpp
files made in 2018 or before, create an environmentpkpo2018
using step 2 above and then install the packages below in the new environment.conda install -c conda-forge pyfai=0.14.2 dill=0.2.6
If the command above returns error not finding any of these old version:
pip install pyfai=0.14.2 dill=0.2.6 --user
(c) for all os's
pip install pytheos --user
You are ready to run PeakPo
.
-
Go to a folder where you will install the
PeakPo
files.cd [path_for_peakpo_folder]
For example, [path_for_peakpo_folder] can be:
home/Desktop/
-
Make a folder to install
PeakPo
:mkdir [peakpo-version_number] cd [peakpo-version_number]
For example, [peakpo-version_number] can be peakpo-7.7.30
-
In the terminal window, copy, paste, and hit the
return
key for the line below.git clone https://github.com/SHDShim/PeakPo .
(Note) Don't forget the period at the end of the line above.
-
Go to the
peakpo
folder.cd [peakpo-version_number]/peakpo
-
Run:
python -m peakpo
In a very rare case, you might have to do
sudo
:sudo python -m peakpo
Most common error at this step is you are in a wrong folder. Please find a folder that has
PeakPo.py
.
Data types and functions
Plot and sidebars
Toolbars
Base pattern
Waterfall patterns
Background subtraction
Setup
Control gray scale
Azimuthal integration
JCPDSs
JCPDS, control the view
Make a jcpds from cif
Workflow
Tweak
Save Tweak to JCPDS
Get Tweak result
Peak fitting
Unit-cell fitting
Session
Output files
Publication-ready Cake plot
Illustrator-ready PeakPo plot
Install in anaconda
Update
Run PeakPo in python
Update history
Issues and Suggestions
Environments | FBS setup | APS setups
PeakPo with Jupyter