Skip to main content

The HDF5_BLS_treat package

This package is a part of the HDF5_BLS project. It's purpose is to unify the conversion of arbitrary Brillouin spectrometers data into a power spectrum.

Installation

To install the package, you can use pip:

pip install HDF5_BLS_analyse

To install the package from source for local development, please refer to the documentation.

Documentation

You can access the documentation of the project at this link or on the dedicated ReadTheDocs page at this link.

Example of usage

from HDF5_BLS_analyse import Analyse_VIPA
import numpy as np
import matplotlib.pyplot as plt

# Creating a mock spectrum and a mock pixel axis
def DHO(nu, nu0, gamma, a, b):
    return b + a * (gamma*nu0)**2/((nu**2-nu0**2)**2+(gamma*nu)**2)

nu = (np.linspace(-1,1,1024) + 2)**2 * 90/8 - 50 # The frequency axis is a simple quadratic polynomial here
pixel = np.arange(len(nu))
mock_spectrum = DHO(nu, nu0=-35, gamma=0.5, a=1, b=0) + DHO(nu, nu0=-25, gamma=0.5, a=1, b=0) + DHO(nu, nu0=-5, gamma=0.5, a=1, b=0) + DHO(nu, nu0=5, gamma=0.5, a=1, b=0) + DHO(nu, nu0=25, gamma=0.5, a=1, b=0) + DHO(nu, nu0=35, gamma=0.5, a=1, b=0) + np.random.normal(0, 0.05, size=1024)

# Initialising the Analyse_VIPA object on the mock spectrum
analyser = Analyse_VIPA(x = np.arange(mock_spectrum.size), y = mock_spectrum)

# Creating a blank algorithm to perform the analysis
analyser.silent_create_algorithm(algorithm_name="VIPA spectrum analyser", 
                            version="v0", 
                            author="Pierre Bouvet", 
                            description="This algorithm allows the user to recover a frequency axis basing ourselves on a single Brillouin spectrum obtained with a VIPA spectrometer. Considering that only one Brillouin Stokes and anti-Stokes doublet is visible on the spectrum, the user can select the peaks he sees, and then perform a quadratic interpolation to obtain the frequency axis. This interpolation is obtained either by entering a value for the Brillouin shift of the material or by entering the value of the Free Spectral Range (FSR) of the spectrometer. The user can finally recenter the spectrum either using the average between a Stokes and an anti-Stokes peak or by choosing an elastic peak as zero frequency.")

# Adding points corresponding to peaks to the algorithm
analyser.add_point(position_center_window=79, type_pnt="Anti-Stokes", window_width=5)
analyser.add_point(position_center_window=252, type_pnt="Stokes", window_width=5)
analyser.add_point(position_center_window=513, type_pnt="Anti-Stokes", window_width=5)
analyser.add_point(position_center_window=619, type_pnt="Stokes", window_width=5)
analyser.add_point(position_center_window=810, type_pnt="Anti-Stokes", window_width=5)
analyser.add_point(position_center_window=895, type_pnt="Stokes", window_width=5)

# Defining the FSR of the VIPA used
analyser.interpolate_elastic_inelastic(FSR = 30)

# Identifying the central peaks and recentering the spectrum to have them be symetric
analyser.add_point(position_center_window=33.7, type_pnt="Stokes", window_width=1)
analyser.add_point(position_center_window=43.8, type_pnt="Anti-Stokes", window_width=1)
analyser.center_x_axis(center_type = "Inelastic")

# # Plotting the results
plt.plot(analyser.x, analyser.y)
plt.xlabel("Frequency (GHz)")
plt.ylabel("PSD (a.u.)")
plt.show()

Metadata

Release files for HDF5-BLS-analyse 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for HDF5-BLS-analyse 1.1.1
File Size Uploaded
hdf5_bls_analyse-1.1.1.tar.gz 13.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for HDF5-BLS-analyse 1.1.1
File Interpreter ABI Platform
hdf5_bls_analyse-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.1 kB

Release files / hdf5_bls_analyse-1.1.1.tar.gz

Download URL hdf5_bls_analyse-1.1.1.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2cdb2384e5b4919288ff05bda23d7dcba70844aa5f8b73801034fda41d3d8296
BLAKE2b-256 checksum
How to use checksums
9f1f08234844d9219c62c656404e7c3c6b730d7c06015dde40fdcdf77150785a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / hdf5_bls_analyse-1.1.1-py3-none-any.whl

Download URL hdf5_bls_analyse-1.1.1-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a85beaabab96bff2ee60abff43f94d936ffa0e1a1cb71285a33790bdbd3debf
BLAKE2b-256 checksum
How to use checksums
a5c34e0fb3fd62c0554930fcde1786e8b493147839b5a41ee5d09c4bdbb3096d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page