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:
Richard Stiskalek 2024-06-21 19:21:06 +01:00 committed by GitHub
parent d3b4bfd29c
commit ffaf92cd4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 311 additions and 206 deletions

View file

@ -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}`.")

View file

@ -1,5 +1,5 @@
nthreads=1
memory=32
memory=7
on_login=0
queue="berg"
env="/mnt/users/rstiskalek/csiborgtools/venv_csiborg/bin/python"