Skip to main content

Pixel Clusterizer Build Status Build status Coverage Status

tests

Intended Use

Pixel_clusterizer is an easy to use pixel hit clusterizer for Python. It clusters hits connected to unique event numbers in space and time.

The hits must be provided in a numpy recarray. The array must contain the following columns ("fields"):

  • event_number
  • frame
  • column
  • row
  • charge

If the column names are different, a mapping of the names to the default names can be provided. The data type of each column can vary and is not fixed. The column/row values can be either indices (integer, default) or positions (float). Charge can be either integer or float (default).

After clustering, two new arrays are returned:

  1. The cluster hits array is the hits array extended by the following columns:
    • cluster_ID
    • is_seed
    • cluster_size
    • n_cluster
  2. The cluster array contains in each row the information about a single cluster. It has the following columns:
    • event_number
    • ID
    • n_hits
    • charge
    • seed_column
    • seed_row
    • mean_column
    • mean_row

Installation

Python 2.7 or Python 3 or higher must be used. There are many ways to install Python, though we recommend using Anaconda Python or Miniconda.

Prerequisites

The following packages are required:

numpy numba>=0.24.0

Installation of pixel_clusterizer

The stable code is hosted on PyPI and can be installed by typing:

pip install pixel_clusterizer

For developer, clone the pixel_clusterizer git repository and use the following command to install pixel_clusterizer:

pip install -e .

For testing the basic functionality of pixel_clusterizer, execute the following command:

nosetests pixel_clusterizer

Usage

import numpy as np

from pixel_clusterizer import clusterizer

hits = np.ones(shape=(3, ), dtype=clusterizer.default_hits_dtype)  # Create some data with std. hit data type

cr = clusterizer.HitClusterizer()  # Initialize clusterizer

cluster_hits, clusters = cr.cluster_hits(hits)  # Cluster hits

Also please have a look at the examples folder!

Support

Please use GitHub's issue tracker for bug reports/feature requests/questions.

Metadata

Release files for pixel-clusterizer 3.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pixel-clusterizer 3.2.0
File Size Uploaded Provenance
pixel_clusterizer-3.2.0.tar.gz 22.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pixel-clusterizer 3.2.0
File Interpreter ABI Platform
pixel_clusterizer-3.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.6 kB

Release files / pixel_clusterizer-3.2.0.tar.gz

Download URL pixel_clusterizer-3.2.0.tar.gz
Size 22.0 kB
Tags Source
SHA-256 checksum
How to use checksums
34523273eac36f070e61626c6db728395ba8fe311e45bf5c7ea9c64074f36e6c
BLAKE2b-256 checksum
How to use checksums
8dcd8b690a6f0bb050b80a507143cc1af7befedf9ec6661ca229fa1c1bfae540
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / pixel_clusterizer-3.2.0-py3-none-any.whl

Download URL pixel_clusterizer-3.2.0-py3-none-any.whl
Size 21.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f763043bbd2dfd53a1a190ae7bb345921b551e6efc3e0f1db76ba9d6803f333
BLAKE2b-256 checksum
How to use checksums
b6489e103f590fb2ac12a3bfb912b969aa35b933869e7b0cadd12cbf254f6bdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for pixel-clusterizer 3.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page