-
-
Notifications
You must be signed in to change notification settings - Fork 137
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 verbose mode to ellipse fitting and modeling #947
Conversation
What about having logger verbosity rather than explicit prints? That would fit much nicer into a pipeline environment. |
@bsipocz that would be nice too, but I wonder how that would work in a, say, notebook environment. I never though of this package as something that can be used in a pipeline environment, due to the highly interactive nature of the data analysis that it performs. The purpose of the direct prints at stdout is to provide the user with instant visual feedback on the progress, as would be with a, say, progress bar. But if we can have the logger perform by default as the plain stdout prints we have now, it would be easy to convert the print code to logger calls. |
@ibusko Astropy's logger works fine in a notebook environment. The advantage of the logger, of course, is it can be turned off by the user. from astropy import log
log.info('my message') |
@larrybradley that's good. Still, I wonder if the logger can be used to create a stdout-based progress-bar-like output like I have in this PR. The point is not really to log anything for posterior use, but to give the user a real-time visual feedback on the fit's progress, while it's happening. The stdout output is not meant to be kept, or used for anything else, much less for science. It may lack the numerical precision available in the output table, as well as have incomplete information. The logger solution seemed to me to be an overkill for just visual feedback purposes. Of course, we can always have both, although I didn't find so far a use case where logging would be necessary. As @bsipocz pointed out, it would make all the sense in a pipeline or background multi-job environment, but I would advise against running the ellipse fitting algorithm in such way, since it typically needs significant "nursing" from the user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @ibusko
This addresses #891 and #823