m3resp.pixel_breath_events#
- m3resp.pixel_breath_events(pixel_breaths, row, column)[source]#
Return the breaths of one pixel as
BreathEventobjects.eit.pixel_breathsstores, for each global breath, a grid of each pixel’s breath start, middle and end time. This function picks one pixel from that grid and turns its breaths intoBreathEventobjects, so analyses written for global breaths (durations, timing checks, linking) can run on one pixel too.- Parameters:
pixel_breaths (IntervalData) – The
IntervalDatawritten byeit.pixel_breaths(name'pixel_breaths'by default): one (row, column, 3) grid of start, middle and end times in seconds per global breath.row (int) – Row of the pixel, counted from 0.
column (int) – Column of the pixel, counted from 0.
- Returns:
- One breath per global breath in which the pixel
has a breath, in time order.
start_timeandend_timeare the pixel’s own breath start and end,extremum_timeis its middle time (end of inspiration), all in seconds. A global breath where the pixel has no breath (NaN) gives no entry.metadataholdsrow,columnandglobal_breath_id, theidof the global breath it belongs to.
- Return type:
- Raises:
ValueError – If the grids are not (row, column, 3), or
roworcolumnis outside the grid.