Quickstart
Here is a quick guide to get started with NXCALS.
Registration
Registration process is described in Getting access.
Timber (extraction web interface)
You can explore data from NXCALS using timber.
Python API
SWAN
Locally
Installation
Install Python NXCALS Extraction APIs (pySpark based). To be able to install package, you need Python3, in version at least 3.7. (currently supported version is 3.7.9) Acc-Py is available on machines from the CERN accelerator sector (ACC).
source /acc/local/share/python/acc-py/base/pro/setup.sh
acc-py venv ./venv
source ./venv/bin/activate
python -m pip install nxcals
python3 -m venv ./venv
source ./venv/bin/activate
python -m pip install git+https://gitlab.cern.ch/acc-co/devops/python/acc-py-pip-config.git
python -m pip install nxcals
More details (and also troubleshooting) you can find here.
Running
You need a valid kerberos ticket. To init kerberos:
kinit
And later start python and create spark object:
from nxcals.spark_session_builder import get_or_create
from nxcals.api.extraction.data.builders import DataQuery
spark = get_or_create("My_APP")
df = DataQuery.builder(spark).entities().system('CMW') \
.keyValuesEq({'device': 'LHC.LUMISERVER', 'property': 'CrossingAngleIP1'}) \
.timeWindow('2022-04-22 00:00:00.000', '2022-04-23 00:00:00.000') \
.build()
You can find more examples in Extraction API chapter.
Java API
- Consult our Java NXCALS examples project
Important
Running NXCALS bundle and executing NXCALS examples require additional configuration steps.