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

Error Handling #19

Open
spapadiamantis opened this issue Nov 14, 2022 · 2 comments
Open

Error Handling #19

spapadiamantis opened this issue Nov 14, 2022 · 2 comments

Comments

@spapadiamantis
Copy link
Contributor

Microscope-metrics does not currently raise error exceptions. At the moment the module solely logs activity. Implementing error handling also entails identifying possible errors and their meaning to users.

An example of a possible error in this project is a saturation error when the saturation present on an image does not permit deducting viable metrics.

@juliomateoslangerak
Copy link
Member

juliomateoslangerak commented Nov 14, 2022

Yes, We need to implement metrics specific errors that can be raised.
For the moment we are thinking about

  • SaturationError

Any other kind of error that might be worth implementing because it is a common error and is not already implemented in the standard library?

Note we can 'raise' warnings with

import warnings
warnings.warn("Warning...........Message")

@juliomateoslangerak
Copy link
Member

Concerning the saturation, it might be worth implementing an utility function check_saturation(image) that will raise this exception when image is saturated.

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

No branches or pull requests

2 participants