mirror of
https://github.com/Richard-Sti/csiborgtools_public.git
synced 2025-05-13 14:11:11 +00:00
Add Manticore (#130)
* Add CB2X paths * Update imports * Add CB2 params * Add CB2x fields * Add CB2X field * Add parallelized * Add **kwargs * Update nb * Minor updates
This commit is contained in:
parent
d3b4bfd29c
commit
ffaf92cd4b
8 changed files with 311 additions and 206 deletions
|
@ -126,9 +126,11 @@ def get_field(simname, nsim, kind, MAS, grid):
|
|||
# Open the field reader.
|
||||
if simname == "csiborg1":
|
||||
field_reader = csiborgtools.read.CSiBORG1Field(nsim)
|
||||
elif "csiborg2" in simname:
|
||||
elif "csiborg2_" in simname:
|
||||
simkind = simname.split("_")[-1]
|
||||
field_reader = csiborgtools.read.CSiBORG2Field(nsim, simkind)
|
||||
elif simname == "csiborg2X":
|
||||
field_reader = csiborgtools.read.CSiBORG2XField(nsim)
|
||||
elif simname == "Carrick2015":
|
||||
folder = "/mnt/extraspace/rstiskalek/catalogs"
|
||||
warn(f"Using local paths from `{folder}`.", RuntimeWarning)
|
||||
|
@ -158,9 +160,9 @@ def get_field(simname, nsim, kind, MAS, grid):
|
|||
|
||||
# Read in the field.
|
||||
if kind == "density":
|
||||
field = field_reader.density_field(MAS, grid)
|
||||
field = field_reader.density_field(MAS=MAS, grid=grid)
|
||||
elif kind == "velocity":
|
||||
field = field_reader.velocity_field(MAS, grid)
|
||||
field = field_reader.velocity_field(MAS=MAS, grid=grid)
|
||||
else:
|
||||
raise ValueError(f"Unknown field kind: `{kind}`.")
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
nthreads=1
|
||||
memory=32
|
||||
memory=7
|
||||
on_login=0
|
||||
queue="berg"
|
||||
env="/mnt/users/rstiskalek/csiborgtools/venv_csiborg/bin/python"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue