Skip to content
Snippets Groups Projects
Commit 129e6898 authored by Simon Wittl's avatar Simon Wittl
Browse files

changed for win style

parent 13542c0f
No related branches found
No related tags found
No related merge requests found
[project]
name = "CyXTraX"
name = "cyxtrax"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
authors = [
{ name = "swittl", email = "simon.wittl@th-deg.de" }
]
requires-python = ">=3.10"
dependencies = [
"artistlib",
"dm-pix>=0.4.3",
"h5py>=3.12.1",
"jax[cuda12]>=0.4.35",
"jax>=0.4.35 ; sys_platform == 'windows'",
"jax[cuda12]>=0.4.35 ; sys_platform == 'linux'",
"matplotlib>=3.9.2",
"numpy>=2.1.3",
"ruff>=0.7.3",
......@@ -16,17 +20,16 @@ dependencies = [
"xraylib>=4.1.5",
]
[tool.hatch.build]
include = [
"src/CyXTraX/data/olaf_6.stl",
"src/CyXTraX/data/scones.stl",
"src/CyXTraX/data/cone.aRTist",
"src/CyXTraX/data/cylinder.aRTist"
]
[tool.uv.sources]
artistlib = { git = "https://github.com/wittlsn/aRTist-PythonLib" }
cyxtrax = { workspace = true }
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff]
exclude = [
".venv",
]
from CyXTraX.simulation import CylindricalProjection, load_mesh
from CyXTraX.data import scones_mesh
from CyXTraX.common import MeshObject
from cyxtrax.simulation import CylindricalProjection, load_mesh
from cyxtrax.data import scones_mesh
from cyxtrax.common import MeshObject
import numpy as np
from matplotlib import pyplot as plt
......
from CyXTraX.io import load_atlas
from CyXTraX.util.visualisation import voxel_maps
from cyxtrax.io import load_atlas
from cyxtrax.util.visualisation import voxel_maps
from pathlib import Path
......
......@@ -3,7 +3,7 @@ import numpy as np
from ..common import MeshObject
with importlib.resources.path("CyXTraX.data", "olaf_6.stl") as file_path:
with importlib.resources.path("cyxtrax.data", "olaf_6.stl") as file_path:
olaf_stl = file_path
olaf_mesh = MeshObject(
olaf_stl,
......@@ -11,7 +11,7 @@ with importlib.resources.path("CyXTraX.data", "olaf_6.stl") as file_path:
orientation_quat=np.array([0.0, 0.0, 0.0, 1.0]),
)
with importlib.resources.path("CyXTraX.data", "scones.stl") as file_path:
with importlib.resources.path("cyxtrax.data", "scones.stl") as file_path:
scones_stl = file_path
scones_mesh = MeshObject(
scones_stl,
......
......@@ -15,7 +15,7 @@ import numpy as np
import os
import importlib.resources
from time import sleep
from CyXTraX.common.mesh_object import MeshObject
from cyxtrax.common.mesh_object import MeshObject
# !!!!!!!!!!!!!!!!!!!
# Read carefully
......@@ -114,7 +114,7 @@ class CylindricalProjection:
return image
def set_cylindrical_mode(self):
with importlib.resources.path("CyXTraX.data", "cylinder.aRTist") as file_path:
with importlib.resources.path("cyxtrax.data", "cylinder.aRTist") as file_path:
print(f"Load: {file_path}")
self.api.load_project(file_path)
self.x_px = 2000.0
......@@ -128,7 +128,7 @@ class CylindricalProjection:
)
def set_cone_mode(self):
with importlib.resources.path("CyXTraX.data", "cone.aRTist") as file_path:
with importlib.resources.path("cyxtrax.data", "cone.aRTist") as file_path:
print(f"Load: {file_path}")
self.api.load_project(file_path)
self.pixel_pitch_mm = 0.139
......
temp/scones.png

71.5 KiB | W: | H:

temp/scones.png

71.5 KiB | W: | H:

temp/scones.png
temp/scones.png
temp/scones.png
temp/scones.png
  • 2-up
  • Swipe
  • Onion skin
version = 1
requires-python = ">=3.10"
resolution-markers = [
"python_full_version < '3.11'",
"python_full_version == '3.11.*'",
"python_full_version == '3.12.*'",
"python_full_version >= '3.13'",
"python_full_version < '3.11' and sys_platform == 'linux'",
"python_full_version < '3.11' and sys_platform == 'windows'",
"python_full_version < '3.11' and sys_platform != 'linux' and sys_platform != 'windows'",
"python_full_version == '3.11.*' and sys_platform == 'linux'",
"python_full_version == '3.11.*' and sys_platform == 'windows'",
"python_full_version == '3.11.*' and sys_platform != 'linux' and sys_platform != 'windows'",
"python_full_version == '3.12.*' and sys_platform == 'linux'",
"python_full_version == '3.12.*' and sys_platform == 'windows'",
"python_full_version == '3.12.*' and sys_platform != 'linux' and sys_platform != 'windows'",
"python_full_version >= '3.13' and sys_platform == 'linux'",
"python_full_version >= '3.13' and sys_platform == 'windows'",
"python_full_version >= '3.13' and sys_platform != 'linux' and sys_platform != 'windows'",
]
[[package]]
......@@ -118,7 +126,8 @@ dependencies = [
{ name = "artistlib" },
{ name = "dm-pix" },
{ name = "h5py" },
{ name = "jax", extra = ["cuda12"] },
{ name = "jax", marker = "sys_platform == 'linux' or sys_platform == 'windows'" },
{ name = "jax", extra = ["cuda12"], marker = "sys_platform == 'linux'" },
{ name = "matplotlib" },
{ name = "numpy" },
{ name = "ruff" },
......@@ -131,7 +140,8 @@ requires-dist = [
{ name = "artistlib", git = "https://github.com/wittlsn/aRTist-PythonLib" },
{ name = "dm-pix", specifier = ">=0.4.3" },
{ name = "h5py", specifier = ">=3.12.1" },
{ name = "jax", extras = ["cuda12"], specifier = ">=0.4.35" },
{ name = "jax", marker = "sys_platform == 'windows'", specifier = ">=0.4.35" },
{ name = "jax", extras = ["cuda12"], marker = "sys_platform == 'linux'", specifier = ">=0.4.35" },
{ name = "matplotlib", specifier = ">=3.9.2" },
{ name = "numpy", specifier = ">=2.1.3" },
{ name = "ruff", specifier = ">=0.7.3" },
......@@ -239,8 +249,8 @@ wheels = [
[package.optional-dependencies]
cuda12 = [
{ name = "jax-cuda12-plugin", extra = ["with-cuda"] },
{ name = "jaxlib" },
{ name = "jax-cuda12-plugin", extra = ["with-cuda"], marker = "sys_platform == 'linux'" },
{ name = "jaxlib", marker = "sys_platform == 'linux'" },
]
[[package]]
......@@ -257,7 +267,7 @@ name = "jax-cuda12-plugin"
version = "0.4.35"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "jax-cuda12-pjrt" },
{ name = "jax-cuda12-pjrt", marker = "sys_platform == 'linux'" },
]
wheels = [
{ url = "https://files.pythonhosted.org/packages/d7/eb/f317f426b8ea56a9e634d6eb06230d9d2d01cc34066defeb7d3fd6ab5708/jax_cuda12_plugin-0.4.35-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:30290570a8a0547e59c1fd927aefb693d4a4fe15aae23c0a1e5c34eed82bef49", size = 15545891 },
......@@ -272,16 +282,16 @@ wheels = [
[package.optional-dependencies]
with-cuda = [
{ name = "nvidia-cublas-cu12" },
{ name = "nvidia-cuda-cupti-cu12" },
{ name = "nvidia-cuda-nvcc-cu12" },
{ name = "nvidia-cuda-runtime-cu12" },
{ name = "nvidia-cudnn-cu12" },
{ name = "nvidia-cufft-cu12" },
{ name = "nvidia-cusolver-cu12" },
{ name = "nvidia-cusparse-cu12" },
{ name = "nvidia-nccl-cu12" },
{ name = "nvidia-nvjitlink-cu12" },
{ name = "nvidia-cublas-cu12", marker = "sys_platform == 'linux'" },
{ name = "nvidia-cuda-cupti-cu12", marker = "sys_platform == 'linux'" },
{ name = "nvidia-cuda-nvcc-cu12", marker = "sys_platform == 'linux'" },
{ name = "nvidia-cuda-runtime-cu12", marker = "sys_platform == 'linux'" },
{ name = "nvidia-cudnn-cu12", marker = "sys_platform == 'linux'" },
{ name = "nvidia-cufft-cu12", marker = "sys_platform == 'linux'" },
{ name = "nvidia-cusolver-cu12", marker = "sys_platform == 'linux'" },
{ name = "nvidia-cusparse-cu12", marker = "sys_platform == 'linux'" },
{ name = "nvidia-nccl-cu12", marker = "sys_platform == 'linux'" },
{ name = "nvidia-nvjitlink-cu12", marker = "sys_platform == 'linux'" },
]
[[package]]
......@@ -538,7 +548,6 @@ source = { registry = "https://pypi.org/simple" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/78/02/9fe3ca905d4838d716669de65006e0fb34fef7b849868f403416526f0e05/nvidia_cublas_cu12-12.6.3.3-py3-none-manylinux2014_aarch64.whl", hash = "sha256:e531199ca4f1f764fb45bc1dde49a006f6765033f9c89c737e4553b9502ca1f5", size = 390792508 },
{ url = "https://files.pythonhosted.org/packages/f3/e7/c186a31c234fce776436753bfef4807df7f9b4cb3eeff358fcfcbf64b547/nvidia_cublas_cu12-12.6.3.3-py3-none-manylinux2014_x86_64.whl", hash = "sha256:f33fb68e101d99470c82d17f92a0dd9f74de2a21685c217f4716cdd63b1316eb", size = 393135292 },
{ url = "https://files.pythonhosted.org/packages/93/7a/2e502382b268277c4c36d26fb1c3aab13efa37a3d058fc993bd024ced8fe/nvidia_cublas_cu12-12.6.3.3-py3-none-win_amd64.whl", hash = "sha256:e1f70bee38b964eac1907293b336bceb24498a4243e61eaf91a52977c59aebc4", size = 434535005 },
]
[[package]]
......@@ -548,7 +557,6 @@ source = { registry = "https://pypi.org/simple" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/25/0f/acb326ac8fd26e13c799e0b4f3b2751543e1834f04d62e729485872198d4/nvidia_cuda_cupti_cu12-12.6.80-py3-none-manylinux2014_aarch64.whl", hash = "sha256:358b4a1d35370353d52e12f0a7d1769fc01ff74a191689d3870b2123156184c4", size = 8236756 },
{ url = "https://files.pythonhosted.org/packages/a5/24/120ee57b218d9952c379d1e026c4479c9ece9997a4fb46303611ee48f038/nvidia_cuda_cupti_cu12-12.6.80-py3-none-manylinux2014_x86_64.whl", hash = "sha256:a3eff6cdfcc6a4c35db968a06fcadb061cbc7d6dde548609a941ff8701b98b73", size = 8917972 },
{ url = "https://files.pythonhosted.org/packages/1c/81/7796f096afaf726796b1b648f3bc80cafc61fe7f77f44a483c89e6c5ef34/nvidia_cuda_cupti_cu12-12.6.80-py3-none-win_amd64.whl", hash = "sha256:bbe6ae76e83ce5251b56e8c8e61a964f757175682bbad058b170b136266ab00a", size = 5724175 },
]
[[package]]
......@@ -558,7 +566,6 @@ source = { registry = "https://pypi.org/simple" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/01/4a/d153d4ec0bfb42889584de351dd168ebb06d293fd43b96f0d0c763b8b029/nvidia_cuda_nvcc_cu12-12.6.77-py3-none-manylinux2014_aarch64.whl", hash = "sha256:9a2aad43b8f4e4be9c237ece04f64450df77871eeebffad5a5a872714a97ca77", size = 19261369 },
{ url = "https://files.pythonhosted.org/packages/62/8f/cd3032281ba7bb531fe3159337af00c5c805fd6a31dc700f0715c8748c8c/nvidia_cuda_nvcc_cu12-12.6.77-py3-none-manylinux2014_x86_64.whl", hash = "sha256:b66bb5dd6b8ae62262586691977d3b4a425e91db61b4b9bc2f6b42bcd4154b96", size = 21169073 },
{ url = "https://files.pythonhosted.org/packages/45/a6/90b049466959c0f8c4a9c55f67f65b71f6ca4e1283e073a8522ccc9eee79/nvidia_cuda_nvcc_cu12-12.6.77-py3-none-win_amd64.whl", hash = "sha256:26e118b4dae4ebd316ab6f5ee3f3c4cb929f8265f717a8e016ba57e254c0b4f1", size = 16812720 },
]
[[package]]
......@@ -568,7 +575,6 @@ source = { registry = "https://pypi.org/simple" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/b7/3d/159023799677126e20c8fd580cca09eeb28d5c5a624adc7f793b9aa8bbfa/nvidia_cuda_runtime_cu12-12.6.77-py3-none-manylinux2014_aarch64.whl", hash = "sha256:d461264ecb429c84c8879a7153499ddc7b19b5f8d84c204307491989a365588e", size = 908040 },
{ url = "https://files.pythonhosted.org/packages/f0/62/65c05e161eeddbafeca24dc461f47de550d9fa8a7e04eb213e32b55cfd99/nvidia_cuda_runtime_cu12-12.6.77-py3-none-manylinux2014_x86_64.whl", hash = "sha256:a84d15d5e1da416dd4774cb42edf5e954a3e60cc945698dc1d5be02321c44dc8", size = 897678 },
{ url = "https://files.pythonhosted.org/packages/fa/76/4c80fa138333cc975743fd0687a745fccb30d167f906f13c1c7f9a85e5ea/nvidia_cuda_runtime_cu12-12.6.77-py3-none-win_amd64.whl", hash = "sha256:86c58044c824bf3c173c49a2dbc7a6c8b53cb4e4dca50068be0bf64e9dab3f7f", size = 891773 },
]
[[package]]
......@@ -576,12 +582,11 @@ name = "nvidia-cudnn-cu12"
version = "9.5.1.17"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "nvidia-cublas-cu12" },
{ name = "nvidia-cublas-cu12", marker = "sys_platform == 'linux'" },
]
wheels = [
{ url = "https://files.pythonhosted.org/packages/99/93/a201a12d3ec1caa8c6ac34c1c2f9eeb696b886f0c36ff23c638b46603bd0/nvidia_cudnn_cu12-9.5.1.17-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:9fd4584468533c61873e5fda8ca41bac3a38bcb2d12350830c69b0a96a7e4def", size = 570523509 },
{ url = "https://files.pythonhosted.org/packages/2a/78/4535c9c7f859a64781e43c969a3a7e84c54634e319a996d43ef32ce46f83/nvidia_cudnn_cu12-9.5.1.17-py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:30ac3869f6db17d170e0e556dd6cc5eee02647abc31ca856634d5a40f82c15b2", size = 570988386 },
{ url = "https://files.pythonhosted.org/packages/b6/b2/3f60d15f037fa5419d9d7f788b100ef33ea913ae5315c87ca6d6fa606c35/nvidia_cudnn_cu12-9.5.1.17-py3-none-win_amd64.whl", hash = "sha256:d7af0f8a4f3b4b9dbb3122f2ef553b45694ed9c384d5a75bab197b8eefb79ab8", size = 565440743 },
]
[[package]]
......@@ -589,12 +594,11 @@ name = "nvidia-cufft-cu12"
version = "11.3.0.4"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "nvidia-nvjitlink-cu12" },
{ name = "nvidia-nvjitlink-cu12", marker = "sys_platform == 'linux'" },
]
wheels = [
{ url = "https://files.pythonhosted.org/packages/ce/f5/188566814b7339e893f8d210d3a5332352b1409815908dad6a363dcceac1/nvidia_cufft_cu12-11.3.0.4-py3-none-manylinux2014_aarch64.whl", hash = "sha256:8510990de9f96c803a051822618d42bf6cb8f069ff3f48d93a8486efdacb48fb", size = 200164135 },
{ url = "https://files.pythonhosted.org/packages/60/de/99ec247a07ea40c969d904fc14f3a356b3e2a704121675b75c366b694ee1/nvidia_cufft_cu12-11.3.0.4-py3-none-manylinux2014_x86_64.whl", hash = "sha256:768160ac89f6f7b459bee747e8d175dbf53619cfe74b2a5636264163138013ca", size = 200221622 },
{ url = "https://files.pythonhosted.org/packages/b4/38/36fd800cec8f6e89b7c1576edaaf8076e69ec631644cdbc1b5f2e2b5a9df/nvidia_cufft_cu12-11.3.0.4-py3-none-win_amd64.whl", hash = "sha256:6048ebddfb90d09d2707efb1fd78d4e3a77cb3ae4dc60e19aab6be0ece2ae464", size = 199356881 },
]
[[package]]
......@@ -602,14 +606,13 @@ name = "nvidia-cusolver-cu12"
version = "11.7.1.2"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "nvidia-cublas-cu12" },
{ name = "nvidia-cusparse-cu12" },
{ name = "nvidia-nvjitlink-cu12" },
{ name = "nvidia-cublas-cu12", marker = "sys_platform == 'linux'" },
{ name = "nvidia-cusparse-cu12", marker = "sys_platform == 'linux'" },
{ name = "nvidia-nvjitlink-cu12", marker = "sys_platform == 'linux'" },
]
wheels = [
{ url = "https://files.pythonhosted.org/packages/93/17/dbe1aa865e4fdc7b6d4d0dd308fdd5aaab60f939abfc0ea1954eac4fb113/nvidia_cusolver_cu12-11.7.1.2-py3-none-manylinux2014_aarch64.whl", hash = "sha256:0ce237ef60acde1efc457335a2ddadfd7610b892d94efee7b776c64bb1cac9e0", size = 157833628 },
{ url = "https://files.pythonhosted.org/packages/9f/81/baba53585da791d043c10084cf9553e074548408e04ae884cfe9193bd484/nvidia_cusolver_cu12-11.7.1.2-py3-none-manylinux2014_x86_64.whl", hash = "sha256:6cf28f17f64107a0c4d7802be5ff5537b2130bfc112f25d5a30df227058ca0e6", size = 158229780 },
{ url = "https://files.pythonhosted.org/packages/d4/53/fff50a0808df7113d77e3bbc7c2b7eaed6f57d5eb80fbe93ead2aea1e09a/nvidia_cusolver_cu12-11.7.1.2-py3-none-win_amd64.whl", hash = "sha256:6813f9d8073f555444a8705f3ab0296d3e1cb37a16d694c5fc8b862a0d8706d7", size = 149287877 },
]
[[package]]
......@@ -617,12 +620,11 @@ name = "nvidia-cusparse-cu12"
version = "12.5.4.2"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "nvidia-nvjitlink-cu12" },
{ name = "nvidia-nvjitlink-cu12", marker = "sys_platform == 'linux'" },
]
wheels = [
{ url = "https://files.pythonhosted.org/packages/d3/56/3af21e43014eb40134dea004e8d0f1ef19d9596a39e4d497d5a7de01669f/nvidia_cusparse_cu12-12.5.4.2-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7aa32fa5470cf754f72d1116c7cbc300b4e638d3ae5304cfa4a638a5b87161b1", size = 216451135 },
{ url = "https://files.pythonhosted.org/packages/43/ac/64c4316ba163e8217a99680c7605f779accffc6a4bcd0c778c12948d3707/nvidia_cusparse_cu12-12.5.4.2-py3-none-manylinux2014_x86_64.whl", hash = "sha256:23749a6571191a215cb74d1cdbff4a86e7b19f1200c071b3fcf844a5bea23a2f", size = 216561357 },
{ url = "https://files.pythonhosted.org/packages/45/ef/876ad8e4260e1128e6d4aac803d9d51baf3791ebdb4a9b8d9b8db032b4b0/nvidia_cusparse_cu12-12.5.4.2-py3-none-win_amd64.whl", hash = "sha256:4acb8c08855a26d737398cba8fb6f8f5045d93f82612b4cfd84645a2332ccf20", size = 213712630 },
]
[[package]]
......@@ -641,7 +643,6 @@ source = { registry = "https://pypi.org/simple" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/11/8c/386018fdffdce2ff8d43fedf192ef7d14cab7501cbf78a106dd2e9f1fc1f/nvidia_nvjitlink_cu12-12.6.77-py3-none-manylinux2014_aarch64.whl", hash = "sha256:3bf10d85bb1801e9c894c6e197e44dd137d2a0a9e43f8450e9ad13f2df0dd52d", size = 19270432 },
{ url = "https://files.pythonhosted.org/packages/fe/e4/486de766851d58699bcfeb3ba6a3beb4d89c3809f75b9d423b9508a8760f/nvidia_nvjitlink_cu12-12.6.77-py3-none-manylinux2014_x86_64.whl", hash = "sha256:9ae346d16203ae4ea513be416495167a0101d33d2d14935aa9c1829a3fb45142", size = 19745114 },
{ url = "https://files.pythonhosted.org/packages/1a/aa/7b5d8e22d73e03f941293ae62c993642fa41e6525f3213292e007621aa8e/nvidia_nvjitlink_cu12-12.6.77-py3-none-win_amd64.whl", hash = "sha256:410718cd44962bed862a31dd0318620f6f9a8b28a6291967bcfcb446a6516771", size = 161917250 },
]
[[package]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment