hextof-processor

Code for preprocessing data from the HEXTOF instrument at FLASH, DESY in Hamburg (DE)

https://github.com/momentoscope/hextof-processor

Science Score: 33.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: nature.com, zenodo.org
  • Committers with academic emails
    4 of 18 committers (22.2%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (19.2%) to scientific vocabulary

Keywords

arpes condensed-matter-physics dask dask-dataframes distributed-processing fel free-electron-laser materials-science mpes pes photoemission solid-state-physics ultrafast-spectroscopy
Last synced: 6 months ago · JSON representation

Repository

Code for preprocessing data from the HEXTOF instrument at FLASH, DESY in Hamburg (DE)

Basic Info
Statistics
  • Stars: 7
  • Watchers: 2
  • Forks: 4
  • Open Issues: 16
  • Releases: 7
Topics
arpes condensed-matter-physics dask dask-dataframes distributed-processing fel free-electron-laser materials-science mpes pes photoemission solid-state-physics ultrafast-spectroscopy
Created almost 8 years ago · Last pushed about 3 years ago
Metadata Files
Readme

README.md

DOI Documentation Status

hextof-processor

This code is used to analyze data measured at FLASH using the HEXTOF (high energy X-ray time of flight) instrument. The HEXTOF uses a delay line detector (DLD) to measure the position and arrival time of single electron events.

The analysis of the data is based on "clean tables" of single events as dask dataframes. There are two dataframes generated in the data readout process. The main dataframe dd contains all detected electrons and can be binned according to the needs of the experiment. The second dataframe ddMicrobunches contains the FEL pulses and is commonly used for normalization.

The class DldProcessor contains the dask dataframes as well as the methods to perform binning in a parallelized fashion.

The DldFlashDataframeCreatorExpress class subclasses DldProcessor and is used for creating the dataframes from the hdf5 files generated by the DAQ system.

Installation

In this section we will walk you through all you need to get up and running with the hextof-processor.

For using this package with the old FLASH data structure, please refer to README_DEPR.md.

1. Python

If you don't have python on your local machine yet we suggest to start with anaconda or miniconda. Details about how to install can be found here.

2. Install hextof-processor

Download the package by cloning to a local folder.

bash $ git clone https://github.com/momentoscope/hextof-processor.git

2.1 Virtual environment

Create a clean new environment (We strongly suggest you to always do so!)

If you are using conda: bash $ conda env create -f environment.yml now, to activate your new environment (windows): bash $ conda activate hextof-express if you are using linux: bash $ source activate hextof-express

2.2 Virtual environment in Jupyter Notebooks

To add the newly created environment to the Jupyter Notebooks kernel list, and install your new kernel: bash (hextof-express)$ python -m ipykernel install --user --name=hextof-express

3. Local Setup

3.1 Initialize settings

Finally, you need to initialize your local settings. This can be done by running InitializeSettings.py, in the same repository folder

bash (hextof-env)$ python InitializeSettings.py

This will create a file called SETTINGS.ini in the local repository folder. This is used to store the local settings as well as calibration values (will change in future..) and other options.

3.2 Setting up local paths

In order to make sure your folders are in the right place, open this file and modify the paths in the [path] section. * datarawdir - location where the raw h5 files from FLASH are stored * datah5dir - storage of binned hdf5 files * dataparquetdir where the apache parquet data files from the generated single event tables are stored (we suggest using an SSD for this folder, since would greatly improve the binning performance.) * dataresultsdir folder where to save results (figures and binned arrays)

if you are installing on Maxwell, we suggest setting the following paths: ini [paths] data_raw_dir = /asap3/flash/gpfs/pg2/YYYY/data/xxxxxxxx/raw/ data_h5_dir = /asap3/flash/gpfs/pg2/YYYY/data/xxxxxxxx/processed/ data_parquet_dir = /asap3/flash/gpfs/pg2/YYYY/data/xxxxxxxx/processed/parquet/ data_results_dir = /asap3/flash/gpfs/pg2/YYYY/data/xxxxxxxx/processed/*USER_NAME*/binned/ Where YYYY is the current year and xxxxxxxx is the beamtime number.

3.3 Calculating sector_correction list

If you like, in the settings, you can add the sectorcorrection list, which will shift any misalignment of the sectors. At the very least, this should include the "bit stealing hack" correction, where the last bits of the dldTime are set so they encode dldSectorId. This can be achieved by using the calibration.gensector_correction function which will generate the list for you, given the energy shifts you want.

3.4 Installing Doniach-Sunjic gaussian broadened

Please refer to XPSdoniachs/README.md for compilation instructions.

4. Test your installation

In order to test your local installation, we have provided a series of tutorial Jupyter Notebooks. You can find all the relevant material in the tutorial folder in the main repository. We suggest setting testing Express data readout.ipynb.

Documentation

The documentation of the package can be found here.

Examples are available as Jupyter Notebooks. Some example data is provided together with the examples. More compatible data is being collected and will soon be added to online open-access repositories.

Citation and and acknowledgments

If you use this software, please consider citing these two papers: * D. Kutnyakhov et al. Review of Scientific Instruments 91, 013109 (2020); * R. P. Xian et al. Scientific Data 7, 442 (2020).

Owner

  • Name: momentoscope
  • Login: momentoscope
  • Kind: organization

Projects related to momentum microscopy data processing at free-electron laser beamline (https://gitter.im/mpes_tools/community)

GitHub Events

Total
Last Year

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 505
  • Total Committers: 18
  • Avg Commits per committer: 28.056
  • Development Distribution Score (DDS): 0.582
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Steinn Ymir Agustsson s****s@u****e 211
Unknown d****o@g****m 135
RealPolitiX x****k@g****m 62
M. Zain Sohail z****4@g****m 47
Soeren Grunewald p****r@h****e 17
Soeren Grunewald p****r@h****e 10
Kai Tiedtke x****n@f****e 6
Yves Acremann a****n@s****h 3
Steinn Ymir Agustsson a****n@p****k 3
Muhammad Zain Sohail s****u@m****e 3
Markus s****m@g****e 1
Markus Scholz s****a@m****e 1
Davide Curcio c****a@m****e 1
Maciej Dendzik d****k@q****e 1
Maciej Dendzik d****m@m****e 1
Steinn Ymir Agustsson a****s@m****e 1
Michael Heber h****c@m****e 1
MichaelHeber 7****r 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 56
  • Total pull requests: 44
  • Average time to close issues: 10 months
  • Average time to close pull requests: 11 days
  • Total issue authors: 7
  • Total pull request authors: 4
  • Average comments per issue: 2.82
  • Average comments per pull request: 0.2
  • Merged pull requests: 41
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • steinnymir (19)
  • zainsohail04 (14)
  • balerion (8)
  • MichaelHeber (6)
  • kutnyakhov (5)
  • momentoscopists (3)
  • Jus80687 (1)
Pull Request Authors
  • balerion (15)
  • zainsohail04 (14)
  • steinnymir (13)
  • MichaelHeber (2)
Top Labels
Issue Labels
enhancement (21) bug (15) distribution (6) question (3) invalid (3) test (2) help wanted (1)
Pull Request Labels
enhancement (4) bug (2)

Dependencies

environment.yml conda
  • dask >=0.17.3
  • fastparquet >=0.2.1
  • h5py >=2.7.1
  • ipywidgets
  • jupyter
  • matplotlib >=2.1.0
  • nb_conda
  • numpy >=1.14.2
  • pandas >=0.20.3
  • pyarrow >=0.12.1
  • python 3.8.*
  • scipy >=1.2.1
  • tifffile
  • tqdm >=4.31.1
  • xarray >=0.9.6
requirements.txt pypi
  • Cython >=0.28.2
  • cloudpickle >=1.2.1
  • dask >=0.17.3
  • fastparquet >=0.2.1
  • h5py >=2.7.1
  • matplotlib >=2.1.0
  • natsort >=6.0.0
  • numpy >=1.14.2
  • pandas >=0.20.3
  • psutil >=5.4.5
  • pyarrow >=0.12.1
  • scipy >=1.2.1
  • sphinx *
  • sphinx_rtd_theme *
  • tifffile *
  • toolz >=0.9.0
  • tqdm >=4.31.1
  • xarray >=0.9.6
.github/workflows/publish-to-test-pypi.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • pypa/gh-action-pypi-publish release/v1 composite
  • pypa/gh-action-pypi-publish master composite
.github/workflows/python-publish.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite