Skip to main content

py4D-browser plugin that adds utility functions which transform the datacube

Project description

py4D-browser-transform

py4D-browser-transform is a plugin for py4D-browser that provides utility functions for transforming the datacube, currently including flipping, transposing, permuting axes. Other functions like cropping, resampling, and adjusting intensity offsets or scaling might be added in the future.

Installation

You can install py4D-browser-transform directly from GitHub using pip or conda:

pip install py4d-browser-transform

💡 Note:

  • If you install into a fresh Python environment, py4D-browser and py4DSTEM will be automatically installed as dependencies so you don't need to install them first.
  • If you already have py4D-browser installed, you can install this plugin into the same Python environment.

A step-by-step guide including creating a fresh Python environment via conda would look like this:

conda create -n py4dgui python=3.12
conda activate py4dgui
python -m pip install --upgrade pip
python -m pip cache purge
pip install py4d-browser-transform

Usage

Simply run the following command to start the browser once you activated the corresponding Python environment:

py4dgui

After installing this plugin, you should see the "Transform" submenu appear under the "Plugins" menu.
From here, you can:

  • Flip or transpose the diffraction pattern.
  • Permute dataset axes if your 4D dataset is not in the expected order. Demo of py4D-browser-transform

These operations would direcly modify the loaded datacube, but will not affect the raw file stored on disk. You can export the transformed datacube to disk using File > Export Datacube.

💡 Note:

  • The order of flipping and permutation matters so if you mix these two operations, you'll have to reverse the operaitons in the exact opposite order to get back to the original state. For example, if you permute and then flip/transpose, you'll have to undo the flip/transpose and then reset the permute.

License

GNU GPLv3

py4D-browser-transform is open source software distributed under a GPLv3 license. It is free to use, alter, or build on, provided that any work derived from py4D-browser-transform is also kept free and open.

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

py4d_browser_transform-0.0.2.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

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

py4d_browser_transform-0.0.2-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file py4d_browser_transform-0.0.2.tar.gz.

File metadata

  • Download URL: py4d_browser_transform-0.0.2.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py4d_browser_transform-0.0.2.tar.gz
Algorithm Hash digest
SHA256 caffdebadae7f0d5aca1ea398674524142f850ddab0f5bf20200de6cf8297903
MD5 fc79d169345419e8d3b4ff6941386a8d
BLAKE2b-256 6e92c42a1cf8c41f80f6828137ff6e8c5f802cac48050f5e935d84d30b85ed0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for py4d_browser_transform-0.0.2.tar.gz:

Publisher: publish_pypi.yml on chiahao3/py4D-browser-transform

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

File details

Details for the file py4d_browser_transform-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for py4d_browser_transform-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d0da4280bfd704cc015afb5168c797be8678ccaea5dc1f58643423e36fbf6c09
MD5 4f677d8a400118dfe061d70c599e7703
BLAKE2b-256 e539f66eb9278e2b84c171e185e47aa21ffc1a5ea3b71c6af10bd0e3bad90a1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for py4d_browser_transform-0.0.2-py3-none-any.whl:

Publisher: publish_pypi.yml on chiahao3/py4D-browser-transform

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