Atelier des rouesLab FR
Objects/Documentation

profils15.py

I provide this item for reproducing the counts, decisions and checks.

Download ↓
"""Independent numerical controls for the released collision-free limit profiles."""
import json
from itertools import product
from math import erf, exp, factorial, fsum, log1p, prod, sqrt


def poisson(rate, n):
    return exp(-rate) * rate**n / factorial(n)


def tv_counts(left, right):
    # Direct TV on the product counts; the omitted mass is below 1e-16 here.
    ns = range(40)
    cells = [[(poisson(a,n),poisson(b,n)) for n in ns] for a,b in zip(left,right)]
    return fsum(abs(prod(s for s,_ in terms)-prod(j for _,j in terms))
                for terms in product(*cells))/2

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.