hiit / ledapy Goto Github PK
View Code? Open in Web Editor NEWPartial Python port of Ledalab (www.ledalab.de)
License: MIT License
Partial Python port of Ledalab (www.ledalab.de)
License: MIT License
Hi,
I continue using your program and I have detected a problem with the linspace function. It expects int type parameters but gets float because the "seconds" parameter passed is len(conductance) / srate. The error is:
File "C:\Users\migue\PythonProjects\testlib-master.venv\lib\site-packages\ledapy\utils.py", line 247, in genTimeVector
return genTime(len(conductance) / srate, srate)
File "C:\Users\migue\PythonProjects\testlib-master.venv\lib\site-packages\ledapy\utils.py", line 239, in genTime
return np.linspace(0, seconds, seconds * srate)
File "<array_function internals>", line 5, in linspace
File "C:\Users\migue\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numpy\core\function_base.py", line 119, in linspace
raise TypeError(
TypeError: object of type <class 'float'> cannot be safely interpreted as an integer.
Hi! Is there a way to extract the tonic component using this package (and not just the phasic component)?
Thanks!
Hi! Thank you for taking the time to port this to Python :)
I am however a bit confused, since I thought Ledalab implemented an algorithm that constrained the phasic driver to be non-negative (since negative sudomotor nerver activations make no sense). The current output, that I can get with leda2.analysis.phasicDriverRaw
is not non-negative and very dense, I assume because it perfectly reconstructs the data when summed with the tonic component
You can see what I mean with the green curve here.
Any pointers on how to better specify what analysis I want from Ledapy ?
Hi!
I continue using your code and i have seen a part of the code that is problematic for me:
utils.py: window = norm.pdf(np.arange(0, winwidth + 1), winwidth // 2, winwidth // 8) (line 162)
the problem is that in my code the input of the function 'smooth(data, winwidth_in)' the parameter winwidth_in is 4 so the output of the pdf function is a list of nan.
A posible solution i have checked (but I'm not sure of it) is to change it to:
window = norm.pdf(np.arange(0, winwidth + 1), winwidth / 2, winwidth / 8)
because the operator // get the floor division but in the previous order you have:
winwidth = int(np.floor(winwidth_in // 2) * 2) # force even winsize for odd window
So winwidth will be always even so the division 'winwidth / 2' shoud always be equals to 'winwidth // 2' but I don't understand why in this case not.
If you have any idea why i have this problem it would be great, but thank you anyways for this wonderful program.
PS: I work with e4_empatica data which have 4 Hz
I have tested your code and it works great, so I am using it in my master thesis. Could you upload it in Pypi?
Hello,
Thank for making this great tool.
I use ledlab mathlab for eda analysis, and i am able to upload the raw eda signals and event files to perform event related analysis (feature extraction).
However, i have been trying to see how that could be possible with the python verssion but still dont get.
can you be kind to point me in the right direction on how to import both event and raw signal data using this python tool.
Looking forward to your reply
Best Regards
ben
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.