Problem with Print & File Window Manager

Using the graphical user interface to build and exercise models. Includes customizing the GUI by writing a little bit of hoc.
Post Reply
Bill Connelly
Posts: 85
Joined: Thu May 22, 2008 11:54 pm
Location: Australian National University

Problem with Print & File Window Manager

Post by Bill Connelly » Wed Nov 13, 2013 11:15 am

So I wanted to use the Print: Ascii feature of the Print & File Window Manager.

The simulation is quite long. 12 seconds. Problems occurs when it starts to save passed 10 seconds. As can be seen from the datafile it saves

Code: Select all

9999.9	-69.1285	-67.7425
9999.92	-69.1285	-67.7565
9999.94	-69.1286	-67.7706
9999.96	-69.1287	-67.7846
9999.98	-69.1287	-67.7986
10000	-69.1288	-67.8126
10000	-69.1289	-67.8267
10000	-69.129	-67.8407
10000.1	-69.1291	-67.8548
10000.1	-69.1292	-67.8689
10000.1	-69.1293	-67.883
10000.1	-69.1294	-67.897
10000.1	-69.1295	-67.9112
10000.2	-69.1296	-67.9253
10000.2	-69.1297	-67.9394
As you can see, it starts to save time values that repeat. This causes all sorts of problems when I try to open the data up in other programs (MATLAB, pClamp etc) because the time vector has those repeating values. Yes, I can make a little matlab script to fix this, but I was just wondering if a) there was a quick way around this problem and b) if you guys were aware of this, and might want to fix it in future releases of Neuron.

ted
Site Admin
Posts: 5186
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Problem with Print & File Window Manager

Post by ted » Thu Nov 14, 2013 12:06 am

The Print & File Window Manager's "Print / Ascii" feature prints the xy coordinates of points in a Graph to a file using single precision (about 6-7 significant digits). This is because Interviews itself uses single precision arithmetic in calculating where to draw points and lines. To get higher precision, you'll have to record the variables of interest to Vectors, then print them out with a printf statement using an f or g format specifier, e.g.
t = 10000.025
printf("%10.3f\n", t)
results in
10000.025

Post Reply