Hi Nathan,

I don’t think I was on the stable version before?  But I don’t know what my old version was, unfortunately. I might have done Git stash on it, so may be able to go back and see....not terribly optimistic though....

On Wed, Oct 3, 2018 at 11:41 PM Nathan Goldbaum <nathan12343@gmail.com> wrote:
Hi Stephanie,

Thanks for reporting the regression. If this works on stable but not on dev it’s due to a bug. Can you open an issue on Github? We can follow up there.

Nathan

On Wed, Oct 3, 2018 at 10:28 PM Stephanie Tonnesen <stonnes@gmail.com> wrote:
Hi all,

I updated my yt dev so that I could fix a problem with the clump finder, and now a simple phaseplot script that I have been using is failing. It seems to claim that there is no mass in the cut_region I am using, even though there clearly is (as shown in total_quantity).  

If anyone has some ideas I would really appreciate it!!

Thanks,
Stephanie

Here is the script:

import sys
import numpy as np
import yt

ds = yt.load("/mnt/ceph/users/stonnesen/runs/IsolatedGalaxy/galaxy0030/galaxy0030")
logs = {('index','cylindrical_r'):False}
logs = {('gas','velocity_z'):False}
logs = {('gas','velocity_cylindrical_radius'):False}
logs = {('gas','velocity_cylindrical_theta'):False}
logs = {('index','z'):False}

ds.index
ds.field_info['gas','velocity_z'].take_log = False
    
ad = ds.all_data()

densegas24 = ad.cut_region("obj['density'] > 1e-24")
densegas5e24 = ad.cut_region("obj['density'] > 5e-24")
densegas25 = ad.cut_region("obj['density'] > 2e-25")


print (ds.field_list)
print (densegas24.quantities.total_quantity(["cell_mass"]))
    
plot21 = yt.PhasePlot(densegas24,"z","velocity_z",["cell_mass"],weight_field=None)
plot21.set_unit('z','kpc')
plot21.save('IG_densegas24_zvz_0030')

__________
And then the output seems to claim that there is no positive values of cell_mass, despite the fact that when I do total_quantity I have some mass:

yt : [INFO     ] 2018-10-03 23:18:17,529 Parameters: current_time              = 0.0060000200028298
yt : [INFO     ] 2018-10-03 23:18:17,529 Parameters: domain_dimensions         = [32 32 32]
yt : [INFO     ] 2018-10-03 23:18:17,530 Parameters: domain_left_edge          = [ 0.  0.  0.]
yt : [INFO     ] 2018-10-03 23:18:17,530 Parameters: domain_right_edge         = [ 1.  1.  1.]
yt : [INFO     ] 2018-10-03 23:18:17,531 Parameters: cosmological_simulation   = 0.0
Parsing Hierarchy : 100%|ââââââââââ| 173/173 [00:00<00:00, 9414.27it/s]
yt : [INFO     ] 2018-10-03 23:18:17,565 Gathering a field list (this may take a moment.)
yt : [WARNING  ] 2018-10-03 23:18:20,923 Profiled field ('gas', 'cell_mass') has no positive values.  Max = 0.000000.
yt : [WARNING  ] 2018-10-03 23:18:20,923 Switching to linear colorbar scaling.
[('all', 'creation_time'), ('all', 'dynamical_time'), ('all', 'metallicity_fraction'), ('all', 'particle_index'), ('all', 'partic
le_mass'), ('all', 'particle_position_x'), ('all', 'particle_position_y'), ('all', 'particle_position_z'), ('all', 'particle_type
'), ('all', 'particle_velocity_x'), ('all', 'particle_velocity_y'), ('all', 'particle_velocity_z'), ('enzo', 'Average_creation_ti
me'), ('enzo', 'Bx'), ('enzo', 'By'), ('enzo', 'Bz'), ('enzo', 'Cooling_Time'), ('enzo', 'Dark_Matter_Density'), ('enzo', 'Densit
y'), ('enzo', 'Electron_Density'), ('enzo', 'Forming_Stellar_Mass_Density'), ('enzo', 'Galaxy1Colour'), ('enzo', 'Galaxy2Colour')
, ('enzo', 'HII_Density'), ('enzo', 'HI_Density'), ('enzo', 'HeIII_Density'), ('enzo', 'HeII_Density'), ('enzo', 'HeI_Density'), 
('enzo', 'MBHColour'), ('enzo', 'Metal_Density'), ('enzo', 'PhiField'), ('enzo', 'Phi_pField'), ('enzo', 'SFR_Density'), ('enzo',
 'Star_Particle_Density'), ('enzo', 'Temperature'), ('enzo', 'TotalEnergy'), ('enzo', 'gammaHI'), ('enzo', 'kphHI'), ('enzo', 'kp
hHeI'), ('enzo', 'kphHeII'), ('enzo', 'x-velocity'), ('enzo', 'y-velocity'), ('enzo', 'z-velocity'), ('io', 'creation_time'), ('i
o', 'dynamical_time'), ('io', 'metallicity_fraction'), ('io', 'particle_index'), ('io', 'particle_mass'), ('io', 'particle_positi
on_x'), ('io', 'particle_position_y'), ('io', 'particle_position_z'), ('io', 'particle_type'), ('io', 'particle_velocity_x'), ('i
o', 'particle_velocity_y'), ('io', 'particle_velocity_z')]
2.02242737915223e+42 g
Traceback (most recent call last):
  File "yt_phaseplots_densegas2.py", line 46, in <module>
    plot21.save('IG_densegas24_zvz_0030')
  File "/mnt/home/stonnesen/yt-conda/yt/yt/visualization/plot_container.py", line 93, in newfunc
    args[0]._setup_plots()
  File "/mnt/home/stonnesen/yt-conda/yt/yt/visualization/profile_plotter.py", line 1077, in _setup_plots
    fig, axes, cax)
  File "/mnt/home/stonnesen/yt-conda/yt/yt/visualization/profile_plotter.py", line 1559, in __init__
    zlim, cmap)
  File "/mnt/home/stonnesen/yt-conda/yt/yt/visualization/profile_plotter.py", line 1580, in _init_image
    self.cb = self.figure.colorbar(self.image, self.cax)
  File "/mnt/xfs1/home/stonnesen/yt-conda/lib/python3.6/site-packages/matplotlib/figure.py", line 1844, in colorbar
    cb = cbar.colorbar_factory(cax, mappable, **kw)
  File "/mnt/xfs1/home/stonnesen/yt-conda/lib/python3.6/site-packages/matplotlib/colorbar.py", line 1365, in colorbar_factory
    cb = Colorbar(cax, mappable, **kwargs)
  File "/mnt/xfs1/home/stonnesen/yt-conda/lib/python3.6/site-packages/matplotlib/colorbar.py", line 943, in __init__
    ColorbarBase.__init__(self, ax, **kw)
  File "/mnt/xfs1/home/stonnesen/yt-conda/lib/python3.6/site-packages/matplotlib/colorbar.py", line 326, in __init__
    self.draw_all()
  File "/mnt/xfs1/home/stonnesen/yt-conda/lib/python3.6/site-packages/matplotlib/colorbar.py", line 352, in draw_all
    self._config_axes(X, Y)
  File "/mnt/xfs1/home/stonnesen/yt-conda/lib/python3.6/site-packages/matplotlib/colorbar.py", line 460, in _config_axes
    self.update_ticks()
File "/mnt/xfs1/home/stonnesen/yt-conda/lib/python3.6/site-packages/matplotlib/colorbar.py", line 377, in update_ticks
    ticks, ticklabels, offset_string = self._ticker()
  File "/mnt/xfs1/home/stonnesen/yt-conda/lib/python3.6/site-packages/matplotlib/colorbar.py", line 620, in _ticker
    b = np.array(locator())
  File "/mnt/xfs1/home/stonnesen/yt-conda/lib/python3.6/site-packages/matplotlib/ticker.py", line 2101, in __call__
    return self.tick_values(vmin, vmax)
  File "/mnt/xfs1/home/stonnesen/yt-conda/lib/python3.6/site-packages/matplotlib/ticker.py", line 2127, in tick_values
    "Data has no positive values, and therefore can not be "
ValueError: Data has no positive values, and therefore can not be log-scaled.


--
Dr. Stephanie Tonnesen
Associate Research Scientist
CCA, Flatiron Institute
New York, NY

stonnes@gmail.com
_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
--
--
Dr. Stephanie Tonnesen
Associate Research Scientist
CCA, Flatiron Institute
New York, NY

stonnes@gmail.com