HEXRD / hexrd

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

Clarify when HKL Exclusion Options are Ignored #615

Open psavery opened 6 months ago

psavery commented 6 months ago

There are a lot of HKL exclusion options now, and many times, some of them are being ignored. I think we need to make it very clear when they are ignored, because it is very confusing to users otherwise. The clearest way is to raise an exception and force the user to rewrite their config until it doesn't contain any ignored settings.

For example, if fit-grains is ran with the default reset_exclusions: True, all HKL exclusion options in the material config will have no effect, because the HKLs will be reset again later in fit-grains. If the user sets any exclusion options in the material config, we should make it clear to them that it has no effect. We probably want to raise an exception.

Another example: if reset_exclusions: False is set, but other HKL exclusions options are also set, then we should also raise an exception, because those options will have no effect.

Also, if we set both tthmax and tth_max, an exception should be raised because tth_max will be ignored. Same kind of thing with min_sfac_ratio and sfacmin.

@darrencpagan Feel free to provide additional feedback.