Marc,
My attempt to answer your 3 questions below.
At 05:21 AM 5/26/2004, you wrote:
Hi,
thanks a lot Jeff, that was exactly what I was looking for. It is working
wonderfully.
Just three additional questions:
- although ASCII array is nice, I would like to add an option to my analysis
program that writes out in NetCDF. As I have already created an example
ASCII input for OpenDX, I wonder whether I can get OpenDX to write this
out as NetCDF (as it would be understood by OpenDX).
So I guess the underlying question is, is there a NetCDF export module
for OpenDX or is there a dx -> netCDF conversion tool ?
There is no export tool from OpenDX to NetCDF. You could probably do this
by creating a custom module. You can export in the native DX format if you
want to reuse the object in DX later.
- the second question concerns the actual line/tube. Sometimes the edges are
quite rough, so I wonder whether one could also draw a smoother shape
through the data points (maybe a Spline or so). Is this possible from the
same data, or does it require additional information/data ?
Is the roughness from the x, y, z positions or the actual data? We have a
module (PathInterpolate) that applies a spline to positions to smooth out a
flight path, but I could not figure out how to use it for you situation.
- third and last, could I have a tube with an elliptical crossection, where
the parameters for the ellipse come from some of the data columns of my
input data file ?
So you actually have three data columns instead of two and you want to use
one column for color and the other two columns for the ellipse axes? I
don't think this is possible using a tube. But you might be able to use
Grid to create an ellipse at each position. Then color each ellipse, but
the ellipses would not be connected like a tube.
Thanks very much in advance,
Marc
>>> Jeff Braun said:
>> Marc,
>>
>> Assuming your points that form the line are in connected order, you can
>> import as a 1D grid. It looks like your line is not straight based on
>> stated x,y,z coordinates. Here is what your general array import file
>> would look like for 100 data points organized with five values on
each line
:
>> x y z data1 data2
>>
>> file = test.txt
>> grid = 100
>> format = ascii
>> interleaving = field
>> majority = column
>> field = locations, field0, field1
>> structure = 3-vector, scalar, scalar
>> type = float, float, float
>> end
>>
>> This will create a group with two members. Now Select the member you
want
>> to Color. Then use Compute to replace the data component from the other
>> member that will be use to determine the radius. Tube, RubbererSheet,
Image
:
>>
>> Import
>> |__________________
>> | |
>> Select(0) Select(1) #Assuming color
>> based on field0
>> | |
>> Autocolor ________|
>> | |
>> Compute(b) #data component now has
>> field1 data
>> |
>> Tube
>> |
>> RubberSheet
>> |
>> Image
>>
>> I think this is what you want. You can use the Print (rD) module to
see how
>> the data is transformed in each step.
--
Dr. Marc Baaden - Institut de Biologie Physico-Chimique, Paris
mailto:[EMAIL PROTECTED] - http://www.marc-baaden.de
FAX: +49 697912 39550 - Tel: +33 15841 5176 ou +33 609 843217