Skip to main content

IRIXS routines

Scripts for the IRIXS spectrometer, Beamline P01, Synchrotron Petra-III, DESY

Overview

Classes

IRIXS.irixs: reduction class for the Rowland circle spectrometer
IRIXS.spectrograph: reduction class for spectrograph

  • extracts raw collected images, transforms them into spectra and loads them to text files for analysis.
  • basic plotting and fitting functionality

IRIXS.sixc: six-circle diffractometer simulator class for experiment planning

Scripts

p01plot: GUI application for quick plotting and fitting for experiments on P01 and P09
irixs_oneshot: check detector images from a specific measurement

Installation

Environment: Python 3.8+ w/ scipy, matplotlib, scikit-image, tabulate, PyQT5

from PyPI:

  1. pip install IRIXS

If using an anaconda/miniconda distribution, it is suggested to install dependencies separately:

  1. pip install IRIXS --no-deps
  2. then e.g. conda install pyqt

To symlink to the source folder instead:

  1. Clone repository to a prefered location
  2. Enter root directory
  3. pip install -e .

Usage

IRIXS.irixs

Example reduction script for IRIXS.irixs

from IRIXS import irixs

# initiate class and define detector ROI and zero energy position (y0)
expname = "irixs_11009137"
a = irixs(expname, y0=667, roix=[160, 1500], roih=[-200, 200])

elastic_runs = [1713, 1719]
spectra_runs = [1710, 1711, 1712, 1722, 1723]

# plot raw detector data to refine the ROI and y0
a.detector(1713)

# load and condition data by binning with meV steps
a.condition(0.006, elastic_runs, fit=True)
a.condition(0.02, spectra_runs)

fig, ax = plt.subplots()
a.plot(elastic_runs, ax=ax)
a.plot(spectra_runs, ax=ax)

IRIXS.spectrograph

from IRIXS import spectrograph

# initiate class and define detector image ROI
expname = "irixs_11012416"
b = spectrograph(expname, roix=[1024, 2048], roic=790, roih=100)

runs = [2476, 2477]

# plot raw detector images to refine ROI
b.detector(2476)

# condition and plot, while summing over the vertical (y) axis of the detector
b.condition(runs, bins=20, oneshot_y=True)
b.plot(runs)

IRIXS.sixc

Example script for IRIXS.sixc

from IRIXS import sixc

# initialise UB-matrix using experimental conditions
# here we assume second reflection is offset by exactly th=90°
unit_cell = [5.37, 5.60, 19.35, 90, 90, 90]
hkl0 = (0, 0, 4)
hkl1 = (1, 0, 0)
th0 = 29.85
tth0 = 53.70
chi0 = 2.0
angles0 = [th0, tth0, chi0]
f = sixc(unit_cell, ref0, ref1, angles0, hkl1_offset=90, energy=2838.5)

# print hkl for values from grazing to normal with detector fixed at tth=90°
for th in range(0, 95, 5):
    print(th, f.hkl(th, 90, chi0).round(3))

p01plot

p01plot [directory] [--remote -r] [--help -h]
directory : location to look for .fio data files
            defaults to /gpfs/current/raw, then current directory
--remote : remove cursor to speed up remote connections
--help : show this menu

irixs_oneshot

irixs_oneshot [number of run]

License

Copyright (C) Max Planck Institute for Solid State Research 2019-2021
GNU General Public License v3.0

Metadata

Release files for IRIXS 0.6.8

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

Source distribution (sdist)

Source distribution for IRIXS 0.6.8
File Size Uploaded Provenance
IRIXS-0.6.8.tar.gz 40.6 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 96.0 kB

Release files / IRIXS-0.6.8.tar.gz

Download URL IRIXS-0.6.8.tar.gz
Size 40.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5b0b059a2e8dc8cb26c76c87659186cdb9ce5049427b3adc4b744a2f1b97dc1c
BLAKE2b-256 checksum
How to use checksums
2793a289e6f3bf455b82bdbb142ffb0772258be66fdf0093a2e0e753cdf56409
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/0.0.0 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / IRIXS-0.6.8-py3-none-any.whl

Download URL IRIXS-0.6.8-py3-none-any.whl
Size 55.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
46b6de08e2c2430ba8d5c56084d83dc47227d4ee686679fa9d3b5a4c0498b6a9
BLAKE2b-256 checksum
How to use checksums
fda330f8576913404d2b063fe2d5eaee6e730d0e033cb028e371d6dc9293765c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/0.0.0 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Security for IRIXS 0.6.8

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