Error when stitching histograms #142
Unanswered
jeaninejuliettes
asked this question in
Q&A
Replies: 1 comment
-
See: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm receiving an error when using stitch_histogram and I'm not sure what I'm doing wrong, hope anyone can help me. The error I get is: ValueError: Request to insert delta hists but time_bin_idx not set. Please do.
The steps I take:
I start with creating a histogrammar object of the original dataframe
hists = df.pm_make_histograms()
bin_specs = popmon.get_bin_specs(hists)
later on I receive a new batch of data, which I add to my existing histograms
new_hists = [new_df.pm_make_histograms(bin_specs=bin_specs)]
hists_2= popmon.stitch_histograms(hists_basis=hists, hists_delta=new_hists, time_axis="batch")
so far so good, but when I try to repeat these steps with yet another new batch of data, I receive the error
new_hists_2 = [new_df_2.pm_make_histograms(bin_specs=bin_specs)]
hists_3 = popmon.stitch_histograms(hists_basis=hists_2, hists_delta=new_hists_2, time_axis="batch")
Is it not possible to stitch another histogram again? If not, I've found a bit of a cumbersome way to decide on what a good value for my time_bin_idx is. It works so far, but I'm expecting it too fail with other data (or not to work as expected). The way I define the time_bin_idx value is:
int(np.ceil(max(hists_2[next(iter(hists_2))].bin_centers()) + 1))
Hopefully you can point me in the right direction. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions