ageller / Firefly

A WebGL interactive particle viewer
GNU Affero General Public License v3.0
64 stars 12 forks source link

Particle sizes change depending on the data #13

Open zhafen opened 6 years ago

zhafen commented 6 years ago

This is demonstrated in the screenshot below, which shows a 100x100x100 ruler shown for two different data sets. Note how the ruler is much thicker in one data set than the other, despite the ruler point size being set to 4 in both data sets. This can be pretty extreme, and makes it hard to look at detailed behavior in some cases.

screen shot 2018-08-21 at 9 49 22 pm

screen shot 2018-08-21 at 9 48 18 pm

As far as differences in the data that could produce this, I think it might have to do with the scale of the data not currently displayed. For the first data set the data goes out to a much larger distance than the second data set.

zhafen commented 6 years ago

This can also be seen by comparing the rulers in time-fly and Latte-CGM. Both are 100x100x100 and have a pointsize of 4, but look different.

agurvich commented 6 years ago

Might have to do with the definition of particle "size" as the number displayed in the app is sizeMult, a multiplicative factor applied to the "true" particle "size."

ageller commented 4 years ago

I may have fixed this in the flaskGUI branch. I created a notebook in there as well called testParticleSizes.ipynb to play with this.

Some explanation: The particle sizes are a bit complicated because they depend on the camera location. Previously we normalized the size by the total extent of the data so that a point size of 1 (for example) is the same relative size no matter what the extent of the data is (e.g., 1 would be very big physically for a physically big system). I removed that normalization. But then there appears to be some magic number of about 70 that I need to multiply the sizes by in order for them to represent the physical size of the point. I don't know where this comes from, but it seems to work in the limited examples I've tested.

For the isolated galaxy example, a point size of 1 looks pretty good. I don't know if that makes sense (e.g., are the units in parsecs?). Thoughts?

Please test this on your end!

agurvich commented 2 years ago

It may be impossible to do this on all systems because different drivers have different ALIASED_POINTSIZE_RANGE variables (and even my computer went from [1,64] to [1,511] since the last time i checked so apparently it can change???)

webgl settings can be viewed at: https://webglreport.com/ which reads your machine's driver info and formats it nicely in the browser