Skip to content

Removing pores above or below a size threshold #2023

Answered by ma-sadeghi
baq99 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, it's actually quite straightforward:

mask = net["pore.diameter"] > threshold
op.topotools.trim(network, pores=mask)

Note: it's crucial that you do the query on your network object, rather than your geometry, as network indices are global whereas geometry indices are local (of course, if you only have only geometry, then the indices are identical, but for more than 1 geometry, you get different results).

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@baq99
Comment options

@baq99
Comment options

Answer selected by baq99
Comment options

You must be logged in to vote
2 replies
@jgostick
Comment options

@mourendong
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants