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

Oggles of Toggles #512

Merged
merged 3 commits into from
Dec 6, 2024
Merged

Oggles of Toggles #512

merged 3 commits into from
Dec 6, 2024

Conversation

rboston628
Copy link
Contributor

@rboston628 rboston628 commented Dec 5, 2024

Description of work

This makes some improvements to the toggles and to adding UI elements to views.

In particular, it makes it easier to connect the toggles.

Explanation of work

Added a LabeledToggle class which takes over the work of a LabeledField with a Toggle set as the field. This just makes it easier to connect to a toggle.

Inside BackendRequestView, added the function to make a LabeledToggle analogously to other widgets.

Inside LabeledField added an argument for easier creation of labeled fields with a QLineEdit with text in them, since that was the most common use of LabeledFields.

Standardized use of BackendRequestView.

To test

Dev testing

This is all GUI work, so all testing is checking the GUI

Diffraction

In diffraction, make sure lite mode toggle and skip toggle work. Input run 46680.

Look at available groupings. In most dev environments, they will have (lite) or (native) at the end (this can be setup if you don't). Click the lite toggle and make sure this changes the groupings from lite to native.

Set the toggle to Lite, choose diamond, and pick a grouping.

Turn off skip pixel cal. Try to continue. You will get an error, confirming that pixel cal tried to run. Turn of it off and continue. You will not get the error, confirming it did not run.

At tweak peak view, observe state of lite mode toggle. Go back to previous screen and flip the lite toggle. Go forward, and make sure it has changed.

Check the name of the raw data workspace (tof_all_lite_raw_046680). If you ran in Lite mode, it should be lite. Check it has 18432 pixels.

Change FWHM right to 4 and recalculate. Continue.

At assess screen, verify everything looks the same. Continue.

At save screen, verify the necessary fields are present and can take data. You can do this by entering data in the fields, saving, then verifying in the CalibrationIndex for this state.

Run diffcal again in native mode. Input 46680, skip pixel cal true, use lite mode false, diamond, any grouping. At tweak peak stage, verify the name of the raw data workspace and check it has 1.2M pixels.

Normalization

In normalization, make sure the lite mode toggle works. Input run 46680, background 46680.

Look at available groupings. In most dev environments, they will have (lite) or (native) at the end (this can be setup if you don't).. Click the lite toggle and make sure this changes the groupings from lite to native.

Set the toggle to Lite, choose diamond, and pick a grouping. Continue.

At tweak peak field, make sure there are elements for run number, backgroun run number, dmin, dmax. Continue.

At save screen, verify the necessary fields are present and can take data. You can do this by entering data in the fields, saving, then verifying in the NormalizationIndex for this state.

Run normalization again in native mode. Input 46680 as run and background, use lite mode false, diamond, any grouping. At the tweak peak stage, verify the raw data workspace has 1.2M pixels.

Reduction

Remove or hide any saved normalizations for the state of 46680.

In reduction, try running with 46680 in lite mode. You should see a popup about needing artificial normalization. For the moment, say "No" (you do NOT want to do artificial normalization), then inspect the loaded raw workspace. It should be lite (18432 pixels). Now continue to artificial normalization.

Fiddle with buttons and create a normalization, and make sure reduction finishes.

Run again with 46680 in native mode. When the popup comes up, click "No" (you do NOT want to do artificial normalization), then inspect the loaded raw workspace. It should be native (1.2M pixels). You can close the window now.

Additional check for Defect 8540

In Reduction with Lite mode toggle ON, enter 46680.

Toggle Lite mode OFF.

Run reduction.

When the data load, ensure it loaded the Native groupings and the Native resolution data file (~1.2M pixels).

CIS testing

N/A

Link to EWM item

Not part of story, but arose during work on

EWM#7712

Also fixes

EWM#8540

Verification

N/A

Acceptance Criteria

N/A

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.69%. Comparing base (0601ba0) to head (3d2e7ea).
Report is 1 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next     #512   +/-   ##
=======================================
  Coverage   95.69%   95.69%           
=======================================
  Files          67       67           
  Lines        5012     5012           
=======================================
  Hits         4796     4796           
  Misses        216      216           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rboston628 rboston628 force-pushed the ewm7712-oggles-of-toggles branch from 036454c to 7cc508d Compare December 6, 2024 17:30
@rboston628 rboston628 marked this pull request as ready for review December 6, 2024 17:30
@rboston628 rboston628 enabled auto-merge (squash) December 6, 2024 18:09
Copy link
Contributor

@darshdinger darshdinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that the DiffCal associated views are now migrated over to inherent from BackendRequestView like other workflows. I like the new LabelToggle Widget that is implemented and appreciate the changes to pixel mask drop down within Reduction.

Will test now.

@darshdinger
Copy link
Contributor

Testing


State Initialization:

image

Successful:
image

Diffraction Calibration:

Insure that toggles function:
image
image

Grouping available for both lite and non-lite modes:
image
image

Toggling Skip Pixel Calibration:

  1. image

  2. image

  3. image

  4. image

Lite mode toggled off:
image
image

Checking raw Workspace:
image

Testing Save View data input:
image
image

Toggle off Lite mode & run:
image

Normalization Calibration:

Lite toggle functional and groupings available in both modes:
image
image

Set Parameters & run:
image

All Elements present in Tweak Peak View:
image

Save & Insure correct meta data retention:
image
image

Toggle lite mode off & run:
image

Reduction:

Hide Normalizations:
image

Run with 46680 and select NO for artificial normalization, inspect raw WS:
image

Run Reduction & insure successful reduction:
image

@darshdinger
Copy link
Contributor

The Reduction view elements are now functional:
image

Inspect workspace:
image

Copy link
Contributor

@darshdinger darshdinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, functional and likely resolves another defect.

@rboston628 rboston628 merged commit 80ea2e0 into next Dec 6, 2024
8 checks passed
@rboston628 rboston628 deleted the ewm7712-oggles-of-toggles branch December 6, 2024 20:31
rboston628 added a commit that referenced this pull request Dec 16, 2024
* rebase and retest

* update docs
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.

2 participants