Skip to main content

Xcalibu

Xcalibu is a python library to manage calibrations tables or polynomia. It includes a PyTango device server in order to optionaly run it as a server.

xcalibu.py : python library Xcalibuds.py : PyTango device server

Xcalibu name comes from the first use of this library to deal with undulators calibrations at ESRF.

installation

Available on PyPi or anaconda.org

or pip install . or pip install -e .

usage

to plot: ./xcalibu.py -p

to debug:./xcalibu.py -d10

plot a file:./xcalibu.py -p examples/xcalibu_calib_poly.calib

Examples

TABLE + INTERPOL

import numpy
import xcalibu
calib = xcalibu.Xcalibu()
calib.set_calib_file_name("mycalib.calib")
calib.set_calib_type("TABLE")
calib.set_reconstruction_method("INTERPOLATION")
calib.set_calib_time("1234.5678")
calib.set_calib_name("CAL")
calib.set_calib_description("dynamic calibration created for demo")
calib.set_raw_x(numpy.linspace(1, 10, 10))
calib.set_raw_y(numpy.array([3, 6, 5, 4, 2, 5, 7, 3, 7, 4]))
calib.plot()
calib.save()  # create a file named `mycalib.calib` in your current directory.

TABLE + POLYFIT

import numpy
import xcalibu
calib = xcalibu.Xcalibu()
calib.set_calib_file_name("mycalib.calib")
calib.set_calib_type("TABLE")
calib.set_reconstruction_method("POLYFIT")
calib.set_calib_time("1234.5678")
calib.set_calib_name("CAL")
calib.set_calib_description("dynamic calibration created for demo")
calib.set_raw_x(numpy.linspace(1, 10, 15))
calib.set_raw_y(numpy.array([4.1, 3.5, 3.6, 4.2, 4.5, 4, 3.9, 3.8, 4.5, 4.6, 6, 6.2, 4.7, 5, 4]))
calib.set_fit_order(6)
calib.fit()
calib.plot()

POLY


% cat mycalib.calib
# XCALIBU CALIBRATION

CALIB_NAME=CAL
CALIB_TYPE=TABLE
CALIB_TIME=1234.5678
CALIB_DESC=dynamic calibration created for demo

CAL[1.000000] = 3.000000
CAL[2.000000] = 6.000000
CAL[3.000000] = 5.000000
CAL[4.000000] = 4.000000
CAL[5.000000] = 2.000000
CAL[6.000000] = 5.000000
CAL[7.000000] = 7.000000
CAL[8.000000] = 3.000000
CAL[9.000000] = 7.000000
CAL[10.000000] = 4.000000

command line usage

Options: -h: help -p: plot -d: debug

-t type -r reconstruction_method -k kind of interpolation -n name

example: ./xcalibu.py -n calinou -t TABLE -r INTERPOLATION -k cubic examples/U32a_1_table.dat -p

Metadata

Release files for xcalibu 1.0.1

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

Source distribution (sdist)

Source distribution for xcalibu 1.0.1
File Size Uploaded Provenance
xcalibu-1.0.1.tar.gz 59.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for xcalibu 1.0.1
File Interpreter ABI Platform
xcalibu-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 121.4 kB

Release files / xcalibu-1.0.1.tar.gz

Download URL xcalibu-1.0.1.tar.gz
Size 59.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d5f786b17569e4ed04cbcf6e10adf3fa0edd3d4ed292cb0f1b1e954d9fb1b2d1
BLAKE2b-256 checksum
How to use checksums
c7eee47131b32850e2dca62e816b5b0c74ff0cfab841b46e8d8048b61e4d8091
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / xcalibu-1.0.1-py3-none-any.whl

Download URL xcalibu-1.0.1-py3-none-any.whl
Size 61.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87bc43423064a71d01696e714422b7fc7373eb01f6f04fed8ab83ff0ac201696
BLAKE2b-256 checksum
How to use checksums
a7434c69ce14314304c71c89594f07694995e5d4acd8b9b497ade8ed0c1d53e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for xcalibu 1.0.1

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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