cloudsci / cloudmetrics

Toolkit for computing 15+ metrics characterising 2D cloud patterns
16 stars 8 forks source link

iorg and iorg_poisson #57

Closed leifdenby closed 2 years ago

leifdenby commented 2 years ago

@martinjanssens going over the iorg code you wrote (https://github.com/cloudsci/cloudmetrics/pull/54) got me thinking about the difference between the iorg and iorg_poisson implementations you did. I think the difference between the two is where the reference nearest-neighbor distribution comes from, is that right? If that is the case I was wondering if we shouldn't combine the two and then have an argument to iorg function that is something like iorg(reference_dist='poisson') and iorg(reference_dist='inhibition_nn')?

Also, did you make a lot of use of both? Or did you find one of them more interesting/relevant? Would be great to include that info in the documentation :)

martinjanssens commented 2 years ago

Yes, you are right: One creates a reference distribution by randomly sampling circles of the same sizes as the objects in the scene and placing them in non-overlapping fashion (assuming periodic BCs). That's how Benner & Curry (1998) suggested doing it. The other is the more commonly used version, which compares against a theoretical distribution from a Poisson process. In terms of experience, the former sounds cleaner, because it accounts for object size. However, I've found it to be a little unstable for scenes that don't have that many objects in them (e.g. LES fields). The "regular", Poisson-based iorg always works and is almost always useful at distinguishing scenes. I'd be happy to add this to the documentation :)

martinjanssens commented 2 years ago

Regarding implementation, I think your suggestion of passing the reference distribution choice as an option is really nice and clean, let's go for that!

leifdenby commented 2 years ago

Great, hanks for this info! I'll make a note of this and ask you to check over my notes :)

leifdenby commented 2 years ago

All done https://github.com/cloudsci/cloudmetrics/pull/54!