jomy-kk / ltbio Goto Github PK
View Code? Open in Web Editor NEWPython library for easy managing and processing of large Long-Term Biosignals. Based on top of Biosspy.
Home Page: https://pypi.org/project/LongTermBiosignals/
Python library for easy managing and processing of large Long-Term Biosignals. Based on top of Biosspy.
Home Page: https://pypi.org/project/LongTermBiosignals/
Extraction/ Calculation
Describe the bug
When plotting an ECG of 5 Segments in each channel, from the 3rd Segment and on they start to overlap on the plot.
Modules
biosignals
To Reproduce
Instructions that reproduce the behavior:
ecg = ECG(data_path, Sense('run_chest'), Patient('ME93'))
ecg.plot()
Expected behavior
Segments should be visibly separated.
Python Version
3.10.4
apply
methodExtends Biosignal and should hold Timeseries from different modalities.
Will this be useful when requiring multimodality in ML training?
Currently, data from ScientISST SENSE files are being read as raw. And it is supposed to have data in mV, uS, G, whatever, depending on the biosignal modality. That can be solved by implementing transfer functions.
Transfer functions are relative to the source device from where the data was acquired, so source-specific transfer functions should be implemented for each BiosignalSource
subclass. The class BiosignalSource
demands _transfer
to be implemented, so that's where the transfer functions will reside.
The signature of _transfer
is the following:
@staticmethod
_transfer(samples: array, type) -> array
One can read it as "transfer these samples to the default unit of this biosignal type".
Arguments:
samples
: a numpy array of one dimension with some samples of a segment in floats;type
: A subclass of Biosginal.It should return a numpy array with the samples converted to the default unit. The default Unit of each biosignal type is maintained in a class-constant called DEFAULT_UNIT
in each subclass.
>> To check if the implemented feature is complying with Specification, all tests should pass.
_transfer([1.0, 2.0, 3.0, ...], ECG)
should output
[0.82, 2.23, 2.87, ...] # merely illustrational values
Use units branch to work on this issue.
Describe the bug
Overlap is ignored.
Modules
biosignals
To Reproduce
Instructions that reproduce the behavior:
x = Biosignal.load(biosignal_path)
median_filter1 = TimeDomainFilter(ConvolutionOperation.MEDIAN, timedelta(seconds=3), timedelta(seconds=3*0))
median_filter2 = FrequencyDomainFilter(ConvolutionOperation.MEDIAN, timedelta(seconds=3), timedelta(seconds=3*0.9))
y1 = median_filter1(x)
y1 = median_filter2(x)
The Problem
y1 and y2 are equal
Expected behavior
They should be different, because the overlap of each filter is different.
Python Version
3.11
Describe the bug
The way E4._read is implemented it expects csv files to be right on the given directory, but it should not.
Inside the given directory, it should expect subdirectories (probably named after the start timestamp), and each should be considered a Segment in time.
Example of tree:
--- given_path
| ---- 1655923195_A0200B
| ---- ACC.csv
| ---- BVP.csv
| ---- 1656324824_A0200B
| ---- ACC.csv
| ---- BVP.csv
| ...
Modules
biosignals
To Reproduce
Instructions that reproduce the behavior:
E4._read(given_path, EDA)
Terminal/Console Error
Files were not found in path given_path
Expected behavior
To read files inside subdirectories, and consider each subdirectory as a Segment.
Python Version
3.10.4
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.