Skip to main content

Package allowing the analysis of SAXS and WAXS data (EDF format) that's fresh out of the machine. This package uses the NeXus standard for the x-ray community.

Reason this release was yanked:

This version was on of the first to be uploaded on PyPi and was bugged since it was the first time I uploaded to PyPi

Project description

SWAXSanalysis


This package is used to convert edf files that contain one header and one dataset into an HDF5 file that contains information selected by the user. This process can be automated if the launcher.py has been launched with the argument --jenkins "true"

How it works


To convert the EDF file, the program uses a configuration file created by the user. To help create said file, a GUI is provided. This same GUI can be used to do basic processes to an HDF5 file that follows the NXcanSAS definition, as described by the NeXus Foundation : https://manual.nexusformat.org/classes/applications/NXcanSAS.html#nxcansas

Once the configuration file has been created it should be saved in the "configs" folder inside the Data Treatment Center. You need to move the config file inside the Data Treatment Center directly for it to be detected and used in the conversion of file. By default, the Data Treatment Center is created on your desktop.

Once the config file is moved, you can put the EDF files you want to convert to hdf5 in the Treatment Queue folder.

You can also use the package directly in a python script by importing the main class and some utility functions :

from SWAXSanalysis.class_nexus_file import NexusFile
from SWAXSanalysis.utils import save_data, extract_from_h5, delete_data

In any case, an example notebook along with a jupyter notebook launcher is present in the Data Treatment Center.

How to install


You have to activate a python virtual environment (more info on how to activate a Venv here) and type the following command :

pip install SWAXSanalysis

After SWAXSanalysis is install you need to install this branch of smi_analysis via the following command

pip install git+https://github.com/gfreychet/smi-analysis.git@master

This wraps up the install the package in the activated virtual environment. If you want to use the GUI, it should be in the Scripts folder of your Virtual environment under the name SWAXSanalysis.exe

Changing the location of the Data Treatment Center


By default, the Data Treatment Center and Treatment Queue folder will be created on your desktop. To change the location of the Data Treatment Center, go to :

path\to\your\venv\Lib\site-packages\saxs_nxformat

and open the __init__.py file. In this file, find the line (should be line N°28) :

ENV_PATH: Path = DESKTOP_PATH

And change it to

ENV_PATH: Path = Path(r"path\where\Data Treatment Center\should\be")

Known issues


  • Changing the ENV_PATH by changing the __init__.py script is impractical.
  • While creating the configuration file, there is no way to choose the NeXus definition, meaning that you have to change the loaded definition in the python script directly.
  • The program can't handle anything other than EDF file with one header and one dataset
  • Azimuthal angle range is behaving weirdly when 0 is not in the range

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

swaxsanalysis-2025.4.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swaxsanalysis-2025.4-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file swaxsanalysis-2025.4.tar.gz.

File metadata

  • Download URL: swaxsanalysis-2025.4.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for swaxsanalysis-2025.4.tar.gz
Algorithm Hash digest
SHA256 e0d46fce58fc2caea93105111f90db224915583a31eaf9d84bfc8219946d9db7
MD5 1915a2fba026a0981a4af94ceacbe37e
BLAKE2b-256 e4029a2ee15ebd35ad66ea0c57d9e417b264ba2d18c844f8b094abe7de1ac044

See more details on using hashes here.

File details

Details for the file swaxsanalysis-2025.4-py3-none-any.whl.

File metadata

  • Download URL: swaxsanalysis-2025.4-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for swaxsanalysis-2025.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9cc804081ab2d163913a47add2afce2e6b0b5bfd643eecf38deff2e5aedd13d2
MD5 484b81f6800847c2699ce165de647b15
BLAKE2b-256 3ef857aa3d0d7b12d5ea84796aa45a037e7cfbe56d421d7cc117dfeaedc80932

See more details on using hashes here.

Supported by

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