Skip to content

AdvancedPhotonSource/pyXpcsViewer

Repository files navigation

pyXPCSViewer

A python-based interactive visualization tool to view XPCS dataset.

To cite pyXpcsViewer:

Chu et al., "pyXPCSviewer: an open-source interactive tool for X-ray photon correlation spectroscopy visualization and analysis", Journal of Synchrotron Radiation, (2022) 29, 1122–1129

Supported Format

Only the APS-8IDI's XPCS data format is supported, for both multi-tau and two-time correlation. The nexus file format for XPCS measurement, which is still under discussion, is not supported yet.

Install and Uninstall

It's highly recommended to setup a new virtual environment to isolate pyXPCSViewer, so it doesn't mess up the dependencies of your existing applications.

  1. Install conda following the instructions at link.

  2. It's highly recommended to setup a new virtual environment to isolate pyXPCSViewer, so it doesn't mess up the dependencies of your existing applications. Create a brand-new environment with conda

    conda create -n your_env_name python==3.9.7
    

    Replace your_env_name with your choice of environment name.

  3. Activate the new environment for your pyXPCSViewer

    conda activate your_env_name
    
  4. Install pyXPCSViewer

    pip install xpcs-viewer
    

    Please note, running conda and pip commands together is generally not recommended. pyXPCSViewer will only use pip or conda once its compatibility issues are resolved.

  5. Launch pyXPCSViewer

    1. Activate your environment described in step 2 if you haven’t.

    2. run

      run_viewer path_to_hdf_directory        # run the viewer from the hdf directory, or
      run_viewer                              # run in the current directory
    3. On MacOS and Linux, you can create an alias in .bashrc (or .zshrc if you're using zsh) like

    alias your_shortcut_name='conda activate your_env_name; run_viewer $@; conda deactivate'

    then source your rc file (source .bashrc) and you can run your_shortcut_name to launch pyXPCSViewer directly.

  6. To upgrade:

    1. Activate your environment described in step 2 if you haven’t.
    2. run
    pip install -U xpcs-viewer
  7. To uninstall:

    1. Activate your environment described in step 2 if you haven’t.
    2. run
    pip uninstall xpcs-viewer
    1. If you want to remove the environment all together, first deactivate the environment with conda deactivate, if you're in the pyXPCSViewer environment, then run
    conda remove -n your_env_name --all

Gallery

  1. The integrated scattering pattern over the whole time series. saxs2d

  2. The reduced one-dimensional small-angle scattering data. saxs1d

  3. The sample's stability against X-ray beam damage. The time series is divided into 10 sections. The SAXS-1D curve is plotted for each section. stability

  4. Intensity fluctuation vs Time. intt

  5. Average Tool box average

  6. g2 plot for multitau analysis. User can fit the time scale using the single exponential function, with the option to specify the fitting range and fitting flags (fix or fit). g2

  7. Diffusion analysis. g2 fitting in the previous panel is required to plot $\tau \mbox{vs.} q$. diffusion

  8. Twotime correlation. User can select two q indexes either on the qmap or on the SAXS2D image. diffusion

  9. Experiment condition viewer. It reads the file structure and string entries of the HDF file selected. hdf-info

About

A python-based interactive visualization tool to view XPCS dataset

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages