[med-svn] [Git][med-team/pyscanfcs][master] 2 commits: Add patch presumably fixing test failures on big-endian archs
Alexandre Mestiashvili
gitlab at salsa.debian.org
Thu Nov 29 10:57:37 GMT 2018
Alexandre Mestiashvili pushed to branch master at Debian Med / pyscanfcs
Commits:
353c093f by Alexandre Mestiashvili at 2018-11-28T17:46:22Z
Add patch presumably fixing test failures on big-endian archs
- - - - -
8f723b19 by Alexandre Mestiashvili at 2018-11-28T17:47:30Z
Update changelog, upload to experimental
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/0001-force-little-endian-dtype-17.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+pyscanfcs (0.3.0+dfsg-2) experimental; urgency=medium
+
+ * Add patch presumably fixing test failures on big-endian archs
+
+ -- Alexandre Mestiashvili <mestia at debian.org> Wed, 28 Nov 2018 17:47:12 +0000
+
pyscanfcs (0.3.0+dfsg-1) unstable; urgency=medium
[ Steffen Möller ]
=====================================
debian/patches/0001-force-little-endian-dtype-17.patch
=====================================
@@ -0,0 +1,62 @@
+From 1950d60ab4824e18cd2964f8b4431881bec13116 Mon Sep 17 00:00:00 2001
+From: Paul Müller <dev at craban.de>
+Date: Sat, 24 Nov 2018 15:50:12 +0100
+Subject: [PATCH] force little-endian dtype (#17)
+
+---
+ pyscanfcs/sfcs_alg.pyx | 11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/pyscanfcs/sfcs_alg.pyx b/pyscanfcs/sfcs_alg.pyx
+index 8cf5cbf..b7ee5d9 100755
+--- a/pyscanfcs/sfcs_alg.pyx
++++ b/pyscanfcs/sfcs_alg.pyx
+@@ -146,7 +146,6 @@ def bin_photon_events(np.ndarray[DTYPEuint32_t] data, double t_bin,
+ TempTrace.append(phot_c)
+
+ NewFile.write(outdtype(TempTrace))
+- del TempTrace
+ NewFile.close()
+ return outfile
+
+@@ -203,9 +202,9 @@ def open_dat(filename, callback=None, cb_kwargs={}):
+ File = open(filename, 'rb')
+ # 1st byte: get file format
+ # should be 16 - for 16 bit
+- fformat = int(np.fromfile(File, dtype="uint8", count=1))
++ fformat = int(np.fromfile(File, dtype="<u1", count=1))
+ # 2nd byte: read system clock
+- system_clock = int(np.fromfile(File, dtype="uint8", count=1))
++ system_clock = int(np.fromfile(File, dtype="<u1", count=1))
+ if fformat == 8:
+ # No 8 bit format supported
+ warnings.warn('8 bit format not supported.')
+@@ -213,7 +212,7 @@ def open_dat(filename, callback=None, cb_kwargs={}):
+ return system_clock, None
+ elif fformat == 32:
+ # (There is an utility to convert data to 32bit)
+- datData = np.fromfile(File, dtype="uint32", count=-1)
++ datData = np.fromfile(File, dtype="<u4", count=-1)
+ File.close()
+ return system_clock, datData
+ elif fformat == 16:
+@@ -225,9 +224,8 @@ def open_dat(filename, callback=None, cb_kwargs={}):
+ # In case of 16 bit file format (assumed), read the rest of the file in
+ # 16 bit format.
+ # Load bunch of Data
+- Data = np.fromfile(File, dtype="uint16", count=-1)
++ Data = np.fromfile(File, dtype="<u2", count=-1)
+ File.close()
+-
+ # Now we need to check if there are any 0xFFFF values which would
+ # mean, that we do not yet have the true data in our array.
+ # There is 32 bit data after a 0xFFFF = 65535
+@@ -261,5 +259,4 @@ def open_dat(filename, callback=None, cb_kwargs={}):
+
+ datData = np.delete(datData, zeroids)
+
+- del Data
+ return system_clock, datData
+--
+2.20.0.rc1
+
=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
+0001-force-little-endian-dtype-17.patch
gui_scripts.patch
View it on GitLab: https://salsa.debian.org/med-team/pyscanfcs/compare/fb9db1f0bff684fc1e34e619a42e3ae5c4ecafee...8f723b19c61fa86c5e7ae893d07f19c69c8f07e6
--
View it on GitLab: https://salsa.debian.org/med-team/pyscanfcs/compare/fb9db1f0bff684fc1e34e619a42e3ae5c4ecafee...8f723b19c61fa86c5e7ae893d07f19c69c8f07e6
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20181129/98f637a4/attachment-0001.html>
More information about the debian-med-commit
mailing list