Add monopole to VF (#136)

* Add monopole sampling

* Add monopole

* Update script

* Bring back zmax

* Add monopole

* Add condition in case division by 0

* Add monopole to field

* Update nb

* Update script

* Update scripts

* Simplify docs
This commit is contained in:
Richard Stiskalek 2024-07-13 21:52:42 +01:00 committed by GitHub
parent 43ebf660ee
commit 68fbd594cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 161 additions and 91 deletions

File diff suppressed because one or more lines are too long

View file

@ -43,6 +43,24 @@ def read_enclosed_density(simname):
return r, overdensity
def read_enclosed_monopole(simname, rmax=155):
fname = join(FDIR, f"enclosed_mass_{simname}.npz")
if exists(fname):
data = np.load(fname)
else:
raise FileNotFoundError(f"File {fname} not found.")
r = data["distances"]
vmono = data["cumulative_velocity_mono"]
mask = r < rmax
r = r[mask]
vmono = vmono[..., mask]
return r, vmono
def read_enclosed_flow(simname):
fname = join(FDIR, f"enclosed_mass_{simname}.npz")