|
208 | 208 | "cell_type": "markdown",
|
209 | 209 | "metadata": {},
|
210 | 210 | "source": [
|
211 |
| - "Define a StructureLibrary containing specifying two crystal structures and orientations of each to include" |
| 211 | + "Define a StructureLibrary containing specifying two crystal structures and orientations of each to include. The in-plane orientations can be a list of known options (set `inplane_rotations=[0]` in the call to `correlate` below) or the starting points for the list of rotations given to `correlate` below." |
212 | 212 | ]
|
213 | 213 | },
|
214 | 214 | {
|
|
221 | 221 | " [('Si', si, 'cubic'),\n",
|
222 | 222 | " ('Ga', ga, 'hexagonal')])\n",
|
223 | 223 | "structure_library = structure_library_generator.get_orientations_from_stereographic_triangle(\n",
|
224 |
| - " [(0, 10), (0, 10)], # Inplane rotations to include\n", |
| 224 | + " [(0,), (0,)], # In-plane rotations\n", |
225 | 225 | " 5) # Angular resolution of the library"
|
226 | 226 | ]
|
227 | 227 | },
|
|
250 | 250 | "cell_type": "markdown",
|
251 | 251 | "metadata": {},
|
252 | 252 | "source": [
|
253 |
| - "Correlate with the patterns contained in the library with the test data. At this stage the top 3 (n_largest) matching results are retained." |
| 253 | + "Correlate with the patterns contained in the library with the test data. At this stage the top 3 (`n_largest`) matching results are retained. Test all in-plane rotations at 5 degree increments from 0 to 360." |
254 | 254 | ]
|
255 | 255 | },
|
256 | 256 | {
|
|
260 | 260 | "outputs": [],
|
261 | 261 | "source": [
|
262 | 262 | "indexer = IndexationGenerator(test_data, template_library)\n",
|
263 |
| - "match_results = indexer.correlate(n_largest=3, keys=phase_names)" |
| 263 | + "match_results = indexer.correlate(n_largest=3, inplane_rotations=np.arange(0, 360, 5))" |
264 | 264 | ]
|
265 | 265 | },
|
266 | 266 | {
|
|
276 | 276 | "metadata": {},
|
277 | 277 | "outputs": [],
|
278 | 278 | "source": [
|
279 |
| - "match_results.plot_best_matching_results_on_signal(test_data, phase_names, template_library,\n", |
280 |
| - " permanent_markers=False, cmap='viridis')" |
| 279 | + "match_results.plot_best_matching_results_on_signal(test_data, template_library, permanent_markers=False, cmap='viridis')" |
281 | 280 | ]
|
282 | 281 | },
|
283 | 282 | {
|
|
334 | 333 | "cell_type": "markdown",
|
335 | 334 | "metadata": {},
|
336 | 335 | "source": [
|
337 |
| - "Define a structure library for expected phases, defined in section 1." |
| 336 | + "Define a structure library for the expected phases from section 1." |
338 | 337 | ]
|
339 | 338 | },
|
340 | 339 | {
|
|
405 | 404 | "cell_type": "markdown",
|
406 | 405 | "metadata": {},
|
407 | 406 | "source": [
|
408 |
| - "Plot indexed peaks on top of the data" |
| 407 | + "Plot indexed peaks on top of the data using the template library from above to generate peak positions." |
409 | 408 | ]
|
410 | 409 | },
|
411 | 410 | {
|
|
414 | 413 | "metadata": {},
|
415 | 414 | "outputs": [],
|
416 | 415 | "source": [
|
417 |
| - "indexation.plot_best_matching_results_on_signal(test_data, phase_names,\n", |
418 |
| - " vector_library, ediff, reciprocal_radius,\n", |
419 |
| - " permanent_markers=False)" |
| 416 | + "indexation.plot_best_matching_results_on_signal(test_data, template_library, permanent_markers=False)" |
420 | 417 | ]
|
421 | 418 | },
|
422 | 419 | {
|
|
441 | 438 | "cell_type": "markdown",
|
442 | 439 | "metadata": {},
|
443 | 440 | "source": [
|
444 |
| - "Plot the match rate as a metric for mapping success" |
| 441 | + "Plot the match rate as a metric for mapping success." |
445 | 442 | ]
|
446 | 443 | },
|
447 | 444 | {
|
|
517 | 514 | "name": "python",
|
518 | 515 | "nbconvert_exporter": "python",
|
519 | 516 | "pygments_lexer": "ipython3",
|
520 |
| - "version": "3.6.6" |
| 517 | + "version": "3.7.2" |
521 | 518 | }
|
522 | 519 | },
|
523 | 520 | "nbformat": 4,
|
|
0 commit comments