@@ -105,70 +105,6 @@ and run the following ::
105
105
Getting Started
106
106
---------------
107
107
108
- Input:
109
- - directory: path to the directory containing the diffraction files that are to be analyzed
110
- - format: string (filepath)
111
- - eg: '/Users/zthatcher/Desktop/Data/nmf_mapping/time_data/' or . for cwd
112
-
113
- - save-files (optional): boolean as to whether or not you would like to save the dataframes, plots, and
114
- components (note: pdf data saves as .cgr and xrd data saves as .xy)
115
- - format: boolean
116
- - eg: --save-files False
117
- - default: True
118
-
119
- - threshold (optional and mut-exc to other thresholds): a threshold for the number of structural phases graphed (NMF components returned)
120
- - format as: integer
121
- - eg: --threshold 2
122
- - default: 10
123
-
124
- - improve-thresh (optional and mut-exc to other thresholds): a threshold (between 0 and 1) for the relative improvement ratio necessary to
125
- add an additional component. Default is 0.001. 0.1 Recommended for real data.
126
- - format: float
127
- - eg: --improve-thresh 0.1
128
- - default = 0.001
129
-
130
- - pca-thresh (optional and mut-exc to other thresholds): explained variance threshold for PCA component counting cutoff
131
- - format: float
132
- - eg: --pca-thresh 0.95
133
- - default = None
134
-
135
- - n-iter (optional): total number of iterations to run NMF algo. Defaults to 1000. 10000 typical to publish.
136
- - format: int
137
- - eg: --n-iter 10000
138
- - default: 1000
139
-
140
- - x-range (optional): the active x-range over which to run the NMF analysis (must be between shortest and
141
- longest range in the set of files)
142
- - format: pair of integers representing the lower r bound and the upper r bound with a comma between
143
- the lower and upper bound
144
- - eg: --xrange 5,10 12,15
145
- - default: entire range
146
-
147
- - xrd (optional): set this option if the directory contains xy or xye files rather than gr.
148
- - format: boolean
149
- - eg: --xrd True
150
- - default: False
151
-
152
- - x_units (required if xrd): set this as either twotheta or q if working with xrd data.
153
- - format: enum[str]
154
- - eg: --x_units twotheta
155
- - default: None (since --xrd defaults to False)
156
-
157
- - show graphs (optional): whether you or not you would like display the images
158
- - format: boolean
159
- - eg: --show False
160
- - default: True
161
-
162
- Returns:
163
- - Figure One: PDF or XRD pattern of structural phase components contributing to the NMF reconstruction
164
- - Figure Two: Weights of the phase components plotted in Figure One
165
- - Figure Three: Reconstruction error as a function of components
166
- - (Optional) Figure Four: Explained Variance plot as a function of components for PCA thresholding
167
-
168
- Example:
169
-
170
- nmf_mapping . --threshold 3 --xrange 5,10 --show True
171
-
172
108
173
109
You may consult our `online documentation <https://diffpy.github.io/diffpy.nmf_mapping >`_ for tutorials and API references.
174
110
0 commit comments