-
Notifications
You must be signed in to change notification settings - Fork 27
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
Geometry fixes #379
Geometry fixes #379
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Caveat here: we don't store the units for |
A couple of quick comments:
|
You're right - I now understand this better. If we define the lab frame via the beam (e.g The final sticking point is the |
ImageD11/sinograms/dataset.py
Outdated
@@ -418,6 +429,10 @@ def import_motors_from_master(self): | |||
print( | |||
"replace bad scan omega", b, self.scans[b], "with", j, self.scans[j] | |||
) | |||
# ensure dty is in microns - this is for compatability with geometry | |||
if dty_is_mm: | |||
self.dty = self.dty * 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To modify the dty numbers is a breaking change. It should not go into the next release.
New highlights: Updated
|
@jonwright ready when you are if you're happy to merge :) |
Addresses #366
Highlights:
dty units of microns now enforced in
dataset.py
Microns are overwhelmingly our choice for
.par
files and I think other solutions introduce significant potentials for confusion.I solve this by checking the
BLISS
axis units fordtymotor
and converting from mm to microns if needed:Introduced a new geometric parameter
ybeam
This is the nominal y-value of the beam in the lab frame. Usually 0 for NSCOPE, 14 mm for TDXRD.
Old approach:
New approach:
I have updated the rest of
geometry.py
to match, including tests and Jupyter notebooks.This affects less than you might think, because
ybeam
often cancels out and we rarely use the lab frame in computation.Updated
geometry.py
function names and docstrings for clarityDecoupled
dtyi
(discretisation ofdty
) from "step space"(si, sj)
New
dty
todtyi
conversion function now requiresymin
but is conceptually simpler and does not induce a sign flip any more:I've updated the
point_by_point.py
code accordingly to includeymin
andybeam
where needed.ybeam
is basically only needed when considering shifts in tomographic reconstructions.Introduced new standard way to generate grids in
(si, sj)
to reconstruct onThis is
geometry.step_grid_from_ybincens
which I discuss here: #366 (comment)