Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WofE CLI functions #475

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

msorvoja
Copy link
Collaborator

This PR adds CLI functions for the two WofE functions.

In the first CLI function (weights_of_evidence_calculate_weights_cli), the resulting dataframe is saved into a CSV file and the arrays are saved as rasters. The number of deposit pixels and evidence pixels are only printed to the user.

In the second CLI function (weights_of_evidence_calculate_responses_cli), the resulting probability and confidence arrays are saved as rasters.

In the latter CLI function, there are at least two options how to transform the input rasters into an array of dictionaries needed in the corresponding toolkit function:

  • Create dictionaries based on the number of input rasters and assign key-array pairs so that each dictionary has got the same keys, for example W+ and S_W+ (remove any uncommon keys), or
  • read rasters into dictionaries based on their file path. This assumes that each set of outputs of weights_of_evidence_calculate_weights_cli are in separate folders. As many dictionaries will be created as there are distinct (innermost) folders in the paths of the input rasters. I'm not sure whether this approach will work with the plugin.

I believe the first approach makes more sense, but I'll let you comment which approach you prefer @nmaarnio.

@msorvoja msorvoja requested a review from nmaarnio December 12, 2024 13:00
@msorvoja msorvoja linked an issue Dec 12, 2024 that may be closed by this pull request
@msorvoja msorvoja marked this pull request as draft December 12, 2024 13:01
Copy link
Collaborator

@nmaarnio nmaarnio left a comment

Choose a reason for hiding this comment

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

In addition to my comments below, please add CLI function for agterberg_cheng_CI_test tool

eis_toolkit/cli.py Outdated Show resolved Hide resolved
eis_toolkit/cli.py Outdated Show resolved Hide resolved
eis_toolkit/cli.py Outdated Show resolved Hide resolved
eis_toolkit/cli.py Outdated Show resolved Hide resolved
eis_toolkit/cli.py Show resolved Hide resolved
eis_toolkit/cli.py Outdated Show resolved Hide resolved
@msorvoja
Copy link
Collaborator Author

@nmaarnio Ready for another review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add CLI functions for WofE
2 participants