asascience / ott-coops

Project Tracking for OTT Co-Ops
1 stars 0 forks source link

Autoscaling a Layer with Particles on Messes with Particle Settings #494

Closed jamesdoyle21 closed 2 years ago

jamesdoyle21 commented 2 years ago

https://user-images.githubusercontent.com/82955395/174670481-f3afc36b-506d-4569-83a9-f18916565229.mp4

https://dev.oceansmap.com/ott-coops/?permalink=N4IgtghgDgQjD2APEAuUB9Azgd1aANgHYDmqAtAOwAsAdFQIz0DMAbEwAzWtMCcArABoQ+CABdU9FjQBMLKnz4V2ADj4t2bAL5D0hAKZ5hJciz402PHi34U+na0JHiU09nQ4trnJhUb0+ypra4NAAyqIAnvgGaCAAlgAmqCFQAEZIoWJ6+PhxogZChBBgMSAAkpDEegBOESBCogAWAK5gqUVx+MmNoqJQmCgA9IPQcTSQaUg0AMbwYIOYkdGYgwBu9IMT6YgLWTl5emSrPIOinXor0mqD7Dc39SCLUaVbSEMLSxeb0Nu7+fv5I48EDBbBgTChPS9OIkTCGQjwTDoaZxeAAMyR2T0qzEqMI6DAOVwsUSyQAXlCxHMiQ8ntFktUIIsag9Zvh4NUAAoQaK9UqM5nVQYJPRoiDNfDiRwQCI1ADyUAgKMiEnY7CEi2qiRi6pAjJIMVAYBhqF1kGQLmCxsIpqE5tQTCEIrFEtEAFkTShdc7xZK3RALdInaLfaIAKpzZJgB7NSMocAPUSMtFouLTD02lBkaQ0diyBrJ1PpgMSJjmKhCPRFVLRABKEANqCTzT0ler0QAKoW0wAZOLEHpN6ottsQGt6ADC8EIongzWqcJQzdbeobVQ7aYA1ouANrq+gCINMAC6QjZHPrYCgyRrLYeVbH0Sn7Oql+vS+HK9EEE6-uIhDyZoRVQMV8EwFdKgA0QgL0Hsx2yECeXA0dxw7H98D-KCYMQsCVwfcdwi1BIYVIFBQOQkB8OiTDAJFODUgQsikL0YIESRaZ0gxdAsRxM5pwJGkSSSeMKW-WdCXwXANU+BkmXyapWXgF9uV5fJZMFYUQ1dB4RFlaoFSVPI6hQeg1WkoidSEfUqkMa1bRCQMrU9M0SxQR0QB9V0M3szy-VcoMPK0yUI2jeNoyEWNQoTAsIBTNNvK9XNlFMQQQCTWKi39C16BoJhlArSj2z0etGw-EdCsfPQuwy3t+0HMq8KKqcZznBch3K6yqq3Xd90PAQTzPJSL2Kd8QFvAoKvHZ9hqvdqv3QmjoOApjcLtCB-1o2D4K6FaKKoqqFvWrDlvIxrKsIxISJwvaisWmD6MY07WOKdAoGqdAmASdBsBhYTQDpUpFWqM5pmWB5Otsz0yDcUw1uy2hbCczNofMOxlDhiQEdSoGQafIa2vjbBGgOEFgmmedqird1oA3EpmVG1xpGkaGWGzdgO3oHgvXYbnczVAAtB4Jlpi58igEqbJQHcQEZ5mNDIehlA7dgqG53m1XYQWhFllns2kZXVbVdWBZAU8QHJ6pKZnABRaJeLxVUIqg0IImZKKSiTNNaSxaZ8gSUJpgfLV4DgvTdzNzAOT90OajKAARXcQCKMBXvez7vt+xS5NyfQ4TNhIxAgCdC-ZYgADFOnkvAgiAA

ndellicarpini commented 2 years ago

Can you give any more details on this issue? The video you sent is too laggy to tell whats going on

jamesdoyle21 commented 2 years ago

Of course. Selecting the autoscale option in the layer settings changes the particles to go from lines back to the old way we had it, the dots. Steps to reproduce:

  1. Turn on a wind or current layer (I used NOO Puerto Rico Wind)
  2. Change the style to particles
  3. Autoscale the color range
  4. Hit apply
  5. The streamlines are sped up and if you zoom in you can see they are back to dots, not lines
  6. Restoring Defaults resets the streamflows to lines
ndellicarpini commented 2 years ago

The streamflows were never made into lines, they were just updated so the same number of particles are always on screen no matter the zoom level.

Maybe it's easier to tell that they're dots because the autoscale has them moving so fast?

mpiannucci commented 2 years ago

Have to make sure autoscale doesn't mess with the colorscale range sent to particles wms image request. Have a feeling that could be messing it up, because autoscale will fail for particles

mpiannucci commented 2 years ago

FWIW, it doesnt look that bad on my computer, and if you adjust the speed of the particles it looks even better.

This might be able to be fixed by further normalizing particle speed, but for now Pyxms is working correctly, the only issue here is trying to make the ranges not get borked

mpiannucci commented 2 years ago

Right so the speed is scaled in the same way that the colors are, so when your range is changed drastically, the speed becomes very fast and the particles look bad. Not sure how we could improve this and the user can always make it pretty again themselves and permalink it jus fine. Let me know what you think

mpiannucci commented 2 years ago

Keeping open for a little further investigation

ndellicarpini commented 2 years ago

It should be fast when autoscaled right? The auto-scale should bring the range values way closer to the data's min/max values than the default, so there should be much more dramatic changes in the speed w/i the layer.

mpiannucci commented 2 years ago

It should be fast when autoscaled right? The auto-scale should bring the range values way closer to the data's min/max values than the default, so there should be much more dramatic changes in the speed w/i the layer.

Yup exactly whats happening

jamesdoyle21 commented 2 years ago

The only reason I wanted to autoscale was to better see the colorscale of the particles. Would it make sense to not change the speed of the particles and only change the color scale? This would make sense too because we label that slider "Color Range"

jamesdoyle21 commented 2 years ago

Because you can also change the speed of the particles in the slower/ faster slider

mpiannucci commented 2 years ago

The speed of the particles should be tied to the actual value of the speed. So I think something is not perfect with the scaling here.

mpiannucci commented 2 years ago

Found the bug, much better...

Screen Shot 2022-06-22 at 11 29 42 AM