Giter VIP home page Giter VIP logo

ltbio's People

Contributors

dependabot[bot] avatar jomy-kk avatar marianaabreu avatar rafaelscsilva avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

rafaelscsilva

ltbio's Issues

[BUG] Segments overlapped in plot

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.

Screenshots
Screenshot 2022-06-24 at 20 01 09

Python Version
3.10.4

Create MultimodalBiosignal class

Extends Biosignal and should hold Timeseries from different modalities.

Will this be useful when requiring multimodality in ML training?

Add transfer functions

Motivation

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.

Specification

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.

Example of Use

_transfer([1.0, 2.0, 3.0, ...], ECG)

should output

[0.82, 2.23, 2.87, ...]  # merely illustrational values

Branch

Use units branch to work on this issue.

ECG New Features

  • Filter Signal
  • Calculate R peaks
  • Calculate Heart Rate
  • Smooth Heart Rate Signal
  • Do this process for signal1
  • Do this process for signal2
  • Correlation Value with Adaptive Sliding Window
  • Return offset temporal deviation between signal 1 and 2

[BUG] TimeDomainFilter does not perform overlap

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

[BUG] Reading E4 should account to find directories inside each given directory, each representing a Segment

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.