Skip to main content

A set of utilities and Rust-accelerated functions for the McFACTS AGN disk simulation project

Project description

Utilities and accelerated functions designed for use by the McFACTS team at CUNY.

Still under early alpha development. Modules and functions that are not explicitly documented here are not yet ready for use.

Merge Tree

For M. McCarthy's black hole merge tracking feature.

import mcfast
from mcfast import MergeForest

# creates a forest of all black holes
forest = MergeForest("./data/", "galaxy_state_*")

bh_uuid: str = "2b422064-0a84-4687-a542-395dcb61cd4f"

# get the immediate child of a given UUID, if the UUID is valid
descendant_uuid = forest.get_descendant(bh_uuid)

# get the immediate parents of a given UUID, if the UUID is valid
(parent1_uuid, parent2_uuid) = forest.get_parents(bh_uuid)

# get the full ancestry list of a given UUID (in DFS order), 
# assuming the UUID has ancestors
ancestor_list = forest.get_ancestors(bh_uuid)


# get the full list of black holes between the UUID and 
# the final product (root)
descent_path = forest.get_lineage_to_root(bh_uuid)

# get the generation of a given UUID, where an initialized BH is generation 0
# note: implementation doesn't fully line up with existing
# reference implementation, under review
generation = forest.get_generation(bh_uuid)

# get all 'root' black holes (products remaining at the final tick)
roots = forest.roots()

# get all 'leaf' black holes (initialized BHs with no ancestors)
leaves = forest.leaves()

# get all 'singleton' black holes (neither ancestors nor children)
singletons = forest.singletons()

if forest.contains(bh_uuid):
    print("It exists!")
else:
    print("It doesn't exist!")

# get total number of nodes in the 'forest'
total = len(forest)

# serialize and deserialize with pickle
import pickle
 
# Save now
with open("forest.pkl", "wb") as f:
    pickle.dump(forest, f)

# Load later
with open("forest.pkl", "rb") as f:
    restored = pickle.load(f)

# sample: 330-node forest serializes down to 16kb

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

mcfast-0.1.1.tar.gz (25.7 kB view details)

Uploaded Source

Built Distributions

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

mcfast-0.1.1-cp313-cp313-win_amd64.whl (296.1 kB view details)

Uploaded CPython 3.13Windows x86-64

mcfast-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl (398.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

mcfast-0.1.1-cp313-cp313-macosx_11_0_arm64.whl (348.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

mcfast-0.1.1-cp312-cp312-win_amd64.whl (296.0 kB view details)

Uploaded CPython 3.12Windows x86-64

mcfast-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl (398.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

mcfast-0.1.1-cp312-cp312-macosx_11_0_arm64.whl (348.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mcfast-0.1.1-cp311-cp311-win_amd64.whl (296.1 kB view details)

Uploaded CPython 3.11Windows x86-64

mcfast-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl (399.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

mcfast-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (350.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mcfast-0.1.1-cp310-cp310-win_amd64.whl (296.1 kB view details)

Uploaded CPython 3.10Windows x86-64

mcfast-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl (399.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

mcfast-0.1.1-cp310-cp310-macosx_11_0_arm64.whl (350.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file mcfast-0.1.1.tar.gz.

File metadata

  • Download URL: mcfast-0.1.1.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcfast-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ac10b57b49170d363f7cacce27a866aa71b6db81cf01dfd97aa975c3e8032a46
MD5 d6e31ae3c9c746a5ced07ff46cffb011
BLAKE2b-256 5a27c451b2b2bcddba6a6fe03ffba84ddd38af17c6406f32a3f39a74db04fe9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.1.tar.gz:

Publisher: mac.yml on nrposner/mcfast

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

File details

Details for the file mcfast-0.1.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: mcfast-0.1.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 296.1 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcfast-0.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 87dbdfcee24bcbd65edc269112807eba499c7c7880fafa70a258d406081a4ad2
MD5 57a4ed4b7adc3579fc303a655ef4b16c
BLAKE2b-256 0d863a3b6faef0b57c9b4f99d4b5e2e26aa27f379d83b8c3cbb5e14bb1fcbe3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.1-cp313-cp313-win_amd64.whl:

Publisher: windows.yml on nrposner/mcfast

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

File details

Details for the file mcfast-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2b9ae83efc829efba3041eaf63dc7ca06fb0c70678557baa57a50fac3f932640
MD5 857236910fb707b23e3b38c4cf682248
BLAKE2b-256 b9307ea7f6b6482fcce6155ebaed72e39f06ca699c6fca2e4b695c0dc0ce4d3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: ubuntu.yml on nrposner/mcfast

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

File details

Details for the file mcfast-0.1.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1b7f5e10509d47236577a17b8a5b997fba97abf7dab22fe12c8c08fe1876567b
MD5 b35acb2b4c90d1899e3180f569a8cf98
BLAKE2b-256 1bcc5e3dcf79f216737f428d8966a599a8993cbc8d0b9eb23064444e4ce73771

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: mac.yml on nrposner/mcfast

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

File details

Details for the file mcfast-0.1.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: mcfast-0.1.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 296.0 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcfast-0.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c7c95ba0a818a8cd1bd6feb35fc504dec60e9b2fdfb65c8d4e7d68a1498e42ad
MD5 511304f514467b2d475127e46647e7be
BLAKE2b-256 af9035c3c54f1703195fe1313572f2d4632540455ba08da19e6bad7121d0ec1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.1-cp312-cp312-win_amd64.whl:

Publisher: windows.yml on nrposner/mcfast

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

File details

Details for the file mcfast-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9875e4fb64266b16f38dd0a97bf7e0872aa36a00749f6280250f30091bb67a03
MD5 dbb51c37c01f61580c54af20304cfd46
BLAKE2b-256 e8dbcfdeca8a223e64ae8c61a73dd3dc5bf8d7d65a17fa094eab94fae5d85c48

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: ubuntu.yml on nrposner/mcfast

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

File details

Details for the file mcfast-0.1.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fa9f0b322571f0c75d2e6d023be480a27b78483e4c5a90320c45fd4a1237fd3e
MD5 18dac05501d8c12a673dead3625feeb9
BLAKE2b-256 6d346ed69e3217ea9f1f1d2a6fd78026bf51072486b2bb3ce149f56dc32cda93

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: mac.yml on nrposner/mcfast

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

File details

Details for the file mcfast-0.1.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: mcfast-0.1.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 296.1 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcfast-0.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c51bed7de74c0e953bed7096c834d8cf503fbb07ddba5877e73835c77fab9cef
MD5 ea6317233057f908ce61ca4b27042a36
BLAKE2b-256 9acb8fd2f0fa483ede15e64316242c67f998ed421454b27ddd9f2b64ed6499d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.1-cp311-cp311-win_amd64.whl:

Publisher: windows.yml on nrposner/mcfast

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

File details

Details for the file mcfast-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0e2cb1c5ba34bf7ef9584e7574037bf11ea26ec1bb1988b36a6c4f04efb73ac0
MD5 92c1a256767f7580ae4116771df32c23
BLAKE2b-256 b23376481b8eec2d3544b6ea396fc1bbf13012b540dcc82c589c772c38eab749

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: ubuntu.yml on nrposner/mcfast

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

File details

Details for the file mcfast-0.1.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 414878a31e0a2f814ba336452605a4f7ab10d034460ece871a4e0bdc14cee863
MD5 d7d2232fba31a8f183bb1dc61de73106
BLAKE2b-256 c73a5587d04764ae5b004bf6a23c394e0b0ec165fe71f10e311ca7d91d73e1d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: mac.yml on nrposner/mcfast

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

File details

Details for the file mcfast-0.1.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: mcfast-0.1.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 296.1 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcfast-0.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 35cec00fb12fbac053469d4508fab32ae0add95e2bd782cce2ed5ed1d8fc892c
MD5 1f12037aff979ae41627afacadc3c62e
BLAKE2b-256 abeb949b557200aebd9136126519e087bda9721970031a99e45a026fbae68412

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.1-cp310-cp310-win_amd64.whl:

Publisher: windows.yml on nrposner/mcfast

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

File details

Details for the file mcfast-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9983595fca538e3a6383e436656f5280764c8f55ef34c83eed5e0dafd3e0dcad
MD5 f80f381de8a696ca8431c23015124c02
BLAKE2b-256 9869c81dafab64bcf540fc81832c49e5ebb4c64a40f63af0bf40d19a928e7644

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: ubuntu.yml on nrposner/mcfast

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

File details

Details for the file mcfast-0.1.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 066daaa3203553d9728771231da54d2f6fc8428be2769b1906f507aeefdc07cf
MD5 b7eb9bbe0a851c19b1f3f40fd4d0c7f2
BLAKE2b-256 7eb7dfb0c4f869548af4aff48ebe919a67bd1c485495416b3ab6814ab18f9dda

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.1-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: mac.yml on nrposner/mcfast

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