[yt-users] Calculating the surface properties of clumps

Matthew Turk matthewturk at gmail.com
Mon Aug 1 08:16:47 PDT 2016


Hi John,

Yes, you should be able to do this.  I think the clumps have an attribute
that describes their value, and then you can supply that to the surface
operator.  I've gotten your bug report and will be looking into supplying
clumps to surfaces.

On Mon, Jul 25, 2016 at 3:08 PM, John Regan <johnanthonyregan at gmail.com>
wrote:

> Hi Matt,
>
> Thanks for looking at this. Much appreciated!  I'll file a bug report no
> problem.
>
> For calling the surface operator with a clump as a data source is it
> possible to extract the isodensity value of the clump from the Clump object
> and pass that to the surface operator?
>
> Cheers,
> John
>
> On 25 Jul 2016 19:58, "Matthew Turk" <matthewturk at gmail.com> wrote:
>
> Hi John,
>
> Sadly, we don't store information about which cells are on the boundary.
> This is potentially possible to compute (although the naive solution, which
> is to check the # of faces of a zone that have neighbors in the clump, will
> not work for clumps that have holes in them) but it's not stored just now.
> I don't have an alternate solution to present right now to that problem.
>
> For the second part, I'm not sure what's going on.  Could you file a bug
> with a repro script?
>
> -Matt
>
> On Mon, Jul 25, 2016 at 8:33 AM, John Regan <johnanthonyregan at gmail.com>
> wrote:
>
>> Hi All,
>>
>> I'm interested in calculating some surface properties of clumps found
>> with the clump finder. Finding the clumps is straight forward via the clump
>> finder API. Once I find a clump then I apply the surface operator
>>
>> e.g.
>> surf = clump.data.ds.surface(clump, "density", 1e-24)
>>
>> This works but isn't ideal. For one I don't want to specify a value for
>> the density contour as by definition this is part of the clump - ideally
>> I'd just be able to extract the surface cells from the clump with something
>> like
>>
>> surf2 = clump.surface()
>>
>> Does YT store any information on which cells reside on the surface of a
>> clump?
>>
>> Even pushing ahead with the YTSurface object doesn't go very far anyway
>> as even trying to access the triangles variable gives the error
>>
>> triangles = surf.triangles
>>
>> File
>> "/cosma/home/dp004/dc-rega4/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/virial_validator.py",
>> line 74, in _virial_validation
>>     triangles = surf.triangles
>>   File
>> "/cosma/home/dp004/dc-rega4/YT/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py",
>> line 1223, in triangles
>>     self.get_data()
>>   File
>> "/cosma/home/dp004/dc-rega4/YT/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py",
>> line 1108, in get_data
>>     for io_chunk in parallel_objects(self.data_source.chunks([], "io")):
>> AttributeError: 'Clump' object has no attribute 'chunks'
>>
>>
>> Any tips/ideas greatly appreciated!
>>
>> Cheers,
>> John
>>
>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160801/96752b7a/attachment-0001.htm>


More information about the yt-users mailing list