Select a *_EMG_raw.sig file (and optionally a GAM file) with
file dialogs, then load them.
A first dialog selects the *_EMG_raw.sig or *_SIG_raw.sig file.
If ied was not already provided, a second dialog then asks for the
interelectrode distance (IED), pre-filled with the default (10 mm),
so accepting it as-is just keeps the default.
A third dialog is then shown to optionally select a GAM auxiliary file,
which can be located in a different folder:
if it is canceled, no GAM file is used and REF_SIGNAL is unaffected.
If a GAM file is selected and gam_channels was not already provided,
a fourth dialog asks which channel indices to load from it.
The file is loaded with emg_from_rec(), which automatically detects
whether it comes from a ReC/MEACs or a ReC/BAM system based on the
system code embedded in the filename, and loads it with the matching
loader (emg_from_rec_meacs or emg_from_rec_bam).
| PARAMETER |
DESCRIPTION |
gam_channels
|
Passed to emg_from_rec(). 0-based channel indices to extract
from the GAM file. If None and a GAM file is selected in the
third dialog, a fourth dialog asks the user to type them instead
of raising an error.
TYPE:
int or list of int or None
DEFAULT:
None
|
ied
|
Passed to emg_from_rec(). The interelectrode distance, in mm, of
the matrix used to acquire the selected file. If None, a second
dialog asks for it (pre-filled with the default, 10 mm).
TYPE:
float or None
DEFAULT:
None
|
parent
|
Optional Qt parent used when embedding the dialog.
TYPE:
QWidget or None
DEFAULT:
None
|
| RETURNS |
DESCRIPTION |
emgfile
|
The loaded emgfile, or None if the first dialog (EMG file) was
canceled.
TYPE:
dict or None
|
See also
- emg_from_rec : Generic loader dispatching to emg_from_rec_meacs or
emg_from_rec_bam based on the filename.
Examples:
>>> from openhdemg.integrations.rec import select_and_load_rec_file
>>> emgfile = select_and_load_rec_file()