Re: yt-users Digest, Vol 127, Issue 6
Hello Mat, Ok. I will report it on the github site. Cheers, El jue., 13 sept. 2018 a las 11:01, <yt-users-request@python.org> escribió:
Send yt-users mailing list submissions to yt-users@python.org
To subscribe or unsubscribe via the World Wide Web, visit https://mail.python.org/mm3/mailman3/lists/yt-users.python.org/ or, via email, send a message with subject or body 'help' to yt-users-request@python.org
You can reach the person managing the list at yt-users-owner@python.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of yt-users digest..."
Today's Topics:
1. Point function not working for negative coordinates (Guido granda muñoz) 2. Re: Point function not working for negative coordinates (Matthew Turk)
----------------------------------------------------------------------
Date: Wed, 12 Sep 2018 17:47:31 -0500 From: Guido granda muñoz <guidogranda@gmail.com> Subject: [yt-users] Point function not working for negative coordinates To: yt-users@python.org Message-ID: < CALOHZ_28Yh_4gVR53jZhdNUzCCM9C4PsU2-5UineUcyQdexGQA@mail.gmail.com> Content-Type: multipart/alternative; boundary="000000000000e2ae280575b46045"
--000000000000e2ae280575b46045 Content-Type: text/plain; charset="UTF-8"
Hello yt users,
I have been trying to obtain density values at different points using point data object. The problem is that this function does not work for negative coordinates regardless the fact that the computational domain contains those coordinates.
This is the error I got:
Entering folder ./lr_teq_p_3_nk4 Using rho_0: 6.372606e-24 Using 5.0 snapshots yt : [INFO ] 2018-09-12 17:34:34,371 Parameters: current_time = 0.0 yt : [INFO ] 2018-09-12 17:34:34,371 Parameters: domain_dimensions = [256 256 256] yt : [INFO ] 2018-09-12 17:34:34,372 Parameters: domain_left_edge = [ -1.54283920e+19 -1.54283920e+19 -1.54283920e+19] yt : [INFO ] 2018-09-12 17:34:34,372 Parameters: domain_right_edge = [ 1.54283920e+19 1.54283920e+19 1.54283920e+19] yt : [INFO ] 2018-09-12 17:34:34,372 Parameters: cosmological_simulation = 0.0 domain: [ 10.00000265 10.00000265 10.00000265] pc YTPoint (lr_hdf5_plt_cnt_0000): , p=[ 1. 1. -0.001] cm [] g/cm**3 --------------------------------------------------------------------------- ValueError Traceback (most recent call last) /share/Part1/guido/w_profile2.py in <module>() 84 print(point) 85 print(point['gas','density']) ---> 86 dens_array[snap_order,ipoint]=point['gas','density'] 87 ipoint=ipoint+1 88 print("time :",time)
ValueError: setting an array element with a sequence.
As you can see, the point p=[ 1. 1. -0.001] cm belongs to the computational domain. When I only use positive coordinates the code runs well. Correct me if I am wrong, but I think this is a bug. Do you guys know another way to get values of any field at a fixed point?
Cheers, -- Guido
--000000000000e2ae280575b46045 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div dir=3D"ltr">Hello yt users,<div><br></div><div>I have= been trying to obtain density values at different points using point data = object. The problem is that this function does not work for negative coordi= nates regardless the fact that the computational domain contains those coor= dinates.</div><div><br></div><div>This is the error I got:</div><div><br></= div><div><div>Entering folder ./lr_teq_p_3_nk4</div><div>Using rho_0: 6.372= 606e-24=C2=A0</div><div>Using 5.0 snapshots</div><div>yt : [INFO=C2=A0 =C2= =A0 =C2=A0] 2018-09-12 17:34:34,371 Parameters: current_time=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D 0.0</div><div>yt : [INFO=C2=A0 =C2= =A0 =C2=A0] 2018-09-12 17:34:34,371 Parameters: domain_dimensions=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0=3D [256 256 256]</div><div>yt : [INFO=C2=A0 =C2=A0= =C2=A0] 2018-09-12 17:34:34,372 Parameters: domain_left_edge=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =3D [ -1.54283920e+19=C2=A0 -1.54283920e+19=C2=A0 -1.5= 4283920e+19]</div><div>yt : [INFO=C2=A0 =C2=A0 =C2=A0] 2018-09-12 17:34:34,= 372 Parameters: domain_right_edge=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D [=C2= =A0 1.54283920e+19=C2=A0 =C2=A01.54283920e+19=C2=A0 =C2=A01.54283920e+19]</= div><div>yt : [INFO=C2=A0 =C2=A0 =C2=A0] 2018-09-12 17:34:34,372 Parameters= : cosmological_simulation=C2=A0 =C2=A0=3D 0.0</div><div>domain: [ 10.000002= 65=C2=A0 10.00000265=C2=A0 10.00000265] pc</div><div>YTPoint (lr_hdf5_plt_c= nt_0000): , p=3D[ 1.=C2=A0 =C2=A0 =C2=A01.=C2=A0 =C2=A0 -0.001] cm</div><di= v>[] g/cm**3</div><div>----------------------------------------------------= -----------------------</div><div>ValueError=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 Traceback (most recent call last)</div><div>/share/Part1/guido/w_pro= file2.py in <module>()</div><div>=C2=A0 =C2=A0 =C2=A084=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 print(point)</div><div>=C2=A0 =C2=A0 =C2=A085=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 print(po= int['gas','density'])</div><div>---> 86=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 d=
ens_array[snap_order,ipoint]=3Dpoint['gas','density']</div>= <div>=C2=A0 =C2=A0 =C2=A087=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ipoint=3Dipoint+1</div><div>=C2= =A0 =C2=A0 =C2=A088=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0print("time :&quo= t;,time)</div><div><br></div><div>ValueError: setting an array element with= a sequence.</div><div><br></div><div>As you can see, the point p=3D[ 1.=C2= =A0 =C2=A0 =C2=A01.=C2=A0 =C2=A0 -0.001] cm belongs to the computational do= main. When I only use positive coordinates the code runs well. Correct me i= f I am wrong, but I think this is a bug. Do you guys know another way to ge= t values of any field at a fixed point?</div><div><br></div><div>Cheers,</d= iv>-- <br><div dir=3D"ltr" class=3D"gmail_signature">Guido</div></div></div=
</div>
--000000000000e2ae280575b46045--
------------------------------
Date: Thu, 13 Sep 2018 10:53:29 -0500 From: Matthew Turk <matthewturk@gmail.com> Subject: [yt-users] Re: Point function not working for negative coordinates To: Discussion of the yt analysis package <yt-users@python.org> Message-ID: <CALO3=5E21MrkThu+MQPK4EFsoBLBEybUNzF35bHRnDG= Y9f5gQ@mail.gmail.com> Content-Type: text/plain; charset="UTF-8"
Hi Guido,
This looks like a bug to me! Can you file an issue and we'll discuss there? I think I have an idea how to fix it, but having the issue to discuss would be great.
https://github.com/yt-project/yt/issues/new
-Matt On Wed, Sep 12, 2018 at 5:49 PM Guido granda muñoz <guidogranda@gmail.com> wrote:
Hello yt users,
I have been trying to obtain density values at different points using
point data object. The problem is that this function does not work for negative coordinates regardless the fact that the computational domain contains those coordinates.
This is the error I got:
Entering folder ./lr_teq_p_3_nk4 Using rho_0: 6.372606e-24 Using 5.0 snapshots yt : [INFO ] 2018-09-12 17:34:34,371 Parameters: current_time
= 0.0
yt : [INFO ] 2018-09-12 17:34:34,371 Parameters: domain_dimensions = [256 256 256] yt : [INFO ] 2018-09-12 17:34:34,372 Parameters: domain_left_edge = [ -1.54283920e+19 -1.54283920e+19 -1.54283920e+19] yt : [INFO ] 2018-09-12 17:34:34,372 Parameters: domain_right_edge = [ 1.54283920e+19 1.54283920e+19 1.54283920e+19] yt : [INFO ] 2018-09-12 17:34:34,372 Parameters: cosmological_simulation = 0.0 domain: [ 10.00000265 10.00000265 10.00000265] pc YTPoint (lr_hdf5_plt_cnt_0000): , p=[ 1. 1. -0.001] cm [] g/cm**3
---------------------------------------------------------------------------
ValueError Traceback (most recent call last) /share/Part1/guido/w_profile2.py in <module>() 84 print(point) 85 print(point['gas','density']) ---> 86 dens_array[snap_order,ipoint]=point['gas','density'] 87 ipoint=ipoint+1 88 print("time :",time)
ValueError: setting an array element with a sequence.
As you can see, the point p=[ 1. 1. -0.001] cm belongs to the computational domain. When I only use positive coordinates the code runs well. Correct me if I am wrong, but I think this is a bug. Do you guys know another way to get values of any field at a fixed point?
Cheers, -- Guido _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
------------------------------
Subject: Digest Footer
_______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
------------------------------
End of yt-users Digest, Vol 127, Issue 6 ****************************************
-- Guido
participants (1)
-
Guido granda muñoz