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 input params, and baseline estimation #140

Merged
merged 3 commits into from
May 10, 2023
Merged

Conversation

samiebee43
Copy link
Contributor

image

  • baseline is defined as line passing through nearest point on spectrum to left and right

image

  • the interpolated_baseline is the value that is subtracted, it matches the intersection of red and gold

image

  • does not yet interpolate spectrum for intersection points

  • area estimation is currently omitted (trapz(spectrum) - trapz(baseline))

  • no decimals in pandas, not yet showing thousands separator

  • green lines (inner-radius) removed

self.field(
name = "Baseline Extent",
name = "Right",
initial = 10, minimum = 0, maximum = 10000, step = .2,
Copy link
Member

Choose a reason for hiding this comment

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

Maybe set precision=1, since otherwise there's a frustratingly unreachable ".x0" at the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

EnlightenPluginFields with type="float" will always display two digits after the decimal no matter the value of step. The user can set the precision of 0.01 using the keyboard, also no matter the value of step. The step parameter only dictates how much the value changes using arrow-keys and scrollwheel.

Also, when adjusting the step param we want to be mindful that that will affect the scrollwheel speed. If we set it low then it will take a long time to move to the target value-- if we set it high then it will be easy to overshoot.

In any event, to remove the trailing 0, we would need to modify the bit of code that reads the EPF (dataclass) and generates widgets. QtSpinBox will have an option for number of digits after the decimal. I believe that is within configure_gui_for_module in PluginController.py

@samiebee43
Copy link
Contributor Author

image
illustrations persist when enabled and un-enabled

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