EarthSystemDiagnostics / cpt-picarr

MIT License
1 stars 0 forks source link

Same min/max value when selecting range of injections gives unexpected behaviour #67

Open thomas-muench opened 4 years ago

thomas-muench commented 4 years ago

On page process data, the injections to average over in the final data output step can be set by selecting a range of injections with the slider, i.e. specifying a min and max value for the injections which should be averaged.

Setting the slider to the same min and max value n, either accidentally or on purpose (rare use case, do we need it?), results in a length-1 "range" vector of value n. In piccr, this is interpreted as to mean "average over the last 'n' injections" which is not the expected behaviour.

In my opinion, one should either

@twollnik What is your opinion on this?

thomas-muench commented 4 years ago

Update: Option 1 (not allowing the same min/max value) can be easily achieved, if I see it correctly, by setting dragRange = FALSE in the sliderInput() function; i.e. this would be the simplest solution.

twollnik commented 4 years ago

This is not intended, thanks for bringing it up. Both of the suggested options should be fine.

thomas-muench commented 4 years ago

Update: Option 1 (not allowing the same min/max value) can be easily achieved, if I see it correctly, by setting dragRange = FALSE in the sliderInput() function; i.e. this would be the simplest solution.

Setting the parameter as such does not change anything in our case; i.e. the range slider can still be dragged together to the same value. Maybe I overlooked someting; needing to re-check with simple app.

thomas-muench commented 4 years ago

Update: I misunderstood the meaning of setting the dragRange parameter: Setting it to TRUE (default) allows to drag the currently set range, so the min and max values, simultaneously to a new range. Setting it to FALSE simply disables this behaviour. So this parameter does not help us here at all and we need to find another solution.