TasVisAn
TasVisAn is a Python library for data reduction, visualization, and analysis of neutron triple-axis spectrometers (TASs), particularly for the thermal-neutron triple-axis spectrometer Taipan and cold-neutron triple-axis spectrometer Sika at Australian Centre for Neutron Scattering, ANSTO. It can also be used for other triple-axis spectrometers in other facilities, for example, the thermal-neutron triple-axis spectrometer BT7 and the cold-neutron triple-axis spectrometer BT4 at NIST. More triple-axis spectrometers will be supported soon.
Install name:
tasvisan
Import name:tasvisanCurrent package version:0.2.1
🚀 Installation
pip install tasvisan
📦 Usage
import tasvisan
# Create an instrument-specific object
taipan = tasvisan.Taipan(expnum=12345, title="Example", sample="Sample", user="User")
# Load a scan (edit the path for your experiment data)
df = taipan.taipan_data_to_pd(path=r"D:\data", scanno=1)
print(df.head())
Run the Qt data browser after installing the package:
tasvisan
# or
python -m tasvisan
The tasvisan command is provided by the package entry point in pyproject.toml.
On Linux distributions such as Ubuntu or Linux Mint, Qt/OpenGL warnings may appear:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
libGL error: glx: failed to create dri3 screen
libGL error: failed to load driver: virtio_gpu
Add the following lines to ~/.bashrc:
# Ensure always render the GUI using software
export LIBGL_ALWAYS_SOFTWARE=1
# Ensure XDG_RUNTIME_DIR exists for third-party apps
if [ -z "$XDG_RUNTIME_DIR" ]; then
export XDG_RUNTIME_DIR=/tmp/runtime-$USER
if [ ! -d "$XDG_RUNTIME_DIR" ]; then
mkdir -p "$XDG_RUNTIME_DIR"
chmod 0700 "$XDG_RUNTIME_DIR"
fi
fi
Then run:
source ~/.bashrc
🎯 Features
- Instrument-specific parsing for Taipan, Sika, BT7, and BT4
- Data normalization, combination, flattening, and HKLW export
- Simple, combined, and spline plotting
- Random and grid-style contour mapping
- Resolution-convolution initialization and fitting
- Taipan and Sika command validation and scan simulation
- Sika multichannel reduction and 3D plotting
- Taipan and Sika HDF/data conversion support
- Qt-based data browsing and visualization GUI
- NumPy, pandas, Matplotlib, Plotly, lmfit, and HDF5 integration
📁 Project Structure
tasvisan/
├── src/tasvisan/ # Main package (import tasvisan)
├── pyproject.toml # Build configuration
├── README.md
└── LICENSE
🔬 Scope
This package is intended for:
Triple-axis Spectrometer Data Reduction, Normalization, Visualization, and Analysis
Quick Data Combination and Contour Mapping
Resolution Convolution Fitting to Inelastic Neutron Scattering Data
Experimental Planning and Command Validation and Simulation
Data Reduction and 3D Visualization of Multiplexing and Multi-analyzer Triple-axis Spectrometers
🛠️ Development
Repository:
https://github.com/gcdengansto/TasVisAn
Install in editable mode:
pip install -e .
📖 Documentation
The documentation sources are in the docs/ directory. They include
installation instructions, a quickstart, instrument notes, GUI guidance,
troubleshooting, and the API reference.
Build the HTML documentation locally with:
pip install -r docs/requirements-docs.txt
mkdocs build
Additional project information is available at https://github.com/gcdengansto/TasVisAn.
🤝 Contributing
Please contact the author for fixing bugs and adding additional functions
📜 License
This project is licensed under the MIT License — see the LICENSE file for details.
👤 Author
Guochu Deng
Email: gc.deng.ansto@gmail.com
⚠️ Disclaimer
This software is provided for scientific research purposes. No guarantees are made regarding correctness or fitness for a particular application.
Metadata
Release files for tasvisan 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tasvisan-0.2.1.tar.gz | 174.8 kB | Without provenance | Details for tasvisan-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tasvisan-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for tasvisan-0.2.1-py3-none-any.whl |
Total release size: 356.8 kB
Release files / tasvisan-0.2.1.tar.gz
| Download URL | tasvisan-0.2.1.tar.gz |
|---|---|
| Size | 174.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2dae2bd024e07ae75517c1f3983c5b43921633875119c6599ac07a6f64494858
|
|
BLAKE2b-256 checksum How to use checksums |
2fc8feb7eb9d457f7d8f267b4ae605fb6eaba13f374995163a6b16e9458d92f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Release files / tasvisan-0.2.1-py3-none-any.whl
| Download URL | tasvisan-0.2.1-py3-none-any.whl |
|---|---|
| Size | 182.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
22d65e2b98a0a621a6454409e51c7445911c92fce64462246f74606f570cee21
|
|
BLAKE2b-256 checksum How to use checksums |
6a79cc93862f3de56d77b426030de02e65e5ed84523c66bc8b4e1be2e50729ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Security for tasvisan 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.