SOFT-AIS Software
SOFT-AIS software is part of the EASI-STRESS project (https://www.easi-stress.eu/).
The software is divided in two parts, the library softaislib
and the GUI softaisgui
.
User installation
(Windows only) Using standalone installer
Since installation can be complex on Windows, a standalone installer is provided on this platform.
The installer can be found on this page, using the "Download artifacts" icons on the right.
This installer will install the GUI application and a python interpreter able to load softaislib
.
(Available soon) Installing using pip
To install SOFT-AIS, install softaislib
and softaisgui
using pip install softaislib
and pip install softaisgui
.
The library can be used in Python with import softaislib
and the gui can be launched with softaisgui
command.
Known caveats
-
softaislib
depends on the szip library, which cannot be installed with pip. We strongly recommend to install SOFT-AIS in a conda environment, and to provide szip library withconda install libaec -c conda-forge
- On Windows,
softaislib
depends onmsvcp140.dll
- On Windows, you must have the same Python version as described in the wheels name (e.g.
softaislib-0.0.0-cp312-none-win_amd64.whl
means you need Python3.12)
Installing using wheels
To install SOFT-AIS, download wheels for softaislib
and softaisgui
and install them using pip install <wheel_name>
.
The wheels can be found on this page, using the "Download artifacts" icons on the right.
The library can be used in Python with import softaislib
and the gui can be launched with softaisgui
command.
Known caveats
-
softaislib
depends on the szip library, which cannot be installed with pip. We strongly recommend to install SOFT-AIS in a conda environment, and to provide szip library withconda install libaec -c conda-forge
- On Windows,
softaislib
depends onmsvcp140.dll
- On Windows, you must have the same Python version as described in the wheels name (e.g.
softaislib-0.0.0-cp312-none-win_amd64.whl
means you need Python3.12)
Developer installation
Development environment
SOFT-AIS software is based on a few dependencies which are necessary for a successful build of the application. The best way to install those dependencies is through conda.
So, please make sure that you have conda installed on your machine. If not installed please refer to this page for installing it. Once conda installed, you can proceed to the installation from the base directory of SOFT-AIS sources:
- run
conda env create -f soft-ais-developer.yml
- run
conda activate soft-ais-developer
For Windows developers, you must also install Visual Studio 2019 or later.
Building the project
The setup is completed and ready for building the application. To build the application:
mkdir -p build
cd build
cmake ..
-
cmake --build . -jN --config Release
whereN
is the number of cores on which you want to distribute the build
To install the application on your environment:
-
cmake --build . -jN --config Release --target install
whereN
is the number of cores on which you want to distribute the build
Usage
The previous step installs the application softaisgui
in your conda environment binaries directory.
You can import the softaislib
library in Python with import softaislib
Options
You can disable the GUI building with cmake .. -DBUILD_SOFT_AIS_GUI=OFF
API Documentation
Overview
This document provides an overview of the functions and methods available in the pyes.Backend class used in the script. This script facilitates the interaction with HDF5 files, setting reference values, and performing strain and stress calculations.
Initialization
import softaislib
softaislib.Backend()
Creates an instance of the Backend class.
Methods
getSoftwareVersion() -> str Retrieves the software version.
Returns: str: The version of the software.
setHDF5FilePath(hdf5Paths: list)
Sets the file paths for the HDF5 input files.
Args: hdf5Paths (list): A list of file paths to the HDF5 files.
onHDF5FilePathChanged()
Triggers the process of opening, reading, and sorting the HDF5 files.
setReferenceInput(referenceValues: str) Sets the reference input values manually.
Args: referenceValues (str): A comma-separated string of reference values.
setReferenceErrorInput(referenceErrors: str)
Sets the reference input error values manually.
Args: referenceErrors (str): A comma-separated string of reference error values.
setDiffractionType(diffractionType: str)
Sets the diffraction type for the calculations.
Args: diffractionType (str): The type of diffraction ('two-theta', 'energy', 'dspacing', 'sin2phi').
onStartStrainCalculation()
Starts the strain calculation process.
setYoungsModulusInput(youngsModulus: str)
Sets the Young's modulus value.
Args: youngsModulus (str): The Young's modulus value.
setPoissonRatioInput(poissonsRatio: str)
Sets the Poisson's ratio value.
Args: poissonsRatio (str): The Poisson's ratio value.
onStartStressCalculation()
Starts the stress calculation process.
setOutHDF5FileName(outputFileName: str)
Sets the output file name for the results.
Args: outputFileName (str): The name of the output file.
onOutHDF5FileNameChanged()
Triggers the process of writing the output files.
setReferenceHDF5FilePath(hdf5ReferencePaths: list)
Sets the file paths for the reference HDF5 files.
Args: hdf5ReferencePaths (list): A list of file paths to the reference HDF5 files.
onReferenceHDF5FilePathChanged()
Triggers the process of opening, reading, and sorting the reference HDF5 files.
Example Usage
In the repository, in the soft-ais-lib
you can find an example script called softaislib_example.py
.
Credits
Some icons taken from