Skip to content

Commit a4c07ef

Browse files
authored
Merge pull request #365 from stevenhua0320/docs-add-data
fix: add real data into example
2 parents 0db2da1 + 804d7c3 commit a4c07ef

File tree

4 files changed

+5347
-3
lines changed

4 files changed

+5347
-3
lines changed

docs/source/examples/diffraction_objects_example.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,19 @@ i.e.,
7575
This makes it very easy to compare a diffraction pattern that was measured or calculated
7676
on one ``xtype`` with one that was measured or calculated on another. E.g., suppose that you
7777
have a calculated powder pattern from a CIF file that was calculated on a d-spacing grid using
78-
some software package, and
79-
you want to know if a diffraction pattern you have measured on a Q-grid is the same material.
78+
some software package, which you could find in the example data folder called `CeO2_dspacing.xy` and
79+
you want to know if a diffraction pattern you have measured on a Q-grid, where the example data is also
80+
in the example data folder called `CeO2_mean_q.chi`, is the same material.
8081
You could simply load them both as diffraction objects and plot them together on the same grid.
82+
Here the `xcalc` is the first column in the `CeO2_dspacing.xy` and `ycalc` is the second column in the same
83+
file. Similarly, `xmeas` corresponds to the first column in the `CeO2_mean_q.chi` and `ymeas` is the second column in
84+
the same file.
8185

8286
.. code-block:: python
8387
8488
calculated = DiffractionObject(xcalc, ycalc, "d")
85-
measured = DiffractionObject(xmeas, ymeas, "tth", wavelength=0.717)
89+
measured = DiffractionObject(xmeas,
90+
ymeas, "q", wavelength=0.1)
8691
plt.plot(calculated.on_q()[0], calculated.on_q()[1])
8792
plt.plot(measured.on_q()[0], measured.on_q()[1])
8893
plt.show()

0 commit comments

Comments
 (0)