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

Does linear_scale_range clip the values? #159

Closed
m-mohr opened this issue Jun 19, 2020 · 4 comments · Fixed by #167
Closed

Does linear_scale_range clip the values? #159

m-mohr opened this issue Jun 19, 2020 · 4 comments · Fixed by #167
Labels
documentation help wanted Extra attention is needed
Milestone

Comments

@m-mohr
Copy link
Member

m-mohr commented Jun 19, 2020

@clausmichele asked:

I wanted to ask you a question about the linear_scale_range process: Does it also have to clip the data in output or not? If we set inputMin and inputMax differently from the real min and max, we won’t obtain data having outputMin and outputMax as output.

It doesn't seem to be documented so it's not clear and we need to define a behavior and document it. What do you think is the expected and most useful behavior? From the original use case (PNG/JPEG export), I think it should clip the values.

@m-mohr m-mohr added this to the v1.0-final milestone Jun 19, 2020
@m-mohr m-mohr added the help wanted Extra attention is needed label Jun 19, 2020
@clausmichele
Copy link
Member

In my opinion we have two options:

  1. Clip the data according to outputMin and outputMax
  2. Set automatically inputMin and inputMax according to the input data

@m-mohr
Copy link
Member Author

m-mohr commented Jun 19, 2020

  1. Clip the data according to outputMin and outputMax

That's the option I meant (which is basically the same as "Clip the data according to inputMin and inputMax").

  1. Set automatically inputMin and inputMax according to the input data

I think we didn't do this as it's not always clear what the input min/max values are without reading all data upfront. So that's the reason the user needs to specify it.

@m-mohr
Copy link
Member Author

m-mohr commented Jul 1, 2020

Telco: Clarify that clipping should take place for input values.

@m-mohr
Copy link
Member Author

m-mohr commented Jul 2, 2020

A fix is available in #167, please review.

m-mohr added a commit that referenced this issue Jul 6, 2020
#159: `linear_scale_range`: Clarify that the process implicitly clips the values.
@m-mohr m-mohr closed this as completed Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation help wanted Extra attention is needed
Projects
None yet
2 participants