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

Add mono rotation series overlays #450

Merged
merged 30 commits into from
Oct 29, 2021

Conversation

psavery
Copy link
Collaborator

@psavery psavery commented Aug 12, 2020

This includes a basic editor for the overlay, and some basic drawing.

image

However, what is being drawn may not be correct. We will need to look into this more.

To do:

  • Ensure data is being generated correctly (there is an aggregation option, but it is currently not in use)
  • Ensure x/y axes are correct for the different views

Fixes: #386
Fixes: #784
Fixes: #1065

@psavery
Copy link
Collaborator Author

psavery commented Aug 12, 2020

@joelvbernier Any feedback on the editor above?

@psavery psavery force-pushed the mono-rotation-series branch 2 times, most recently from 1fb4de5 to e850c52 Compare August 19, 2020 19:50
@psavery psavery mentioned this pull request Aug 20, 2020
@joelvbernier
Copy link
Member

Let's come back to this after the demo

@psavery
Copy link
Collaborator Author

psavery commented Sep 17, 2020

Sounds good

@psavery psavery force-pushed the mono-rotation-series branch from e850c52 to cc487ac Compare October 1, 2020 11:08
@joelvbernier
Copy link
Member

Let's try to revive this issue this week. I'll take a look at where things are at.

@psavery
Copy link
Collaborator Author

psavery commented Jan 13, 2021

@joelvbernier Sounds good, I think some good test data would be helpful.

@psavery
Copy link
Collaborator Author

psavery commented Feb 16, 2021

@joelvbernier A simulated example like we did for the Laue spots would be helpful for this.

@joelvbernier
Copy link
Member

@psavery -- one of the ruby examples (say singleGE) would be a good comparative data set since there is only 1 grain. I can make a simulated imageseries as well (current simulator only makes point groups, not images, but I have a first cut at making images almost ready to merge).

@psavery psavery force-pushed the mono-rotation-series branch 2 times, most recently from d8dfef6 to cc1d414 Compare June 16, 2021 19:09
@psavery psavery force-pushed the mono-rotation-series branch 2 times, most recently from a55a60c to 5b67754 Compare October 26, 2021 15:31
@psavery
Copy link
Collaborator Author

psavery commented Oct 26, 2021

This seems to be mostly working. Probably will need more testing and re-design, but I think what we have is a good first start. See video for an example.

mono_rotation_series_example.mp4

@psavery psavery marked this pull request as ready for review October 26, 2021 19:59
@joelvbernier
Copy link
Member

joelvbernier commented Oct 27, 2021

Nice @psavery -- a few observations.

  • The form height for the rotation series overlay runs off the screen on my monitor, and there seems to be a lot of vertical space to "eat" in the widget
  • It would be very useful to be able to import the grain parameters from either a grains.out file or a selected grain in the internal grains table (assuming the user has generated one).
  • The displayed hkls seems pinned to the first 9; the overlay doesn't update if I select more or fewer from the material's reflection table.
    • side note: it would be great to include a button to call up the reflection table in the overlay widget just as for the powder...
  • If single images are loaded, it doesn't trigger "aggregate mode"; that should be the behavior for this edge case.
    • similarly, for no image loaded (i.e., "simulation mode", it should behave as an aggregated display).
      That being said, lines up nicely with the single GE ruby scan :-)!

@joelvbernier
Copy link
Member

joelvbernier commented Oct 27, 2021

  • Also, I am not sure where this is getting re-set, but the "calibration crystal" spin controller step sizes are too big. The .ui file seems to have singleStep set to, but in the GUI they are set to 1 (which is too large to be useful).

The aggregation is already specified in the constructor.

Signed-off-by: Patrick Avery <[email protected]>
This was accidentally placed here. It is not used...

Signed-off-by: Patrick Avery <[email protected]>
Signed-off-by: Patrick Avery <[email protected]>
This adds basic functionality for MonoRotationSeriesOverlays.

It includes a rough draft of an editor for the overlay, some updates
to the overlay generator, and some basic drawing.

This also includes a RangeTableEditor, which is a table designed for
editing a list of ranges.

*Something* is being drawn, but it is probably not correct. We need
to inspect it further.

Signed-off-by: Patrick Avery <[email protected]>
It's not currently being used for anything, though...

Signed-off-by: Patrick Avery <[email protected]>
MRS == mono rotation series

Signed-off-by: Patrick Avery <[email protected]>
Signed-off-by: Patrick Avery <[email protected]>
We can remove the "Mono" part because it is implied in our work. This
reduces the number of lines and simplifies the code.

Signed-off-by: Patrick Avery <[email protected]>
The rotation series will either be aggregated or not. It will not use
different methods for different methods of aggregation. Use a checkbox.

Signed-off-by: Patrick Avery <[email protected]>
They seem to work properly now...

Signed-off-by: Patrick Avery <[email protected]>
The image canvas will use this info to determine what to draw.

Signed-off-by: Patrick Avery <[email protected]>
This width, along with the omega value of the currently displayed
frame, will allow us to determine the range of omega values to use
for plotting.

Signed-off-by: Patrick Avery <[email protected]>
Rather than waiting until the HEDM workflow is initialized, if an
image series has omega data, convert it to an OmegaImageSeries immediately.

This will be very useful for rotation series overlays, where omega
information is needed, even though the HEDM workflow may have not been ran.

Signed-off-by: Patrick Avery <[email protected]>
This will return the omega range if the image series is an omega
imageseries. Otherwise, it will return `None`.

Signed-off-by: Patrick Avery <[email protected]>
"aggregated" is currently forced to be `True` if the current image
series doesn't have omega data.

Signed-off-by: Patrick Avery <[email protected]>
This allows the rotation series overlay to be used with the image
series index (which represents an image at a particular omega range).

Signed-off-by: Patrick Avery <[email protected]>
This helps the user keep track of what omega range they are currently
looking at.

Signed-off-by: Patrick Avery <[email protected]>
This adds two theta and eta ranges to the rotation series overlays, which
are rectangular.

Signed-off-by: Patrick Avery <[email protected]>
Depending on the active widget...

This allows the overlay editor to start off small, and then grow larger
if the user picks an overlay type that requires a lot of space.

Signed-off-by: Patrick Avery <[email protected]>
@psavery psavery force-pushed the mono-rotation-series branch from 65b845a to 7ceb52e Compare October 27, 2021 22:00
This works just like the reflections table button in the powder overlay
editor.

Signed-off-by: Patrick Avery <[email protected]>
It doesn't actually have to be as big as it has been being drawn.

Signed-off-by: Patrick Avery <[email protected]>
Signed-off-by: Patrick Avery <[email protected]>
Whether several widgets are enabled or not depends on the current value
of the GUI, which may change when `update_gui()` is called. Thus, always
update enable states after `update_gui()` is called.

Signed-off-by: Patrick Avery <[email protected]>
This allows other widgets to expand instead of this one when a dialog
is enlarged. We really don't need this one to be bigger...

Signed-off-by: Patrick Avery <[email protected]>
Previously, we would step by the digit to the left of the decimal
place (whether we were in scientific notation, or standard notation).
However, this was not that useful, because most numbers were not large
enough or small enough to be in scientific notation, and we had no
control over the step size.

Instead, let's step according to the step size, so that we are able to
better control what it will be. Now, we can set the `singleStep` property
to control the step size.

Fixes: HEXRD#1065

Signed-off-by: Patrick Avery <[email protected]>
Fixes part of: HEXRD#1063

Signed-off-by: Patrick Avery <[email protected]>
@psavery
Copy link
Collaborator Author

psavery commented Oct 28, 2021

  • Also, I am not sure where this is getting re-set, but the "calibration crystal" spin controller step sizes are too big. The .ui file seems to have singleStep set to, but in the GUI they are set to 1 (which is too large to be useful).

This is now fixed, along with #1065 and part of the discussion in #1063.

@psavery
Copy link
Collaborator Author

psavery commented Oct 29, 2021

Here's an updated image:
image

@joelvbernier joelvbernier self-requested a review October 29, 2021 15:21
@joelvbernier joelvbernier merged commit 39fc5c5 into HEXRD:master Oct 29, 2021
@psavery psavery deleted the mono-rotation-series branch January 26, 2022 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants