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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give option to show reciprocal lattice in crystal frame #1259

Merged
merged 8 commits into from
Jun 3, 2020

Conversation

graeme-winter
Copy link
Contributor

Contributes to #279

Includes "Crystal frame" toggle, which shows the reciprocal lattice points and reciprocal lattice vectors in the crystal frame i.e. B*h rather than U*B*h

Illustrations:

Before:
Screenshot 2020-05-12 at 09 18 20

After:
Screenshot 2020-05-12 at 09 18 42

You have to zoom in closely to see differences between reciprocal lattices, but they are there 馃檪

When mapping, optionally combine the crystal U matrix with the fixed
goniometer matrix - if no crystal model will do nothing
which proves to be trivial as we just want B
@dagewa
Copy link
Member

dagewa commented May 12, 2020

This looks useful, but I wonder if there is a better label than "Show in crystal frame"? A toggle or radio button between setting = UB and setting = B would be more explanatory (at least to me)

@graeme-winter
Copy link
Contributor Author

@dagewa I would think to ${average user} "Show in crystal frame" would make more sense than "setting=UB / B" but I welcome other viewpoints.

@graeme-winter
Copy link
Contributor Author

BTW I recognise that the "setting = B / UB" is much more precise and explicit a definition, no worries. I just think it will not be clear to our end user what this means 馃檪

@dagewa
Copy link
Member

dagewa commented May 12, 2020

I do think this is a more expert option, the users of which should probably know what a setting matrix is. I'm also imagining adding another option in future to include RUB and then have an angle control. This would allow visualisation of the orientation of the crystal wrt to the beam at any image and thus address #214

@graeme-winter
Copy link
Contributor Author

I am not wedded to the name, but I would like to get the feature in. I personally think this is not an expert option - I could see in situ general users using it...

@graeme-winter
Copy link
Contributor Author

This is particularly cute when you are looking at > 1 lattice on a sweep as they can be overlapped rather nicely - example with 2 -

Screenshot 2020-05-12 at 14 40 27

becomes

Screenshot 2020-05-12 at 14 40 40

Co-authored-by: Markus Gerstel <2102431+Anthchirp@users.noreply.github.com>
array_family/flex_ext.py Outdated Show resolved Hide resolved
Rolled into the treatment of fixed_rotation which is renamed to sample
rotation - could probably pull those bits out of the panel loop, but things
OK like this for the moment
@dagewa
Copy link
Member

dagewa commented May 13, 2020

The tooltip doesn't appear to be working for me, on Linux :-(

@graeme-winter
Copy link
Contributor Author

The tooltip doesn't appear to be working for me, on Linux :-(

Works on RHEL7 for me, and macOS:
Screenshot 2020-05-13 at 08 38 13

IMG_8290

Please excuse the Moire patterns - I could not do a screen grab without making the tooltip vanish 馃檮

@dagewa
Copy link
Member

dagewa commented May 13, 2020

I believe it works! Just not on my laptop 馃し

@graeme-winter
Copy link
Contributor Author

image

@graeme-winter
Copy link
Contributor Author

Please can I merge this? Was looking for exactly this feature a second ago.

Or are the absence of tooltips on some systems a blocker?

@dagewa
Copy link
Member

dagewa commented Jun 3, 2020

Fine by me

@graeme-winter graeme-winter merged commit 7b498f0 into master Jun 3, 2020
graeme-winter added a commit that referenced this pull request Jun 3, 2020
When mapping, optionally combine the crystal U matrix with the fixed
goniometer matrix - if no crystal model will do nothing

* Show reciprocal points in crystal frame
* Show cell axes in same frame
* Add long form prose as tooltip to explain what this means

Co-authored-by: Markus Gerstel <2102431+Anthchirp@users.noreply.github.com>
@graeme-winter
Copy link
Contributor Author

N.B. also needed a985e1b

Anthchirp added a commit that referenced this pull request Jun 4, 2020
When mapping, optionally combine the crystal U matrix with the fixed
goniometer matrix - if no crystal model will do nothing

* Show reciprocal points in crystal frame
* Show cell axes in same frame
* Add long form prose as tooltip to explain what this means

Co-authored-by: Markus Gerstel <2102431+Anthchirp@users.noreply.github.com>
@Anthchirp Anthchirp mentioned this pull request Jun 4, 2020
Anthchirp added a commit that referenced this pull request Jun 4, 2020
* fix reading of single-image Eiger files (cctbx/dxtbx#164)
* we now support Spring2020 Nexus files, including multi-wavelength
  beams and absence of goniometer/scan (dials/dxtbx#41)
* project names are now correctly written into .mtz files
* dials.reciprocal_lattice_viewer: show correct sweep colour for integrated data (#1283)
* dials.reciprocal_lattice_viewer: added option to show lattice in crystal frame (#1259)
* xia2: fix treatment of missing individual images (xia2/xia2#462, xia2/xia2#463)
@ndevenish ndevenish mentioned this pull request Jun 11, 2020
ndevenish added a commit that referenced this pull request Jun 11, 2020
- `dials.reciprocal_lattice_viewer`: Add an option to show lattice(s) in the crystal rather than laboratory frame. (#1259)
- Support for mtz project_name in export and scaling
- `dials.reciprocal_lattice_viewer`: fix multiple experiment view for integrated data (#1284)
- cctbx_project: Fix python 3 compatibility in prime
- dxtbx: Account for beam centre record changing with ADSC 442 move from 8.3.1 to 5.0.1 (cctbx/dxtbx#171)
- dxtbx: Fix handling for hierarchical NeXus detectors (cctbx/dxtbx#175)
- dxtbx: Prevent mangling of URL-based filenames via abspath (cctbx/dxtbx#176)
- dxtbx: Fix incorrect axis detection on MAX IV Eiger and Spring8 (cctbx/dxtbx#178)
- xia2: Fix missing anomalous info in hkl data converted for shelx
- xia2: Compatibility with DIALS project_name changes
@Anthchirp Anthchirp deleted the rlv-crystal-frame branch August 30, 2020 22:12
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

Successfully merging this pull request may close these issues.

None yet

3 participants