
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
UNSIOTOOLS contains a collection of unsio based programs and depends of the Nemo package. You have access to falcON algorithm to compute density and gravity.
pip install python-unsiotools -U
# Help on falcON class
pydoc unsiotools.simulations.cfalcon
import unsio.input as uns_in # unsio reading module
import unsiotools.simulations.cfalcon as falcon
myfile="/home/jcl/output_00004" # input RAMSES simulation
# we instantiate a CUNS_IN object
my_in=uns_in.CUNS_IN(myfile,"halo") # We select components HALO
#
# Reading
#
if my_in.nextFrame(): # load snapshot
# read halo positions
status,pos=my_in.getData("halo","pos")
# read halo mass
status,mass=my_in.getData("halo","mass")
# read time simulation
status,timex=my_in.getData("time")
# compute density
cf=falcon.CFalcon()
ok,rho,hsml=cf.getDensity(pos,mass)
print("Rho=",rho)
# compute gravity
eps=0.05 # softening
ok,acc,phi=cf.getGravity(pos,mass,eps)
print (ok,acc,phi)
import unsiotools.simulations.cfalcon as falcon
import numpy as np
pos=np.float32(np.random.random_sample((300,)))
mass=np.float32(np.random.random_sample((100,)))
cf=falcon.CFalcon()
# density
ok,rho,hsml=cf.getDensity(pos,mass)
print(f"ok={ok}\nrho={rho}")
# gravity
eps=0.05
ok,acc,phi=cf.getGravity(pos,mass,eps)
print (f"ok={ok}\nacc={acc}\nphi={phi}")
UNSIOTOOLS is open source and released under the terms of the CeCILL2 Licence
PLease visit :
Copyright Jean-Charles LAMBERT
Jean-Charles.Lambert_at_lam.fr
FAQs
Python wrapper to unsiotools
We found that python-unsiotools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.