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

[Feature Request] Use logging instead of raw printing to stdout/stderr #286

Open
jkrenzer opened this issue Oct 10, 2024 · 2 comments
Open

Comments

@jkrenzer
Copy link

Hi!

Currently svmbir prints to console all it's messages. This makes ist somewhat hacky to use inside other projects, which have a propper logging interface or a CLI.

There basically two options I would suggest going forward:

  1. Use a real logging library like python's loggingmodule and make use of the differen log levels to differentiate severity of messages
    • More effort needed as all print statements have to be evaluated and changed
    • But also more value gained as information of logging is differentiated better and the consumer can use level or location filters to filter messages he wants
  2. Replace print calls by a _print function which is defined in the svmbir module and defaults to _print = print
    • Less effort, can be basically done mostly by search and replace
    • Quite hacky
    • Not much value gained as consumer has to parse the printed messages to determine leves for logging and locating the message is not possible

Cheers,

Jörn

@cabouman
Copy link
Owner

Thanks Jörn!
I'm going to send a separate email to Jordan Kisner and Greg Buzzard that flags this issue. We haven't done an update in a while, so maybe we can include this improvement.
Charlie

PS If you have any feedback of how you have used this software and what is good or can be made better, that would be very valuable. We maintain a number of MBIR packages, so hearing from people who use it helps us to much better understand the goals.

@jkrenzer
Copy link
Author

jkrenzer commented Oct 10, 2024

Thanks!

In scope of my PhD thesis I am trying to to observe electrode erosion in ion beam sources using X-ray micro-tomography. I wrote a python based utility, which provides reconstruction with different algorithms and where I try different approaches to reduce artifacts and recover voxel and mesh data-sets to feed the "real thing" into our institute's simulation software. SVMBIR is one of the reconstruction packages which I included in hopes of better coping with the strong artifacts commonly observed in our electrode systems due to the stark attenuation constrasts and many parallel and patterned structures of the extraction grids.

Hope this gives you some insight

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