Update init matching procedure (#50)

* pep8

* fix convention

* Update script

* enforce optimisation boundaries to be finite

* Update TODO

* Remove sky matching

* FIx a small bug

* fix bug

* Remove import

* Add halo fitted quantities

* Update nbs

* update README

* Add load_initial comments

* Rename nbs

* Delete nb

* Update imports

* Rename function

* Update matcher

* Add overlap paths

* Update the matching script

* Update verbosity

* Add verbosity flags

* Simplify make_bckg_delta

* bug fix

* fix bug

* lala

* la

* Add overlap paths

* Update limit

* pep8

* Some pep8 stuff

* pep8

* Minor corrections

* Update paths

* Add number of particles check

* Fix bug

* pep8 comments
This commit is contained in:
Richard Stiskalek 2023-04-29 14:38:21 +01:00 committed by GitHub
parent c14be720b5
commit b5fefe4196
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 24 deletions

View file

@ -93,7 +93,7 @@ for i, nsim in enumerate(paths.get_ics(tonew=True)):
# the end save these.
cat = csiborgtools.read.ClumpsCatalogue(nsim, paths, load_fitted=False,
rawdata=True)
parent_ids = cat["index"][cat.ismain][:500]
parent_ids = cat["index"][cat.ismain]
jobs = csiborgtools.fits.split_jobs(parent_ids.size, nproc)[rank]
for i in tqdm(jobs) if verbose else jobs:
clid = parent_ids[i]
@ -101,6 +101,9 @@ for i, nsim in enumerate(paths.get_ics(tonew=True)):
mmain_mask = numpy.isin(clump_ids, mmain_indxs, assume_unique=True)
mmain_particles = part0[mmain_mask]
# If the number of particles is too small, we skip this halo.
if mmain_particles.size < 100:
continue
raddist, cmpos = csiborgtools.match.dist_centmass(mmain_particles)
patchsize = csiborgtools.match.dist_percentile(raddist, [99],