Skip to main content

Add your description here

Project description

CRYSM

Installation

In order to install the package, run

uv tool install -e .

This exposes the crysm command. To see available commands, run crysm --help. The commands correspond to the decorated functions in src/main.py.

Installation of uv

In this package, uv is used for package management. To install on linux/mac, run

curl -LsSf https://astral.sh/uv/install.sh | sh

and on windows (in powershell)

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Usage

The functionality of this library can be found by typing crysm --help or reading the functions in src/main.py. Below are some examples.

Example 1: Finding correction factors for the central cross from a flatfield image

crysm find-center-cross-correction 24bit/flatfield_200kV_24bit.mib
> For image: 24bit/flatfield_200kV_24bit.mib:
>   Mean value of cross: 40151.59
>   Mean value of central four pixels: 74076.75
>   Mean value of rest of image: 18284.44
> Suggested arguments for correction:
>  --additional-pixels 4 --correction-factor 2.196 --central-four-factor 4.051
> Number of additional pixels should be verified with detector manufacturer

This command can also take multiple images, but they should be collected with the same parameters (unlike the example below):

crysm find-center-cross-correction 24bit/flatfield_200kV_24bit.mib 12bit/flatfield_200kV_12bit.mib 6bit/flatfield_200kV_6bit.mib                                          3.11   17:08:04
> For image: 24bit/flatfield_200kV_24bit.mib:
>   Mean value of cross: 40151.59
>   Mean value of central four pixels: 74076.75
>   Mean value of rest of image: 18284.44
>   Additional pixels: 4
>   Correction factor: 2.196
>   Central four factor: 4.051
> For image: 12bit/flatfield_200kV_12bit.mib:
>   Mean value of cross: 2013.16
>   Mean value of central four pixels: 3716.25
>   Mean value of rest of image: 916.51
>   Additional pixels: 4
>   Correction factor: 2.197
>   Central four factor: 4.055
> For image: 6bit/flatfield_200kV_6bit.mib:
>   Mean value of cross: 39.97
>   Mean value of central four pixels: 63.00
>   Mean value of rest of image: 18.22
>   Additional pixels: 4
>   Correction factor: 2.194
>   Central four factor: 3.457
> Suggested arguments for correction:
>  --additional-pixels 4 --correction-factor 2.195 --central-four-factor 3.854
> Number of additional pixels should be verified with detector manufacturer

Example 2: Correcting the central cross of a calibration image

crysm pets-correct-center-cross-calibration --additional-pixels 4 --correction-factor 2.196 --central-four-factor 4.051 SAED_150cm.mib WIDE_150cm.tiff
> Wrote corrected image to WIDE_150cm.tiff

Example 3: Correcting the central cross of a pets project

crysm pets-correct-center-cross --additional-pixels 4 --correction-factor 2.196 --central-four-factor 4.051
> Using cred project C:\Users\iverks\progging\master\cRED_070325\experiment_5
> 100%|█████████████████████████████████████████████████████████████████████████████| 1093/1093 [00:10<00:00, 109.19it/s]
> Wrote 1093 corrected images to C:\Users\iverks\progging\master\cRED_070325\experiment_5\tiff_corr

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

crysm-0.1.4.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

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

crysm-0.1.4-py3-none-any.whl (30.7 kB view details)

Uploaded Python 3

File details

Details for the file crysm-0.1.4.tar.gz.

File metadata

  • Download URL: crysm-0.1.4.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.30

File hashes

Hashes for crysm-0.1.4.tar.gz
Algorithm Hash digest
SHA256 bf9e2a0a07e8bfdeec493926e29febdcd735a55bfefd3731c7926749d1d4872c
MD5 96419d64249ec2b758abdf632ee73253
BLAKE2b-256 3843dfc7ea850b751d97889b421825a6e03b761eef35361a270c7e7f0c4f6e01

See more details on using hashes here.

File details

Details for the file crysm-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: crysm-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 30.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.30

File hashes

Hashes for crysm-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 00af9010cf457d25822c471b1f3a9d5a8e7ec598ef3ae138f0624e130bca62f7
MD5 284e47a011534c1022a3b95cfcb2e74c
BLAKE2b-256 4270abcea51a298aaba1c81f27b0b2bbbc448787420d8bf0b8f2bc0cc853bbdf

See more details on using hashes here.

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