pysal / pointpats

Planar Point Pattern Analysis in PySAL
https://pysal.org/pointpats/
BSD 3-Clause "New" or "Revised" License
83 stars 27 forks source link

usage of `intensity` within `random.py` distributions? #113

Open jGaboardi opened 1 year ago

jGaboardi commented 1 year ago

Within random.parse_size_and_intensity() the intensity variable is returned when called within each available distribution (poisson, normal, cluster_poisson, and cluster_normal). However, intensity does not appear to used outside parse_size_and_intensity().

Does intensity actually need to be returned from parse_size_and_intensity()?

ljwolf commented 1 year ago

Intensity and the first element of the "Size" tuple give the same information. Like, sampling a unit square at intensity 2 should be the same as sampling two points from it.

The intensity is returned from the parse function just in case future functions find it easier to work with that than with the sizes. Right now, though, we're always using the sizes, either inferred from intensity or given by the user.

That make sense?

jGaboardi commented 1 year ago

Yes, that makes sense.

The intensity is returned from the parse function just in case future functions find it easier to work with that than with the sizes. Right now, though, we're always using the sizes, either inferred from intensity or given by the user.

Would you be against me putting in a PR that adds some information to the docstring to remind us (me) for future reference?

@ljwolf Thoughts in this?