usnistgov / pyMCR

pyMCR: Multivariate Curve Resolution for Python
https://pages.nist.gov/pyMCR
Other
80 stars 27 forks source link

Add "quiet" mode of operation #22

Closed jat255 closed 5 years ago

jat255 commented 5 years ago

As @AndrewHerzing and I are working to include pyMCR as a decomposition method into HyperSpy, it would be nice if there was a way to prevent the code from outputting to the stdout on the console.

I would recommend one of two methods: 1) Rather than print statements, make use of the logging module, so packages that call this library can set the verbosity of the log as needed 2) Add a quiet parameter throughout the code that when set will prevent outputting to the console (a la most UNIX tools)

Option 1 is more "pythonic", and provides a little more flexibility, so that would be my preferred recommendation.