dataesr/scientific-paragraphs-categorization huggingface dataset:
g. , BTI/4D, KIT, EDF, Biosemi BDF and BrainVision EEG. Other formats such as eXimia or CTF can be converted to FIF files using tools available in the MNE-C package, also available at http:// martinos. org/mne. The Neo project  (Garcia et al. , under review)  implements readers in Python for micromed and elan files, which can facilitate the use of these formats with MNE-Python. The FIF file format allows organization of any type of information into a multi-leaved tree structure of elements known as tags. It is at the core of the MNE-Python package which favored the development of highly optimized reading and writing routines for this format. It offers for example the ability to read data from disk only when needed. This access-on-demand principle can also be inherited by other classes that build upon Raw (such as Epochs and Evoked, below), which offers the possibility to process data with a very limited memory usage.
Typical processing steps at this stage include filtering, noise suppression (such as blinks or cardiac artifacts), data cropping, and visual data exploration. All of these are supported by convenient instance methods of the Raw class that will be explored in greater detail below. Typical M/EEG experiments involve presentation of stimuli and responses based on some form of task demands. The occurrence of each stimulus or response can can be used to define an epoch which captures the brain signals preceding the stimulus or response as well as the response following them. Depending on the experimental paradigm and the analysis employed, an epoch is typically 500 ms to 2 s long. Epochs of different experimental conditions obtained from one subject are stored in MNE-Python in an instance of the Epochs class.
An Epochs instance is created by specifying one or more instances of Raw to operate on, the event/stimulus type(s) of interest, and the time window to include. The Epochs object has various parameters for preprocessing single trial data, such as baseline correction, signal detrending, and temporal decimation. Epochs can be averaged to form evoked data containing the MEG and EEG signals known respectively as event related fields (ERFs) and event related potentials (ERPs). The averaged data are stored in instances of the Evoked class, and can be created simply by calling the average method on an instance of Epochs. As the Raw class, both Epochs and Evoked classes expose convenient plot methods that help visualizing single trials and evoked responses. Each of these data containers can be written to and read from disk using the FIF file format, which is readable from the MNE C code and the MNE-Matlab toolbox.
These convenience functions in MNE-Python are known as pick functions, and they start with pick_ (e. g. , pick_types to select by channel type). Other standard data structures in MNE-Python handle forward operators, covariance matrices, independent components, and source estimates. These structures will be introduced below after explaining their role in the standard pipeline. Importantly, the API follows as much as possible the Python standard library and the widely spread NumPy package. It avoids the proliferation of classes and limits the use of complex inheritance mechanisms. This helps to keep the code simple, favoring new contributions.
Several channels can be filtered in parallel, thanks to the standard multiprocessing Python module exposed via the Joblib package (http://pythonhosted. org/joblib/). The FFTs used to implement FIR filters can also be efficiently computed on the graphical processing unit (GPU) via CUDA and PyCUDA  (Klöckner et al. , 2012) , further reducing the execution time. When segmenting continuous data into epochs, single epochs can be rejected based on visual inspection, or automatically by defining thresholds for peak-to-peak amplitude and flat signal detection. The channels contributing to rejected epochs can also be visualized to determine whether bad channels have been missed by visual inspection, or if noise rejection methods have been inadequate. Instead of simply excluding contaminated data from the analysis, artifacts can sometimes be removed or significantly suppressed by using methods for signal decomposition such as signal space projection (SSP;  Uusitalo and Ilmoniemi, 1997)  or independent component analysis (ICA, see Section 3.
1 below). The assumption behind the SSP method is that artifacts are confined to a small-dimensional spatial subspace with specific topographic patterns that are orthogonal or almost orthogonal to the brain signal patterns of interest and can thus be suppressed with appropriate projection vectors. Projection vectors can be derived from instances of Raw as well as Epochs. MNE-Python also offers command-line level scripts and Python-level functions to automatically detect heart beats and eye blinks in the data, making automatic SSP computation possible. Once projection vectors are specified for subtraction in the measurement info, MNE minimizes memory and disk space usage by not modifying the original data but instead applying the projections on demand. This enables the user to explore the effects of particular SSPs later in the pipeline and to selectively abandon some projection vectors if the signals of interest are attenuated.
Source localization methods generally fall into one of three categories: parametric overdetermined methods such as timevarying dipole fitting  (Scherg and Von Cramon, 1985) , scanning methods (including beamformers and the MUSIC algorithm), and distributed inverse methods. While MNE-Python does not provide dipole-fitting functionality, it does implement multiple beamformer methods and distributed inverse methods. The most popular of these is the software namesake MNE, which stands for Minimum-Norm Estimate  (Wang et al. , 1992; Hämäläinen and Ilmoniemi, 1994) , and its variants which include dSPM  (Dale et al. , 2000)  and sLORETA  (Pascual-Marqui, 2002). The standard MNE pipeline by uses MNE or dSPM as the inverse method by default. These methods employ the (weighted) 2 -norm of the current distribution as regularizer.
SURFACE-BASED NORMALIZATION While clinical examinations generally consider data from each patient separately, neuroscience questions are frequently answered by comparing and combining data from groups of subjects. To achieve this, data from all participating subjects need to be transformed to a common space in a manner that helps compensate for inter-subject differences. This procedure, called morphing by the MNE software, exploits the FreeSurfer spherical coordinate system defined for each hemisphere  (Dale et al. , 1999; Fischl et al. , 1999). The process is illustrated in Figure  5.
DENOISING WITH INDEPENDENT COMPONENT ANALYSIS (ICA) In addition to SSP, MNE supports identifying artifacts and latent components using temporal ICA. This method constitutes a latent variable model that estimates statistically independent sources, based on distribution criteria such as kurtosis or skewness. When applied to M/EEG data, artifacts can be removed by zeroing out the related independent components before inverse transforming the latent sources back into the measurement space. The ICA algorithm currently supported by MNE-Python is FastICA  (Hyvärinen and Oja, 2000)  implemented in Scikit-Learn  (Pedregosa et al. , 2011). Here, MNE-Python has added a domain specific set of convenience functions covering visualization, automated component selection, persistence as well as integration with the MNE-Python object system.
ICA in MNE-Python is handled by the ICA class which allows one to fit an unmixing matrix on either Raw or Epochs by calling the related decompose_raw or decompose_epochs methods. After a model has been fitted, the resulting source time series can be visualized using trellis plots  (Becker et al. , 1996)  (cf. Figure  6 ) as provided by the plot_sources_raw and plot_sources_epochs methods (illustrated in Figure  6 ). In addition, topographic plots depicting the spatial sensitivities of the unmixing matrix are provided by the plot_topomap method (illustrated in Figure  6 ). Importantly, the find_sources_raw and find_sources_epochs methods allow for identifying FIGURE 5 | Current estimates obtained from an individual subject can be remapped (morphed), i. e. , normalized, to another cortical surface, such as that of the FreeSurfer average brain "fsaverage" shown here.
NON-PARAMETRIC CLUSTER-LEVEL STATISTICS For traditional cross-subject inferences, MNE-Python offers several parametric and non-parametric statistical methods. Parametric statistics provide valid statistical contrasts in so far as the data under test conform to certain underlying assumptions of Gaussianity. The more general class of non-parametric statistics, which we will focus on here, do not require such assumptions to be satisfied  (Nichols and Holmes, 2002; Pantazis et al. , 2005). M/EEG data naturally contains spatial correlations, whether the signals are represented in sensor space or source space, as temporal patterns or time-frequency representations. Moreover, due to filtering and even the characteristics of the signals themselves, there are typically strong temporal correlations as well.
MNE-Python includes a general framework for cluster-based tests to allow for performing arbitrary sets of contrasts along arbitrary dimensions while controlling for multiple comparisons. In practice, this means that the code is designed to work with many forms of data, whether they are stored as SourceEstimate for source-space data, or as Evoked for sensor-space data, or even as custom data formats, as necessary for time-frequency data. It can operate on any NumPy array using the natural (grid) connectivity structure, or a more complex connectivity structure (such as those in a brain source space) with help of a sparse adjacency matrix. MNE-Python also facilitates the use of methods for variance control, such as the "hat" method  (Ridgway et al. , 2012). Two common use cases are provided in Figure  7.
FUNCTIONAL CONNECTIVITY Functional connectivity estimation aims to estimate the structure and properties of the network describing the dependencies between a number of locations in either sensor-or sourcespace. To estimate connectivity from M/EEG data, MNE-Python employs single-trial responses, which enables the detection of relationships between time series that are consistent across trials. Source-space connectivity estimation requires the use of an inverse method to obtain a source estimate for each trial. While computationally demanding, estimating connectivity in sourcespace has the advantage that the connectivity can be more readily related to the underlying anatomy, which is difficult in the sensor space. The connectivity module in MNE-Python supports a number of bivariate spectral connectivity measures, i.
The connectivity estimation routines in MNE-Python are designed to be flexible yet computationally efficient. When estimating connectivity in sensor-space, an instance of Epochs is used as input to the connectivity estimation routine. For source-space connectivity estimation, a Python list containing SourceEstimate instances is used. Instead of a list, it is also possible to use a Python generator object which produces SourceEstimate instances. This option drastically reduces the memory requirements, as the data is read on-demand from the raw file and projected to source-space during the connectivity computation, therefore requiring only a single SourceEstimate instance to be kept in memory. To use this feature, inverse methods which operate on Epochs, e. g. , apply_inverse_epochs, have the option to return a generator object instead of a list.
We provide functions to do this automatically for cortical parcellations obtained by FreeSurfer, which employs probabilistic atlases and cortical folding patterns for an automated subject-specific segmentation of the cortex into anatomical regions  (Fischl et al. , 2004; Desikan et al. , 2006; Destrieux et al. , 2010). The obtained set of summary time series can then be used as input to the connectivity estimation. The association of time series with cortical regions simplifies the interpretation of results and it makes them directly comparable across subjects since, due to the subject-specific parcellation, each time series corresponds to the same anatomical region in each subject. Code to compute the connectivity between the labels corresponding to the 68 cortical regions in the FreeSurfer "aparc" parcellation is shown in Table  4  and the results are shown in Figure  9.
MNE-Python implements two source localization techniques based on beamforming: Linearly-Constrained Minimum Variance (LCMV) in the time domain  (Van Veen et al. , 1997)  and Dynamic Imaging of Coherent Sources (DICS) in the frequency domain  (Gross et al. , 2001). Beamformers construct adaptive spatial filters for each location in the source space given a data covariance (or cross-spectral density in DICS). This leads to pseudo-images of "source power" that one can store as SourceEstimates. Figure  4  presents example results of applying the LCMV beamformer to the sample data set for comparison with results achieved using dSPM. The code that was used to generate this example is listed in Table  5. import mne from sklearn. svm import SVC from sklearn. cross_validation import cross_val_score, ShuffleSplit # Take only the data channels (here the gradiometers) data_picks = mne.
NON-LINEAR INVERSE METHODS All the source estimation strategies presented thus far, from MNE to dSPM or beamformers, lead to linear transforms of sensor-space data to obtain source estimates. There are also multiple inverse approaches that yield non-linear source estimation procedures. Such methods have in common to promote spatially sparse estimates. In other words, source configurations consisting of a small set of dipoles are favored to explain the data. MNE-Python implements three of these approaches, namely mixed-norm estimates (MxNE)  (Gramfort et al. , 2012) , timefrequency mixed-norm estimates (TF-MxNE)  (Gramfort et al. , 2013b ) that regularize the estimates in a time-frequency representation of the source signals, and a sparse Bayesian learning technique named γ-MAP  (Wipf and Nagarajan, 2009).
DISCUSSION Data processing, such as M/EEG analysis, can be thought of as a sequence of operations, where each step has an impact on the subsequent (and ultimately final) results. In the preceding sections we have first detailed the steps of the standard MNE pipeline, followed by the presentation of some alternative and complementary analysis tools made available by the package. MNE-Python is a scripting-based package with many visualization capabilities for visualizing results of processing steps and final outputs, but limited graphical user interfaces (GUIs) for actually performing processing steps. Leveraging the good  import mne # load raw data and create epochs and evoked objects as in Table  1 , but picking # only MEG channels using mne. fiff. pick_types (raw. info, meg=True, eeg=False)  # compute noise and data covariance noise_cov = mne.
compute_covariance(epochs, tmax=0. 0) noise_cov = mne. cov. regularize (noise_cov, evoked. info, mag=0. 05, grad=0. 05, eeg=0. 1, proj=True) data_cov = mne. compute_covariance (epochs, tmin=0. 04, tmax=0. 15) # compute LCMV inverse solution fwd_fname = 'sample_audvis-meg-vol-7-fwd. fif' fwd = mne. read_forward_solution (fwd_fname, surf_ori=True) stc = mne. beamformer. lcmv (evoked, fwd, noise_cov, data_cov, reg=0. 1, pick_ori='max-power')  # save result in 4D nifti file for plotting with Freesurfer stc. save_as_volume  ('lcmv. nii. gz', fwd['src'] , mri_resolution=False) readability on the Python language, particular care has been taken to keep the scripts simple, easy to read and to write. This is similar in spirit with the FieldTrip package  (Oostenveld et al. , 2011) , in that it pushes users toward standardizing analyses via scripting instead of processing data in a GUI.
Perhaps the largest downside of this scripting approach is that users clearly need to be able to write reasonable scripts. However this approach, which is facilitated by many examples that can be copied from the MNE website, has very clear benefits. First, our experience from analyzing several M/EEG studies unambiguously indicates that the processing pipeline must be tailored for each study based on the equipment used, the nature of the experiment, and the hypotheses under test. Even though most pipelines follow the same general logic (filtering, epoching, averaging, etc. ), the number of options is large even for such standard steps. Scripting gives the flexibility to set those options once per study to handle the requirements of different M/EEG studies. Second, analyses conducted with help of documented scripts lead to more reproducible results and ultimately help improve the quality of the research results.
The MNE-Python project is developed and maintained to help provide the best quality in terms of accuracy, efficiency, and readability. In order to preserve analysis accuracy, the development process requires the writing of unit and regression tests (so-called test-driven development) that ensure that the software is installed and functioning correctly, yielding results that match those previously obtained from many different users and machines. This testing framework currently covers about 86% of the lines of MNE-Python code, which not only enhances the quality and stability of the software but also makes it easier to incorporate new contributions quickly without breaking existing code. Code quality is also improved by a peer review process among the developers. Any code contribution must be read by at least two people, the author and a reviewer, in order to mitigate the risk of errors.
Moreover, the entire source code and full development history is made publicly available by a distributed version control system. This makes it possible to keep track of the development of the project and handle code changes in a way that minimizes the risk of rendering existing scripts and analysis pipelines inoperable. Finally, large parts of the source code are commented using inline documentation that allows for automatically building user manuals in PDF and HTML formats. The Ohloh. net 1  source code analysis project attests that 35% of the source code consists of documentation and with this, MNE-Python scores in the upper third of the most well documented Python projects. Some recent studies have pointed out the heterogeneity of functional MRI data analysis pipelines  (Carp, 2012a,b).
Again, this is not wrong per se, as expertise is more easily found from colleagues than mailing lists or user documentation. By favoring on-line collaborative work between international institutions, MNE-Python aims to reduce this geographical bias. While an important goal in science is the reproducibility of results, reproducibility can have two levels of meaning. Rerunning the same analysis (code) on the same dataset using the same machine should always be possible. However, we should really be aiming for a deeper level of reproducability that helps foster new scientific discoveries, namely where rerunning the same analysis on data collected on an equivalent task in another laboratory. In other words, analysis pipelines should ideally be reusable across laboratories. Although it is often overlooked by users (and some developers), care must be taken regarding the license governing use of a given software package in order to maximize its impact.
The MNE-Python code is thus provided under the very permissive open source new BSD license. This license allows anybody to reuse and redistribute the code, even in commercial applications. Neuroimaging is a broad field encompassing static images, such as anatomical MRI as well as dynamic, functional data such as M/EEG or fMRI. The MNE software already relies on some other packages such as FreeSurfer for anatomical MRI processing, or Nibabel for file operations. Our ambition is of course not to make MNE-Python self-contained, dropping any dependency on other software. Indeed the MNE-Python package cannot and does not aim to do everything. MNE has its own scope and seeks to leverage the capabilities of external software in the neuroimaging software ecosystem. Tighter integration with fMRI analysis pipelines could be facilitated by NiPype  (Gorgolewski et al.
, 2011)  but is first made possible by adopting standards. That is why all data MNE produces are stored in FIF file format which can be read and written by various software packages written in different languages. The MNE-Python code favors its integration in the scientific Python ecosystem via the use of NumPy and SciPy, and limits effort duplication and code maintainance burden by pushing to more general purpose software packages any improvement to non M/EEG specific algorithms. For example, improvement of ICA code were contributed back to Scikit-Learn, as it could be for signal processing routines in the scipy. signal module. Good science requires not only good hypotheses and theories, creative experimental design, and principled analysis methods, but also well-established data analysis tools and software.
Communication Disorders fellowship  F32DC012456 , and  NSF  awards  0958669  and  1042134. The work of Alexandre Gramfort was partially supported by  ERC-YStG-263584. Martin Luessi  was partially supported by the  Swiss National Science Foundation Early Postdoc. Mobility  fellowship  148485. Christian Brodbeck  was supported by grant  G1001  from the  NYUAD Institute. Teon Brooks  was supported by the  National Science Foundation Graduate Research Fellowship  under Grant No. DGE-1342536. Lauri Parkkonen  was supported by the  "aivoAALTO" program. Daniel Strohmeier  was supported by grant  Ha 2899/8-2  from the  German Research Foundation.
This work presents recent developments in the calculation of opacity and equation of state tables suitable for including in the radiation hydrodynamic code ARWEN  [1]  to study processes like ICF or X-ray secondary sources. For these calculations we use the code bigbart to compute opacities in LTE conditions, with self-consistent data generated with the Flexible Atomic Code (FAC)  [2]. Non-LTE effects are approximately taken into account by means of the new RADIOM model developed in  [3] , which makes use of existing LTE data tables. We use the screened-hydrogenic model  [4]  to derive the Equation of State (EOS) using the population and energy of each level.
RADIATIVE MODEL Calculating the radiative properties of a plasma is a formidable task, even further if NLTE effects are included in our models, where a myriad of transitions between levels are needed for solving a collisional-radiative system with the increasing complexity of ions with increasing Z. The simplest codes assume an average atom and calculates transitions between average orbitals. Other models merge close configurations to obtain configuration-averages reducing the amount of levels to treat. Both possibilities are implemented in our code bigbart to compute the spectral opacity and emissivity of a plasma for a given temperature and density. In order to reduce computational cost as much as possible bigbart now uses modified FAC output files to reuse the atomic data generated. Energy levels, radiative transitions and photoionization crosssections are calculated under request and stored in indexed binary files.
COMPARISON TO EXPERIMENTAL DATA In order to test mixtures calculations we have included in figure  3  the transmission coefficient for a mixture of iron with sodium fluoride compared with the experimental data described in  [11]. Conditions determined were 59 eV and 11. 3 mg/cm 3. We include non-relativistic (ALEXANDRIT DCA) and relativistic (bigbart DCA) hydrogenic calculations from previous versions used in the Instituto de Fusión Nuclear, figure  3(a). The new FAC-UTA calculation in figure  3 (b) shows in general a better fit, especially in the 100-150 eV range, showing the absorption peak above 100 eV which does not appear in the hydrogenic calculations.