Re: [opendx-dev] OpenDX data model confusion

2005-07-29 Thread Joel Richardson


Hi Matt,

Sounds like you are on the right track. The simplest way to get
your data into DX is probably just to create a delimited text
file and use ImportSpreadsheet (be sure to set the delimiter
input to whatever you use in the file (comma, tab, space, ...)

timesource1 source2 source3
0.1 53.2101.9   82.9
0.2557.0100.2   82.9
0.4 68.697.382.5
... ... ... ...

The Plot module (under Annotation) will draw the lines for
you. It wants a field with a 'positions' component containing
the X values, and a 'data' component containing the Y. So, to draw
the line for one of your sources, you could rename the time component
as 'positions', then mark the data source component you want to plot,
then pass it to Plot:

ImportSpreadsheet
|
|  "time"
|  | "positions"
|  |  |
Rename
  |
  | "source1"
  | |
 Mark
  |
  |
 Plot
  |
 Image

To plot all three source lines at once, Mark each one separately,
collect the results into a group, and pass that to Plot:

yourfield
|
|  "time"
|  | "positions"
|  |  |
Rename
  |
  |-+---+
  | |   |
  | "source1" |  "Source2"  |  "Source3"
  | |   |   |   |   |
 Mark   MarkMark
  | |   |
  +-+   |  ++
|   |  |
 Collect
|
Plot
|
Image

To create a scatter plot, say source1 vs. source2, rename source1 to 
positions, mark source2, and add a "scatter" attribute with a value of 
1, just before Plot:


yourfield
|
|  "source1"
|  | "positions"
|  |  |
Rename
  |
  | "source2"
  | |
 Mark
  |
  | "scatter"
  | |
  | |  1
 Options
  |
 Plot
  |
 Image

For more information, check out the documentation for Plot.


Hope this helps.

Cheers,
Joel

Matt Genovese wrote:

Hello,

I am a little confused regarding the OpenDX data model, and would like 
to solicit input from those who understand it better than I.


My project is fairly simple: I am writing a C program to capture data as 
time progresses, and plot it in DX.  There are one or more axes (sources 
of data values), and obviously the time-axis is another source of data 
(there can actually be multiple discrete time axes, but I'll keep it 
simple for now).  Note that time does not progress at a constant rate.


The goal is to be able to plot any axis vs. a time axis.  However, more 
generally, I'd like to be able to plot any axis vs. any other 
axiswhich is really a scatter plot.  The points on the scatter plot 
are correlated (linked) by the discrete time which they were captured in 
the simulation.


I'd like to understand how to best assemble this into the DX data 
model.  My attempt is to group all the axes under a DX Field.  Each axis 
is essentially a DX Array of data, which is a component of the Field.  
However, does this allow me to formulate the time-based plots or scatter 
plots I am looking for?  The Arrays I was building are scalar (rank 0) - 
just raw values (doubles) obtained over time...one for each axis.  I am 
also confused as to the "rank" and "shape" parameters, and how they 
affect organization of the data in the Arrayso perhaps this is part 
of my problem.


So for example, my thinking is that if I had 3 data sources, and they're 
sampled over time, I have:  4 "axes" - 4 DX Arrays as components under 1 
DX Field object.  Three of the arrays are one-dimensional and contain 
the data values, and the fouth array is one-dimensional and contains the 
capture times for all points.  Then the three data arrays are somehow 
linked to the fourth array to correlate the data value with 
time-of-capture.  Again, I'm worried I am going about this all-wrong.


I hope this is not too vague.  Thanks in advance for any guidance you 
can provide.

Best Regards,

Matt

Re: [opendx-dev] Compiling outboard module on MacOSX 10.4 Tiger

2005-07-06 Thread Joel Richardson


Here's what someone sent me a while back.
Hope this helps.

Cheers,
Joel

Tan Meng YUE wrote:

Hi,

   I am porting a RenderMan outboard module from Linux to OSX.

   I have got OpenDX 4.3.2 running on OSX Tiger with no problem but the 
module compilation on OSX Tiger seems quite different from that in Linux.


   Does anyone have a sample Makefile which show one how to link the 
various libraries and build dynamical libraries on OSX Tiger.


   I have also encountered a DXAddModule() function not found error 
during the linkage.


Cheers



--

===
Joel Richardson, Ph.D.   Phone: (207) 288-6435
The Jackson Laboratory   Fax:   (207) 288-6132
600 Main Street  URL:   www.informatics.jax.org
Bar Harbor, Maine 04609
===


dxRunTimeMacOS.rtf
Description: RTF file


[opendx-dev] OK, my face IS red (ImportSpreadsheet)

2004-07-16 Thread Joel Richardson

Ok, just ignore those last two postings.
I discovered another bug. I will go away now and 
stop bothering you...

Joel

- Begin Forwarded Message -

Date: Fri, 16 Jul 2004 14:23:13 -0400 (EDT)
From: Joel Richardson <[EMAIL PROTECTED]>
Subject: Re: ImportSpreadsheet bugfixes
To: opendx2-dev@lists.berlios.de
Mime-Version: 1.0


The file I posted yesteday introduced a bug that is
fixed in the attached file. (I wasn't handling 
"!filter" filenames properly.)

Sorry about that.

Cheers,
Joel

=======
Joel Richardson, Ph.D.  [EMAIL PROTECTED]
The Jackson Laboratory  Phone:  (207) 288-6435
600 Main Street Fax:(207) 288-6132
Bar Harbor, Maine 04609 URL:www.informatics.jax.org
===
- End Forwarded Message -



=======
Joel Richardson, Ph.D.  [EMAIL PROTECTED]
The Jackson Laboratory  Phone:  (207) 288-6435
600 Main Street Fax:(207) 288-6132
Bar Harbor, Maine 04609 URL:www.informatics.jax.org
===


[opendx-dev] new modules, seeking feedback

2004-05-21 Thread Joel Richardson

Hello developers,

As part of a bioinformatics project, I have developed several
runtime-loadable modules that may be of general interest.
Before contributing them to the public (or inflicting
them upon the innocent, depending on your point of view)
I was wondering if someone(s) on this list might be willing
to give them a once-over. I'm especially interested in
advice on their interface, comments on usability, etc.

These modules augment DX's string handling capabilities.
(Some of this might be better done as enhancements to
Compute, but I didn't want to go there...) Anyway,
here's a brief rundown:

strFormat - 'souped up' Format, e.g., can format 
a table into a string list
strParse - 'souped up' Parse. e.g., can parse a
string list into a table 
strSplice - substring manipulation: extraction, insertion, deletion
strJoin - 'vertical' string concatenation, with separators
strRegex - finds regular expression matches
strRegsub - makes substitutions at regex matches
strRegsplit - splits strings at regex matches.
(The regex modules use GNU regex.c)

I have compiled them only under solaris, so I have no idea what
kind of portability problems may lurk. They just
use standard C string functions, so it shouldn't be too bad.

If you are interested/willing to test them out or at
least look over the man pages, please let me know. 
Thanks in advance!

Joel

=======
Joel Richardson, Ph.D.  [EMAIL PROTECTED]
The Jackson Laboratory  Phone:  (207) 288-6435
600 Main Street Fax:(207) 288-6132
Bar Harbor, Maine 04609 URL:www.informatics.jax.org
===


[opendx-dev] Bugfix for ImportSpreadsheet

2004-05-21 Thread Joel Richardson

Hello,

In a previous email, I asked about ImportSpreadsheet's
tendency to munge large integers. E.g., 96933478 becomes
96933480. (http://opendx.npaci.edu/mail/opendx-users/2003.06/msg00046.html)

I have traced this to line 1337 of import_ss.c, in the function
_dxf_isnumber(). The data
value has just been parsed as a float. Then, if no decimal
point is found, the float is converted to an int:
*d = (int)f;
But it's too late because there's not enough precision in
the float to represent large ints. Re-parsing the input as an
integer fixes it:
sscanf(p+(*p=='$'), "%d", d);

I have verified this on my local installation.

Cheers,
Joel

=======
Joel Richardson, Ph.D.  [EMAIL PROTECTED]
The Jackson Laboratory  Phone:  (207) 288-6435
600 Main Street Fax:(207) 288-6132
Bar Harbor, Maine 04609 URL:www.informatics.jax.org
===