HEXRD / hexrd

A cross-platform, open-source library for the analysis of X-ray diffraction data.
Other
56 stars 25 forks source link

Need mechanism for saving PlaneData exclusions to new material #172

Closed joelvbernier closed 3 years ago

joelvbernier commented 3 years ago

In analyzing HEDM data from the most recent APS run, I am running into the need to save the exclusions (or "valid hkls" if you will) for the reflections lists on a material. Currently, the objects are instantiated from the data stored in the hdf5 file upon load, and there is no mechanism for specifying a user-specified list of reflections to use. For the most generality, we can probably store a list of {hkl} that are selected as valid, and have the material associate those with its master list upon generation. That way we can handle the case if parameters like dmin are changed, which would change the total number of reflections generated. In the HEDM workflow, the structure factor ratio and tThMax are still applied to mask the reflection list on the PlaneData object; the saved exclusions would be applied before these.

joelvbernier commented 3 years ago

@saransh13 -- I think it is probably best to just store PlaneData.hkls upon save. It is already filtered by exclusions. Then upon load, if there is an "active_hkls" list specified in the HDF5 archive, then it matches the stored hkls to the generated ones to set exclusions on the new instance of PlaneData. Capice?