https://github.com/fgjorup/plaid

plaid - plot azimuthally integrated data makes it easy to visualize powder diffraction data and compare with known structures (CIF)

https://github.com/fgjorup/plaid

Science Score: 26.0%

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

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.0%) to scientific vocabulary

Keywords

crystallography diffraction
Last synced: 4 months ago · JSON representation

Repository

plaid - plot azimuthally integrated data makes it easy to visualize powder diffraction data and compare with known structures (CIF)

Basic Info
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 9
Topics
crystallography diffraction
Created 8 months ago · Last pushed 5 months ago
Metadata Files
Readme License

README.md

plaid - plot azimuthally integrated data

plaid is a simple visualization tool intended to quickly evaluate azimuthally integrated powder diffraction data and compare to known structures, provided by the user in the form of CIF files.
The main data format is HDF5 files, inspired by the NeXus file formats.

Installation

You can install plaid using pip (PyPi). For most users, the following command is all you need:

bash pip install plaid-xrd

Tip:
For a cleaner Python setup, you can use a virtual environment to keep your packages organized. This is optional, but recommended if you work on multiple Python projects.

To create and activate a virtual environment (optional):

Show virtual environment instructions **Windows:** ```bash python -m venv plaid-env plaid-env\Scripts\activate ``` **macOS/Linux:** ```bash python3 -m venv plaid-env source plaid-env/bin/activate ```

If you are unsure which Python interpreter to use, you might need to specify the full path. You can find your Python path by running:

bash where python # on Windows which python # on macOS/Linux

Once your environment is ready, install plaid as shown above.

Start the application from a terminal with:
bash plaid

or you can run:

bash plaid -h

to see a list of available command-line arguments and options for plaid.

Using plaid to read nxazint HDF5 files

plaid is intended as a visualization tool, but the plaid.nexus module can also be used as a library of convienience functions for reading nxazint files. The plotnxazintdemo.ipynb jupyter notebook demonstrate how the plaid.nexus module can be used to read and plot 1D and 2D diffraction data from a multi-modal nxazint file.

```python import h5py as h5 import plaid.nexus as pnx import matplotlib.pyplot as plt

fname = "tests/scan-0100multidemo.h5" # your file name

open the file with h5py

with h5.File(fname,'r') as f: # get the nxazint1d entry (or subentry) azint1d = pnx.getnxentry(f,definition='NXazint1d')

# get the axes group - radial axis (2theta or Q) is the last index
axes_gr = pnx.get_nx_axes(azint1d)
x = axes_gr[-1][:]

# get the signal group i.e. the intensity
signal_gr = pnx.get_nx_signal(azint1d)
I = signal_gr[:]

plot the first diffraction pattern

plt.figure() plt.plot(x,I[0]) plt.show()
```

Example

The main window of plaid
Example of the plaid main window
- Drag/drop an .h5 file into the main window or browse from File -> Open
- Change the pattern by moving the horizontal lines with the mouse or the arrow keys
- Add a new moveable line by double-clicking the heatmap, remove a line by right-clicking it
- Click the symbols in the pattern legend to show/hide the patterns
- Drag/drop a .cif file into the main window or browse from File -> Load CIF
- Click on a reference line to show its reflection index

File tree context menu Example of the file tree menu - Right-click on a file in the file tree to add $I_0$ or auxiliary data
- Right-click on two or more selected files to group them

Export patterns Example of the export settings window - Save the export settings in Export -> Export settings

Hotkeys

| Key | Action | |-----|---------------------------------------------| | L | Toggle log scale for the heatmap | | C | Show/hide the auto-correlation map | | Q | Toggle between q and 2θ axes | | ↑ | Move the active line one frame up | | ↓ | Move the active line one frame down | | ← | Move the active line several frames down | | → | Move the active line several frames up |

Owner

  • Name: Frederik
  • Login: fgjorup
  • Kind: user
  • Company: @Magnetic-Matter-Aarhus

GitHub Events

Total
  • Release event: 3
  • Delete event: 1
  • Push event: 34
  • Create event: 4
Last Year
  • Release event: 3
  • Delete event: 1
  • Push event: 34
  • Create event: 4

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 72
  • Total Committers: 2
  • Avg Commits per committer: 36.0
  • Development Distribution Score (DDS): 0.069
Past Year
  • Commits: 72
  • Committers: 2
  • Avg Commits per committer: 36.0
  • Development Distribution Score (DDS): 0.069
Top Committers
Name Email Commits
Frederik H Gjørup f****p@c****k 67
Frederik 4****p@u****m 5
Committer Domains (Top 20 + Academic)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 448 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 9
  • Total maintainers: 1
pypi.org: plaid-xrd

plaid is a simple visualization tool intended to quickly evaluate azimuthally integrated powder diffraction data

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 448 Last month
Rankings
Dependent packages count: 8.8%
Average: 29.1%
Dependent repos count: 49.4%
Maintainers (1)
Last synced: 5 months ago

Dependencies

.github/workflows/python-app.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v3 composite
requirements.txt pypi
  • Dans-Diffraction >=3.0.0
  • PyQt6 >=6.8.1
  • PySide6 >=6.8.2.1
  • h5py *
  • numpy *
  • pyqtgraph >=0.13.7