Skip to main content

Python client for accessing the XENON experiment PMT data.

Project description

A helper package for managing the PMT database used by the XENONnT Dark Matter Experiment.

https://img.shields.io/pypi/v/xepmts.svg https://img.shields.io/travis/jmosbacher/xepmts.svg Documentation Status

Basic Usage

import xepmts

# If you are using a notebook:
xepmts.notebook()

# use v1 client
db = xepmts.login("v1", token='YOUR-API-TOKEN')

# or the v2 client
db = xepmts.login("v2")

# set the number of items to pull per page
db.tpc.installs.items_per_page = 25

# get the next page
page = db.tpc.installs.next_page()

# iterate over pages:
for page in db.tpc.installs.pages():
    df = page.df
    # do something with data

# select only top array
top_array = db.tpc.installs.filter(array="top")

# iterate over top array pages
for page in top_array.pages():
    df = page.df
    # do something with data

query = dict(pmt_index=4)
# get the first page of results for this query as a list of dictionaries
docs = db.tpc.installs.find(query, max_results=25, page_number=1)

# same as find, but returns a dataframe
df = db.tpc.installs.find_df(query)


# insert documents into the database
docs = [{"pmt_index": 1, "position_x": 0, "position_y": 0}]
db.tpc.installs.insert_documents(docs)

Features

  • TODO

Credits

This package was created with Cookiecutter and the briggySmalls/cookiecutter-pypackage project template.

Project details


Download files

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

Source Distribution

xepmts-0.5.9.tar.gz (11.7 kB view hashes)

Uploaded Source

Built Distribution

xepmts-0.5.9-py3-none-any.whl (11.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page