SWAXSanalysis


NameSWAXSanalysis JSON
Version 2025.4.1.0 PyPI version JSON
download
home_pageNone
SummaryPackage allowing the conversion and analysis of SAXS and WAXS data (EDF format) that's fresh out of the machine. This package convertis the EDF files to an HDF5 file with the NeXus standard for the x-ray community.
upload_time2025-07-29 13:54:24
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords edf hdf5 nexus data analysis x-ray xeuss saxs waxs swaxs
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

Versioning Y.X1.X2.X3 :
- Y : year of release
- X1 : Big update (refactoring, new GUI, new way to use...)
- X2 : Update including new functionality.
- X3 : If 0, stable release, if not, it's a work in progress

## 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 :
```python
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](https://docs.python.org/3/library/venv.html)) and type the following command :
```PowerShell
pip install SWAXSanalysis
```
After SWAXSanalysis is installed you need to install this branch of smi_analysis via the following command
```PowerShell
pip install git+https://github.com/gfreychet/smi-analysis.git@master
```
This wraps up the installation of the package in the activated virtual environment. If you want to use the GUI, you 
only need to type
```PowerShell
SWAXSanalysis
```
in the same activated virtual environment

The conversion process can be automated if the `launcher.py` has been launched with the argument `--jenkins "true"` like so :
```PowerShell
python3 -m SWAXSanalysis.launcher --jenkins true 
```

## 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\SWAXSanalysis
 ```
and open the `__init__.py` file. In this file, find this line (should be line N°28) :
```python
ENV_PATH: Path = DESKTOP_PATH
```
And change it to
```python
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
- 2 param intensity is still a bit of a work in progress but should work as long as you do not use it with the batch 
  option enabled

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "SWAXSanalysis",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "EDF, HDF5, NeXus, Data analysis, X-ray, Xeuss, SAXS, WAXS, SWAXS",
    "author": null,
    "author_email": "Adrien Toulouse <toulouseadrienjob@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e7/d6/caa856eaee1bb43640b265e53d869a1722d2b273785607a70918d2e7d532/swaxsanalysis-2025.4.1.0.tar.gz",
    "platform": null,
    "description": "# SWAXSanalysis\r\n___\r\nThis package is used to convert edf files that contain one header and one dataset into an HDF5 file that contains \r\ninformation selected by the user.\r\n\r\nVersioning Y.X1.X2.X3 :\r\n- Y : year of release\r\n- X1 : Big update (refactoring, new GUI, new way to use...)\r\n- X2 : Update including new functionality.\r\n- X3 : If 0, stable release, if not, it's a work in progress\r\n\r\n## How it works\r\n___\r\nTo convert the EDF file, the program uses a configuration file created by the user. To help create said file, a GUI \r\nis provided. This same GUI can be used to do basic processes to an HDF5 file that follows the NXcanSAS definition, \r\nas described by the NeXus Foundation : https://manual.nexusformat.org/classes/applications/NXcanSAS.html#nxcansas \r\n\r\nOnce the configuration file has been created it should be saved in the \"configs\" folder inside the Data Treatment \r\nCenter. You need to move the config file inside the Data Treatment Center directly for it to be detected and used in \r\nthe conversion of file. By default, the Data Treatment Center is created on your desktop.\r\n\r\nOnce the config file is moved, you can put the EDF files you want to convert to hdf5 in the Treatment Queue folder.\r\n\r\nYou can also use the package directly in a python script by importing the main class and some utility functions :\r\n```python\r\nfrom SWAXSanalysis.class_nexus_file import NexusFile\r\nfrom SWAXSanalysis.utils import save_data, extract_from_h5, delete_data\r\n```\r\n\r\nIn any case, an example notebook along with a jupyter notebook launcher is present in the Data Treatment Center.\r\n## How to install\r\n___\r\nYou have to activate a python virtual environment (more info on how to activate a Venv \r\n[here](https://docs.python.org/3/library/venv.html)) and type the following command :\r\n```PowerShell\r\npip install SWAXSanalysis\r\n```\r\nAfter SWAXSanalysis is installed you need to install this branch of smi_analysis via the following command\r\n```PowerShell\r\npip install git+https://github.com/gfreychet/smi-analysis.git@master\r\n```\r\nThis wraps up the installation of the package in the activated virtual environment. If you want to use the GUI, you \r\nonly need to type\r\n```PowerShell\r\nSWAXSanalysis\r\n```\r\nin the same activated virtual environment\r\n\r\nThe conversion process can be automated if the `launcher.py` has been launched with the argument `--jenkins \"true\"` like so :\r\n```PowerShell\r\npython3 -m SWAXSanalysis.launcher --jenkins true \r\n```\r\n\r\n## Changing the location of the Data Treatment Center\r\n___\r\nBy default, the Data Treatment Center and Treatment Queue folder will be created on your desktop. To change the \r\nlocation of the Data Treatment Center, go to :\r\n```\r\npath\\to\\your\\venv\\Lib\\site-packages\\SWAXSanalysis\r\n ```\r\nand open the `__init__.py` file. In this file, find this line (should be line N\u00b028) :\r\n```python\r\nENV_PATH: Path = DESKTOP_PATH\r\n```\r\nAnd change it to\r\n```python\r\nENV_PATH: Path = Path(r\"path\\where\\Data Treatment Center\\should\\be\")\r\n```\r\n\r\n## Known issues\r\n___\r\n- Changing the `ENV_PATH` by changing the `__init__.py` script is impractical.\r\n- While creating the configuration file, there is no way to choose the NeXus definition, meaning that you have to \r\n  change the loaded definition in the python script directly.\r\n- The program can't handle anything other than EDF file with one header and one dataset\r\n- Azimuthal angle range is behaving weirdly when 0 is not in the range\r\n- 2 param intensity is still a bit of a work in progress but should work as long as you do not use it with the batch \r\n  option enabled\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Package allowing the conversion and analysis of SAXS and WAXS data (EDF format) that's fresh out of the machine. This package convertis the EDF files to an HDF5 file with the NeXus standard for the x-ray community.",
    "version": "2025.4.1.0",
    "project_urls": {
        "Homepage": "https://github.com/CEA-MetroCarac/SWAXSanalysis"
    },
    "split_keywords": [
        "edf",
        " hdf5",
        " nexus",
        " data analysis",
        " x-ray",
        " xeuss",
        " saxs",
        " waxs",
        " swaxs"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1e0cf4b4b34f92190844a0710f07f0f8ad52bac8136659e837bdf4f6da4b12e6",
                "md5": "858c18a1a47744284e86bebe5c5bcfaa",
                "sha256": "4e88ff60b1d802fed04f12440d34906f0bc19f7a5b55506785916a32d4c14d20"
            },
            "downloads": -1,
            "filename": "swaxsanalysis-2025.4.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "858c18a1a47744284e86bebe5c5bcfaa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 9897787,
            "upload_time": "2025-07-29T13:54:19",
            "upload_time_iso_8601": "2025-07-29T13:54:19.210805Z",
            "url": "https://files.pythonhosted.org/packages/1e/0c/f4b4b34f92190844a0710f07f0f8ad52bac8136659e837bdf4f6da4b12e6/swaxsanalysis-2025.4.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e7d6caa856eaee1bb43640b265e53d869a1722d2b273785607a70918d2e7d532",
                "md5": "1e93056b2ae4a464fbbdb85c0285002a",
                "sha256": "ff15f9b2f244b1a0527adcf170067bea854ce05546dcf44c46f08ff344ed613e"
            },
            "downloads": -1,
            "filename": "swaxsanalysis-2025.4.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1e93056b2ae4a464fbbdb85c0285002a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 9891465,
            "upload_time": "2025-07-29T13:54:24",
            "upload_time_iso_8601": "2025-07-29T13:54:24.272522Z",
            "url": "https://files.pythonhosted.org/packages/e7/d6/caa856eaee1bb43640b265e53d869a1722d2b273785607a70918d2e7d532/swaxsanalysis-2025.4.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-29 13:54:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CEA-MetroCarac",
    "github_project": "SWAXSanalysis",
    "github_not_found": true,
    "lcname": "swaxsanalysis"
}
        
Elapsed time: 1.48712s