Guys, Sorry for multiple question, here is another simple one. I have a dataset d for which I create a sphere: s = d.sphere([x0,y0,z0],r0) vcen = s.quantities.bulk_velocity() s.set_field_parameter("bulk_velocity",vcen) It is located somewhere in the box: print(x0,y0,z0)
0.04789762673404803 Mpc 4.396788395087413 Mpc 0.9398923037682868 Mpc
Now I would like to find the location of the max density for some field. When I try this: print(s.quantities.max_location(('deposit', 'STAR_density'))) print(s.quantities.max_location(('gas', 'density'))) print(s.quantities.max_location(('deposit', 'N-BODY_density'))) I get non-nonsensical values: [1.1195988056992701e-21 g/cm**3, 1.3408203125 cm, 117.7998046875 cm, 25.3603515625 cm] [1.3058663046178781e-20 g/cm**3, 1.3408203125 cm, 117.8017578125 cm, 25.3603515625 cm] [1.73680472946578e-20 g/cm**3, 1.3896484375 cm, 117.7919921875 cm, 25.3271484375 cm] Density values are ok, but positions surely cannot be measured in a small number of cm. Given that in code units the box size is 128, it seems like locations are returned in code units but interpreted as cm. n
participants (2)
-
Nathan Goldbaum
-
Nick Gnedin