threw this code together and it was unusually/ surprising timeconsuming to debug yet has rather little code/ logic. the difficulty is related to the early-discovered property of how skewed (nonlinear) a random sample of trajectory distributions is. nearly all are very short and it seems quite possible its in line with some power law (never tried to fit it, but do have the overwhelming urge to, and just go hunting for as many power-law properties in the data one can find, strongly suspect they might be quite widespread).

the idea is to try to bias (or unbias depending on pov) the sample of randomly chosen trajectories (based on initial density spread sample) so that they are nearly linearly distributed in length. was developing the test data to test the trajectory (meta function) calculation logic. did not end up with meta function calculation logic tied to it worth saving, but given how tricky it was, do want to save this sampling code for future reference! this generates 10 samples of 500 points over uniform density, and then finds the min and ¾ the max of trajectory lengths, and tries to sample linearly over that range (starting top down), and the result is quite smooth as in the graph (of trajectory length).

Continue reading →