<div dir="ltr">You probably don't want to print it if you're using it in a script, I was just printing it it to illustrate what the data look like. You can use it like any other YTArray instance. You can also cast it to ndarray by doing e.g.:<div><br></div><div>import numpy as np</div><div><br></div><div>data = np.array(phase_data)</div><div><br></div><div>-Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 19, 2015 at 11:13 AM, Madison Fitzgerald <span dir="ltr"><<a href="mailto:fitzg152@msu.edu" target="_blank">fitzg152@msu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Yes, that’s exactly what I’ve been trying to do!<div><br></div><div>So looking at phase_data, how do I expand it so I can see all of the information in it? print phase_data only gives so much information, where a lot of it is hidden with the line of periods. Is there a way I can print it so it will show all of the data (I know this will be very large)?</div><div><br></div><div>Thanks,</div><div>Madison</div><div><br></div><div><div><span class=""><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>Madison Fitzgerald</div><div><br></div><div>Astrophysics | Lyman Briggs College</div><div>Women’s & Gender Studies | College of Arts & Letters</div><div>LGBTQ and Sexuality Studies Specialization</div><div><div>Women in Science, President</div><div>Undergraduate Teaching Assistant</div><div>Department of Physics and Astronomy</div></div><div>Honors College</div><div>Michigan State University</div></div></div></div></div></div></div></div></div>
</div>
<br></span><div><div class="h5"><div><blockquote type="cite"><div>On Oct 19, 2015, at 2:03 PM, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Hi Madison,<div><br></div><div>Take a look at this example here:</div><div><br></div><div><div><a href="https://gist.github.com/f1f0d5c1b2ff2037e7d2" target="_blank">https://gist.github.com/f1f0d5c1b2ff2037e7d2</a></div></div><div><br></div><div>I think the main problem you're having is accessing the profile data using `field_data`. The profile object is designed to have a dictionary-like interface like other yt data objects, so you access the data by doing "profile[bin_field_name]". In your example, the bin field is 'cell_mass', so you would do "profile['cell_mass']".</div><div><br></div><div>See also this page in the docs: <a href="http://yt-project.org/doc/analyzing/generating_processed_data.html?highlight=create_profile#profiles-and-histograms" target="_blank">http://yt-project.org/doc/analyzing/generating_processed_data.html?highlight=create_profile#profiles-and-histograms</a></div><div><br></div><div>HTH,</div><div><br></div><div>Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 19, 2015 at 10:52 AM, Madison Fitzgerald <span dir="ltr"><<a href="mailto:fitzg152@msu.edu" target="_blank">fitzg152@msu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I apologize, it had a lot of unnecessary information that I didn’t know was in that document—I’ve updated my script with comments that highlights more about what I’m trying to do (<a href="http://paste.yt-project.org/show/5987/" target="_blank">http://paste.yt-project.org/show/5987/</a>).<div><br></div><div>Essentially, what I’m trying to do is to take the data stored in plot.profile.field_data.values() and treat it like a YTArray, so I can manipulate it and use it in the same ways that we use other YTArrays. What I ultimately want to do with this is to find the mass at a specific location of radius and entropy on the plot using the plot data output. However, in the current format, I’m not able to do that, and I haven’t been able to figure out a way to make the data within the plot.profile object more accessible.</div><div><br></div><div>Thank you,</div><div><span><div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>Madison Fitzgerald</div><div><br></div><div>Astrophysics | Lyman Briggs College</div><div>Women’s & Gender Studies | College of Arts & Letters</div><div>LGBTQ and Sexuality Studies Specialization</div><div><div>Women in Science, President</div><div>Undergraduate Teaching Assistant</div><div>Department of Physics and Astronomy</div></div><div>Honors College</div><div>Michigan State University</div></div></div></div></div></div></div></div></div>
</div>
<br></span><div><div><div><blockquote type="cite"><div>On Oct 19, 2015, at 1:27 PM, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>> wrote:</div><br><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 19, 2015 at 9:45 AM, Madison Fitzgerald<span> </span><span dir="ltr"><<a href="mailto:fitzg152@msu.edu" target="_blank">fitzg152@msu.edu</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hello,<div><br></div><div>I’m working on accessing the information stored by a phase plot in plot.profile.field_data, but yt recognizes this as a list, so I can’t seem to get the information out of this list to use. </div><div><br></div><div>I’ve attached the script with how I’ve been attempting to access the data (<a href="http://paste.yt-project.org/show/5985/" target="_blank">http://paste.yt-project.org/show/5985/</a>), and then the output and various procedures I’ve tried (<a href="http://paste.yt-project.org/show/5986/" target="_blank">http://paste.yt-project.org/show/5986/</a>).</div></div></blockquote><div><br></div><div>Hi Madison,</div><div><br></div><div>I'm sorry, I'm having a tough time inferring the issue you're having reading the second pastebin.</div><div><br></div><div>Can you explain in words a little bit more exactly what the issue is? It would also help if you expand the first script to get it to the point where you are having your issue, and then explain what information you are trying to get out of the profile object.</div><div><br></div><div>-Nathan</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>I’ve been working on a MacBook Pro, OS X 10.10.5, with yt version 3.2 (installed using miniconda, so no changeset).</div><div><br></div><div>I appreciate any help you might be able to give me.</div><div><br></div><div>Thank you,</div><div><div><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>Madison Fitzgerald</div><div><br></div><div>Astrophysics | Lyman Briggs College</div><div>Women’s & Gender Studies | College of Arts & Letters</div><div>LGBTQ and Sexuality Studies Specialization</div><div><div>Women in Science, President</div><div>Undergraduate Teaching Assistant</div><div>Department of Physics and Astronomy</div></div><div>Honors College</div><div>Michigan State University</div></div></div></div></div></div></div></div></div></div><br></div></div><br>_______________________________________________<br>yt-users mailing list<br><a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br><br></blockquote></div><br></div></div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">_______________________________________________</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">yt-users mailing list</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="mailto:yt-users@lists.spacepope.org" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">yt-users@lists.spacepope.org</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a></div></blockquote></div><br></div></div></div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>yt-users mailing list<br><a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br></div></blockquote></div><br></div></div></div></div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>