Browse Source

Add script used to create new test files

Added for posterity. Creates ``written-by-axographio-without-linearsequence.axgx`` and ``written-by-axographio-with-linearsequence.axgx`` using the axographio package. The file ``corrupt-comment.axgx`` was created by opening a copy of ``written-by-axographio-with-linearsequence.axgx`` in AxoGraph 1.7.0 (Windows), which automatically corrupts the (previously non-existent) comment section of the file.
Jeffrey Gill 3 years ago
parent
commit
049ee6ca52
1 changed files with 14 additions and 0 deletions
  1. 14 0
      axograph/create-test-files-using-axographio.py

+ 14 - 0
axograph/create-test-files-using-axographio.py

@@ -0,0 +1,14 @@
+import numpy as np
+import axographio
+
+names = ['Time (s)', 'Data 1 (V)', 'Data 2 (V)']
+
+t = np.arange(0, 10, 0.01)
+data1 = np.sin(1*t)
+data2 = np.cos(2*t)
+
+f1 = axographio.file_contents(names, [t, data1, data2])
+f1.write('written-by-axographio-without-linearsequence.axgx')
+
+f2 = axographio.file_contents(names, [axographio.aslinearsequence(t), data1, data2])
+f2.write('written-by-axographio-with-linearsequence.axgx')