Move from eitprocessing#
This page lists the eitprocessing calls and the M3Resp calls that do the same work. See the Migration guide for the tasks that are the same for all modalities.
Load a recording#
session.load_eit calls load_eit_data of eitprocessing, with the same vendor:
# eitprocessing
from eitprocessing.datahandling.loading import load_eit_data
sequence = load_eit_data("recording.bin", vendor="draeger")
# M3Resp
session.load_eit("recording.bin", vendor="draeger")
m3resp.io.load_eit(path, vendor=...) loads a recording without a session.
Filter and detect breaths#
session.preprocess_eit() runs the eitprocessing steps in one call. Each step has settings in preprocess_eit:
|
Settings of |
|---|---|
|
|
|
|
Butterworth low-pass or band-pass filter |
|
|
|
|
|
|
|
See How to change the EIT processing settings for the default of each setting.
Read the results#
session.detect_eit_breaths() gives the breaths of BreathDetection as BreathEvent objects. The values per breath are in session.interval_data:
session.preprocess_eit()
breaths = session.detect_eit_breaths()
tiv = session.interval_data.for_name("continuous_tivs")[0]
print(len(breaths), len(tiv.values)) # one TIV value per breath
|
Place in M3Resp |
|---|---|
Respiratory rate and heart rate |
|
Breaths of |
|
TIV, EELI and pixel TIV per breath |
|
|
|
|
|
coerce_intervals changes eitprocessing intervals into M3Resp Interval objects. coerce_events does the same for single time points.
Continue with Process an EIT recording for a full example, or with Move from resurfemg.