@@ -15,9 +15,8 @@ to create a ``DiffractionObject`` instance and analyze your diffraction data usi
1515 most of the other functionalities in the class.
1616 Additionally, you can specify the type of your scattering experiment using the ``scat_quantity `` parameter,
1717 the name of your diffraction object using the ``name `` parameter,
18- and a ``metadata `` dictionary containing relevant information about the data. Here's an example:
18+ and a ``metadata `` dictionary containing relevant information about the data. Here's an example: ::
1919
20- .. code-block :: python
2120 import numpy as np
2221 from diffpy.utils.diffraction_objects import DiffractionObject
2322 x = np.array([0.12, 0.24, 0.31, 0.4]) # independent variable (e.g., q)
@@ -43,9 +42,8 @@ to create a ``DiffractionObject`` instance and analyze your diffraction data usi
4342 but also all the associated information for analysis.
4443
45442) ``DiffractionObject `` automatically populates the ``xarray `` onto ``q ``, ``tth ``, and ``d ``-spacing.
46- If you want to access your diffraction data in a specific spacing, you can do this:
45+ If you want to access your diffraction data in a specific spacing, you can do this: ::
4746
48- .. code-block :: python
4947 q = do.on_xtype("q")
5048 tth = do.on_xtype("tth")
5149 d = do.on_xtype("d")
@@ -71,9 +69,8 @@ to create a ``DiffractionObject`` instance and analyze your diffraction data usi
7169 For example, you can use the ``scale_to `` function to rescale one diffraction object to align its intensity values
7270 with a second diffraction object at a (closest) specified value on a specified ``xarray ``.
7371 This makes it easier for visualizing and comparing two intensity curves on the same plot.
74- For example, to scale ``do1 `` to match ``do2 `` at ``tth=60 ``:
72+ For example, to scale ``do1 `` to match ``do2 `` at ``tth=60 ``: ::
7573
76- .. code-block :: python
7774 # Create Diffraction Objects do1 and do2
7875 do1 = DiffractionObject(
7976 xarray=np.array([10, 15, 25, 30, 60, 140]),
@@ -111,9 +108,8 @@ to create a ``DiffractionObject`` instance and analyze your diffraction data usi
111108 do_copy = do.copy()
112109
1131106) The ``dump `` function saves the diffraction data and relevant information to a specified file.
114- You can choose one of the data axis (`` q`` , `` tth`` , or `` d`` ) to export, with `` q`` as the default.
111+ You can choose one of the data axis (``q ``, ``tth ``, or ``d ``) to export, with ``q `` as the default. ::
115112
116- .. code- block:: python
117113 # Assume you have created a Diffraction Object do
118114 file = "diffraction_data.xy"
119115 do.dump(file, xtype="q")
0 commit comments