comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Volume Size
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Volume Size [message #11383] Thu, 09 April 1998 00:00 Go to next message
Les Butler is currently offline  Les Butler
Messages: 1
Registered: April 1998
Junior Member
Hi,

As a newcomer to the world of IDL (I have been using it for three
weeks!) I would like to know if there is any way that IDL can be used to
measure the percentage volume of an object. To use a geological example
- can I find out the percent-volume of the pores in a rock?

Most of our data is stored as 2D 'slices' as .cdf files and then
constructed into a 3D common block form in IDL

Any information on this subject will be greatly appreciated.

comments can be posted here or E-Mailed to me at :

wales@chrs1.chem.lsu.edu

or call me on (504) 388 4416

Thanks

Andy Wales
with Professor Les Butler
Department of Chemistry
Chopin Hall
Louisiana State University
Baton Rouge
LA 70803
Re: Volume Size [message #11464 is a reply to message #11383] Sun, 12 April 1998 00:00 Go to previous message
a2652099 is currently offline  a2652099
Messages: 10
Registered: August 1996
Junior Member
davidf@dfanning.com (David Fanning) wrote:

>> Presumably you can distinguish the pores by some "value"
>> in the 3D volume. Suppose the pores had values less than
>> 10 and the rock (rest of the 3D volume) had values greater
>> than 10. Then calculating the percentage volume of the pores
>> is as simple as this:
>>
>> pores = Where(volume LE 10)
>> percent_pores = N_Elements(volume[pores])/N_Elements(volume)
>
> And what I *should* have written is this:
>
> percent_pores = FLOAT(N_Elements(volume[pores]))/N_Elements(volume)
>
> Or you will be looking at a 0 percent, always!

To avoid the slow WHERE function I'd suggest

percent_pores = 1.0 * Total( volume LE 10 ) / N_Elements( volume )



Alex
--
Alex Schuster Wonko@weird.cologne.de PGP Key available
alex@pet.mpin-koeln.mpg.de
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: another bomb
Next Topic: Multi-variable nonlinear fit subroutine?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:00:35 PDT 2025

Total time taken to generate the page: 0.00720 seconds