tberlok / paicos

An object-oriented Python package for analysis of (cosmological) simulations performed with Arepo
GNU General Public License v3.0
11 stars 3 forks source link

changed cubic and spherical region selection #67

Closed LorenzoLMP closed 7 months ago

LorenzoLMP commented 7 months ago

Region selection in paicos/cython/get_index_of_region.pyx changed from

if (x < (sidelength_x + thickness[ip])/2.0) and (x > -(sidelength_x + thickness[ip])/2.0):

to

if (x < (sidelength_x/2.0 + thickness[ip])) and (x > -(sidelength_x/2.0 + thickness[ip])):

for better clarity. Similarly in get_radial_range_plus_thin_layer the selection has been changed from

if (r2 < (r2_max + thickness[ip])) and (r2 > (r2_min - thickness[ip])):

so that

r2_min = (r_min - thickness[ip])*(r_min - thickness[ip]) r2_max = (r_max + thickness[ip])*(r_max + thickness[ip])