Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

A clusterizer to cluster hits of a pixel detector with Python. The clustering happens in C++ on numpy arrays to increase the speed.

Project Description

# Pixel Clusterizer [![Build Status](https://travis-ci.org/SiLab-Bonn/pyPixelClusterizer.svg?branch=master)](https://travis-ci.org/SiLab-Bonn/pyPixelClusterizer) [![Build Status](https://ci.appveyor.com/api/projects/status/github/SiLab-Bonn/pyPixelClusterizer)](https://ci.appveyor.com/project/DavidLP/pyPixelClusterizer)

pixel_clusterizer is an easy to use pixel hit-clusterizer for Python. It clusters hits on an event basis in space and time.

The hits have to be a numpy recarray with data types as defined in data_struct.HitInfo. The fields are: - event_number - frame - column - row - charge

Cluster information (data_struct.ClusterInfo) is created with the following fields: - event_number - ID - size - charge - seed_column - seed_row - mean_column - mean_row

Also cluster hit information (data_struct.ClusterHitInfo) is created. The cluster hit information is the hit information extended by the following fields: - cluster_ID - is_seed - cluster_size - n_cluster

# Installation

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

pip install pixel_clusterizer

# Usage

import numpy as np

from pixel_clusterizer.clusterizer import HitClusterizer

from pixel_clusterizer import data_struct

hits = np.ones(shape=(3, ), dtype=data_struct.HitInfo) # create some data

clusterizer = HitClusterizer() # initialize clusterizer

clusterizer.add_hits(hits) # cluster hits # add hits to clusterizer

print (clusterizer.get_cluster()) # print cluster

print (clusterizer.get_hit_cluster()) # print hits + cluster info

Also take a look at the example folder!

Release History

Release History

This version
History Node

1.0.3

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pixel_clusterizer-1.0.3.zip (63.2 kB) Copy SHA256 Checksum SHA256 Source Sep 26, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting