tskit
tskit copied to clipboard
add `mask` option to stats
This is going to be necessary for stdpopsim. We can do it easily in python at first as I did here.
Agreed. As discussed somewhere in #261, I think the mask argument should be a 2D numpy array with shape (N, 2) so that we would mask out two regions with something like
ts.diversity(mask=[(s1, e1), (s2, e2)])
We can use the recently added interval operations in util.py to parse these mask arguments.
As discussed, we're not sure when these are needed though. I'm provisionally adding them to a new 0.2.3 milestone, but we can promote to 0.2.2 if we want.
Is this feature still desired?
Yes - but it's a can of worms. I wouldn't take it on unless you have a spare month!