*2.2. Raw Data Import*

MuseStudio facilitates the data import process from raw XDF files. Those can contain EEG, PPG, accelerometer, and gyroscope recordings from multiple Muses at the same time. That adds processing complexity because the captured data are not properly organized at recording time. The separation of recordings into different containers causes the reception of disordered data at the stream-type level. For instance, EEG and PPG may not be received in such an order, but it is ensured that channels inside those streams are correctly ordered and ready to use afterwards. For this reason, the library seeks the metadata of every channel to rearrange them into different sets of recordings, which can be further used accordingly. Figure 2 shows an example of a file containing the recording of two Muses (Step 1), which were used in a experiment simultaneously. The library then converts the file into four independent lists with the same length as the number of devices used (Step 2). Those lists already contain the information of the device used in each recording.

**Figure 2.** Example of XDF file conversion into separate lists.

Additionally, there is compatibility for importing all the XDF files located inside a particular folder. In such a case, the output remains the same, being four lists with a length that is equivalent to the sum of all the recordings inside all the files. Moreover, the library provides flexibility to researchers using Muse and Python because the data import approach only returns the lists without any other manipulation, so they can start working with native data.
