<div dir="ltr">Hi Nathan!<div><br></div><div>Okay, so the linewidth problem is just a small edit:  instead of </div><div><br></div><div>lw = ['2']</div><div>it needs to be set as </div><div>lw = [2]</div><div>--not sure why that changed, but not a big deal.  I can't remember or find if the first version is in the docs or if I got it some other way.</div><div><br></div><div>I have submitted the other issue as a bug report with the working and failing scripts attached!  </div><div><br></div><div>Thanks!  Best,</div><div>Stephanie</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><font face="garamond,serif">--<br>Dr. Stephanie Tonnesen<br></font></div></div><div><font face="garamond,serif">Associate Research Scientist</font></div><div><font face="garamond,serif">CCA, Flatiron Institute</font></div><div><font face="garamond,serif">New York, NY</font></div><font face="garamond,serif"><br></font></div><font face="garamond,serif"><a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a><br></font></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, Nov 6, 2017 at 5:17 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>These both sound like bugs. Can you please open two issues on github so we don't lose track? Please also use datasets from <a href="http://yt-project.org/data" target="_blank">yt-project.org/data</a> or include links to outputs so we can reproduce the issues locally.<br><br></div>-Nathan<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Nov 6, 2017 at 3:59 PM, Stephanie Tonnesen <span dir="ltr"><<a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi yt-users!<div><br></div><div>I have two ProfilePlot issues.  I have updated to yt version 3.5 dev0 to try and get the standard_error on a ProfilePlot, but now am running into other problems.  Basically, I am trying to get the same result two ways, and have run into two problems.</div><div><br></div><div>1)  The linewidth call no longer works.  This code worked in my old yt version, but now gives me an error unless I take out the linewidth command:</div><div><br></div><div><div>profiles = []</div><div>labels = []</div><div>plot_specs = []</div><div>linest = ['-','--','-.','-','--']</div><div>cols = ['red','red','red','green','gr<wbr>een']</div><div>lws = ['2','2','2','2','2']</div><div><br></div><div>i =0</div><div>while i < len(loop):</div><div>    ds = yt.load("/mnt/ceph/users/stonn<wbr>esen/data1/"+loopfile[i]+"/DD"<wbr>+loop[i]+"/"+loopfile[i]+loop[<wbr>i])</div><div>    disk = ds.disk([0.5,0.5,0.5],[0,0,-1.<wbr>0],(40,"kpc"),(2,"kpc"))</div><div><br></div><div><br></div><div>    profiles.append(yt.create_prof<wbr>ile(</div><div>    data_source=disk,</div><div>    bin_fields=["radius"],</div><div>    fields=["density"],</div><div>    n_bins=52,</div><div>    units=dict(radius="kpc",</div><div>               density="g/cm**3"),</div><div>    logs=dict(radius=False),</div><div>    weight_field='ones',</div><div>    extrema=dict(radius=(0,40)),</div><div>    ))</div><div>    labels.append("%s" % looptext[i])</div><div>    plot_specs.append(dict(linesty<wbr>le=linest[i],linewidth=lws[i],<wbr>color=cols[i]))</div><div>    </div><div>    </div><div>    i = i+1</div><div><br></div><div>plot = yt.ProfilePlot.from_profiles(p<wbr>rofiles,labels=labels,plot_spe<wbr>cs=plot_specs)</div><div>plot.set_ylim('density',1e-27,<wbr>1e-22)</div><div>plot.save()</div></div><div><div><br></div><div>I get this error:</div><div><div>yt : [INFO     ] 2017-11-06 16:44:12,585 Gathering a field list (this may take a moment.)</div><div>Traceback (most recent call last):</div><div>  File "yt_diskprofile_oplotdiffruns.<wbr>py", line 61, in <module></div><div>    plot = yt.ProfilePlot.from_profiles(p<wbr>rofiles,labels=labels,plot_spe<wbr>cs=plot_specs)</div><div>  File "/mnt/home/stonnesen/yt-conda/<wbr>yt/yt/visualization/profile_pl<wbr>otter.py", line 443, in from_profiles</div><div>    return cls._initialize_instance(obj, profiles, labels, plot_specs, y_log)</div><div>  File "/mnt/home/stonnesen/yt-conda/<wbr>yt/yt/visualization/profile_pl<wbr>otter.py", line 393, in _initialize_instance</div><div>    obj._setup_plots()</div><div>  File "/mnt/home/stonnesen/yt-conda/<wbr>yt/yt/visualization/profile_pl<wbr>otter.py", line 355, in _setup_plots</div><div>    label=self.label[i], **self.plot_spec[i])</div><div>  File "/mnt/xfs1/home/stonnesen/yt-c<wbr>onda/lib/python3.6/site-packag<wbr>es/matplotlib/__init__.py", line 1710, in inner</div><div>    return func(ax, *args, **kwargs)</div><div>  File "/mnt/xfs1/home/stonnesen/yt-c<wbr>onda/lib/python3.6/site-packag<wbr>es/matplotlib/axes/_axes.py", line 1437, in plot</div><div>    for line in self._get_lines(*args, **kwargs):</div><div>  File "/mnt/xfs1/home/stonnesen/yt-c<wbr>onda/lib/python3.6/site-packag<wbr>es/matplotlib/axes/_base.py", line 404, in _grab_next_args</div><div>    for seg in self._plot_args(this, kwargs):</div><div>  File "/mnt/xfs1/home/stonnesen/yt-c<wbr>onda/lib/python3.6/site-packag<wbr>es/matplotlib/axes/_base.py", line 394, in _plot_args</div><div>    seg = func(x[:, j % ncx], y[:, j % ncy], kw, kwargs)</div><div>  File "/mnt/xfs1/home/stonnesen/yt-c<wbr>onda/lib/python3.6/site-packag<wbr>es/matplotlib/axes/_base.py", line 301, in _makeline</div><div>    seg = mlines.Line2D(x, y, **kw)</div><div>  File "/mnt/xfs1/home/stonnesen/yt-c<wbr>onda/lib/python3.6/site-packag<wbr>es/matplotlib/lines.py", line 396, in __init__</div><div>    self.set_linestyle(linestyle)</div><div>  File "/mnt/xfs1/home/stonnesen/yt-c<wbr>onda/lib/python3.6/site-packag<wbr>es/matplotlib/lines.py", line 1115, in set_linestyle</div><div>    self._us_dashOffset, self._us_dashSeq, self._linewidth)</div><div>  File "/mnt/xfs1/home/stonnesen/yt-c<wbr>onda/lib/python3.6/site-packag<wbr>es/matplotlib/lines.py", line 69, in _scale_dashes</div><div>    scaled_offset = offset * lw</div><div>TypeError: can't multiply sequence by non-int of type 'float'</div><div><br></div><div><br></div><div>2)  the plot copying the cookbook example (<a href="http://yt-project.org/doc/cookbook/simple_plots.html?highlight=profileplot%20standard%20deviation" target="_blank">http://yt-project.org/doc/coo<wbr>kbook/simple_plots.html?highli<wbr>ght=profileplot%20standard%<wbr>20deviation</a>) is giving me 0s and nans instead of the correct values:</div><div><br></div><div><div>profiles = []</div><div>labels = []</div><div>plot_specs = []</div><div>linest = ['-','--','-.','-','--']</div><div>cols = ['red','red','red','green','gr<wbr>een']</div><div>lw = ['2','2','2','2','2']</div><div><br></div><div>i =0</div><div>while i < len(loop):</div><div>    ds = yt.load("/mnt/ceph/users/stonn<wbr>esen/data1/"+loopfile[i]+"/DD"<wbr>+loop[i]+"/"+loopfile[i]+loop[<wbr>i])</div><div>    disk = ds.disk([0.5,0.5,0.5],[0,0,-1.<wbr>0],(40,"kpc"),(2,"kpc"))</div><div>    </div><div>    prof = yt.create_profile(disk,'radius<wbr>',('gas','density'), units={'radius':'kpc'}, extrema={'radius':((0.0,'kpc')<wbr>,(40.0,'kpc'))},weight_field='<wbr>ones')</div><div>    </div><div>    radius = prof.x</div><div>    mean = prof['gas','density']</div><div>    std = prof.standard_deviation['gas',<wbr>'density']</div><div>    plt.semilogy(radius,mean,color<wbr>=cols[i])#,linewidth=lw[i],<wbr>linestyle=linest[i])</div><div>    print (mean)</div><div>    print (radius)</div><div>    </div><div>    labels.append("%s" % looptext[i])</div><div>    i = i+1</div><div><br></div><div>plt.ylim(1e-27,1e-21)</div><div>plt.xlabel('r (kpc)')</div><div>plt.ylabel(r'density')</div><div>plt.legend()</div><div>plt.savefig('density_profiles_<wbr>gasmassmatch.png')</div><div>plt.clf()</div><div><br></div></div><div>The mean values are all zero, and the radius values are all nan. The code will finish (unless I use the linewidth command), but of course the plots have nothing on them!!</div><div><br></div><div>Any ideas for these issues?  I would be happy to send my full scripts or output files. </div><div><br></div><div>Thanks!</div><div>Stephanie</div><div><br></div><div><div class="m_4636770714382322418m_-6722959640739144651gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><font face="garamond,serif">--<br>Dr. Stephanie Tonnesen<br></font></div></div><div><font face="garamond,serif">Associate Research Scientist</font></div><div><font face="garamond,serif">CCA, Flatiron Institute</font></div><div><font face="garamond,serif">New York, NY</font></div><font face="garamond,serif"><br></font></div><font face="garamond,serif"><a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a><br></font></div></div></div></div></div></div></div>
</div></div></div>
<br></div></div>______________________________<wbr>_________________<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/lis<wbr>tinfo.cgi/yt-users-spacepope.<wbr>org</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
<br></blockquote></div><br></div>