Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions docs/examples/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ First, plot the data without performing peak extraction. The first argument
must be either a PDF (as here) or a .srmise file (described later) saved by
SrMise. ::

srmise data/Ag_nyquist_qmax30.gr --no-extract --plot
srmise docs/examples/data/Ag-nyquist-qmax30.gr --no-extract --plot

This should result in an image very similar to the one below. The top shows the
experimental data in blue. The bottom shows the difference curve, which is
Expand All @@ -160,7 +160,7 @@ performing peak extraction from around 2 Å to 3.5 Å will be sufficient. To
restrict peak extraction to this interval use the ``--range`` option, which
accepts a pair of values. ::

srmise data/Ag_nyquist_qmax30.gr --no-extract --plot --range 2 3.5
srmise docs/examples/data/Ag-nyquist-qmax30.gr --no-extract --plot --range 2 3.5

The PDF baseline of a crystal is linear, and a reasonable crystal baseline can
often be automatically estimated. To estimate baseline parameters
Expand All @@ -170,7 +170,7 @@ baseline for which SrMise provides automatic estimation. Since the results of
peak extraction are conditioned on the baseline parameters, it is a good idea to
see whether they are reasonable. ::

srmise data/Ag_nyquist_qmax30.gr --no-extract --plot --range 2 3.5
srmise docs/examples/data/Ag-nyquist-qmax30.gr --no-extract --plot --range 2 3.5
--baseline "Polynomial(degree=1)"

|images/extract_single_peak2.png|
Expand All @@ -179,7 +179,7 @@ The estimated baseline looks reasonable, so it's time to perform peak extraction
By default ``srmise`` performs extraction when run, so simply remove the
``--no-extract`` option. ::

srmise data/Ag_nyquist_qmax30.gr --plot --range 2 3.5
srmise docs/examples/data/Ag-nyquist-qmax30.gr --plot --range 2 3.5
--baseline "Polynomial(degree=1)"

|images/extract_single_peak3.png|
Expand All @@ -206,7 +206,7 @@ options.
The script gives results identical to the commands above, and also saves both a
.srmise and .pwa file in the *output* directory. Verify this by running it. ::

python extract_single_peak.py
python extract-single-peak.py


.. ~Example 2~ ..
Expand Down Expand Up @@ -236,7 +236,7 @@ which sets SrMise parameters as part of the following pattern: ::

Run and plot the results of this example with ::

python parameter_summary.py
python parameter-summary.py

|images/parameter_summary1.png|

Expand Down Expand Up @@ -296,7 +296,7 @@ follows: ::

Run the following command to view this baseline. ::

srmise data/TiO2_fine_qmax26.gr --bpoly1 -0.65 0c --range 0 10
srmise data/TiO2-fine-qmax26.gr --bpoly1 -0.65 0c --range 0 10
--no-extract --plot

|images/parameter_summary2.png|
Expand Down Expand Up @@ -634,14 +634,14 @@ First, visually check that the baseline obtained in the earlier silver example
(set using the ``--bsrmise filename.srmise`` option) is reasonable over a
larger range. ::

srmise data/Ag_nyquist_qmax30.gr --no-extract --plot --range 2 10
srmise docs/examples/data/Ag-nyquist-qmax30.gr --no-extract --plot --range 2 10
--bsrmise output/query_results.srmise

|images/query_results1.png|

Next, run ::

python query_results.py
python query-results.py

to perform peak extraction, the example analysis, and obtain the two plots
below.
Expand Down Expand Up @@ -764,8 +764,8 @@ Details of the multimodeling procedure are discussed in the comments of the
extraction and analysis scripts. Run these, noting that the extraction script
may take several minutes to complete. ::

python multimodel_known_dG1.py
python multimodel_known_dG2.py
python multimodel-known-dG1.py
python multimodel-known-dG2.py

.. ~Example 6~ ..

Expand Down Expand Up @@ -808,8 +808,8 @@ Details of the multimodeling procedure are discussed in the comments of the
extraction and analysis scripts. Run these, noting that the extraction script
may take several minutes to complete. ::

python multimodel_unknown_dG1.py
python multimodel_unknown_dG2.py
python multimodel-unknown-dG1.py
python multimodel-unknown-dG2.py

.. ~PDF Info~ ..

Expand Down
23 changes: 23 additions & 0 deletions news/bg-mpl-stylesheet.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* No News Added: Added `bg-mpl-stylesheet` as requirement to render better plot

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
1 change: 1 addition & 0 deletions requirements/conda.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
numpy
scipy
matplotlib-base
bg-mpl-stylesheets
1 change: 1 addition & 0 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
numpy
scipy
matplotlib
bg-mpl-stylesheets
2 changes: 2 additions & 0 deletions src/diffpy/srmise/applications/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
import matplotlib.pyplot as plt
import mpl_toolkits.axisartist as AA
import numpy as np
from bg_mpl_stylesheets.styles import all_styles
from matplotlib.ticker import MultipleLocator
from mpl_toolkits.axes_grid1.inset_locator import inset_axes

from diffpy.srmise.pdfpeakextraction import PDFPeakExtraction, resample
from diffpy.srmise.peakstability import PeakStability

plt.style.use(all_styles["bg-style"])
# For a given figure, returns a label of interest
labeldict = {}

Expand Down
Loading