Skip to content

Conversation

nordam
Copy link
Collaborator

@nordam nordam commented Jun 20, 2025

No description provided.

@nordam nordam linked an issue Jun 20, 2025 that may be closed by this pull request
@arsalanmstn
Copy link
Contributor

Hi, can you modify the extract_oil function by letting the user to set a deformation limit using Feret's Threshold as:

def extract_oil(stats, feretThres=0.3, THRESH=0.85, solidityThres=0.95):
ma = stats['minor_axis_length'] / stats['major_axis_length']
stats = stats[ma > feretThres] # cannot have a deformation more than Feret's Threshold
stats = stats[stats['solidity'] > solidityThresh]
ind = np.logical_or((stats['probability_oil'] > stats['probability_bubble']),
(stats['probability_oil'] > stats['probability_oily_gas']))

ind2 = (stats['probability_oil'] > THRESH)

ind = np.logical_and(ind, ind2)

stats = stats[ind]
return stats

@emlynjdavies emlynjdavies added the patch / enhancement improved functionality or patch indented for changes that require bumping only the PATCH number label Jul 28, 2025
ind = np.logical_or((stats['probability_oil'] > stats['probability_bubble']),
(stats['probability_oil'] > stats['probability_oily_gas']))

ind2 = (stats['probability_oil'] > proabability_threshold)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proabability_threshold -> probability_threshold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch / enhancement improved functionality or patch indented for changes that require bumping only the PATCH number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add extract_oil function from pysilcam to pyopia
4 participants