rs-station / careless

Merge X-ray diffraction data with Wilson's priors, variational inference, and metadata
MIT License
16 stars 6 forks source link

Reciprocal ASUs should have consistent dmins #48

Open kmdalton opened 2 years ago

kmdalton commented 2 years ago

When multiple files are supplied, the DataFormatter classes which construct ReciprocalASU instances determine the appropriate dmin on a per file basis. This can cause issues with the double-Wilson prior down the line. Particularly, if a child node has a higher resolution cutoff than its parent, you can end up with a nasty error when the prior tries to look up the equivalent for high resolution reflections in the parent. I think the most durable solution here is that the DataFormatter base class simply pick the dmin which is consistent with the highest resolution dataset and use it for all ASUs.

For users running into issues with this, the current workaround is to supply a --dmin which is lower resolution than the lowest resolution data set.

DHekstra commented 1 year ago

I'm encountering a similar issue in the context of what we discussed earlier today--providing OFF data in a higher-symmetry spacegroup and ON data in a reduced-symmetry spacegroup, while invoking the double-wilson prior. In this case, each individual dataset has data out to about 1.50 A, but I set --dmin=1.7. I checked that all MTZs have the same unit cell parameters. Attached: careless input parameters and error traceback. (the first line is due to my bash script, please ignore). inputs_params.log.txt myoutput_39898999.err.txt

DHekstra commented 1 year ago

I tried v 0.2.4 and 0.2.6 with the same result.

kmdalton commented 1 year ago

As per our slack discussion, the issue here is that the parent spacegroup has its systematic absences determined in spacegroup 19 and the child spacegroup 4. So, when the model looks up the conditioning reflections from the parent some small number along the principal axes are missing. The workaround for now is to remove systematic absences from the children using the higher symmetry group. However, this is a tad unsatisfactory. We should revisit this later.