Re: [opendx-users] display polar coordinates

2005-06-17 Thread Dan Patnaude
Wow! That was so easy. Thanks. I guess I never really think of the  
array indices as 'positions',


Thanks for the help,
Dan
On Jun 17, 2005, at 6:32 AM, Dragos MOROIANU wrote:

After you import the data, you can pass it through a MARK-COMPUTE- 
UNMARK

control, where you can change the coordinates from polar to cartesian:

a
b
[a.x*cos(a.y),a.x*sin(a.y)]

Don't forget to mark the positions before you make the transform.

Dragos

On Thu, Jun 16, 2005 at 03:19:38PM -0400, Dan Patnaude wrote:


Hi-

I have some 2d data where the data is stored in a 1024 square array,
but the positions are not regular. That is, the data was made in a
simulation in polar coordinates (r, theta). I can't figure out how to
tell DX that this is the case. How do I construct a grid with polar
coords and then get DX to display the data in the proper format (i.e.
the grid ought to look like a pie slice, rather than square).

Any ideas would be helpful.

Thanks,
Dan



--



[opendx-users] display polar coordinates

2005-06-16 Thread Dan Patnaude

Hi-

I have some 2d data where the data is stored in a 1024 square array,  
but the positions are not regular. That is, the data was made in a  
simulation in polar coordinates (r, theta). I can't figure out how to  
tell DX that this is the case. How do I construct a grid with polar  
coords and then get DX to display the data in the proper format (i.e.  
the grid ought to look like a pie slice, rather than square).


Any ideas would be helpful.

Thanks,
Dan


[opendx-users] dealing with record terminators

2005-06-06 Thread Dan Patnaude

Hi-

I am using IBM XLF 8.1, and when I write unformatted 2d data, I get  
this nonsense:


4 byte header data 4 byte footer 4 byte header data ...  
data 4 byte footer


Now, I know how to specify a 4 byte header, but I can't seem to  
figure out how to tell DX that the last 4 bytes of a record is
a footer. I don't think the 'series' and 'record' separator options  
(available when describing a general time series data format) are an  
option, since those are for dealing with multi-variate files. Any  
suggestions?


Thanks,
Dan


Re: [opendx-users] simple plotting

2005-05-24 Thread Dan Patnaude

Sam, Joel-

Thanks for the advice. Samuel gets the prize. Scattered data seems to  
be the way to go.

On May 24, 2005, at 9:49 AM, Samuel Pelaez wrote:


Hey Dan,

I'm far away from being a DX expert. But once I needed to draw a  
set of vectors at different positions in space and with different  
directions. If I'm understanding all right your problem now is on  
how to associate the positions at wich your vectors are located in  
space with the vectors' coordinates. Well, the way I did this  
(maybe there is a more professional way to do it) was to write in  
the same file positions and vector coordinates. That is, I wrote a  
file with 6 columns: [x y z vx vy vz] where (x,y,z) is the spatial  
location (position) of a vector with coordinates (vx,vy,vz). Doing  
it this way DX associates one position with one vector, row by row.


However, I don't read the data as a Spreadsheet format file.  
Instead I use Scattered data. I am a DX newbie, so I'll try to  
show you a really simple way (the most simple, i think) of plotting  
3d-vectors with DX. Let me explain it step by step, as to a 5-year- 
old kid, because that is the only way I find these explanations  
usefull.

First of all prepare your data file with 6 columns [x y z vx vy vz]
Open DX and select Import Data...
Choose your data filename
Select Grid or scattered file
In Grid type select the dotted square (on the right), named  
Scattered data

Set Number of variables to 1
Activate the item Positions in data file
Set Dimension: to 3
Click on Describe Data...
In this new window set # of Points to the amount of vectors you  
have (~450?)
On the right column there is a Field list with two items:  
locations and field0. The locations item referes to the  
positions in space where your vectors will be plotted, and field0  
will refer to your vectors' coordinates.
Select the field0 item and in the Structure selector choose 3- 
vector. Click on Modify
Save this file as a *.general file. Now DX knows how to read your  
data.
Close this window and return to the last one. There click on  
Visualize Data...
Here in the Image window you should see a lot of thin 'needles',  
representing your data. From the menu select Windows - Open  
Visual Program Editor.
If you want you can change the Glyph type by double-clicking the  
AutoGlyph tool and changing type (from speedy, set by  
default) to rocket (my favourite) or wathever you want...

hope this is helpful you. Good luck...!  ;-)

Samuel.


Re: [opendx-users] simple plotting

2005-05-23 Thread Dan Patnaude
Maybe this is a fundamental misunderstanding of how DX treats things on my part.  I've updated the data so that I now have four columns:x,y,z,radial velocityThe x, y,  and z positions describe a position in space, and the data at that position is the radial velocity. If I assume an age and distance to the remnant, I can decompose the radial velocity into components vx, vy, and vz, but I am still at a loss. When I read in the spreadsheet, how do I tell DX to associate v_radial (or vx,vy,vz) with the position (x,y,z)? I don't understand how to tell DX that the 1st three columns denote positions, but the 4th column (or 4th, 5th and 6th columns) are data associated with those positions; i.e. column 4 is the x component of the velocity at the position (x,y,z). Moreover, if I do create a three vector for the velocity components, I can't seem to pass it to the 4th tab in Construct. It returns the following error:ERROR: Construct: Invalid data: origin must be a vector or vector listHere is the layout:ImportSpreadSheet=Mark(x),Mark(y),Mark(z),Mark(vx),Mark(vy),Mark(vz)Mark(x,y,z)-Compute([x,y,z])Mark(vx,vy,vz)-Compute([vx,vy,vz])[x,y,z]-Construct.origin[vx,vy,vz]-Construct.dataA little more insight would be helpful. I can't imagine that this is as much of a hassle as it seems to be. I've attached the network and data in case anyone would be kind enough to play around with it.

ejecta.cfg
Description: Binary data


ejecta.dat
Description: Binary data


ejecta.net
Description: Binary data
On May 20, 2005, at 5:29 PM, Chris Pelkie wrote:I'm not sure if you mean you want all the arrows to originate at 0,0,0, as if you snapshot the 'explosion', or if you want each arrow to originate at its x,y,z position, but be directed radially away from 0,0,0. In either case, the solution is the same, but the 'positions' are different.To draw 3-d arrow glyphs in space, you need to have 3-d positions and 3-d data (dep on those positions). You didn't specify what you Mark'ed (I assume column0, column1, column2), so after creating the 3-vector and (unnecessarily Unmark'ing) you have 3-d data on the 1-d positions (a line) autocreated by ImportSpreadsheet (and usually, but not always, worthless).So to emanate all from the origin, compute the 3-vectors as you have already, then feed this array to the 4th input of a Construct. Set origin to 0,0,0. This creates a field with as many 0,0,0 positions as there are data items in the input array. Autoglyph. Color with Autocolor or Color/Colormap. Image. done.To do the second layout, separately Compute the array of 3-d positions and feed it to Construct(origin) and the data array to the same Construct's 4th input (which I can't think of the formal name of off the top of my head, either data or input). Same net as above. Use Print("rd") to watch how each operation changes the data field at the output of each module.Chris PelkieVice President      (607) 257-8335Conceptual Reality Presentations, Inc.30 West Meadow DriveIthaca, NY 14850On May 19, 2005, at 19:41, Daniel Patnaude wrote: Hi-I'm trying to do something which intuitively ought to be quite simple:I have a data file which looks like:x_pos,y_pos,v_radialThe data is of ~ 450 ejecta knots in a supernova remnant (3c58 for the curious).  I basically want to make a 'kaboom' type 3-d distribution with the coords x,y,v_rad, since v_rad is effectively a measure of the z displacement from the center. The positions should be marked by an arrow which points radially away from (0,0,0), has a length proportional to the data, and optionally a color based on the value (bluer for positive, redder for negative values). Is this an easy thing to do? So far, all I've been able to do is:ImportSpreadSheet-(Mark x 3, for each value)-Compute (to make a vector)-Unmark-Autoglyph-Imagebut this only makes a distribution of circles, which looks nice, but isn't quite what I have in mind.Any suggestions?Thanks,DanDaniel PatnaudeSmithsonian Astrophysical Observatory60 Garden StMS-02Cambridge, MA 02138[EMAIL PROTECTED](617) 496-2087