Skip to main content

Routines for the IRIXS spectrometer

Project description

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

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

IRIXS-0.6.8.tar.gz (40.6 kB view details)

Uploaded Source

Built Distribution

IRIXS-0.6.8-py3-none-any.whl (55.4 kB view details)

Uploaded Python 3

File details

Details for the file IRIXS-0.6.8.tar.gz.

File metadata

  • Download URL: IRIXS-0.6.8.tar.gz
  • Upload date:
  • Size: 40.6 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for IRIXS-0.6.8.tar.gz
Algorithm Hash digest
SHA256 5b0b059a2e8dc8cb26c76c87659186cdb9ce5049427b3adc4b744a2f1b97dc1c
MD5 d2ad618b0bb4b6ed112f0636df12b287
BLAKE2b-256 2793a289e6f3bf455b82bdbb142ffb0772258be66fdf0093a2e0e753cdf56409

See more details on using hashes here.

File details

Details for the file IRIXS-0.6.8-py3-none-any.whl.

File metadata

  • Download URL: IRIXS-0.6.8-py3-none-any.whl
  • Upload date:
  • Size: 55.4 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for IRIXS-0.6.8-py3-none-any.whl
Algorithm Hash digest
SHA256 46b6de08e2c2430ba8d5c56084d83dc47227d4ee686679fa9d3b5a4c0498b6a9
MD5 28875bd1527126ca1b6fc02aecdf9f21
BLAKE2b-256 fda330f8576913404d2b063fe2d5eaee6e730d0e033cb028e371d6dc9293765c

See more details on using hashes here.

Supported by

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