Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

voxcov

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

voxcov

  • 0.2.8
  • PyPI
  • Socket score

Maintainers
1

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()

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc