-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add reference column to reduction table #169
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
Conversation
self.run_number_max = widgets.IntText( | ||
value=9999, description='', layout=widgets.Layout(width='5em') | ||
|
||
def _init_display_component(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really the intention of this PR, but since you split this into 'components', you could also make different classes and compose them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's possible. Right now I don't think they are independent enough for that. There would be tight coupling between the main GUI class and the "components" anyway, and in that case it's easier to just keep them together. Eventually maybe some of them could be refactored out as separate components.
@@ -491,6 +509,9 @@ def add_row(_): | |||
'QBins': 391, | |||
'QStart': 0.01, | |||
'QStop': 0.3, | |||
'Reference': self.reference_table.data.iloc[0]['Sample'] | |||
if len(self.reference_table.data) > 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like there can be more than 1 element in self.reference_table.data
but only the first one is used in 'Reference'
. What happens to the other elements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sets the default value of the Reference column to be the first entry in the reference table.
It's up to the user to change that to something else if there are more than one entry in the reference table.
Fixes #150
First change is refactoring to make it a bit easier to understand what part of the init function deals with what components of the GUI.
Second change adds a "reference" column to the reduction table to let the user specify what reference measurement to use for that reflectivity curve.