ifarup / ciefunctions

Python module, GUI, and web app for computing the CIE TC1-97 colorimetric functions
GNU General Public License v3.0
5 stars 5 forks source link

Spinbox for 'Upper domain limit' in Python GUI: Auto-correct vaule to be consistent with parameter choices for 'lower domain limit' and 'step'. #104

Closed janhenrikwold closed 9 years ago

janhenrikwold commented 10 years ago

If there is no mathematical consistency between the values given in the parameter spinboxes for 'lower domain limit', 'upper domain limit' and 'step', auto-correct the value given in the 'parameter spin box' for the 'upper domain limit' to the largest number satisfying

'lower domain limit' + n 'step' < 'upper domain limit' , where n is an integer.

In doing this, check also #102.

ifarup commented 9 years ago

This turns out to be a synchronisation problem. Probably threading.Condition can solve it (by means of waiting and notifications).

ifarup commented 9 years ago

After a long discussion, we (Gerardo and I) have decided on the following GUI behaviour: The three parameters lambda_min, lambda_max and lambda_step are adjusted individually by the user in steps of 0.1 nm. Only when compute is pressed the parameters are sent to compute, which changes the lambda_max parameter if necessary. If lambda_max is changed, the value of the spinbox is also changed. This is the best we can do.