Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
Add patch presumably fixing test failures on big-endian archs
· 353c093f
Alexandre Mestiashvili
authored
Nov 28, 2018
353c093f
Update changelog, upload to experimental
· 8f723b19
Alexandre Mestiashvili
authored
Nov 28, 2018
8f723b19
Hide whitespace changes
Inline
Side-by-side
debian/changelog
View file @
8f723b19
pyscanfcs (0.3.0+dfsg-2) experimental; urgency=medium
* Add patch presumably fixing test failures on big-endian archs
-- Alexandre Mestiashvili <mestia@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 → 100644
View file @
8f723b19
From 1950d60ab4824e18cd2964f8b4431881bec13116 Mon Sep 17 00:00:00 2001
From: Paul Müller <dev@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
View file @
8f723b19
0001-force-little-endian-dtype-17.patch
gui_scripts.patch