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

change the NIKA option to read the nika attributes directly #22

Open
EliotGann opened this issue Nov 18, 2021 · 6 comments
Open

change the NIKA option to read the nika attributes directly #22

EliotGann opened this issue Nov 18, 2021 · 6 comments
Assignees
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@EliotGann
Copy link
Collaborator

on a loadrun, the beamcenter x and y and detector distance are read once into the beamcenter, but if you change these attributes before runbning the integration, they are not reread, and have to be entered manually ie
geomethod='nika',
NIdistance=raw.attrs['sdd'],
NIbcx=raw.attrs['beamcenter_x'],
NIbcy=raw.attrs['beamcenter_y'],
I think it makes more sense, when using the nika geomethod, to reread the attrs each time, incase the user has tweaked them, that is unless there is an easier (and faster?) way to interactively tweak the beamcenter in a integrator.

@pbeaucage
Copy link
Collaborator

I had a brainwave on this. I should define NIbcx and NIbcy as properties of the integrator - so that they can be tweaked just as integrator.NIbcx = 123.45; integrator.NIbcy = 234.56

@pbeaucage
Copy link
Collaborator

I'm of two minds on actually defining where in the attribute tree a beam center should live - there are so many units, centers, etc. The 'right way' (TM) would be for a loader to convert the instrument's units to PyFAI poni1/poni2/dist (all in m), which iirc is what it does when you initialize with template_xr.

If we then have the ability to tweak in either Nika or pyFAI space with the underlying pyFAI data store updating automatically, would that basically fulfill this feature?

@EliotGann
Copy link
Collaborator Author

EliotGann commented Apr 6, 2022

Of course having a way to visualize and drag around a beamcenter as a cursor would be the nicest way to solve all of this (so I don't have to do it in igor, and pull the new coordinates over)

@EliotGann
Copy link
Collaborator Author

but yeah, I think having a way to tweak an integrator on the fly either way would solve the problem. I should store the pyFAI center in the metadata perhaps...

@pbeaucage
Copy link
Collaborator

Preliminary fix for this in [2e589de], did not tag properly in commit message.

pbeaucage added a commit that referenced this issue Apr 9, 2022
@pbeaucage pbeaucage added documentation Improvements or additions to documentation good first issue Good for newcomers labels Jun 1, 2022
@pbeaucage
Copy link
Collaborator

Folks brought up on Slack today that this is really useful, but completely undocumented. Needs a tutorial update to show tweaking the beam center on-the-fly.

pbeaucage added a commit that referenced this issue Jun 6, 2022
@dsunday dsunday self-assigned this Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants