WFDB_isigopen
Keywords: wfdb_tools

Next: WFDB_osigopen Up: Selecting Database Records Previous: WFDB_annopen Contents

##
WFDB_isigopen

Usage: | `S = WFDB_isigopen(RECORD)` |
Input: | `RECORD`: (string) record name |
Output: | `S`: Siginfo structure(s) |

This function opens input signal files for a selected record. If RECORD begins with `+', previously opened input signal files are left open, and the record name is taken to be the remainder of RECORD after discarding the `+'. Otherwise, WFDB_isigopen closes any previously opened input signal files, and takes all of RECORD as the record name. S is an array of WFDB_Siginfo structures (see section 3.8 for an explanation of the fields), one for each signal that was opened.

Calling WFDB_isigopen also sets internal WFDB library variables that record the base time and date, the length of the record, and the sampling and counter frequencies, so that time conversion functions such as WFDB_strtim (see section 3.5) that depend on these quantities will work properly.

WFDB_isigopen will fill the structure array S with information about the signals in the order in which signals are specified in the `hea' file for the record. Signal numbers begin with 0, so that fields in S(n) are the attributes of signal (n-1). For example, the gain attributes of each signal in record `100s' can be read like this:

        >> S = WFDB_isigopen('100s');
        >> for ii = 1:length(S)
        sprintf('Signal %d, gain: %d', ii-1, S(ii).gain)
        end
        ans =
        Signal 0, gain: 200
        ans =
        Signal 1, gain: 200

An error message is produced if WFDB_isigopen is unable to open any of the signals listed in the header file, or if it cannot read the header file. It is not considered an error if only some of the signals can be opened, however.

See also: WFDB_Siginfo (3.8)

Next: WFDB_osigopen Up: Selecting Database Records Previous: WFDB_annopen Contents