experiment
categories
background
base
BackgroundBase
Bases: CategoryCollection
Abstract base for background subcategories in experiments.
Concrete implementations provide parameterized background models and compute background intensities on the experiment grid.
Source code in src/easydiffraction/datablocks/experiment/categories/background/base.py
11 12 13 14 15 16 17 18 19 20 21 22 23 | |
show()
abstractmethod
Print a human-readable view of background components.
Source code in src/easydiffraction/datablocks/experiment/categories/background/base.py
20 21 22 23 | |
chebyshev
Chebyshev polynomial background model.
Provides a collection of polynomial terms and evaluation helpers.
ChebyshevPolynomialBackground
Bases: BackgroundBase
Chebyshev polynomial background model.
Source code in src/easydiffraction/datablocks/experiment/categories/background/chebyshev.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |
show()
Print a table of polynomial orders and coefficients.
Source code in src/easydiffraction/datablocks/experiment/categories/background/chebyshev.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |
PolynomialTerm
Bases: CategoryItem
Chebyshev polynomial term.
New public attribute names: order and coef replacing the
longer chebyshev_order / chebyshev_coef. Backward-compatible
aliases are kept so existing serialized data / external code does
not break immediately. Tests should migrate to the short names.
Source code in src/easydiffraction/datablocks/experiment/categories/background/chebyshev.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |
coef
property
writable
Coefficient used in a Chebyshev polynomial background term.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
id
property
writable
Identifier for this background polynomial term.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
order
property
writable
Order used in a Chebyshev polynomial background term.
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the
parameter value.
enums
Enumerations for background model types.
BackgroundTypeEnum
Bases: str, Enum
Supported background model types.
Source code in src/easydiffraction/datablocks/experiment/categories/background/enums.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
default()
classmethod
Return a default background type.
Source code in src/easydiffraction/datablocks/experiment/categories/background/enums.py
17 18 19 20 | |
description()
Human-friendly description for the enum value.
Source code in src/easydiffraction/datablocks/experiment/categories/background/enums.py
22 23 24 25 26 27 | |
factory
Background factory — delegates entirely to FactoryBase.
BackgroundFactory
Bases: FactoryBase
Create background collections by tag.
Source code in src/easydiffraction/datablocks/experiment/categories/background/factory.py
9 10 11 12 13 14 | |
line_segment
Line-segment background model.
Interpolate user-specified points to form a background curve.
LineSegment
Bases: CategoryItem
Single background control point for interpolation.
Source code in src/easydiffraction/datablocks/experiment/categories/background/line_segment.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
id
property
writable
Identifier for this background line segment.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
x
property
writable
X-coordinates used to create many straight-line segments.
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the
parameter value.
y
property
writable
Intensity used to create many straight-line segments.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
LineSegmentBackground
Bases: BackgroundBase
Linear-interpolation background between user-defined points.
Source code in src/easydiffraction/datablocks/experiment/categories/background/line_segment.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
show()
Print a table of control points (x, intensity).
Source code in src/easydiffraction/datablocks/experiment/categories/background/line_segment.py
178 179 180 181 182 183 184 185 186 187 188 189 | |
data
bragg_pd
PdCwlData
Bases: PdDataBase
Bragg powder CWL data collection.
Source code in src/easydiffraction/datablocks/experiment/categories/data/bragg_pd.py
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 | |
two_theta
property
Get 2θ values for data points included in calculations.
unfiltered_x
property
Get the 2θ values for all data points in this collection.
x
property
Alias for two_theta.
PdCwlDataPoint
Bases: PdDataPointBaseMixin, PdCwlDataPointMixin, CategoryItem
Powder diffraction data point for CWL experiments.
Source code in src/easydiffraction/datablocks/experiment/categories/data/bragg_pd.py
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | |
PdCwlDataPointMixin
Mixin for CWL powder diffraction data points.
Source code in src/easydiffraction/datablocks/experiment/categories/data/bragg_pd.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
two_theta
property
Measured 2θ diffraction angle (deg).
Reading this property returns the underlying
NumericDescriptor object.
PdDataBase
Bases: CategoryCollection
Base class for powder diffraction data collections.
Source code in src/easydiffraction/datablocks/experiment/categories/data/bragg_pd.py
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 | |
calc_status
property
Refinement-status flags for each data point as an array.
d_spacing
property
D-spacing values for active (non-excluded) data points.
intensity_bkg
property
Background intensities for active data points.
intensity_calc
property
Calculated intensities for active data points.
intensity_meas
property
Measured intensities for active data points.
intensity_meas_su
property
Standard uncertainties of the measured intensities.
Values smaller than 0.0001 are replaced with 1.0 to prevent fitting failures.
PdDataPointBaseMixin
Single base data point mixin for powder diffraction data.
Source code in src/easydiffraction/datablocks/experiment/categories/data/bragg_pd.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
calc_status
property
Status code of the data point in the calculation process.
Reading this property returns the underlying
StringDescriptor object.
d_spacing
property
d-spacing value corresponding to this data point.
Reading this property returns the underlying
NumericDescriptor object.
intensity_bkg
property
Intensity of a computed background at this point.
Reading this property returns the underlying
NumericDescriptor object.
intensity_calc
property
Intensity of a computed diffractogram at this point.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas
property
Intensity recorded at each measurement point (angle/time).
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas_su
property
Standard uncertainty of the measured intensity at this point.
Reading this property returns the underlying
NumericDescriptor object.
point_id
property
Identifier for this data point in the dataset.
Reading this property returns the underlying
StringDescriptor object.
PdTofData
Bases: PdDataBase
Bragg powder TOF data collection.
Source code in src/easydiffraction/datablocks/experiment/categories/data/bragg_pd.py
551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 | |
time_of_flight
property
Get TOF values for data points included in calculations.
unfiltered_x
property
Get the TOF values for all data points in this collection.
x
property
Alias for time_of_flight.
PdTofDataPoint
Bases: PdDataPointBaseMixin, PdTofDataPointMixin, CategoryItem
Powder diffraction data point for time-of-flight experiments.
Source code in src/easydiffraction/datablocks/experiment/categories/data/bragg_pd.py
285 286 287 288 289 290 291 292 293 294 295 | |
PdTofDataPointMixin
Mixin for powder diffraction data points with time-of-flight.
Source code in src/easydiffraction/datablocks/experiment/categories/data/bragg_pd.py
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |
time_of_flight
property
Measured time for time-of-flight neutron measurement (µs).
Reading this property returns the underlying
NumericDescriptor object.
bragg_sc
Refln
Bases: CategoryItem
Single reflection for single-crystal diffraction data.
Source code in src/easydiffraction/datablocks/experiment/categories/data/bragg_sc.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | |
d_spacing
property
Distance between lattice planes for this reflection (Å).
Reading this property returns the underlying
NumericDescriptor object.
id
property
Identifier of the reflection.
Reading this property returns the underlying
StringDescriptor object.
index_h
property
Miller index h of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
index_k
property
Miller index k of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
index_l
property
Miller index l of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
intensity_calc
property
Intensity of the reflection calculated from atom site data.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas
property
The intensity of the reflection derived from the measurements.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas_su
property
Standard uncertainty of the measured intensity.
Reading this property returns the underlying
NumericDescriptor object.
sin_theta_over_lambda
property
The sin(θ)/λ value for this reflection (Å⁻¹).
Reading this property returns the underlying
NumericDescriptor object.
wavelength
property
Mean wavelength of radiation for this reflection (Å).
Reading this property returns the underlying
NumericDescriptor object.
ReflnData
Bases: CategoryCollection
Collection of reflections for single crystal diffraction data.
Source code in src/easydiffraction/datablocks/experiment/categories/data/bragg_sc.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | |
d_spacing
property
D-spacing values for all reflection data points.
index_h
property
Miller h indices for all reflection data points.
index_k
property
Miller k indices for all reflection data points.
index_l
property
Miller l indices for all reflection data points.
intensity_calc
property
Calculated intensities for all reflections.
intensity_meas
property
Measured structure-factor intensities for all reflections.
intensity_meas_su
property
Standard uncertainties of the measured intensities.
sin_theta_over_lambda
property
sinθ/λ values for all reflection data points.
wavelength
property
Wavelengths associated with each reflection.
factory
Data collection factory — delegates to FactoryBase.
DataFactory
Bases: FactoryBase
Factory for creating diffraction data collections.
Source code in src/easydiffraction/datablocks/experiment/categories/data/factory.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
total_pd
Data categories for total scattering (PDF) experiments.
TotalData
Bases: TotalDataBase
Total scattering (PDF) data collection in r-space.
Note: Works for both CWL and TOF measurements as PDF data is always transformed to r-space.
Source code in src/easydiffraction/datablocks/experiment/categories/data/total_pd.py
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 | |
unfiltered_x
property
Get the r values for all data points.
x
property
Get the r values for data points included in calculations.
TotalDataBase
Bases: CategoryCollection
Base class for total scattering data collections.
Source code in src/easydiffraction/datablocks/experiment/categories/data/total_pd.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | |
calc_status
property
Refinement-status flags for each data point as an array.
intensity_bkg
property
Background is always zero for PDF data.
intensity_calc
property
Calculated G(r) values for active data points.
intensity_meas
property
Measured G(r) values for active data points.
intensity_meas_su
property
Standard uncertainties of the measured G(r) values.
TotalDataPoint
Bases: CategoryItem
Total scattering (PDF) data point in r-space (real space).
Note: PDF data is always in r-space regardless of whether the original measurement was CWL or TOF.
Source code in src/easydiffraction/datablocks/experiment/categories/data/total_pd.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | |
calc_status
property
Status code of the data point in calculation.
Reading this property returns the underlying
StringDescriptor object.
g_r_calc
property
Calculated pair distribution function G(r).
Reading this property returns the underlying
NumericDescriptor object.
g_r_meas
property
Measured pair distribution function G(r).
Reading this property returns the underlying
NumericDescriptor object.
g_r_meas_su
property
Standard uncertainty of measured G(r).
Reading this property returns the underlying
NumericDescriptor object.
point_id
property
Identifier for this data point in the dataset.
Reading this property returns the underlying
StringDescriptor object.
r
property
Interatomic distance in real space (Å).
Reading this property returns the underlying
NumericDescriptor object.
diffrn
default
Default diffraction ambient-conditions category.
DefaultDiffrn
Bases: CategoryItem
Ambient conditions recorded during diffraction measurement.
Source code in src/easydiffraction/datablocks/experiment/categories/diffrn/default.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
ambient_electric_field
property
writable
Mean electric field during measurement (V/m).
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the value.
ambient_magnetic_field
property
writable
Mean magnetic field during measurement (T).
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the value.
ambient_pressure
property
writable
Mean hydrostatic pressure during measurement (kPa).
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the value.
ambient_temperature
property
writable
Mean temperature during measurement (K).
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the value.
factory
Factory for diffraction ambient-conditions categories.
DiffrnFactory
Bases: FactoryBase
Create diffraction ambient-conditions category instances.
Source code in src/easydiffraction/datablocks/experiment/categories/diffrn/factory.py
10 11 12 13 14 15 | |
excluded_regions
default
Exclude ranges of x from fitting/plotting (masked regions).
ExcludedRegion
Bases: CategoryItem
Closed interval [start, end] to be excluded.
Source code in src/easydiffraction/datablocks/experiment/categories/excluded_regions/default.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |
end
property
writable
End of the excluded region.
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the
parameter value.
id
property
writable
Identifier for this excluded region.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
start
property
writable
Start of the excluded region.
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the
parameter value.
ExcludedRegions
Bases: CategoryCollection
Collection of ExcludedRegion instances.
Excluded regions define closed intervals [start, end] on the x-axis that are to be excluded from calculations and, as a result, from fitting and plotting.
Source code in src/easydiffraction/datablocks/experiment/categories/excluded_regions/default.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |
show()
Print a table of excluded [start, end] intervals.
Source code in src/easydiffraction/datablocks/experiment/categories/excluded_regions/default.py
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |
factory
Excluded-regions factory — delegates entirely to FactoryBase.
ExcludedRegionsFactory
Bases: FactoryBase
Create excluded-regions collections by tag.
Source code in src/easydiffraction/datablocks/experiment/categories/excluded_regions/factory.py
12 13 14 15 16 17 | |
experiment_type
default
Experiment type descriptor (form, beam, probe, scattering).
This lightweight container stores the categorical attributes defining an
experiment configuration and handles CIF serialization via
CifHandler.
ExperimentType
Bases: CategoryItem
Container of attributes defining the experiment type.
Source code in src/easydiffraction/datablocks/experiment/categories/experiment_type/default.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
beam_mode
property
Constant wavelength (CW) or time-of-flight (TOF) measurement.
Reading this property returns the underlying
StringDescriptor object.
radiation_probe
property
Neutron or X-ray diffraction measurement.
Reading this property returns the underlying
StringDescriptor object.
sample_form
property
Powder diffraction or single crystal diffraction.
Reading this property returns the underlying
StringDescriptor object.
scattering_type
property
Conventional Bragg diffraction or total scattering (PDF).
Reading this property returns the underlying
StringDescriptor object.
factory
Experiment-type factory — delegates entirely to FactoryBase.
ExperimentTypeFactory
Bases: FactoryBase
Create experiment-type descriptors by tag.
Source code in src/easydiffraction/datablocks/experiment/categories/experiment_type/factory.py
10 11 12 13 14 15 | |
extinction
factory
Extinction factory — delegates entirely to FactoryBase.
ExtinctionFactory
Bases: FactoryBase
Create extinction correction models by tag.
Source code in src/easydiffraction/datablocks/experiment/categories/extinction/factory.py
10 11 12 13 14 15 | |
shelx
Shelx-style isotropic extinction correction.
ShelxExtinction
Bases: CategoryItem
Shelx-style extinction correction for single crystals.
Source code in src/easydiffraction/datablocks/experiment/categories/extinction/shelx.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |
mosaicity
property
writable
Mosaicity value for extinction correction (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
radius
property
writable
Crystal radius for extinction correction (µm).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
instrument
base
Instrument category base definitions for CWL/TOF instruments.
This module provides the shared parent used by concrete instrument implementations under the instrument category.
InstrumentBase
Bases: CategoryItem
Base class for instrument category items.
This class sets the common category_code and is used as a base
for concrete CWL/TOF instrument definitions.
Source code in src/easydiffraction/datablocks/experiment/categories/instrument/base.py
15 16 17 18 19 20 21 22 23 24 25 26 | |
__init__()
Initialize instrument base and set category code.
Source code in src/easydiffraction/datablocks/experiment/categories/instrument/base.py
23 24 25 26 | |
cwl
CwlInstrumentBase
Bases: InstrumentBase
Base class for constant-wavelength instruments.
Source code in src/easydiffraction/datablocks/experiment/categories/instrument/cwl.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | |
setup_wavelength
property
writable
Incident neutron or X-ray wavelength (Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
CwlPdInstrument
Bases: CwlInstrumentBase
CW powder diffractometer.
Source code in src/easydiffraction/datablocks/experiment/categories/instrument/cwl.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
calib_twotheta_offset
property
writable
Instrument misalignment offset (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
CwlScInstrument
Bases: CwlInstrumentBase
CW single-crystal diffractometer.
Source code in src/easydiffraction/datablocks/experiment/categories/instrument/cwl.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
factory
Instrument factory — delegates to FactoryBase.
InstrumentFactory
Bases: FactoryBase
Create instrument instances for supported modes.
Source code in src/easydiffraction/datablocks/experiment/categories/instrument/factory.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
tof
TofPdInstrument
Bases: InstrumentBase
TOF powder diffractometer.
Source code in src/easydiffraction/datablocks/experiment/categories/instrument/tof.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | |
calib_d_to_tof_linear
property
writable
TOF linear conversion (µs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
calib_d_to_tof_offset
property
writable
TOF offset (µs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
calib_d_to_tof_quad
property
writable
TOF quadratic correction (µs/Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
calib_d_to_tof_recip
property
writable
TOF reciprocal velocity correction (µs·Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
setup_twotheta_bank
property
writable
Detector bank position (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
TofScInstrument
Bases: InstrumentBase
TOF single-crystal diffractometer.
Source code in src/easydiffraction/datablocks/experiment/categories/instrument/tof.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
linked_crystal
default
Default linked-crystal reference (id + scale).
LinkedCrystal
Bases: CategoryItem
Linked crystal reference for single-crystal diffraction.
Source code in src/easydiffraction/datablocks/experiment/categories/linked_crystal/default.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
id
property
writable
Identifier of the linked crystal.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
scale
property
writable
Scale factor of the linked crystal.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
factory
Linked-crystal factory — delegates entirely to FactoryBase.
LinkedCrystalFactory
Bases: FactoryBase
Create linked-crystal references by tag.
Source code in src/easydiffraction/datablocks/experiment/categories/linked_crystal/factory.py
10 11 12 13 14 15 | |
linked_phases
default
Linked phases allow combining phases with scale factors.
LinkedPhase
Bases: CategoryItem
Link to a phase by id with a scale factor.
Source code in src/easydiffraction/datablocks/experiment/categories/linked_phases/default.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
id
property
writable
Identifier of the linked phase.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
scale
property
writable
Scale factor of the linked phase.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
LinkedPhases
Bases: CategoryCollection
Collection of LinkedPhase instances.
Source code in src/easydiffraction/datablocks/experiment/categories/linked_phases/default.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
__init__()
Create an empty collection of linked phases.
Source code in src/easydiffraction/datablocks/experiment/categories/linked_phases/default.py
97 98 99 | |
factory
Linked-phases factory — delegates entirely to FactoryBase.
LinkedPhasesFactory
Bases: FactoryBase
Create linked-phases collections by tag.
Source code in src/easydiffraction/datablocks/experiment/categories/linked_phases/factory.py
10 11 12 13 14 15 | |
peak
base
Base class for peak profile categories.
PeakBase
Bases: CategoryItem
Base class for peak profile categories.
Source code in src/easydiffraction/datablocks/experiment/categories/peak/base.py
8 9 10 11 12 13 | |
cwl
Constant-wavelength peak profile classes.
CwlPseudoVoigt
Bases: PeakBase, CwlBroadeningMixin
Constant-wavelength pseudo-Voigt peak shape.
Source code in src/easydiffraction/datablocks/experiment/categories/peak/cwl.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
CwlSplitPseudoVoigt
Bases: PeakBase, CwlBroadeningMixin, EmpiricalAsymmetryMixin
Split pseudo-Voigt (empirical asymmetry) for CWL mode.
Source code in src/easydiffraction/datablocks/experiment/categories/peak/cwl.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
CwlThompsonCoxHastings
Bases: PeakBase, CwlBroadeningMixin, FcjAsymmetryMixin
Thompson–Cox–Hastings with FCJ asymmetry for CWL mode.
Source code in src/easydiffraction/datablocks/experiment/categories/peak/cwl.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
cwl_mixins
Constant-wavelength (CWL) peak-profile component classes.
This module provides classes that add broadening and asymmetry parameters. They are composed into concrete peak classes elsewhere via multiple inheritance.
CwlBroadeningMixin
CWL Gaussian and Lorentz broadening parameters.
Source code in src/easydiffraction/datablocks/experiment/categories/peak/cwl_mixins.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
broad_gauss_u
property
writable
Gaussian broadening from sample size and resolution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_v
property
writable
Gaussian broadening instrumental contribution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_w
property
writable
Gaussian broadening instrumental contribution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_x
property
writable
Lorentzian broadening (sample strain effects) (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_y
property
writable
Lorentzian broadening from microstructural defects (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
EmpiricalAsymmetryMixin
Empirical CWL peak asymmetry parameters.
Source code in src/easydiffraction/datablocks/experiment/categories/peak/cwl_mixins.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | |
asym_empir_1
property
writable
Empirical asymmetry coefficient p1.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
asym_empir_2
property
writable
Empirical asymmetry coefficient p2.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
asym_empir_3
property
writable
Empirical asymmetry coefficient p3.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
asym_empir_4
property
writable
Empirical asymmetry coefficient p4.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
FcjAsymmetryMixin
Finger–Cox–Jephcoat (FCJ) asymmetry parameters.
Source code in src/easydiffraction/datablocks/experiment/categories/peak/cwl_mixins.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | |
asym_fcj_1
property
writable
Finger-Cox-Jephcoat asymmetry parameter 1.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
asym_fcj_2
property
writable
Finger-Cox-Jephcoat asymmetry parameter 2.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
factory
Peak profile factory — delegates to FactoryBase.
PeakFactory
Bases: FactoryBase
Factory for creating peak profile objects.
Source code in src/easydiffraction/datablocks/experiment/categories/peak/factory.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
tof
Time-of-flight peak profile classes.
TofPseudoVoigt
Bases: PeakBase, TofBroadeningMixin
Time-of-flight pseudo-Voigt peak shape.
Source code in src/easydiffraction/datablocks/experiment/categories/peak/tof.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
TofPseudoVoigtBackToBack
Bases: PeakBase, TofBroadeningMixin, IkedaCarpenterAsymmetryMixin
TOF back-to-back pseudo-Voigt with asymmetry.
Source code in src/easydiffraction/datablocks/experiment/categories/peak/tof.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
TofPseudoVoigtIkedaCarpenter
Bases: PeakBase, TofBroadeningMixin, IkedaCarpenterAsymmetryMixin
TOF pseudo-Voigt with Ikeda–Carpenter asymmetry.
Source code in src/easydiffraction/datablocks/experiment/categories/peak/tof.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
tof_mixins
Time-of-flight (TOF) peak-profile component classes.
Defines classes that add Gaussian/Lorentz broadening, mixing, and Ikeda–Carpenter asymmetry parameters used by TOF peak shapes. This module provides classes that add broadening and asymmetry parameters. They are composed into concrete peak classes elsewhere via multiple inheritance.
IkedaCarpenterAsymmetryMixin
Ikeda–Carpenter asymmetry parameters.
Source code in src/easydiffraction/datablocks/experiment/categories/peak/tof_mixins.py
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
asym_alpha_0
property
writable
Ikeda-Carpenter asymmetry parameter α₀.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
asym_alpha_1
property
writable
Ikeda-Carpenter asymmetry parameter α₁.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
TofBroadeningMixin
TOF Gaussian/Lorentz broadening and mixing parameters.
Source code in src/easydiffraction/datablocks/experiment/categories/peak/tof_mixins.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | |
broad_gauss_sigma_0
property
writable
Gaussian broadening (instrumental resolution) (µs²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_sigma_1
property
writable
Gaussian broadening (dependent on d-spacing) (µs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_sigma_2
property
writable
Gaussian broadening (instrument-dependent term) (µs²/Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_gamma_0
property
writable
Lorentzian broadening (microstrain effects) (µs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_gamma_1
property
writable
Lorentzian broadening (dependent on d-spacing) (µs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_gamma_2
property
writable
Lorentzian broadening (instrument-dependent term) (µs²/Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_mix_beta_0
property
writable
Ratio of Gaussian to Lorentzian contributions (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_mix_beta_1
property
writable
Ratio of Gaussian to Lorentzian contributions (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
total
Total-scattering (PDF) peak profile classes.
TotalGaussianDampedSinc
Bases: PeakBase, TotalBroadeningMixin
Gaussian-damped sinc peak for total scattering (PDF).
Source code in src/easydiffraction/datablocks/experiment/categories/peak/total.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
total_mixins
Total scattering / PDF peak-profile component classes.
This module provides classes that add broadening and asymmetry parameters. They are composed into concrete peak classes elsewhere via multiple inheritance.
TotalBroadeningMixin
PDF broadening/damping/sharpening parameters.
Source code in src/easydiffraction/datablocks/experiment/categories/peak/total_mixins.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
broad_q
property
writable
Quadratic peak broadening from thermal uncertainty (Å⁻²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
cutoff_q
property
writable
Q-value cutoff for Fourier transform (Å⁻¹).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
damp_particle_diameter
property
writable
Particle diameter for spherical envelope damping correction (Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
damp_q
property
writable
Q-resolution damping for high-r PDF peak amplitude (Å⁻¹).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
sharp_delta_1
property
writable
PDF peak sharpening coefficient (1/r dependence) (Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
sharp_delta_2
property
writable
PDF peak sharpening coefficient (1/r² dependence) (Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
collection
Collection of experiment data blocks.
Experiments
Bases: DatablockCollection
Collection of Experiment data blocks.
Provides convenience constructors for common creation patterns and helper methods for simple presentation of collection contents.
Source code in src/easydiffraction/datablocks/experiment/collection.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | |
add_from_cif_path(cif_path)
Add an experiment from a CIF file path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cif_path
|
str
|
Path to a CIF document. |
required |
Source code in src/easydiffraction/datablocks/experiment/collection.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
add_from_cif_str(cif_str)
Add an experiment from a CIF string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cif_str
|
str
|
Full CIF document as a string. |
required |
Source code in src/easydiffraction/datablocks/experiment/collection.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
add_from_data_path(*, name, data_path, sample_form=None, beam_mode=None, radiation_probe=None, scattering_type=None, verbosity=None)
Add an experiment from a data file path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Experiment identifier. |
required |
data_path
|
str
|
Path to the measured data file. |
required |
sample_form
|
str | None
|
Sample form (e.g. |
None
|
beam_mode
|
str | None
|
Beam mode (e.g. |
None
|
radiation_probe
|
str | None
|
Radiation probe (e.g. |
None
|
scattering_type
|
str | None
|
Scattering type (e.g. |
None
|
verbosity
|
str | None
|
Console output verbosity: |
None
|
Source code in src/easydiffraction/datablocks/experiment/collection.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |
create(*, name, sample_form=None, beam_mode=None, radiation_probe=None, scattering_type=None)
Add an experiment without associating a data file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Experiment identifier. |
required |
sample_form
|
str | None
|
Sample form (e.g. |
None
|
beam_mode
|
str | None
|
Beam mode (e.g. |
None
|
radiation_probe
|
str | None
|
Radiation probe (e.g. |
None
|
scattering_type
|
str | None
|
Scattering type (e.g. |
None
|
Source code in src/easydiffraction/datablocks/experiment/collection.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
show_names()
List all experiment names in the collection.
Source code in src/easydiffraction/datablocks/experiment/collection.py
148 149 150 151 | |
show_params()
Show parameters of all experiments in the collection.
Source code in src/easydiffraction/datablocks/experiment/collection.py
154 155 156 157 | |
item
base
Base classes for experiment datablock items.
ExperimentBase
Bases: DatablockItem
Base class for all experiment datablock items.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | |
as_cif
property
Serialize this experiment to a CIF fragment.
calculator
property
The active calculator instance for this experiment.
Auto-resolved on first access from the experiment's data
category calculator_support and
CalculatorFactory._default_rules.
calculator_type
property
writable
Tag of the active calculator backend (e.g. 'cryspy').
diffrn
property
Ambient conditions recorded during measurement.
diffrn_type
property
writable
Tag of the active diffraction conditions type.
name
property
writable
Human-readable name of the experiment.
show_as_cif()
Pretty-print the experiment as CIF text.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
130 131 132 133 134 135 | |
show_current_calculator_type()
Print the name of the currently active calculator.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
226 227 228 229 | |
show_current_diffrn_type()
Print the currently used diffraction conditions type.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
120 121 122 123 | |
show_supported_calculator_types()
Print a table of supported calculator backends.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | |
show_supported_diffrn_types()
Print a table of supported diffraction conditions types.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
116 117 118 | |
type
property
Experiment type: sample form, probe, beam mode.
PdExperimentBase
Bases: ExperimentBase
Base class for all powder experiments.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 | |
data
property
Data collection for this experiment.
data_type
property
writable
Tag of the active data collection type.
excluded_regions
property
Collection of excluded regions for the x-grid.
excluded_regions_type
property
writable
Tag of the active excluded-regions collection type.
linked_phases
property
Collection of phases linked to this experiment.
linked_phases_type
property
writable
Tag of the active linked-phases collection type.
peak
property
Peak category object with profile parameters and mixins.
peak_profile_type
property
writable
Currently selected peak profile type enum.
show_current_data_type()
Print the currently used data collection type.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
709 710 711 712 | |
show_current_excluded_regions_type()
Print the currently used excluded-regions collection type.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
663 664 665 666 | |
show_current_linked_phases_type()
Print the currently used linked-phases collection type.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
620 621 622 623 | |
show_current_peak_profile_type()
Print the currently selected peak profile type.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
765 766 767 768 | |
show_supported_data_types()
Print a table of supported data collection types.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
705 706 707 | |
show_supported_excluded_regions_types()
Print a table of supported excluded-regions types.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
659 660 661 | |
show_supported_linked_phases_types()
Print a table of supported linked-phases collection types.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
616 617 618 | |
show_supported_peak_profile_types()
Print available peak profile types for this experiment.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
758 759 760 761 762 763 | |
ScExperimentBase
Bases: ExperimentBase
Base class for all single crystal experiments.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 | |
data
property
Data collection for this experiment.
data_type
property
writable
Tag of the active data collection type.
extinction
property
Active extinction correction model.
extinction_type
property
writable
Tag of the active extinction correction model.
instrument
property
Active instrument model for this experiment.
instrument_type
property
writable
Tag of the active instrument type.
linked_crystal
property
Linked crystal model for this experiment.
linked_crystal_type
property
writable
Tag of the active linked-crystal reference type.
show_current_data_type()
Print the currently used data collection type.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
493 494 495 496 | |
show_current_extinction_type()
Print the currently used extinction correction model.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
345 346 347 348 | |
show_current_instrument_type()
Print the currently used instrument type.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
447 448 449 450 | |
show_current_linked_crystal_type()
Print the currently used linked-crystal reference type.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
392 393 394 395 | |
show_supported_data_types()
Print a table of supported data collection types.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
489 490 491 | |
show_supported_extinction_types()
Print a table of supported extinction correction models.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
341 342 343 | |
show_supported_instrument_types()
Print a table of supported instrument types.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
439 440 441 442 443 444 445 | |
show_supported_linked_crystal_types()
Print a table of supported linked-crystal reference types.
Source code in src/easydiffraction/datablocks/experiment/item/base.py
388 389 390 | |
bragg_pd
BraggPdExperiment
Bases: PdExperimentBase
Standard Bragg powder diffraction experiment.
Source code in src/easydiffraction/datablocks/experiment/item/bragg_pd.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | |
background
property
Active background model for this experiment.
background_type
property
writable
Current background type enum value.
instrument
property
Active instrument model for this experiment.
instrument_type
property
writable
Tag of the active instrument type.
show_current_background_type()
Print the currently used background type.
Source code in src/easydiffraction/datablocks/experiment/item/bragg_pd.py
216 217 218 219 | |
show_current_instrument_type()
Print the currently used instrument type.
Source code in src/easydiffraction/datablocks/experiment/item/bragg_pd.py
165 166 167 168 | |
show_supported_background_types()
Print a table of supported background types.
Source code in src/easydiffraction/datablocks/experiment/item/bragg_pd.py
212 213 214 | |
show_supported_instrument_types()
Print a table of supported instrument types.
Source code in src/easydiffraction/datablocks/experiment/item/bragg_pd.py
157 158 159 160 161 162 163 | |
bragg_sc
CwlScExperiment
Bases: ScExperimentBase
Bragg constant-wavelength single-crystal experiment.
Source code in src/easydiffraction/datablocks/experiment/item/bragg_sc.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
TofScExperiment
Bases: ScExperimentBase
Bragg time-of-flight single-crystal experiment.
Source code in src/easydiffraction/datablocks/experiment/item/bragg_sc.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
enums
Enumerations for experiment configuration (forms, modes, types).
BeamModeEnum
Bases: str, Enum
Beam delivery mode for the instrument.
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
default()
classmethod
Return the default beam mode (CONSTANT_WAVELENGTH).
Returns:
| Type | Description |
|---|---|
BeamModeEnum
|
The default enum member. |
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
114 115 116 117 118 119 120 121 122 123 124 | |
description()
Return a human-readable description of this beam mode.
Returns:
| Type | Description |
|---|---|
str
|
Description string for the current enum member. |
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
126 127 128 129 130 131 132 133 134 135 136 137 138 | |
CalculatorEnum
Bases: str, Enum
Known calculation engine identifiers.
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
141 142 143 144 145 146 | |
PeakProfileTypeEnum
Bases: str, Enum
Available peak profile types per scattering and beam mode.
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
default(scattering_type=None, beam_mode=None)
classmethod
Return the default peak profile type for a given mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scattering_type
|
ScatteringTypeEnum | None
|
Scattering type; defaults to
|
None
|
beam_mode
|
BeamModeEnum | None
|
Beam mode; defaults to |
None
|
Returns:
| Type | Description |
|---|---|
PeakProfileTypeEnum
|
The default profile type for the given combination. |
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | |
description()
Return a human-readable description of this peak profile type.
Returns:
| Type | Description |
|---|---|
str
|
Description string for the current enum member. |
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
RadiationProbeEnum
Bases: str, Enum
Incident radiation probe used in the experiment.
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
default()
classmethod
Return the default radiation probe (NEUTRON).
Returns:
| Type | Description |
|---|---|
RadiationProbeEnum
|
The default enum member. |
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
80 81 82 83 84 85 86 87 88 89 90 | |
description()
Return a human-readable description of this radiation probe.
Returns:
| Type | Description |
|---|---|
str
|
Description string for the current enum member. |
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
92 93 94 95 96 97 98 99 100 101 102 103 104 | |
SampleFormEnum
Bases: str, Enum
Physical sample form supported by experiments.
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
default()
classmethod
Return the default sample form (POWDER).
Returns:
| Type | Description |
|---|---|
SampleFormEnum
|
The default enum member. |
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
14 15 16 17 18 19 20 21 22 23 24 | |
description()
Return a human-readable description of this sample form.
Returns:
| Type | Description |
|---|---|
str
|
Description string for the current enum member. |
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
26 27 28 29 30 31 32 33 34 35 36 37 38 | |
ScatteringTypeEnum
Bases: str, Enum
Type of scattering modeled in an experiment.
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
default()
classmethod
Return the default scattering type (BRAGG).
Returns:
| Type | Description |
|---|---|
ScatteringTypeEnum
|
The default enum member. |
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
47 48 49 50 51 52 53 54 55 56 57 | |
description()
Return a human-readable description of this scattering type.
Returns:
| Type | Description |
|---|---|
str
|
Description string for the current enum member. |
Source code in src/easydiffraction/datablocks/experiment/item/enums.py
59 60 61 62 63 64 65 66 67 68 69 70 71 | |
factory
Factory for creating experiment instances from various inputs.
Provides individual class methods for each creation pathway:
from_cif_path, from_cif_str, from_data_path, and
from_scratch.
ExperimentFactory
Bases: FactoryBase
Creates Experiment instances with only relevant attributes.
Source code in src/easydiffraction/datablocks/experiment/item/factory.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
from_cif_path(cif_path)
classmethod
Create an experiment from a CIF file path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cif_path
|
str
|
Path to a CIF file. |
required |
Returns:
| Type | Description |
|---|---|
ExperimentBase
|
A populated experiment instance. |
Source code in src/easydiffraction/datablocks/experiment/item/factory.py
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | |
from_cif_str(cif_str)
classmethod
Create an experiment from a CIF string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cif_str
|
str
|
Full CIF document as a string. |
required |
Returns:
| Type | Description |
|---|---|
ExperimentBase
|
A populated experiment instance. |
Source code in src/easydiffraction/datablocks/experiment/item/factory.py
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | |
from_data_path(*, name, data_path, sample_form=None, beam_mode=None, radiation_probe=None, scattering_type=None, verbosity=VerbosityEnum.FULL)
classmethod
Create an experiment from a raw data ASCII file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Experiment identifier. |
required |
data_path
|
str
|
Path to the measured data file. |
required |
sample_form
|
str | None
|
Sample form (e.g. |
None
|
beam_mode
|
str | None
|
Beam mode (e.g. |
None
|
radiation_probe
|
str | None
|
Radiation probe (e.g. |
None
|
scattering_type
|
str | None
|
Scattering type (e.g. |
None
|
verbosity
|
VerbosityEnum
|
Console output verbosity. |
VerbosityEnum.FULL
|
Returns:
| Type | Description |
|---|---|
ExperimentBase
|
An experiment instance with measured data attached. |
Source code in src/easydiffraction/datablocks/experiment/item/factory.py
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
from_scratch(*, name, sample_form=None, beam_mode=None, radiation_probe=None, scattering_type=None)
classmethod
Create an experiment without measured data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Experiment identifier. |
required |
sample_form
|
str | None
|
Sample form (e.g. |
None
|
beam_mode
|
str | None
|
Beam mode (e.g. |
None
|
radiation_probe
|
str | None
|
Radiation probe (e.g. |
None
|
scattering_type
|
str | None
|
Scattering type (e.g. |
None
|
Returns:
| Type | Description |
|---|---|
ExperimentBase
|
An experiment instance with only metadata. |
Source code in src/easydiffraction/datablocks/experiment/item/factory.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
total_pd
TotalPdExperiment
Bases: PdExperimentBase
PDF experiment class with specific attributes.
Source code in src/easydiffraction/datablocks/experiment/item/total_pd.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |