<div dir="ltr"><div><div><div><div><div><div><div><div>Hello users,<br><br></div>    I've recently been using yt to plot gas and star Flash runs where the particle size is proportional to the log of the mass. I've noticed that using the annotate_particles method is occasionally seems to be giving me the wrong masses. <br><br>Here's a plot with the annotate_particles method:<br><br><span style="font-family:monospace">ds = yt.load("./Runs/ProbStars/data/turbsph_hdf5_plt_cnt_0021")<br><br>gr = yt.ProjectionPlot(ds, 'x', 'dens')<br><br>gr.annotate_particles(ds.domain_width[0],<br>                      p_size=np.multiply(20.0,np.log10(dd['particle_mass'].in_units('Msun').v)),<br>                      col='b')<br><br>gr.annotate_timestamp(corner='upper_left')<br>gr.zoom(5)<br>gr.save('ann_part_test.png')<br>gr.show()</span><br><br></div>Here's the plot:<br><br><img src="cid:1587e44efd9ee5ac3bb1" alt="ann_part_test.png" style="max-width: 100%; opacity: 1;" class=""><br><br></div>And if I manually add the stars (also, I'm not sure why I have to call proj.show() before the scatter plot to get this to work...):<br><br><span style="font-family:monospace">proj = yt.ProjectionPlot(ds, 'x', 'dens')<br><br>proj.show()<br><br>dens_plot = proj.plots['dens']<br><br><br>proj_ax = dens_plot.axes<br>fig = dens_plot.figure<br><br>proj_ax.scatter(dd['particle_position_y'].in_units('pc').v,<br>            dd['particle_position_z'].in_units('pc').v,<br>            s=np.multiply(20.0,np.log10(dd['particle_mass'].in_units('Msun').v)), c='k')<br><br><br>proj_ax.set_xlim(-1.0, 1.0)<br>proj_ax.set_ylim(-1.0, 1.0)<br><br><br>proj.show()<br><br>proj.save('man_ann_part.png')<br><br></span></div><span style="font-family:monospace"><font face="sans-serif">Here's the plot for this (which has the correct sized particles, note the one closest to 0,0 is about 1.4 Msun and much smaller in the plot below):<br><br><img src="cid:1587e471ae5cf74d9112" alt="man_ann_part.png" style="max-width: 100%; opacity: 1;" class=""><br><br></font></span></div><span style="font-family:monospace"><font face="sans-serif">I am currently re-writing my plotting routines (which I use to make movies) to account for this, but it is a lot uglier this way, especially since I run on a cluster without display and don't want to have to call proj.show() before I call for the scatter plot. I'm guessing I can probably also just call proj.save() twice with the same effect, but I haven't tested it yet.<br><br></font></span></div><span style="font-family:monospace"><font face="sans-serif">Any assistance would be appreciated, and thanks!<br><br></font></span></div><span style="font-family:monospace"><font face="sans-serif">Cordially,<br><br></font></span></div><span style="font-family:monospace"><font face="sans-serif">Josh Wall<br></font></span><div><div><div><div><span style="font-family:monospace"><font face="sans-serif"><br></font></span></div></div></div></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div><div><div><div>Joshua Wall<br></div>Doctoral Candidate<br></div>Department of Physics<br></div>Drexel University<br></div>3141 Chestnut Street<br></div>Philadelphia, PA 19104<br></div></div>