-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
516 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
92 changes: 92 additions & 0 deletions
92
examples/interface/histoprint/.ipynb_checkpoints/histo1d-checkpoint.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 8, | ||
"id": "615547eb-5c01-4749-9069-e75dbaf24d83", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from histoprint import print_hist\n", | ||
"import babyyoda" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 10, | ||
"id": "556cb6d5-a1e3-472f-854a-ad0ac230a622", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"{'/': GROGU_HISTO1D_V3(d_annotations={'Path': '/', 'Title': 'test', 'Type': 'Histo1D'}, d_key='/', d_edges=[0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0], d_bins=[GROGU_HISTO1D_V3.Bin(d_sumw=3.0, d_sumw2=3.0, d_sumwx=-5.0, d_sumwx2=9.0, d_numentries=3.0), GROGU_HISTO1D_V3.Bin(d_sumw=0.0, d_sumw2=0.0, d_sumwx=0.0, d_sumwx2=0.0, d_numentries=0.0), GROGU_HISTO1D_V3.Bin(d_sumw=1.0, d_sumw2=1.0, d_sumwx=1.0, d_sumwx2=1.0, d_numentries=1.0), GROGU_HISTO1D_V3.Bin(d_sumw=2.0, d_sumw2=2.0, d_sumwx=4.0, d_sumwx2=8.0, d_numentries=2.0), GROGU_HISTO1D_V3.Bin(d_sumw=3.0, d_sumw2=3.0, d_sumwx=9.0, d_sumwx2=27.0, d_numentries=3.0), GROGU_HISTO1D_V3.Bin(d_sumw=4.0, d_sumw2=4.0, d_sumwx=16.0, d_sumwx2=64.0, d_numentries=4.0), GROGU_HISTO1D_V3.Bin(d_sumw=5.0, d_sumw2=5.0, d_sumwx=25.0, d_sumwx2=125.0, d_numentries=5.0), GROGU_HISTO1D_V3.Bin(d_sumw=6.0, d_sumw2=6.0, d_sumwx=36.0, d_sumwx2=216.0, d_numentries=6.0), GROGU_HISTO1D_V3.Bin(d_sumw=7.0, d_sumw2=7.0, d_sumwx=49.0, d_sumwx2=343.0, d_numentries=7.0), GROGU_HISTO1D_V3.Bin(d_sumw=8.0, d_sumw2=8.0, d_sumwx=64.0, d_sumwx2=512.0, d_numentries=8.0), GROGU_HISTO1D_V3.Bin(d_sumw=9.0, d_sumw2=9.0, d_sumwx=81.0, d_sumwx2=729.0, d_numentries=9.0), GROGU_HISTO1D_V3.Bin(d_sumw=21.0, d_sumw2=21.0, d_sumwx=221.0, d_sumwx2=2331.0, d_numentries=21.0)])}" | ||
] | ||
}, | ||
"execution_count": 10, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"h = babyyoda.read(\"../../../tests/test_histo1d_v3.yoda\")\n", | ||
"h" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 12, | ||
"id": "8d443f31-3ce2-49ee-ae3f-79d3103cf1d7", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
" test \n", | ||
" 0.000 _ x 10^+01 9/row ╷\n", | ||
" 0.100 _\n", | ||
" 0.200 _\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\n", | ||
" 0.300 _\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\n", | ||
" 0.400 _\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\n", | ||
" 0.500 _\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\n", | ||
" 0.600 _\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\n", | ||
" 0.700 _\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\n", | ||
" 0.800 _\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\n", | ||
" 0.900 _\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\n", | ||
" 1.000 _\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\u001b[90;40m█\u001b[39;49m\n", | ||
" \u001b[90;40m█\u001b[39;49m \n", | ||
" Tot: 4.50e+01 \n", | ||
" Avg: 6.83e-01 \n", | ||
" Std: 2.21e-01 \n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"v=h['/']\n", | ||
"print_hist(v, summary=True, title=v.title())" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.13.0" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
Oops, something went wrong.