Skip to main content

McFAST v0.1.10

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

Functions currently fully tested for integration:

  • tau_inc_dyn_helper
  • tau_ecc_dyn_helper
  • gw_strain_helper
  • analytical_kick_velocity_helper
  • merged_orb_ecc_helper
  • torque_mig_timescale_helper
  • generate_r
  • shock_luminosity_helper
  • jet_luminosity_helper
  • encounters_prograde_sweep_helper
  • si_from_r_g_helper
  • r_g_from_units_helper
  • r_schwarzschild_of_m_helper

Functions currently in testing for integration: star_wind_mass_loss_helper accrete_star_mass_helper

Example: Tau Incline/Eccentricity

In order to accelerate the tau_inc_dyn and tau_ecc_dyn functions in mcfacts/physics/disk_capture.py, we provide tau_inc_dyn_helper and tau_ecc_dyn_helper functions that perform the vectorized array calculations in an optimized Rust function. The example implementation for tau_inc_dyn_optimized follows: it has the same call signature, takes the same inputs, and provides the same output as tau_inc_dyn, but is 2-3x faster.

This function and its ecc variant can be further optimized by speeding up or eliminating the calls to si_from_r_g, which now make up the bulk of the runtime in each function (approximately 2/3rds).

In particular, the tau_semi_lat functionality in tau_ecc_dyn is sped up at least 120x, with tau_semi_lat initially being timed at 6 seconds, while the tau_ecc_dyn_helper functionality that subsumes it is timed at 0.05 seconds.

def tau_inc_dyn_optimized(smbh_mass, disk_bh_retro_orbs_a, disk_bh_retro_masses, omega, ecc, inc, disk_surf_density_func, r_g_in_meters):
    """Computes inclination damping timescale from actual variables; used only for scaling.
    Uses Rust-accelerated helper functions for the calculation: compare to tau_inc_dyn
    """
    # throw most things into SI units (that's right, ENGINEER UNITS!)
    #    or more locally convenient variable names
    SI_smbh_mass = smbh_mass * u.Msun.to("kg")  # kg
    SI_semi_maj_axis = si_from_r_g(smbh_mass, disk_bh_retro_orbs_a, r_g_defined=r_g_in_meters).to("m").value
    SI_orbiter_mass = disk_bh_retro_masses * u.Msun.to("kg")  # kg
    cos_omega = np.cos(omega)

    disk_surf_res = disk_surf_density_func(disk_bh_retro_orbs_a)

    tau_i_dyn = tau_inc_dyn_helper(SI_smbh_mass, SI_orbiter_mass, ecc, inc, cos_omega, disk_surf_res, SI_semi_maj_axis)

    assert np.isfinite(tau_i_dyn).all(), \
        "Finite check failure: tau_i_dyn"

    return tau_i_dyn

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

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.10.tar.gz (56.9 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.10-cp313-cp313-win_amd64.whl (390.8 kB view details)

Uploaded CPython 3.13Windows x86-64

mcfast-0.1.10-cp313-cp313-manylinux_2_28_x86_64.whl (484.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

mcfast-0.1.10-cp313-cp313-macosx_11_0_arm64.whl (431.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

mcfast-0.1.10-cp313-cp313-macosx_10_12_x86_64.whl (446.8 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

mcfast-0.1.10-cp312-cp312-win_amd64.whl (391.4 kB view details)

Uploaded CPython 3.12Windows x86-64

mcfast-0.1.10-cp312-cp312-manylinux_2_28_x86_64.whl (485.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

mcfast-0.1.10-cp312-cp312-macosx_11_0_arm64.whl (431.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mcfast-0.1.10-cp312-cp312-macosx_10_12_x86_64.whl (447.0 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

mcfast-0.1.10-cp311-cp311-win_amd64.whl (392.4 kB view details)

Uploaded CPython 3.11Windows x86-64

mcfast-0.1.10-cp311-cp311-manylinux_2_28_x86_64.whl (487.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

mcfast-0.1.10-cp311-cp311-macosx_11_0_arm64.whl (434.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mcfast-0.1.10-cp311-cp311-macosx_10_12_x86_64.whl (447.4 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

mcfast-0.1.10-cp310-cp310-win_amd64.whl (392.2 kB view details)

Uploaded CPython 3.10Windows x86-64

mcfast-0.1.10-cp310-cp310-manylinux_2_28_x86_64.whl (487.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

mcfast-0.1.10-cp310-cp310-macosx_11_0_arm64.whl (434.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mcfast-0.1.10-cp310-cp310-macosx_10_12_x86_64.whl (447.4 kB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: mcfast-0.1.10.tar.gz
  • Upload date:
  • Size: 56.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mcfast-0.1.10.tar.gz
Algorithm Hash digest
SHA256 2e504e55c64eeee26d63c3351b7b4b3e804c5ca86de6150f532000cf73b58ae5
MD5 ea0d6a09d6b24fd10b1cb3e93a8130ac
BLAKE2b-256 0855120bdbaf9d0d8e0a97302641d675cbfad16d3be4cd2f12a51dd7b385706b

See more details on using hashes here.

Provenance

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

Publisher: mac.yml on McFACTS/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.10-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: mcfast-0.1.10-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 390.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mcfast-0.1.10-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d4b9d65ae4832527a6395aca2683f9531ed66f2e5a0a85f23a0bd19bb6cfe6e4
MD5 ad06dc4229786f84db189491eb8bdcd6
BLAKE2b-256 c7e86fe97013ce387670f4d64c5b6d82da9b1894811302a119cf2b2c43675749

See more details on using hashes here.

Provenance

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

Publisher: windows.yml on McFACTS/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.10-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.10-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 beed5836c2d56a3c7fed51e5ba1e537098a07234488e8e33183c984171a80121
MD5 29aaf9cbc814b660731da725b1149765
BLAKE2b-256 cb97c81c4cdfa09ad209d2927712a988c17bcb04e2ddfdd743aaf2a7223ce8c8

See more details on using hashes here.

Provenance

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

Publisher: ubuntu.yml on McFACTS/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.10-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.10-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 55160eb951a39d086d8af7b67f17f8da2bcdcf52a524f5e844308a62ff716587
MD5 f32137c0316fdc075acca6ff6c482f44
BLAKE2b-256 a32248aec8e7729d9e03d435f9098c7df53fddb84814fb439c338788b74b33ed

See more details on using hashes here.

Provenance

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

Publisher: mac.yml on McFACTS/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.10-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.10-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 abab0ddd70e0000aefaf846f6f848e4f4ae879f55681c2b8dbf1f7834e947036
MD5 e6002d3b3f0d837a2de1bd89f86f3da1
BLAKE2b-256 336ba60afefce86aa45f1731bf541586103645ea07eab71ca365a602e9827847

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.10-cp313-cp313-macosx_10_12_x86_64.whl:

Publisher: mac_x86.yml on McFACTS/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.10-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: mcfast-0.1.10-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 391.4 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mcfast-0.1.10-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 490a509bb570802a9458cc39f56eb4bdfafc20171922b8267dbfa98aa169b569
MD5 e4aa212541d283fd9394c32024cb32bd
BLAKE2b-256 a9ac08d4d043541b28320b3dc9085983e6a9c1e6bdd50cdf97ed5bd635acfa4c

See more details on using hashes here.

Provenance

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

Publisher: windows.yml on McFACTS/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.10-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.10-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b368dd440bd8b0fde90e1b9bf0b714da65cd6a5869f69e0e5d8780062be8c61f
MD5 b470b2c05ee8ed50cf043b088ea9f43b
BLAKE2b-256 c43228f5caf4fe296efbca12e28e52bf434c30e70f5d58148acb6137e90a3db9

See more details on using hashes here.

Provenance

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

Publisher: ubuntu.yml on McFACTS/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.10-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.10-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 56a259c28f9a5fa36625006777f281197f96b375547ef983752be596540701fb
MD5 888b6ee71722c40e2201e449a8783b86
BLAKE2b-256 5f036220f97142f37604069a8fa7c865b6f9516569e09113093b390f38f02fec

See more details on using hashes here.

Provenance

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

Publisher: mac.yml on McFACTS/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.10-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.10-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4f6f2eda74c482afee24f633926b5d5c5c94d681b8574d01fbd98dfa5486999d
MD5 1871a65c3b0c3dbd8395b4a8c29cc1e4
BLAKE2b-256 55a5bdd7a497e561278c01b0052c0227092c3ac0166e1222726adb5a2dab8aad

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.10-cp312-cp312-macosx_10_12_x86_64.whl:

Publisher: mac_x86.yml on McFACTS/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.10-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: mcfast-0.1.10-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 392.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mcfast-0.1.10-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3b02c0d2f1555174015ae3f604821a674226d1e76bf6c34bcb7854548398bee9
MD5 84f0a966fc14cb0dae688180e07de643
BLAKE2b-256 50afe4ceef558736aa467714ac6cf104e638e6ef54e9318d74cc2b339e225271

See more details on using hashes here.

Provenance

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

Publisher: windows.yml on McFACTS/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.10-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.10-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 06d741de3314d508800e003ea1f1aea343de5c2acf5adf6cc83effa1620ee9e3
MD5 9e63aeaa99cfcf0a27121bfb6429d7f6
BLAKE2b-256 13fadd315f27a08f25ea05030f8a91d6988b5e81e18575b4d603bc20a1d32214

See more details on using hashes here.

Provenance

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

Publisher: ubuntu.yml on McFACTS/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.10-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.10-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f58000f39378fd5677c3af994982eefb0ea479226895dd87d00343e8cc0b480a
MD5 72b1d0aacde9fa1d69aa6e2a612cbc17
BLAKE2b-256 ea1cdbde6f372483bf23f6381e86be72048d5d43e66604a2723c755af33f7e4e

See more details on using hashes here.

Provenance

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

Publisher: mac.yml on McFACTS/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.10-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.10-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0c33b12a4a9c8fd024ddd5e956a0199b8093369278dcf244e920ce40d84bc520
MD5 b6616e99931b0147ed629bcadfd4eeb1
BLAKE2b-256 b612714985b7ebd5f25e27874a689a70f2b877da1c3b8127bb6187f85efa94ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.10-cp311-cp311-macosx_10_12_x86_64.whl:

Publisher: mac_x86.yml on McFACTS/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.10-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: mcfast-0.1.10-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 392.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mcfast-0.1.10-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bc160be03df7fa2e9b55e8b92ee9d9f05fa2bf2bcbdcf0d82c1f6ee3e1c33368
MD5 f7b8579c0670bb541782c26b7d52d1c0
BLAKE2b-256 7e11b0093d354439bed98422c998c033f0fcdb8a940cfd863e5783c70cdb82e9

See more details on using hashes here.

Provenance

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

Publisher: windows.yml on McFACTS/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.10-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.10-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 efdf3a94e1cb71843c7a29b8d8a8a4390aac6dbf8fe2b29f4f9b272d91728629
MD5 ed1b959b177bc4e128f979dda2c5a08b
BLAKE2b-256 ba5560721ca87af7d3ceb8face38406f0a5cc5c349099d0e8850a3a575dffc78

See more details on using hashes here.

Provenance

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

Publisher: ubuntu.yml on McFACTS/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.10-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.10-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4b215a422401281793ca8ddc0a500bec13afe2f4300d7d6fbc799b74873b118a
MD5 1b8417e916c5e90144570d91c0bd1c13
BLAKE2b-256 92d1730a916d32726ff9d891f08740da1aaaea3bc3113edec3338d95aa55421b

See more details on using hashes here.

Provenance

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

Publisher: mac.yml on McFACTS/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.10-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mcfast-0.1.10-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 10e2bfe7d6364c716785fe4c7351b176db00629514e56179c1224b2d90a07a95
MD5 839008cd49e899f748dce98d658d7566
BLAKE2b-256 6669a248cd9396ae2ea1ed5024fa87e0aca34d473f7e9d7888d6b486efbff537

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcfast-0.1.10-cp310-cp310-macosx_10_12_x86_64.whl:

Publisher: mac_x86.yml on McFACTS/mcfast

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

Release history Release notifications | RSS feed

This release

0.1.10 This release

17 files

0.1.9

17 files

0.1.8

17 files

0.1.7

17 files

0.1.6

17 files

0.1.5

17 files

0.1.4

17 files

0.1.3

13 files

0.1.2

13 files

0.1.1

13 files

0.1.0

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page