API change and pinhole camera distortion tools
Major release
In addition to the API change in the ff-HEDM config object and associated η-ω maps, the PowderCalibrator
class can now accept an xrdutil.phutil.SampleLayerDistortion
class to apply the 2θ distortion associated with an offset sample layer in a pinhole camera instrument (e.g., TARDIS, PXRDIP). The corresponding class for actual pinhole lines themselves is not yet implemented (staged, using functions from @ryanrygg). Below is a simulated TARDIS image with the cyan and orange overlays coming from 5μm thick layers at 150μm and 250μm offsets, respectively; the aforementioned distortion caused the nominal 2θ values to appear curved (note the simulation captures the distortion effect on account of being voxelated, while the correction follows @ryanrygg's Eq 10 from the TARDIS paper.
As for the ff-HEDM config API, now the hkls used for constructing the η-ω maps are specified by the explicit list of (h, k, l) indices (any symmetric equivalent) or the list of global G-vector ids from the material (less preferred). This removes the ambiguity associated with the previous convention of using indices into the reduced hkl list. For example,:
find_orientations:
orientation_maps:
# A file name must be specified. If it doesn't exist, one will be created
file: null
threshold: 250 # threshold on raw images to build maps
bin_frames: 1 # how many successive frames to bin. default is 1
# specify which hkls to use
# "all", or a list of hkl indices. Note that the default value of "all"
# means all hkls that are not marked as excluded in the material definition.
# can be a list of indices or a list of [h, k, l].
# !!! used to be active_hkls: [0,1,2,3,4,5]
# !!! this was really [0,1,2,4,6,7] considering the material parameters above
active_hkls:
- [0, 1, 2]
- [1, 0, 4]
- [1, 1, 0]
- [1, 1, 3]
- [0, 2, 4]
- [1, 1, 6]
What's Changed
- replacing "if" with "elif" in line 604 of materials.py. by @saransh13 in #465
- Guard against unicode when saving HDF5 imageseries by @psavery in #466
- Pinhole distortion by @joelvbernier in #446
- changed hkl specification for indexing to master hklID by @joelvbernier in #454
- Update test.yml by @joelvbernier in #467
- change default source_distance to inf by @joelvbernier in #468
- NF chunking by @rachelelim in #461
- Additional modifications to make tth_distortion for pinhole camera instruments functional by @joelvbernier in #470
- API change to tth_corr_map_sample_layer by @joelvbernier in #471
- Add missing init.py files by @psavery in #472
New Contributors
- @rachelelim made their first contribution in #461
Full Changelog: 0.8.21...0.9.0