Skip to main content

A Python package to visualize and analyze microstructures.

Project description

PolyLX - python package to visualize and analyze digitized 2D microstructures

PyPI version Testing Documentation Status DOI

Installation

PyPI

To install PolyLX, just execute

pip install polylx

Upgrading via pip

To upgrade an existing version of PolyLX from PyPI, execute

pip install polylx --upgrade --no-deps

Please note that the dependencies (Matplotlib, NumPy, Pandas, NetworkX, seaborn, shapely, pyshp and SciPy) will also be upgraded if you omit the --no-deps flag; use the --no-deps ("no dependencies") flag if you don't want this.

Installing PolyLX with conda or mamba

Another common way to install is create environment using conda or mamba. Download latest version of polylx and unzip to folder of your choice. Use conda or mamba to create an environment from an environment.yml file. Open the terminal, change directory where you unzip the source and execute following command:

conda env create -f environment.yml

Activate the new environment and install from current directory::

conda activate polylx
pip install polylx

Documentation

Explore the full features of PolyLX. You can find detailed documentation here.

Contributing

Most discussion happens on Github. Feel free to open an issue or comment on any open issue or pull request. Check CONTRIBUTING.md for more details.

License

PolyLX is free software: you can redistribute it and/or modify it under the terms of the MIT License. A copy of this license is provided in LICENSE file.

Changes

0.5.4 (05 Mar 2024)

  • shapelysmooth methods added for smoothing
  • shapely and scipy upstream fixes
  • jenks and quantile rules fix
  • bcov shape_method added for eigenanalysis of decomposed geometry

0.5.3 (06 Mar 2023)

  • upstream fix for networkX 3
  • Fracnet.from_boundaries bug fixed

0.5.2 (06 Mar 2023)

  • upstream fix for shapely 3
  • topological analyses added to Fracnet

0.5.1 (27 May 2021)

  • fourier_ellipse shape method for Grains added
  • eliptic fourier smoothing for Grains added
  • added grainsize plot
  • added accumulate method to Grains and Boundaries
  • simple fiona reader implemented (fiona must be installed)
  • added kde plot

0.5 (29 Jan 2019)

  • rose plot groupped according to classification
  • get_class, class_iter methods added to Grains and Boundaries
  • seaborn added to requirements
  • several seaborn categorical plots are added as methods (swarmplot, boxplot, barplot, countplot)

0.4.9 (12 Dec 2017)

  • getindex method of Grains and Boundaries implemented
  • Grain cdist property return centroid-vertex distance function
  • Grain cdir property return centroid-vertex direction function
  • Grain shape_vector property returns normalized Fourier descriptors
  • Grain regularize method returns Grain with regularly distributed vertices
  • Classification could be based on properties or any other values
  • boundary_segments method added
  • Smoothing, simplification and regularization of boundaries implemented
  • Colortable for legend is persistant trough indexing. Classify method could be used to change it
  • Default color table is seaborn muted for unique classification and matplotlib viridis for continuous classes

0.4.8 (04 Mar 2017)

  • bugfix

0.4.6 (04 Mar 2017)

  • added plots module (initial)
  • representative_point for Grains implemented
  • moments calculation including holes
  • surfor and parror functions added
  • orientation of polygons is unified and checked
  • minbox shape method added

0.4.5 (12 Jan 2017)

  • shell script ipolylx opens interactive console

0.4.4 (12 Jan 2017)

  • Added MAEE (minimum area enclosing ellipse) to grain shape methods
  • Removed embedded IPython and IPython requirements

0.4.3 (02 Sep 2016)

  • IPython added to requirements

0.4.2 (02 Sep 2016)

  • Sample has pairs property(dictionary) to map boundary id to grains id
  • Sample triplets method returns list of grains id creating triple points

0.4.1 (20 Jun 2016)

  • Examples added to distribution

0.4 (20 Jun 2016)

  • Sample neighbors_dist method to calculate neighbors distances
  • Grains and Boundaries nndist to calculate nearest neighbors distances
  • Fancy indexing with slices fixed
  • Affine transformations affine_transform, rotate, scale, skew, translate methods implemented for Grains and Boundaries
  • Sample name atribute added
  • Sample bids method to get boundary id's related to grain added

0.3.2 (04 Jun 2016)

  • PolyShape name forced to be string
  • Creation of boundaries is Grains method

0.3.1 (22 Feb 2016)

  • classification is persitant trough fancy indexing
  • empty classes allowed
  • bootstrap method added to PolySet

0.2 (18 Apr 2015)

  • Smooth and simplify methods for Grains implemented
  • Initial documentation added
  • phase and type properties renamed to name

0.1 (13 Feb 2015)

  • First release

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

polylx-0.5.4.tar.gz (505.2 kB view hashes)

Uploaded Source

Built Distribution

polylx-0.5.4-py3-none-any.whl (500.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page