-
Notifications
You must be signed in to change notification settings - Fork 38
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
Patch progress bar #276
Patch progress bar #276
Conversation
Hi Daniel, would it be an option to make the progress-bar optional? Like e.g. https://github.com/JelleAalbers/wimprates/blob/master/wimprates/utils.py#L44. |
Hi Joran, thanks. I have to check. |
Done, the bar is now optional. By default the bar is switched on. Also added a check that the progress bar is only used if metadata exists. |
@WenzDaniel some extra questions:
|
To be honest I never really checked, since the overall added extra time is super small compared to all the other checks we are doing when reading data. I expect the time difference to be very small. I guess the part which takes longest is the reading in of the metadata for which I have not seen any big differences for the different datakinds. Update: I just checked with
for a typical calibration run and I got the following values:
So there seems to be an overhead O(1 s) which I think is fine.
No, I never worked with superruns and I do not know how they work. If it is a nested loop for run in runid -> for .. in get_iter -> you will get for each run an individual progress bar, if you first somewhat make a "super run" for which you loop just once with get_iter you will get just a single bar. ** Update: ** I just read through https://github.com/AxFoundation/strax/blob/master/strax/run_selection.py#L221 and since super runs have the same structure as regular runs including a metadata file the progess bar should also work for them. |
@ ACs this is ready for merge unless @WenzDaniel feels like addressing CodeFactor |
@WenzDaniel , this PR would be great but I cannot circumvent the codefactor |
With this pull request we add a nice progessbar. Implemented in get_iter. It also works if the user specifies any time range.