Skip to main content

Package for processing polarised images to measure stress in granular media

Project description

photoelastimetry

Package for processing polarised images to measure stress in granular media

Installation

To install the package, run the following command in the terminal:

pip install photoelastimetry

Usage

After installation, two command line scripts are available:

image-to-stress

Converts photoelastic images to stress maps using the stress-optic law and polarization analysis.

image-to-stress <json_filename> [--output OUTPUT] [--polariser-angle ANGLE]

Arguments:

  • json_filename: Path to the JSON5 parameter file containing configuration (required)
  • --output: Path to save the output stress map image (optional)
  • --polariser-angle: Polariser angle in degrees relative to the 0 degree camera axis (default: 0.0)

Example:

image-to-stress params.json5 --output stress_map.png --polariser-angle 45.0

The JSON5 parameter file should contain:

  • folderName: Path to folder containing raw photoelastic images
  • C: Stress-optic coefficient in 1/Pa
  • thickness: Sample thickness in meters
  • wavelengths: List of wavelengths in nanometers
  • crop (optional): Crop region as [y1, y2, x1, x2]
  • debug (optional): If true, display all channels for debugging

stress-to-image

Converts stress field data to photoelastic fringe pattern images.

stress-to-image <json_filename>

Arguments:

  • json_filename: Path to the JSON5 parameter file containing configuration (required)

Example:

stress-to-image params.json5

The JSON5 parameter file should contain:

  • p_filename: Path to the photoelastimetry parameter file
  • stress_filename: Path to the stress field data file
  • t: Thickness of the photoelastic material
  • lambda_light: Wavelength of light used in the experiment
  • C: Stress-optic coefficient of the material
  • scattering (optional): Gaussian filter sigma for scattering simulation
  • output_filename (optional): Path for the output image (default: "output.png")

Development

To set up the development environment, clone the repository and install the package in editable mode:

git clone https://github.com/benjym/photoelastimetry.git
cd photoelastimetry
pip install -e .

Authors

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

photoelastimetry-0.3.tar.gz (32.6 kB view details)

Uploaded Source

Built Distribution

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

photoelastimetry-0.3-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file photoelastimetry-0.3.tar.gz.

File metadata

  • Download URL: photoelastimetry-0.3.tar.gz
  • Upload date:
  • Size: 32.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for photoelastimetry-0.3.tar.gz
Algorithm Hash digest
SHA256 3f2ff96fe2b339846a3d67fe5e531fc01eb0c853e0b030263fc764715cfae4b2
MD5 96322ddd5d928f52cb4a42dd52350ee3
BLAKE2b-256 b67790b0747bb8327ccca03eeb1043586b6e39416c2894213dd62af482a4ffaa

See more details on using hashes here.

Provenance

The following attestation bundles were made for photoelastimetry-0.3.tar.gz:

Publisher: pypi.yml on benjym/photoelastimetry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file photoelastimetry-0.3-py3-none-any.whl.

File metadata

  • Download URL: photoelastimetry-0.3-py3-none-any.whl
  • Upload date:
  • Size: 34.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for photoelastimetry-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5d8dc145dc3b585ac4c7c1984f672bd286c2e4e722420b34eb58a63e9c4f480c
MD5 9d7708f33420422beed73a8b10dee033
BLAKE2b-256 41709be9dbf8ac087f13b63d08b239f697b45b6705171fc98e57dfa6f65bc9f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for photoelastimetry-0.3-py3-none-any.whl:

Publisher: pypi.yml on benjym/photoelastimetry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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