Python client for accessing the XENON experiment PMT data.
Project description
Basic Usage
import xepmts
# If you are using a notebook:
xepmts.notebook()
# v1 client
db = xepmts.get_client("v1")
db.login(token='YOUR-API-TOKEN')
# v2 client
db = xepmts.get_client("v2")
db.login()
# 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)
Free software: MIT
Documentation: https://xepmts.readthedocs.io/
Features
TODO
Credits
This package was created with Cookiecutter and the briggySmalls/cookiecutter-pypackage project template.
Project details
Release history Release notifications | RSS feed
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.2.tar.gz
(11.1 kB
view hashes)
Built Distribution
xepmts-0.5.2-py3-none-any.whl
(10.9 kB
view hashes)