Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pbp indexer - y0 not added in grid and units for diffty not matching distance #366

Open
jonwright opened this issue Dec 13, 2024 · 3 comments

Comments

@jonwright
Copy link
Member

Around line 2000 in point_by_point:
"""
nlo = np.floor((self.ybincens.min()) / self.ystep).astype(int)
nhi = np.ceil((self.ybincens.max()) / self.ystep).astype(int)

    rng = range(nlo, nhi + 1, gridstep)

"""
It needs to subtract y0 if there was one.

Also noted: the distance correction in get_local_gv assumes dty and distance have the same units. This is harder to fix automagically unless everything comes with units.

@jonwright
Copy link
Member Author

Also the indexing loglevel does not work when changed. Something about the multiprocessing pool and global state perhaps. No idea how to fix that.

@jadball
Copy link
Contributor

jadball commented Dec 13, 2024

For the first issue: here's the commit to blame: 32dfd94

It seems I was correcting a y0 bug for a dataset with a big y0 by modifying the code in two places - I remember things definitely got better after the bug fix, but I suspect the second fix wasn't needed. To me this raises deeper questions about how the geometry.dty_to_dtyi function works/should work. TODO after Christmas for sure!

@jadball
Copy link
Contributor

jadball commented Dec 13, 2024

I think the underlying problem is that we assume that a perfectly aligned diffractometer would have a y0 value of 0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants