Forum Index
Discussion for DataTank and DataGraph
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Radial integration

Post new topic   Reply to topic Forum Index -> Getting Started
View previous topic :: View next topic  
Author Message

Joined: 03 Aug 2008
Posts: 170
Location: University of Oregon

PostPosted: Thu Feb 05, 2009 1:58 pm    Post subject: Radial integration Reply with quote

Say that I have a square gray-scale image, with a centrosymetric data set in pixel position (x,y) and intensity (gray scale value, 8 bit or 16 bit), like a Fourier transform of an image from real space into reciprocal space. Is it possible to do a radial plot (see website below under "plot panel") using DT? The idea is basically to select a radius (from the center of the plot) and an arc and then have the image integrate around the radius through the arc to compress the 3-D information (x,y, and Intensity) to a 2-D set of data (r and Intensity).

Website with example: (the red/yellow/white plot is what I have, and the plot in the foreground is what I want).

Back to top
View user's profile Send private message AIM Address
Site Admin

Joined: 25 Nov 2006
Posts: 1961
Location: Chapel Hill, NC

PostPosted: Sun Feb 08, 2009 11:11 pm    Post subject: Reply with quote

I don't have this built in, but you can compute some of this in DT.

You can extract (by interpolation) the values along a path, and then integrate them (along arc length).
2D Path Values::Values From Mesh - to extract the values
Real Number::Integrate - to integrate along arc length.
So what you need to do is to create.

There is one way to do this, but it is slightly tedious (but much faster than coding things in C++).
Real Number::Time Sequence: Set up a time series for radii, for example howMany = 101, Value = 0.1+n*0.001 to create a series from 0.1 to 0.2 with increments of 0.001.
2D Path::Parametrized By Functions: Drag the real number in, and use that to create an arc from 0 to pi/4 or whatever angle you want. As time goes from 0 to 100, you are sweeping along the path (just adjust things).
2D Path Values::Values From Mesh: Specify mesh and path series, this gives you a time series that sweeps across, interpolating along different arcs.
Real Number::Integrate: Integrate along this path
1D Plot::Sample (x(t),y(t)): where x(t) is the radius, and y(t) is the integral.

I added a sample script:

The drawback is that you have used the time dependence to handle the sweep, so it is not possible to use this on a time series of images. There is a way to do that using the Series::Script On Series, and if you want to do that I can create such a script.

You can of course create additional graphical paths and mimic the UI they gave (take in points, compute the angles using expressions, etc).

Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic Forum Index -> Getting Started All times are GMT - 3 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group