No project description provided
Project description
voxcov-py
Python bindings for voxcov.
Quick start
Clone voxcov
first.
Run maturin develop --release
to build and install the plugin. Use the --release
flag to get an optimized build.
Coverage example
Import the library
import voxcov as vc
Create a map.
apix = [1.0, 1.0, 1.0]
origin = [0.0, 0.0, 0.0]
# The maximum axis length
size = 256
vox_map = vc.Map(apix, origin, size)
Add and delete spheres.
# Add a sphere of radius 3.5 at (10,10,10)
vox_map.add_sphere([10.0, 10.0, 10.0], 3.5, lambda vox: print("Adding A Covered: ", vox))
# Add another sphere which overlaps mostly of radius 3.5 at (11,10,10)
vox_map.add_sphere([11.0, 10.0, 10.0], 3.5, lambda vox: print("Adding B Covered: ", vox))
# Delete sphere which overlaps mostly of radius 3.5 at (11,10,10)
vox_map.del_sphere([11.0, 10.0, 10.0], 3.5, lambda vox: print("Deleting B uncovered: ", vox))
Blur example
Import the library
import voxcov as vc
Create a blurrer. Note, the API is a bit clunky. Named parameters would be nice.
blurred_map = vc.BlurMap(
[1.084,1.084,1.084], # The cell dimensions
[0,0,0], # The origin
[256,256,256], # The size, 256^3
5.1, # Sigma for gaussian
# e.g. (sigma_coef * resolution)
4.0 # The number of sigma to cutoff at
)
Stick atoms in.
# We pass the center and scale of each gaussian.
blurred_map.add_gaussian([3,4,5], 10)
blurred_map.add_gaussian([4,5,3], 12)
Get a numpy array out.
blurred_map.to_numpy()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for voxcov-0.2.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f7db724bfd9f7b95c36b7fb05addf043629ec707b7cd0afd877e989b5546133 |
|
MD5 | f5dd4ff1f3cc27d60b860c42b789e769 |
|
BLAKE2b-256 | e3e47a624fa4f8ea52cfd046967254345a701137c939791e79b42fc31273f97c |
Close
Hashes for voxcov-0.2.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67dce4ce17f3a83e8488b491655d76175dab690377af4995ec37ce28699c336e |
|
MD5 | 94c7d9f55f6d26ce059a28189cd4ac95 |
|
BLAKE2b-256 | 4320c01cbe79c98bcef4359bbf0bacd9d19e5506e573395784c5c79a494e7d47 |
Close
Hashes for voxcov-0.2.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 207804908b723656e34930a6b8e03cbb39051cb1fd88ddaa71a81ef54a40795e |
|
MD5 | ad1d289d9c0dd2e4a5522893def73fb9 |
|
BLAKE2b-256 | 6209c58271cb603af6b5630996954dac2e563dab91d8743c0967915b32815219 |
Close
Hashes for voxcov-0.2.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30f71ed234bf4ec6bd4ef9b31c84a6def994b6d84242c07b098b0020ccefef16 |
|
MD5 | a7c1a780bf3ca4a6685b93006595e05f |
|
BLAKE2b-256 | 0bc7d11aa641ba48e3b7cbb7246c0d1a971ad7dc935e56873c6d32eb94b6baaf |
Close
Hashes for voxcov-0.2.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67f2899521f7d46b8e84f5b045148f51781ad4f476272f72a8ff78d8518c0394 |
|
MD5 | 08c0e64e96fe704e9e1c5ac136649d01 |
|
BLAKE2b-256 | c5a29fb9de88644cc741680056d30b76d355d78061813e9b3b8386270012b5d8 |
Close
Hashes for voxcov-0.2.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bce21365a054e556cc09ba588f2b7c57e83442b404f2144464efc1c1252f309c |
|
MD5 | d5f503c68510e267f30339e58f381c11 |
|
BLAKE2b-256 | ac8c445a4e1e9463a4f129126e843078b78d98493831b7814a2deaadcca0745f |
Close
Hashes for voxcov-0.2.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f97c339669473e2966ceafaab9f03347084bf792f8c58c60aa3f9319f64e0ce |
|
MD5 | 74803a68783c7ce2ec5610dd7ca89d63 |
|
BLAKE2b-256 | 1ace20a19085c8a78fbacd6b6f7e9ea21462ee6edae6640fef9a8274b8e876a4 |
Close
Hashes for voxcov-0.2.0-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4a3e5dccfc3f8aab8ff34c42e769702f96649c632323de7f8a8e0de31285f5a |
|
MD5 | 34388d1dc911ac2acdffca9946c03f1a |
|
BLAKE2b-256 | 9c6d3214f728808bdb07f83a1955f1bdb28f4dcd71de0c9a6cbbbf562ee515dd |
Close
Hashes for voxcov-0.2.0-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8af11439d45b2b1aa6428d2d9a0ec5edc129e6953e0a18dae058ff1cb15b5d86 |
|
MD5 | c23e05a23d4ed5d8410194da33d254c2 |
|
BLAKE2b-256 | 95f570c71948813f3d0b3a476881418a98cf1e7391dac82e0ab020e5ab2cfc9f |
Close
Hashes for voxcov-0.2.0-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69a685d6214864551c1ab458624283b0c7a85c355104e8488252f12616894f07 |
|
MD5 | 99e78468da64be170bc4890a22e4aac3 |
|
BLAKE2b-256 | e8d43c4a92362bff68036fd13bfa6995b2310dd171b47ea9b031ea0448803e11 |