Add cleaner paths (#43)

* ignore venv

* ignore pylians if unavaible

* Edit loading paths

* Edit paths

* Stop having default paths

* Add nb

* Add glamdring paths

---------

Co-authored-by: Richard Stiskalek <dc-stis1@login8b.pri.cosma7.alces.network>
Co-authored-by: Richard Stiskalek <dc-stis1@login8a.pri.cosma7.alces.network>
This commit is contained in:
Richard Stiskalek 2023-04-14 23:24:52 +01:00 committed by GitHub
parent 1344fa40b6
commit e0d3854277
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1421 additions and 50 deletions

View file

@ -34,7 +34,7 @@ comm = MPI.COMM_WORLD
rank = comm.Get_rank()
nproc = comm.Get_size()
paths = csiborgtools.read.CSiBORGPaths()
paths = csiborgtools.read.CSiBORGPaths(**csiborgtools.paths_glamdring)
dumpdir = "/mnt/extraspace/rstiskalek/csiborg/"
loaddir = join(dumpdir, "temp")
cols_collect = [("npart", numpy.int64), ("totpartmass", numpy.float64),
@ -118,8 +118,7 @@ for i, nsim in enumerate(paths.ic_ids(tonew=False)):
out_collected = csiborgtools.read.combine_splits(
utils.Nsplits, nsnap, nsim, partreader, cols_collect,
remove_splits=True, verbose=False)
fname = join(paths.dumpdir, "ramses_out_{}_{}.npy"
.format(str(nsim).zfill(5), str(nsnap).zfill(5)))
fname = paths.hcat_path(nsim)
print("Saving results to `{}`.".format(fname))
numpy.save(fname, out_collected)