updated readme

This commit is contained in:
Erik Frojdh
2023-06-05 10:28:22 +02:00
parent d742e169d4
commit 7fbd308c7d
2 changed files with 25 additions and 11 deletions

View File

@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "cc37377b",
"id": "8e4c3dd9",
"metadata": {},
"source": [
"# Using ClusterFile"
@@ -11,7 +11,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "5dcb9f4e",
"id": "38941595",
"metadata": {},
"outputs": [],
"source": [
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
"id": "a1f27bec",
"id": "bc0ae735",
"metadata": {},
"source": [
"## Read clusters from file and plot a histogram\n",
@@ -41,7 +41,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "45482025",
"id": "e69f82da",
"metadata": {},
"outputs": [
{
@@ -74,6 +74,7 @@
"xmax = 1e4\n",
"hist1 = bh.Histogram(bh.axis.Regular(n_bins, xmin, xmax))\n",
"\n",
"# Read clusters and fill the histogram with pixel values\n",
"with ClusterFile(path/fname, chunk = 10000) as f:\n",
" for clusters in f:\n",
" hist1.fill(clusters['data'].flat)\n",
@@ -91,7 +92,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "a2973368",
"id": "f7fd30b5",
"metadata": {},
"outputs": [],
"source": []