**1. Introduction**

Data are crucial elements of all systems that surround us today. Data collection is the process of gathering and measuring information on variables of interest, in an established systematic fashion that enables one to answer stated research questions, test hypotheses, and evaluate outcomes. The data collection component of research is common to all fields of study including physical and social sciences, humanities, business, etc. While methods vary by discipline, the emphasis on ensuring accurate and honest collection remains the same.

Indeed, storing valuable data is beneficial as this enables comparisons between different situations of the same subject, the same situation between different subjects, and a combination of both. As a result, proper treatment provides evidence in the scope of several environments, such as: patient monitoring with automatic health checks; sleep tracking with state detection; student performance analysis and prediction; obtaining a birds-eye view of how people travel, given the difficulties imposed by COVID-19; many other possibilities ruled by the quality of the data acquired.

In particular, the demand for ElectroEncephaloGraphy (EEG) and the devices that allow gathering brain activity has been increasing in the last few years. That interest is expected to keep growing in the future [1]. Medicine, marketing, interaction, and signal

**Citation:** Sánchez-Cifo, M.A.; Montero, F.; López, M.T. MuseStudio: Brain Activity Data Management Library for Low-Cost EEG Devices. *Appl. Sci.* **2021**, *11*, 7644. https://doi.org/10.3390/app11167644

Academic Editors: Alexander E. Hramov, Hidenao Fukuyama and Jing Jin

Received: 26 May 2021 Accepted: 16 August 2021 Published: 20 August 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

processing are some disciplines that require these kinds of products, especially those that feature dry sensors, knowing that some of them are relatively inexpensive.

Regardless of the field of study or preference for defining data (quantitative, qualitative), accurate data collection is essential to maintain the integrity of research. Both the selection of appropriate data collection instruments (existing, modified, or newly developed) and clearly delineated instructions for their correct use reduce the likelihood of errors occurring.

One of the main contributions is the compatibility with the Brain Imaging Data Structure (BIDS) [2] standard, which facilitates research activities related to the use of EEG devices. This standard allows researchers to organize and share the data associated with studies carried out in their laboratories. However, some EEG devices available on the market are not compatible with the BIDS. This issue makes managing recordings, sessions, and users a very difficult and inconvenient task. The majority of low-cost EEG devices have this limitation, and even though they are compatible with proprietary software for brain activity, the features included are limited and not very flexible [3].

In this context, we used a low-cost EEG device, known as Interaxon Muse 2 [4] (Muse and Muse S devices are also compatible). The manufacturer offered an SDK with computer support in the past (which was never compatible with Muse 2 and Muse S). However, it was deprecated, and currently, there is no viable alternative to use the devices in a research or professional environment. This only enables their connection to the original smartphone app, which is limited to guided meditation, and not intended for experiments.

To overcome the imposed limitations, we developed a Python library, called MuseStudio [5], that allows managing brain activity data from users with several sessions, including other helpful characteristics. The main research question that guided the development of this paper is the following: What (internal and external) features should a low-cost EEG library have to manage users' information while performing different activities? Among the solutions that MuseStudio provides, importing and exporting data stand as key differentiators using Muse. To ensure compatibility with current and future research, we focused on compliance with the best practices in data analysis and sharing [2]. Additionally, the recommendations from the OHBM COBIDAS MEEG committee [6] entirely apply to the introduced library in this paper.

There are multiple scenarios in which MuseStudio is helpful: sharing brain activity data recordings with colleagues thanks to the BIDS standard support; bulk importing other recordings in BIDS format, including raw recordings; converting to MNE format for further noise reduction, signal transformation, and analysis; viewing the experiments taking place in real time with several devices connected at the same time. For instance, a experiment can be performed with multiple Muse 2 devices, connected to a single computer running MuseStudio. Once the recording is finished, it can be converted for feature extraction and exported to share it with peers or attached to a research article for its publication, as it can be imported by anyone interested. Moreover, there is a big community around Muse devices due to its convenience and precision.

The article provides the related work, first. Then, the set of features included in the software with their specific purpose is presented. Afterwards, different examples of use are shown, outlining the results and the aspects of the visualization screen. Lastly, some insights about the necessity of this proposal are given, together with the discussion and the conclusion sections.

## **2. Background**

An electroencephalogram is a data-intensive test that allows detecting abnormalities in brain waves, or the electrical activity of the brain [7]. During the procedure, electrodes consisting of small metal discs with thin wires are pasted onto the scalp. This technology has a wide variety of uses, especially in the emotion recognition domain, as the results of these articles showed [8,9].

Due to the previously annotated increasing demand of EEG devices, the number of available devices is on the rise, and they have many different characteristics [3,10,11]. Moreover, these devices are not only present in the research environment [12–17], but also in the entertainment one [18–20]. A recent article [21] analyzed the number of electrodes included in devices depending on their design. The authors concluded that the availability of more or less electrodes depends on the final application in which the device will be used. However, in these scenarios, the number of sensors is not the only key factor: data collection and software for supporting them are other relevant factors for success.

In our case, we focused on low-cost EEG devices [10,22,23]. The price requirement results in the number of electrodes being reduced, and then, the device has less capabilities depending on the field in which it is deployed [21]. Considering that there are still plenty of applications that can be explored and relate to meditation, relaxation, concentration, stress, and anxiety, many therapeutic and entertainment activities can be approached. In this research, Muse 2 was chosen among other viable alternatives. It features a sampling rate of 256 Hz for EEG concurrent signals, four dry capturing electrodes, plus frontal reference channels, an accelerometer, a gyroscope, a PhotoPlethysmoGraphy (PPG) sensor, a built-in battery, and Bluetooth. Following the 10-20 standard system, the device locates its sensors at AF7, AF8, TP9, and TP10.

Muse has been validated as a device for conducting Event-Related Potential (ERP) research [24]. This device has been compared with other wearable sensors resulting in high performance in the fields of ease of integration and applied usability [25]. In addition, many other studies have used Muse for several purposes, including brain wave activity detection during training [26], enjoyment evaluation [27], accelerometer measurement of head movement during surgery [28], and concentration and stress measurement during surgery [29].

In addition to the inherent hardware limitations of the devices, the software restrictions in terms of applications, software development kits, and application programming interfaces should be considered as well [3]. The great majority of software provided by manufacturers cannot manage activities, record sessions, and provide remote real-time visualization while participants are being evaluated. These issues are important limitations in supporting scientific activities. The community of users and researchers of, for instance, Muse products cannot perform data management for several sessions and different users and, later, analyze these data. The traditional manner of making evaluations with Muse is shown in Figure 1. To overcome some of these issues, MuseStudio allows storing data in a structured manner and sharing them.

**Figure 1.** Traditional usage of Muse in experiments.

Specifically, Muse does not include brain data management software, nor real-time visualization, nor recording, so one cannot make use of its potential features. Our solution provides a Python library that allows working with those functionalities, even with several devices and places at the same time.
