<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr">Hi there--<div><br></div><div>I'm doing something wrong with clumps in yt3, and can't quite figure out what I"m doing.  When I make some clumps, the field 'density' shows up, but no other fields seem to be well defined.  Is this a familiar error to anyone?  What I'm doing is the following:</div><div><br></div><div>I make some clumps from a sphere, similar to what's in the docs (details at the end of the email), and when I do <br></div><div>>>> leaf_clumps[n]['density']</div><div>I get something sensical.  But if I do</div><div>>>> leaf_clumps[n]['cell_mass']</div><div><div>YTArray([], dtype=float64) g</div></div><div><br></div><div>I get this empty array.  </div><div><br></div><div>If I instead try quantities.total_mass(), I get an odd error. </div><div><div>>>> leaf_clumps[22].quantities.total_mass()</div><div>Traceback (most recent call last):</div><div>  File "<stdin>", line 1, in <module></div><div>  File "/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/data_objects/derived_quantities.py", line 193, in __call__</div><div>    rv = super(TotalMass, self).__call__(fields)</div><div>  File "/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/data_objects/derived_quantities.py", line 160, in __call__</div><div>    rv = super(TotalQuantity, self).__call__(fields)</div><div>  File "/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/data_objects/derived_quantities.py", line 56, in __call__</div><div>    sto.result = self.process_chunk(ds, *args, **kwargs)</div><div>  File "/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/data_objects/derived_quantities.py", line 166, in process_chunk</div><div>    for field in fields]</div><div>  File "/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/data_objects/data_containers.py", line 248, in __getitem__</div><div>    self.get_data(f)</div><div>  File "/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/data_objects/selection_data_containers.py", line 749, in get_data</div><div>    raise YTMixedCutRegion(self.conditionals, field)</div><div>yt.utilities.exceptions.YTMixedCutRegion: Can't mix particle/discrete and fluid/mesh conditions or</div><div>               quantities.  Field: ('all', 'particle_mass') and Conditions specified:</div><div>            obj['contours_8d0408a91fc34e2bbe9eb838d48de46e'] == 1</div></div><div><br></div><div><br></div><div><br></div><div>I build the clumps in the following manner.  I don't have any validators by design.  Plotting the clumps with annotate_clumps(leaf_clumps) gives reasonable results.  </div><div><br></div><div><div>    ds = yt.load(setname)</div><div>    loc = ds.arr([ 0.03613281,  0.79589844,  0.03027344], 'code_length')<br></div><div>    width = (0.05,'code_length')</div><div>    sphere = ds.sphere(loc,width)</div><div>    master_clump = Clump(sphere,"density")</div><div>use_particles=False, use_thermal_energy=False)<br></div><div>    c_min = sphere["gas", "density"].min()</div><div>    c_max = sphere["gas", "density"].max()</div><div>    step = 2.0</div><div>    find_clumps(master_clump, c_min, c_max, step)</div><div>    leaf_clumps = get_lowest_clumps(master_clump)<br></div><div><br></div><div>Thanks a ton!</div><div>d.</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">-- Sent from a computer.<br></div></div>
</div></div>