@@ -106,23 +106,26 @@ we would replace the code above with
106
106
The ``scale_to() `` method returns a new ``DiffractionObject `` which we can assign to a new
107
107
variable and make use of,
108
108
109
+ The default behavior is to align the objects based on the maximal q-value of each diffraction object,
110
+ so they will align at the intensity at these indices.
111
+
109
112
.. code-block :: python
110
113
111
- scaled_measured = measured.scale_to(calculated, q = 5.5 )
114
+ scaled_measured = measured.scale_to(calculated)
112
115
113
- For convenience , you can also apply an offset to the scaled new diffraction object with the optional
114
- `` offset `` argument, for example,
116
+ If this doesn't give the desirable results , you can specify an `` xtype=value `` to scale
117
+ based on the closest x-value in both objects. For example:
115
118
116
119
.. code-block :: python
117
120
118
- scaled_and_offset_measured = measured.scale_to(calculated, q = 5.5 , offset = 0 .5 )
121
+ scaled_measured = measured.scale_to(calculated, q = 5.5 )
119
122
120
- You can call ` scale_to() ` without specifying a value for ` q `, ` tth `, or ` d `.
121
- In this case, the scaling will be done based on the maximal x-array value of both diffraction objects:
123
+ For convenience, you can also apply an offset to the scaled new diffraction object with the optional
124
+ `` offset `` argument, for example,
122
125
123
126
.. code-block :: python
124
127
125
- scaled_measured = measured.scale_to(calculated)
128
+ scaled_and_offset_measured = measured.scale_to(calculated, q = 5.5 , offset = 0.5 )
126
129
127
130
DiffractionObject convenience functions
128
131
---------------------------------------
0 commit comments