INSPECTOR: free software for magnetic resonance spectroscopy data inspection, processing, simulation and analysis

In vivo magnetic resonance spectroscopy (MRS) is a powerful tool for biomedical research and clinical diagnostics, allowing for non-invasive measurement and analysis of small molecules from living tissues. However, currently available MRS processing and analytical software tools are limited in their potential for in-depth quality management, access to details of the processing stream, and user friendliness. Moreover, available MRS software focuses on selected aspects of MRS such as simulation, signal processing or analysis, necessitating the use of multiple packages and interfacing among them for biomedical applications. The freeware INSPECTOR comprises enhanced MRS data processing, simulation and analytical capabilities in a one-stop-shop solution for a wide range of biomedical research and diagnostic applications. Extensive data handling, quality management and visualization options are built in, enabling the assessment of every step of the processing chain with maximum transparency. The parameters of the processing can be flexibly chosen and tailored for the specific research problem, and extended confidence information is provided with the analysis. The INSPECTOR software stands out in its user-friendly workflow and potential for automation. In addition to convenience, the functionalities of INSPECTOR ensure rigorous and consistent data processing throughout multi-experiment and multi-center studies.

In vivo magnetic resonance spectroscopy (MRS) enables the noninvasive measurement of small molecules from localized regions in living tissue, thereby providing a powerful tool to assess tissue metabolism and function. The repertoire of measurable chemical compounds makes MRS a versatile tool for researching living systems (Supplementary Material, S1) and characterizing clinical conditions, especially for longitudinal studies requiring repeated experimentation. For instance, proton ( 1 H) MRS is applied to many central nervous system disorders, ranging from multiple sclerosis to cancer, that involve significant metabolic alterations in the concentrations of small molecules 1 . Despite the strong potential of MRS for cutting-edge biomedical research and clinical applications, deviations from optimal data quality, processing strategy or quantification pipeline reduces the metabolic information that can be extracted. Resulting systematic errors have been suspected to be the key contributing factors for limited multi-site reproducibility 2 .
Concentrations of metabolites measured with in vivo MRS are typically in the millimolar range (< 12 mmol/L or mM) 3,4 . The concentration of tissue or free water signal (e.g. cerebrospinal fluid), by comparison, is in the molar range (40-55 M) 5 . Due to the low overall Boltzmann spin magnetization, MRS is a low-sensitivity method, and a single measurement of metabolites suffers from low signal-to-noise ratio (SNR) 6 . MRS benefits from a magnetic resonance (MR) scanner with a strong and homogeneous static magnetic field (B 0 ) 7 , a relatively large volume of interest (VOI), and signal averaging, to name a few.
MRS software provided by MR scanner vendors is generally limited in scope and function, potentially resulting in inconsistent quantification accuracy and non-standardized study outcomes 8,9 . Data of high experimental quality should therefore be complemented by efficient and state-of-the-art data processing and analysis routines 9 . Robust and precise signal processing and analysis MRS are of the utmost importance because retaining every possible bit of information from start to finish is vital for accurate analysis of the final result. Similarly, potential erroneous and artificial signal contributions need to be identified and corrected or excluded from further analysis to avoid degradation or falsification of the derived metabolic information.
MA) as a stand-alone user-friendly software with powerful analytic capabilities for applying magnetic resonance spectroscopy data to biomedical research and ultimately clinical applications 12 . INSPECTOR is freeware for non-commercial applications and requires neither MATLAB nor other software dependencies 13 . INSPECTOR is available for Microsoft Windows, Apple MacOS and Linux, making it platform-independent and functional on all commonly used operating systems. The only requirement is installation of the MATLAB Runtime environment available for download from the MathWorks website free of charge and without a license 14 . Interface and data management. INSPECTOR is organized into 'pages' , each offering a set of functions related to specific aspects of MRS signal manipulation, like data handling, processing, simulation, and quantification. INSPECTOR is controlled entirely through a graphical user interface (GUI) (Fig. 1). The application pages are sorted in a menu bar from left to right according to a typical workflow. Additional information is either printed as a summary or in detail ("Verbose" mode) in an information window. Loaded data can be transferred from one page to another. The data can be accessed and visualized in either time or frequency domain on any page.
A typical processing workflow of brain MRS data in INSPECTOR comprises several steps, which can be further differentiated according to regular, J-difference editing (JDE) or other spectroscopy experiment types 15 (Fig. 2). Experimentally acquired raw data are loaded and averaged on the Data page. Spectra can be further improved on the Processing page using standard signal processing methods. Basis sets for metabolite quantification can be simulated on the Synthesis or MARSS page and used for spectral analysis on the LCM page. An overview of each page follows below.

Pages and applications
Each page, named for its corresponding step in the MRS data handling pipeline, contains various associated functions for data processing and visualization. Users can view function hints via mouseover. An overview of these functions is available in Supplementary Material (S2).
Examples from our and other laboratories are given below demonstrating particular functionalities available on each page of INSPECTOR. Examples from published studies are cited in the text; acquisition details can be found in Supplementary Material (S3). Data page. The Data page contains methods for loading and saving protocol files, loading data, quality assessment (QA), and spectral alignment for averaging individual traces into a single spectrum used in further processing and analysis.
Protocol files enable saving a complete image of all parameter selections and the INSPECTOR workflow. One file can store all adjustments and paths used for loading data, processing, simulation and quantification. Protocol files were designed to facilitate consistency and reproducibility of data processing, especially in case of data from longitudinal, multi-center, or otherwise large studies.
Data can be sorted according to MRS experiment type. A simple MRS experiment can be loaded as "Regular MRS", whereas JDE experiments with two or three conditions can be loaded as "JDE". INSPECTOR supports the following data formats: All MRS-relevant header information, such as echo time (T E ), repetition time (T R ), N R , spectral width, Larmor frequency, volume of interest (VOI) and more, are displayed on the Data page after the data are loaded. The Data page allows inspection of acquired receive channel-specific signals, which can be visualized as FIDs in the time domain or as spectra in the frequency domain. In vivo MRS experiments are susceptible to system B 0 drifts, which have consequences for data quality as they may affect the efficiency of frequency-selective RF pulses for water suppression or editing, and cause spectral line broadening when MRS signals are combined. It is therefore desirable to break down long MRS scans into smaller parts to allow intermittent experimental frequency adjustments that mitigate such effects. INSPECTOR supports the handling and concatenation of such scan series in addition to basic single-scan data formats. Water references support the calculation of channel-specific scaling factors and phases for sensitivity-weighted channel combination of FID traces. Phase correction is based either on Klose's method (used also for eddy-current correction, ECC) 17 , which is recommended, or on taking only the first FID point as a phase reference. Similar to the metabolite data, the header information is displayed as well.
In vivo MRS also commonly suffers from oscillatory frequency and phase variations due to magnetic susceptibility-induced B 0 variations across the subjects' respiratory cycles 18 . Before further treatment of signal repetitions, data can be inspected by the QA tool. The QA tool provides simple and fast data visualization and quality management for assessing frequency drift, hardware instability, subject motion, and other effects that can cause variability across scan repetitions. Visualization of the spectra in the QA tool enables the analysis and display of the signal (1) minimum, (2) maximum, (3) mean, (4) median, (5) standard deviation (SD) and (6) integral over the selected spectral frequency window. Erroneous data, e.g. due to technical malfunction of individual receivers or excessive motion, can be thereby identified and discarded. The QA tool can be applied before and after potential frequency, phase and amplitude corrections for optimal quality management and a side-by-side comparison of the effects of data manipulation and correction.  www.nature.com/scientificreports/ Frequency, phase or amplitude corrections are fully automated and based on an arbitrary number of concomitantly considered frequency windows (e.g. 0…2.1 ppm, 3.3…4.1 ppm and 7.1…9.1 ppm) and tailored spectral preprocessing such as line broadening, apodization (cut) and zero-filling. Frequency, phase and amplitude alignment rely on the comparison of a MRS trace with a reference, and a customized amplitude-weighted cross-correlation algorithm is applied to minimize the deviation of the two. The reference FID signal can be either a specific trace or a combination of traces (for improved SNR). Additional parameters include variation range and resolution in Hz for frequency alignment, phase step in degrees for phase alignment and polynomial order for amplitude alignment.
MR spectra pertaining to different JDE conditions, i.e. with editing radiofrequency (RF) pulses ON vs. OFF, are inherently distinct in content and thus also shape. INSPECTOR applies all corrections in an editing condition-specific fashion, before MRS traces are combined into two averaged spectra representing the ON and OFF conditions. Example: loading and pre-processing of brain MRS data. INSPECTOR can visualize and selectively analyze data from each coil channel and repetition, or any combinations thereof. This enables inspection of all recorded signals in time or frequency domain for consistency and identification of signals that might be corrupted and therefore should be omitted from the final averaged spectrum. The signals can be visualized individually, as a superposition or as an array (Fig. 3a).
The QA tool and the Align tool work together to support data visualization both before and after the potential corrections of frequency, phase and amplitude. The example shows amplitude (Series mode) as well as phase and frequency (Superposition mode) of the real-valued N-acetylaspartate (NAA) peak measured in the human brain at 7 T before and after frequency and phase alignment with the Align tool. The data can be inspected in series or as a superposition of traces over a user-defined frequency range ( Fig. 3b) as well as a spectral array (not shown).
INSPECTOR allows various steps to be involved in the signal processing, from simple averaging of all signals to more refined handling of all signals, which consist of RF receive channel-specific, i.e. relative, phase correction, weighting of receivers and phase and frequency alignment of the resultant spectra (Fig. 3c). As can be seen in the example, the highest SNR and lowest full width at half maximum (FWHM) of the methyl group of total creatine (tCr, 3.03 ppm) signal were measured in a spectrum processed with receiver-specific relative phase correction and sensitivity-weighted averaging, and phase and frequency alignment of the resultant sequence repetitions. Combination of these methods is recommended 9 .
Processing page. The Processing page contains methods for loading, visualizing, calibrating, filtering, baseline-correcting, and otherwise post-processing spectra.
The data can be transferred from the Data page (resulting from the pre-processed and averaged set of experimental spectra), Synthesis page, or LCM page or directly loaded as INSPECTOR's native (.mat) data format, the combination of text (.txt) and parameter (.par) files used by the NMRWizard software 19 ; data (.raw), parameter (.coord) and basis set (.basis) formats used by LCModel software 20 and jMRUi's (.mrui) data format 21 , enabling side-by-side software comparison and interfacing. INSPECTOR uses established methods for signal processing in MRS: Lorentzian and Gaussian line-broadening filters, zero-filling, zero-and first-order phasing, amplitude scaling, frequency shifting, and baseline offsets as described in the literature 22 .
MRS spectra with non-flat baselines can be corrected with the Baseline handling tool. For example, non-flat spectral baselines can originate from solids (e.g., plastics) in the RF coil housing 23 , especially when the data are measured with pulse-acquire methods. The Baseline handling tool allows baseline manipulation using polynomial interpolation over specific frequency ranges. It also allows removing unwanted signals (e.g., water in case of insufficient water suppression) using the Hankel singular value decomposition method 24 .
Standard processing approaches are extended by unique functionalities and algorithms specifically developed for in vivo MRS. For instance, the alignment of two spectra, representing, for example, the condition-specific averages of the JDE spectra ON and OFF, can be achieved by nonlinear least squares optimization considering up to 8 different aspects of spectral processing such as relative frequency shifting, exponential line broadening, polynomial baseline, and others. This advanced spectral alignment can be applied for arbitrary selections of specific frequency ranges over which signals are expected to remain unaffected and can therefore support spectral alignment between different JDE conditions. All these functionalities can be conveniently selected and combined through the GUI.
Analysis of SNR, FWHM and peak integral can be performed over any user-defined target frequency range. Noise for SNR measurement is similarly calculated over a user-defined frequency range.
Example: J-difference editing on GABA at 3 T. In this example dataset, showing processing of two spectra for measuring glutamate and glutamine (Glx) and gamma-aminobutyric acid (GABA) in a healthy adult (44 years, male) in the auditory cortex, the frequency alignment between averaged JDE ON and OFF spectra concomitantly considering the frequency ranges 0…0.5 ppm, 3.15…3.50 ppm and 3.87…4.20 ppm resulted in visually overlapping and aligned spectral peaks (Fig. 4a,b). Yet the difference between the two conditions exhibited notable subtraction artifacts in spectral areas comprising strong singlet peaks from tCr and choline (Cho) (Fig. 4c, blue). While the subtraction error at 3.20 ppm from Cho is likely irrelevant for quantification, the corresponding tCr-related artifact at 3.03 ppm overlaps with the targeted GABA signal and is thus expected to induce systematic errors in the quantification of GABA. The additional consideration of line broadening, (minute) amplitude scaling, offset and zero-order phase correction, in addition to frequency alignment, not only improves the apparent overlap of spectral ON and OFF conditions (Fig. 4b)    .03 ppm measured in the brain at 7 T. Data averaged without any processing resulted in the lowest spectral SNR and the highest FWHM, and the spectrum was out of phase (black). Phase correction for channel combination improved the SNR and FWHM (green). Additional sensitivity-weighting of individual coil channels further improved SNR (red). The best spectral quality was achieved by also correcting for relative phase and frequency variations between scan repetitions (blue).   www.nature.com/scientificreports/ difference signals void of apparent subtraction artifacts (Fig. 4c, red) as a prerequisite for meaningful quantification of GABA from these spectral data.
Synthesis page. The Synthesis page contains methods for simulating and processing singlet arrays and brain spectra with varying spectral quality and baseline effects. Basis functions consisting of singlets are useful for LCM analysis of water, lipids, macromolecules or X-nuclei (non-1 H nuclei) MR spectra. One or more singlets can be simulated according to Larmor frequency (the scanner B 0 field), bandwidth, calibration of synthesizer frequency in ppm and number of complex points. Every singlet can be individually characterized by frequency in ppm units, amplitude in arbitrary units and linewidth in hertz units, in the MATLAB syntax: [frequency amplitude linewidth]. In addition, complex Gaussian noise and polynomial baselines can be added to the simulated spectrum in the frequency domain in a flexible and well-defined fashion. Signals can be further processed with the same methods as on the Processing page, such as cut, zero filling, Lorentzian and Gaussian line broadening, and corrections to phase, scale, shift, and offset. These functionalities can be used to illustrate and quantify the impact of spectral quality including line shape, baseline and SNR on the accuracy of spectral fitting and linear combination modeling (compare Monte-Carlo functionality on LCM page).
In certain situations, a high-quality brain spectrum can be useful, for example, for SNR simulations, the explorations of the effects of signal processing or for teaching purposes. In this case, a 1 H MR spectrum can be synthesized on the Synthesis page. This spectrum includes all relevant metabolite signals at (average) concentrations taken from the literature 6 .
Example: Synthesis page. The Synthesis page allows the generation of singlet and other spectral signals ( Fig. 5a), which can be employed as basis functions (or part thereof) for quantification of MRS signals. Adding varying levels of well-defined noise to these signals can be useful for studying the impact of noise for analysis (Fig. 5b). The Synthesis page also enables simulation of singlet arrays (Fig. 5c) and a 1 H brain spectrum using already simulated basis functions (Fig. 5d), resembling realistic use cases.

MARSS page. The Magnetic Resonance Spectrum Simulator (MARSS) page contains methods for simulat-
ing the signals of arbitrary MRS metabolites, i.e., spin systems, based on the quantum mechanical density-matrix formalism providing a complete theoretical description of any nuclear magnetic resonance experiment 25 .
MARSS has been shown to provide experimentally realistic spectra for the commonly employed MRS sequences STEAM 26 , PRESS 27 , semi-LASER 28 , LASER 29 , and SPECIAL 30 . LCM for quantification employing simulated basis functions relies on the assumption that the calculated spectra resemble physical reality. MARSS has been incorporated into INSPECTOR for the automated simulation of full metabolite basis sets comprising realistic sequence-and vendor-specific spectral shapes for metabolite quantification free of systematic errors based on the selection of scanner vendor, MRS sequence type, and basic acquisition parameters such as B 0 field strength or T E . It has been previously demonstrated that the basis functions expected for even the same sequence by different vendors can differ significantly 10 ; as such, the ability to easily generate vendor-specific basis sets, for instance, for Siemens, General Electric and Philips, is of great importance to the MR spectroscopy field.
MARSS is able to simulate even complicated nuclear spin systems more quickly than other available simulation packages 10 by employing the so-called T-matrix algorithm 31 , which reduces the computational complexity of the task. The current implementation is capable of simulating a full basis set for a three-pulse sequence comprising 23 standard brain metabolites including glucose, GABA and other coupled spin systems with 128 3 spatial points in 26 min on a personal desktop computer. The theoretical background for MARSS and further performance metrics are described in more detail in the literature 10 .

Example: simulation of lactate and the superposition of glutamate and glutamine at 3 T. Var-
ying MRS sequence parameters like T E or mixing time (T M ), and, as mentioned, even vendor-specific implementations of the identical MRS sequence and parameters, have been shown to yield markedly different MRS signal shapes 10 . This can be illustrated using the lactate 1 H spectrum, which exhibits multiplet resonances from spin-coupled nuclei. Since vendors use different excitation and, more importantly, refocusing RF pulse shapes with different bandwidths, the resultant spectral patterns obtained experimentally will differ depending on these conditions (Fig. 6a). Variations between spectra are small at short T E (30 ms), but they become clearly visible at long T E (144 ms). Such differences can be propagated over a larger basis set of brain metabolites and will inevitably lead to systematic errors in LCM fits and ultimately inaccurate metabolite concentration estimates.
Spectral shapes rely in a complex fashion on MR sequence parameters and details of the spin system such as chemical shift and J-coupling. The optimization of spectral shapes for SNR and quantification accuracy as a result of spectral distinctiveness through variation of experimental parameters (e.g., T E ) is therefore a very time-consuming, cumbersome and costly task when approached experimentally. If the characteristics of the spin system are well known, simulations provide an easy and fast way to observe resolution and potential for separation at various B 0 field strengths. For example, a well-known problem of effective spectral resolution of glutamate (Glu) and glutamine (Gln) signals at 3 T can be approached by simulating the molecules' J-modulation across various echo times (Fig. 6b).
LCM page. The linear combination modeling (LCM) page contains methods for loading and processing averaged spectra, creating and managing basis sets, adjusting and running LCM analysis, and exporting results for further data or statistical analysis.    www.nature.com/scientificreports/ Data for LCM analysis can be retrieved from the Data page, Processing page, or Synthesis page; it can also be directly imported from file in INSPECTOR's native format (.mat), as text (.txt) and parameter (.par) formats used by NMRWizard software 19 , in the (.raw) data format used by used by LCModel software 20 , and the jMRUI data format (.mrui) 21 .
A Basis Tool is provided to import, visualize, annotate and manage basis functions and create basis sets. Any number of spectral signals can be converted into a basis set, including those generated on the Synthesis page, simulated with MARSS or provided by external software tools such as NMRWizard (.txt, .part), LCModel (.raw) or jMRUI (.mrui).
INSPECTOR's LCM functionality treats the quantification problem as a nonlinear least squares problem with user-defined tolerance functions, maximum iterations, and maximum function evaluations. It hereby provides access to all parameters and boundary conditions for maximal transparency, i.e. no black box, and flexible userdefined tailoring of the quantification algorithm. LCM can perform quantification of real-or complex-valued spectral shapes including Lorentzian and Gaussian line shaping or combination thereof (Voigt model). The spectral baseline can be handled under full user control including polynomials up to 10 th order, b-splines of customizable knot interval and smoothing weight 32 , experimentally measured macromolecule signal(s), broad synthesized signals, or various combinations thereof.
INSPECTOR's LCM functionality provides Cramér-Rao lower bounds (CRLB) 33 errors for all optimization parameters including amplitudes (or concentrations), various forms of line broadening, and frequency shifts as well as polynomial and spline baseline shapes, i.e. not only for metabolite concentrations. In addition, CRLB can be calculated for arbitrary metabolite combinations including, but not limited to NAA + N-acetylaspartylglutamate (NAAG), Glu + Gln or choline + phosphocholine + glycerophosphorylcholine (Cho + PCho + GPC). In addition, extended confidence metrics including Monte-Carlo simulations and Hessian error estimates of the least-squares optimization are available for a more complete picture. The full correlation matrix entailing all parameters and calculation of CRLB for any desired metabolite combination (= summation) is supported through flexible adaptation of the prior-knowledge matrix P 33 . In general, INSPECTOR can analyze spectra from any nuclei, B 0 strength or tissue type, if provided a suitable basis set.
Example 1: LCM in the brain. The quantification of brain metabolites can be streamlined with LCM in INSPECTOR employing basis sets generated in MARSS. Short-T E brain spectra (20-30 ms) measured at 3 T contain several overlapping and J-coupled signals; therefore, the basis functions of all metabolites and macromolecules need to be simulated with precision or measured using the same sequence as the in vivo data to which the model is being fit. In current practice 8 , the basis functions of metabolites are simulated and the basis function or background signals of macromolecules is measured when applicable. LCM finds appropriate line broadening parameters, frequency shifts, scaling amplitudes, and other applicable transformations for each basis function. The fit with all basis functions, baseline and residual signals can be visualized after the LCM analysis 3 (Fig. 7a), transferred to other INSPECTOR pages for further analysis or exported as complex FIDs as needed.
Measured macromolecule spectra can not only inform models for quantification of brain metabolites but can also themselves serve as targets for quantification. Analysis of macromolecules can provide insight into metabolism of proteins in brain tissue 34,35 . Since "macromolecules" in MRS parlance comprise what can be large and complex polypeptides with highly complex coupling networks 35 , it is currently not feasible to simulate their spectral shapes from the density matrix formalism like metabolites. It is more common to employ, rather, a basis set consisting of singlets representing groups of known macromolecular signals at specific chemical shifts 36 (Fig. 7b).
The in vivo detection and measurement of GABA 37 , the major inhibitory neurotransmitter in the mammalian brain, is of particular interest in psychiatry and neuroscience 38,39 . Because signals from GABA overlap with signals of higher-concentration molecules (e.g., tCr at 3.03 ppm), the JDE technique is routinely used for its isolation and detection. However, due to an imperfect profile of editing pulses and similar J-coupling constants, GABA is often co-edited with macromolecules (GABA+). Since the editing conditions in the sequence are known, the basis set can be used for analysis of the edited spectrum containing GABA+ , glutamate + glutamine (Glx) and total N-acetylaspartate (tNAA) (Fig. 7c).
Glutathione (GSH) is an endogenous antioxidant implicated in several biological processes, including those associated with multiple sclerosis 40 . Its detection, similarly to GABA, is performed with JDE experiments, which results in an edited spectrum containing GSH and tNAA signals 41 (Fig. 7d). It has been shown previously that processing and quantification of GSH with INSPECTOR was accurate and reproducible 41,42 . Example 2: LCM in preclinical research and X-nuclei MRS. Applications of MRS in preclinical oncology research are driven by the detection of chemical compounds associated with cancer biology, for instance choline-containing compounds or total choline (tCho), with a distinctive peak at 3.2 ppm. tCho contains choline, phosphocholine (PC), and glycerophosphocholine (GPC) contributions; however, due to their close chemical shifts, they cannot be resolved from each other using in vivo 1 H MRS. A spectrum measured from a 0.027 mL volume of interest (VOI) in a murine pancreatic tumor at 9.4 T employed a basis set created in MARSS for LCM quantification of tCho, lipids and taurine (Tau) (Fig. 8a).
The use of short 10 ms T E minimizes signal losses due to T 2 relaxation effects and increases the contributions of coupled spin systems such as glutamate (Glu) and glutamine (Gln). An analyzed spectrum from a 0.125-mL brain VOI in an anesthetized macaque measured at short T E using a vertical 7 T MR system 36 showed well resolved Glu and Gln signals at 2.35 ppm and 2.45 ppm, respectively (Fig. 8b).
A prominent disadvantage of 1 H MRS is the relatively large spectral overlap of metabolites. For example, as mentioned before, the contributions in tCho cannot be well resolved with 1  www.nature.com/scientificreports/ 31 P MRS is also often used for investigations into energy metabolism due to relatively easy detection of adenosine triphosphate (ATP) 45 . A 31 P spectrum measured in the human liver at 7 T was analyzed in LCM with a basis set created on the Synthesis page (Fig. 8c). Note the clear separation of PC and GPC.
Carbon ( 13 C) MRS can provide measurements of neuroenergetics and neurotransmitter cycling in the human brain 46 . Thanks to a large spread of chemical shifts, molecules like GABA, Gln and Glu can be detected directly, without strong overlaps (Fig. 8d). Similar to the 31 P MRS liver example, the basis set in Fig. 8d   The measured macromolecular signal was included in the basis set. The "MM09" basis function compensated offsets caused by macromolecular signal variation due to differences in T 1 relaxation times among different macromolecules. Data were measured in a healthy adult at 3 T 3 . (b) Analysis of macromolecule spectrum measured in the medial prefrontal cortex at 3 T 43 . The spectrum was obtained from the occipital lobe of a healthy volunteer and shows 10 broad macromolecule resonances (solid colored lines), along with 3 residual singlet resonances assigned to the metabolites NAA (orange), creatine (blue), and choline (purple). (c) J-difference edited spectrum for gamma-aminobutyric acid (GABA) quantification from the medial prefrontal cortex measured at 3 T (unpublished data). GABA+ denote possible macromolecular contamination due to co-editing effect. (d) J-difference edited spectrum for glutathione (GSH) from the prefrontal cortex resembling the first successful implementation of MEGA semi-LASER at 7 T 42,44 . www.nature.com/scientificreports/

Discussion
This paper has provided an overview of the INSPECTOR software and its functionalities, which offer the tools necessary for inspecting, processing and analyzing spectroscopy data in a unitary software solution. INSPECTOR is intended for users ranging from novices to experts. It is GUI-based and platform-independent, able to read almost all single-voxel MRS data formats. Having all necessary tools in one application, researchers can analyze experimental data right out of the box. Therefore, INSPECTOR can be easily employed by a researcher or laboratory processing and analyzing MRS data for the first time. Experienced users can analyze every trace of the FID via the GUI and discard or fix corrupted signals. This functionality can help to ensure highquality experimental data and to troubleshoot if needed, e.g. in case of coil hardware failure or subject motion. Each functionality can be fine-tuned according to specific experimental needs. High-level data processing and quality management were incorporated into the pipeline to ensure data consistency and reproducibility.
INSPECTOR is written in MATLAB, which gives users several advantages. All spectral data can be exported in a MATLAB data format, thereby rendering them easily accessible for additional processing if needed. Since    13 C spectrum from human brain measured at 4 T (Courtesy of Dr. Graeme F. Mason, Yale University, unpublished data). Full list of abbreviations of metabolites is provided in Supplementary Information