Welcome, Guest. Please Login.
OpenDX User Forum
05/18/13 at 17:07:27


Pages: 1
How to use export in combination with sequencer (Read 1073 times)
msb
Junior Member
**


Got Viz?

Posts: 30
How to use export in combination with sequencer
01/24/11 at 23:25:27
 
Dera Joel,
 
I'm trying to export a series of number made sequentially using Sequencer to an output file. To be more precise, for each sequence, I measure something (e.g. the area of an isosurface) which then I want to write it out as a single floating point number. So The output file should be basically a single column of data.  
The problem is that After each sequence, the previous data is replaced by the new one. So I end up with an output file containing a single line of number (corresponding to the last sequence). I was wondering If you know how to fix this problem.
 
Thanks  
Saeed
Back to top
 
 
  IP Logged
joelr
OpenDX Forum Administrator
*****


Got Viz?

Posts: 388
Re: How to use export in combination with sequence
Reply #1 - 01/25/11 at 04:56:50
 

What you need to do is accumulate the numbers in an array, then
write out the array at the end. The attached image shows how to
accumulate a list of numbers. On each iteration of the sequencer,
send the new number in the top. The accumulated list comes out  
the bottom. You can send this to Export directly. However, for
efficiency, you might want to stick a Route in, and only export
on the final iteration.
 
Cheers,
Joel
Back to top
 
 
Email   IP Logged
joelr
OpenDX Forum Administrator
*****


Got Viz?

Posts: 388
Re: How to use export in combination with sequence
Reply #2 - 01/25/11 at 04:57:23
 
Oops...and now, the image...
Back to top
accum_001.jpg (attachment deleted)  
 
Email   IP Logged
msb
Junior Member
**


Got Viz?

Posts: 30
Re: How to use export in combination with sequence
Reply #3 - 01/25/11 at 10:43:33
 
Thank you so much Joel.  
Your trick works like a charm. Now I can save all the sequential data as an array in an output file.  
But I just could not catch your point how Route can improve the efficiency. In my current program, regardless of whether I send the accumulated list directly to Export or via Route, the overall performance appears to be the same. Moreover even with Route, the output file seems to be updated after each sequence. The attached shows how I do the export. Please let me know If I'm missing something
 
Thanks again
Saeed
Back to top
Picture_4.jpeg (attachment deleted)  
 
  IP Logged
msb
Junior Member
**


Got Viz?

Posts: 30
Re: How to use export in combination with sequence
Reply #4 - 01/25/11 at 11:04:40
 
I think now I understood your point. In the Route, the selector should be always 0 except for the last iteration. In this case, the data would only be sent to the Export after finishing all the sequences. Right?
Back to top
 
 
  IP Logged
joelr
OpenDX Forum Administrator
*****


Got Viz?

Posts: 388
Re: How to use export in combination with sequence
Reply #5 - 01/25/11 at 11:42:22
 
Yes, exactly.
Back to top
 
 
Email   IP Logged
msb
Junior Member
**


Got Viz?

Posts: 30
Re: How to use export in combination with sequence
Reply #6 - 01/25/11 at 19:02:46
 
Thanks Joel,
Back to top
 
 
  IP Logged
Pages: 1