dataesr/scientific-paragraphs-categorization huggingface dataset:
This paper reports on the development of a collection of dynamical models of one-dimensional peak profile functions used to fit dynamic structure factors S (Q, ω) of Quasi Elastic Neutron Scattering (QENS) data. The objective of this development is to create a maintainable and interoperable Python library with models reusable in other projects related to the analysis of data from Quasi Elastic Neutron Scattering experiments. The ambition is that the library also will serve as a platform where scientists can make their models available for others. We illustrate how the library can be used by newcomers to the field as well as by experts via different examples. These examples, provided as Jupyter notebooks, show how the QENS models can be integrated in the whole QENS data processing pipeline.
g. , to explore the dynamics of proteins)  [5, 6] , soft-matter (e. g. , to investigate different relaxation modes in polymers)  [7, 8]  or materials science (e. g. , to probe H-diffusion in hydrogen storage materials)  [9] , among others. Each type of motion is characterised by a specific Q-dependence of the intensity and line-width of the quasi elastic signal for a given Q, which can be represented by an analytical model. Therefore, a large series of analytical models corresponding to the different types of motions mentioned above exist and can be used to fit the experimental data in order to extract the relevant physical parameters (e. g. , self-diffusion constants, residence times, jump lengths, etc. ) from the QENS spectra  [1]. The QENS library makes a range of these mathematical models freely available to practitioners of QENS and developers of QENS analysis software in a format that makes them inter-operable and reusable.
As an opensource library, the implementations can be scrutinised and validated by peers, and scientists are encouraged to add their own models to make them available for the QENS community at large. The QENS library at its core provides Python models of mainly one-dimensional (1D) line profiles to fit experimental or simulated S (Q, ω ≈ 0) data. This work was part of SINE2020 Work Package 10 on Data Treatment  [10]  to develop a comprehensive library of dynamical models in order to increase interoperability and reusability, for instance for rapid prototyping. The library provides different building blocks that users can combine, convolute and plug into different frameworks for visualizing or fitting. Our approach is similar to that implemented by the SasView  [11]  developer community for small angle scattering with its SasView Marketplace  [12].
Software description The library is developed under an open-source license (BSD 3-Clause) and the source is stored in a GitHub repository at https://github. com/QENSlibrary/QENSmodels/. The models are written in Python facilitating integration with other packages of the large Python eco-system as well as easy integration in Python based workflows. Moreover, Python is a very popular scripting and programming language in science and the Python interface therefore reduces the entry barrier for the many scientists already familiar with Python. The library comes with examples of how it can be used in practise and in conjunction with existing Python modules for optimization (fitting), visualization, and for adding Graphical User Interface (GUI) elements. Figure  1  shows a typical QENS data processing workflow.
QENSmodels repository QENSmodels/. Usability in a scripting environment, such as Jupyter, is facilitated by providing rich documentation through socalled documentation strings using the Sphinx  [19]  standard including so-called doctest  [20]. By adhering to the Sphinx standard, documentation pages can be automatically generated and updated from the code itself. Moreover, to help the interested user and to lower the entry barrier, examples using Jupyter notebooks and Python scripts are provided as well as instructions for scientists wishing to contribute their own models to the library. Online documentation is also available on readthedocs at https://qensmodels. readthedocs. io/. Code quality and maintainability is facilitated by using git for version control and by implementing unit tests, including the aforementioned doctests, 2 , which are used for continuous integration using GiHub Actions.
Software Functionalities Figure  3  shows the options available for using the library. In order to give an idea of what can be done with the library without any installation, the Jupyter notebooks  [22]  are available through Binder  [23]. Users only have to click on the link to be able to run the notebooks and check if the library can answer their needs. On the other hand, for users only interested in the models, for example, to add them to their fitting pipelines, the installation of the library requires only a command line. In addition, they will have to perform all steps as listed in the third column of Figure  3  in order to use the model for their cases. As mentioned in the previous section, examples are provided as Jupyter notebooks. They use a few QENS models and a few fitting engines, like lmfit, scipy, or bumps.
The notebooks and modules required to make them run can be installed by following the guidelines on the github pages  [24]. Note that the minimizers used in these notebooks were only to illustrate the specific syntaxes of the fitting engines and not because they were the most optimal engines for the investigated cases. Details about comparison of minimizers can be found at  [25]. Physical units used by the models' parameters and variables are specified at the beginning of the Jupyter notebooks. A notebook, Convert_Units. ipynb is also provided to convert between different physical units in case the reference user's data are expressed in different units than the standards chosen for the QENS library. 2 A unit test checks that a single component operates in the right way. It helps to isolate where something in the code is broken.
We provide these reference data in binary (hdf5) and ascii formats. The resolution function is either a Gaussian profile or reduced data from a Vanadium run. And the convolution with the sample data is done using methods from numpy  [14]  or lmfit  [17]. We are now going to detail one of these notebooks, bumps_Brownian_Diff_fit. ipynb. Figure  4  details its table of contents. After a short introduction describing the objective of the notebook, we specify the physical units of the refined parameters and import the required Python libraries as well as the reference data for the sample and resolution function. Figure  5  shows the evolution of these functions for different Q values. The convolution between the sample and the resolution functions is done using a method from numpy  [14]. The fitting model is expressed as: S (Q, ω) = R(Q, ω) scale π DQ 2 ( ω -center) 2 + (DQ 2 ) 2 , where scale and center are the scale factor and center of the Lorentzian function describing the diffusion, of halfwidth at half-maximum equal to DQ 2 , where D is the selfdiffusion coefficient and Q the momentum transfer.
py provided in the library. The Python script is displayed in the editor. After its execution, workspaces, i. e. , Mantid data structures, are available for further operations in the Graphical User Interface (left-hand side column) and a separate window displays the fitting result for the 4 Q-values considered in this example. models to fit data and plot and display the output in Man-tidWorkbench (see Figure  7 ). Reference  [27]  details the QENS features available in this framework.
Benchmarking with experimental data One of the notebooks, lmfit_TOFTOF_delta_lorentz. ipynb uses reduced data presented in  [28]. In this publication, the authors used QENS, among other techniques, to investigate the microscopic details of the proton motions in two proton conducting, acceptordoped, perovskites. The samples were measured at the time-of-flight spectrometer TOFTOF at MLZ at different temperatures using an incident wavelength of 2. 5 Å. Nine "Q-cuts" were retained in the analysis. The reduced data files for one of the investigated samples BaZr 0. 8 In 0. S meas (Q, ω) = {S (Q, ω)[1 + n( ω)] ωβ} R(Q, ω), where S (Q, ω) = a D (Q)δ( ω) + a L (Q)L(Q, ω) + bkg(Q), n( ω) = [exp( ω k B T ) -1] -1 is the Bose factor, and β = (k B T ) -1 is the reciprocal of the thermodynamic temperature.
δ( ω) and L(Q, ω) are a Dirac and a Lorentzian peaks, respectively. R(Q, ω) is the resolution function (spectrum of a vanadium standard). bkg(Q) is the constant background, only Q-dependent and is the convolution symbol. The Jupyter notebook describes how to load the reduced data, build the model using the QENS library, select the minimizer and the range of Q-values to consider, run batch fitting over successive Q-values at different temperatures and extract, store and display results from the fit. Figure  8  shows the comparison between an experimental profile (bullet points with errorbars) and the fitted model (solid line) for Q = 2. 3 Å at a temperature of T = 540K together with the initial model (dashed curve). The good agreement between the final fit and the experimental data is clearly evident.
Impact The QENS library helps researchers and scientists by providing a list of 1D functions to fit QENS data making the analysis more FAIR, i. e. , Findable Accessible Interoperable Reusable  [29]  by providing a public reference to fitting models allowing other researchers to reproduce the analysis. The dynamics observed in QENS experiments are mainly related to the complexities of the samples studied. But collected signals can also contain the signature of the instrument and of the sample environment, which are getting more sophisticated. The combination of both factors may render the extraction and modelling of the experimental S (Q, ω) challenging. But this process can be made easier thanks to the flexibility of customising fitting models with the QENS library and different instrument resolution functions.
The library can be imported in different frameworks as illustrated in Section 3 with MantidWorkbench. This example shows how to use Python scripts. But the library could also be used in Graphical User Interfaces, like the QENS data analysis interface of Mantid described in  [27]. Given that the library is installed using pip, it can be included in an automated data processing pipeline (reduction and analysis) or, for example, in a Machine Learning workflow, to build the optimal fitting model with ease, which increases the reach and usability of our development.
Conclusions We have developed a Python package called QENSmodels, that provides dynamic models of 1D line profiles to fit QENS experimental or simulated data. In order to illustrate how to hook these models to the whole data processing pipeline to newcomers and experts, we provide Python scripts and Jupyter notebooks using different data and fitting engines. In the future, we plan to integrate more models and other examples using experimental data and other fitting engines. Scientists are also encouraged to contribute implementations of their work with additional models or examples.
The statistical combination of disjoint signal regions in reinterpretation studies uses more of the data of an analysis and gives more robust results than the single signal region approach. We present the implementation and usage of signal region combination in MADANALYSIS 5 through two methods: an interface to the PYHF package making use of statistical models in JSON-serialised format provided by the ATLAS collaboration, and a simplified likelihood calculation making use of covariance matrices provided by the CMS collaboration. The gain in physics reach is demonstrated 1. ) by comparison with official mass limits for 4 ATLAS and 5 CMS analyses from the Public Analysis Database of MADANALYSIS 5 for which signal region combination is currently available, and 2. ) by a case study for an MSSM scenario in which both stops and sbottoms can be produced and have a variety of decays into charginos and neutralinos.
1 he ATLAS collaboration follows a different strategy: instead of approximate SR correlations, the collaboration recently started to provide full statistical models in JSON-serialised format  [7]. These statistical models, based on HISTFACTORY  [8] , describe the complete probabilistic dependence of the observable data on both the parameters of interest and the nuisance parameters. When the observed numbers of events are entered, this becomes the likelihood function (see  [4]  for details). The JSON-serialised format enables the usage of the HISTFAC-TORY structure outside the ROOT framework, in particular within the PYHF package  [9, 10]. PYHF can conveniently be used for signal patching, evaluation of likelihoods, computation of Table  1 : Overview of MADANALYSIS 5 recast codes for which SR combination is available.
Usage of JSON-serialised HISTFACTORY models: interface to PYHF In order to employ the statistical model information embedded in JSON files provided by the ATLAS collaboration, the analysis'. info file needs to be extended by <pyhf> blocks. These specify the filename(s) of the JSON file(s) and the associated channels and region names within the analysis. In the PYHF language, a channel refers to an ordered ensemble of signal regions treated correlatively in the statistical model. The structure of such a <pyhf> block reads: <pyhf id="Global"> <name>analysisID. json</name> <regions> <channel name="Channel1">Region1_1 Region1_2 Region1_3</channel> <channel name="Channel2">Region2_1 </channel> <channel name="Channel3" is_included="True"> </channel> <channel name="Channel4" is_included="False"> </channel> </regions> </pyhf> The id of a <pyhf> block is the label of the corresponding exclusion limit calculation, that is further propagated to the output file to present the results (see below).
For analyses involving a single JSON file for all SRs, we recommend setting this label to "Global"; for analyses with multiple JSON files (for the combination of different subsets of SRs), each <pyhf> block needs to be assigned a unique identifier. The following child block <name> declares the name of the JSON file. This follows the same naming convention as that employed for the analysis implementation, with an optional extra identification suffix if needed. 3 This JSON file needs to be located at the same path as the MADANALYSIS 5 information file. For the ATLAS analyses discussed in section 3, this is automatically realised after the installation of a local version of the MADANALYSIS 5 Public Analysis Database through the MADANALYSIS 5 command line interface (install PAD or install PADforSFS).
We come back to this feature in section 3. We now turn to the format of the output file generated by MADANALYSIS 5. Whenever the exclusion is computed by means of the PYHF package, the results are reported in the CLs_output_summary. dat file in the form <set> <tag> <SR> <best?> <exp> <obs> <CLs> || just after the results for individual SRs. The successive elements are the dataset name <set>, the analysis name <tag>, the description of the subset of combined SRs <SR> that contains an explicit [pyhf] tag, the flag for best combination (0 or 1), the expected and observed cross section upper limits at 95% CL, and finally the exclusion level, 1 -CL s ; see  [3]  for details. No statistical error information is printed (to the right of the double bars), as it is already accounted for in the likelihood calculation.
Usage of simplified likelihoods through covariance matrices For the combination of SRs via the simplified likelihood approach  [5] , we adopted the implementation in SMODELS  [12] , i. e. its PYTHON module simplified_likelihood. py, for use in MADANALYSIS 5. In order to comply with the MADANALYSIS 5 framework  [3] , the covariance information has to be included in the. info XML file associated with the analysis recast code. For each SR, the covariance with every other SR can be supplied. There is thus a list of covariances with two entries: the paired regions and the value of the associated covariance. The (self-explanatory) new standard syntax of the. info file reads: <analysis id="analysis name" cov_subset="Global"> <lumi>. </lumi> <region type="signal" id="region name"> <nobs>. </nobs> <nb>.
</analysis> The results from the simplified likelihood combination are printed in the output file CLs_output_summary. dat in the form <set> <tag> <cov_subset> <best?> <exp> <obs> <CLs> || analogous to the output format described in section 2. 1. The successive elements are the dataset name, the analysis name, the description of the subset of combined SRs (with an  [SL]  prefix indicating that SR combination is performed via the simplified likelihood approach), the flag for best combination (0 or 1), the expected and observed cross section upper limits at 95% CL, and finally the exclusion level, 1 -CL s. A concrete example reads defaultset cms_sus_16_039 [SL]-SRs_A 1 10. 4852 11. 1534 0. 9997 || The statistical error, usually provided after the double bar, is not printed as it is already encoded in the simplified likelihood calculation.
Included analyses, validation Signal region combination is currently available for four ATLAS analyses  [18, 21, 30, 31]  (recast codes  [19, 22, 32, 33] ) and five CMS analyses  [23, 24, [34] [35] [36]  (recast codes  [28, 29, [37] [38] [39] [40] ) in MADANALYSIS 5. An overview is given in table 1. They are included in any local installation of the Public Analysis Database (PAD) of MADANALYSIS 5, achieved via the commands install PAD and install PADForSFS. In this section, we briefly describe these analyses and illustrate how SR combination improves the quality of the reinterpretation. To this end, we compare mass limits obtained in the best-SR, simplified likelihood and/or full likelihood approaches to the official limits from the ATLAS or CMS collaborations for specific simplified model scenarios used in the experimental publications.
This difference originates from the recasting procedure and was also noted in  [60] , where it was traced to a difference of up to 50% in the effect of the m T 2 cut (based on the cutflows for two benchmark points with stau masses of 120 and 280 GeV provided by the ATLAS collaboration). We must note here, however, that the analysis involves several identification and reconstruction efficiencies, which are specified only approximately in the ATLAS publication  [30]. These efficiencies are used in the recast code to incorporate the multi-level tau tagging, which is not directly possible in DELPHES 3. A fudge factor of 0. 7 (reducing the final weights by 30%) would bring the observed limit from MADANALYSIS 5 in agreement with the official ATLAS one. For the expected limit, we note that the MADANALYSIS 5 results shown in the right panel of figure  2  are pre-fit, while  95% CL exclusion contours as in figure  1 , but for the pp → τ+ L,R τ- L,R →τ + χ0 1 τ -χ0 0.
The simplified statistical model obtained with SIMPLIFY, however, yields reasonable results. Consequently, only the latter is included in the MADANALYSIS 5 implementation. ) plane together with the official results from the ATLAS collaboration. While the best-SR approach already leads to a good agreement with the official limits, this is improved by the SR combination. Since the latter involves a combined fit to SRs and CRs, this is a case where emulating also the CRs in the recast code would be beneficial.
Information and validation details can be found in  [35] ; see also the related RAMP seminar by Andreas Albert  [75]. We here use version 2. 0 of the code  [40] , which allows for a / E T shape analysis through the construction of a simplified likelihood based on the yields and the covariance matrix for the SR bins provided on HEPData  [76]. For validation, we reproduce in figure  9  the constraints on the fermion portal model considered in  [35]. This is a t-channel dark matter signal containing two contributions, namely the production of a pair of scalar mediators Φ that decay into dark matter χ and jets (pp → ΦΦ → χ j χ j) and the direct production of dark matter with an energetic jet (pp → χχ j) through a t-channel mediator exchange. Whereas solely very conservative constraints are obtained when relying only on a single / E T bin (the recast mass limits being a factor of 2 smaller than the official ones), with the shape analysis based on the simplified likelihood the official limits can be reproduced quite well with MADANALYSIS 5.
Conclusions and outlook We presented the implementation and usage of SR combination in MADANALYSIS 5 via two methods: an interface to the PYHF package making use of statistical models in JSON-serialised format provided by the ATLAS collaboration, and a simplified likelihood calculation making use of covariance matrices provided by the CMS collaboration. Currently, there are recast codes for four ATLAS and five CMS analyses in the MADANALYSIS 5 Public Analysis Database for which this new functionality can be exploited. We demonstrated the associated gain in physics reach for reinterpretation studies in two ways. First, we reproduced mass limits on simplified model scenarios as published by the ATLAS and CMS collaborations for the analyses considered. Second, we performed a case study of a realistic MSSM scenario in which stops and sbottoms have a variety of decay modes into charginos and neutralinos.
Funding information This work was supported in part by the  IN2P3  master project " Théorie -BSMGA ", and by the  French Agence Nationale de la Recherche (ANR)  under grants  ANR-21-CE31-0013  (project  DMwithLLPatLHC ) and  ANR-21-CE31-0023  ( PRCI SLDNP ). J. Y. A. thanks the  LPSC Grenoble  and the LPTHE for hospitality and financial support for research visits during the completion of this work.
Semi-automated workflow Standard workflows for the study of low-magnitude earthquake sequences mainly involve manual event detection and phase-picking, both quite time-consuming. In this study, we used manually detected earthquakes occurred in the period between 7 and 10 August as input to our workflow, thus simulating a dataset produced by a seismic observatory from manual revision by expert seismologists. Indeed, the starting catalog has been realized by a visual inspection of the seismic data stream through a dedicated intranet system (WebObs,  Beauducel et al. 2020 ) available at the CNR-IMAA data center. WebObs consists of a near real-time multi-record strip-chart (SefraN) of the seismograms of the configured stations from the local HAVO network and some of the stations belonging to the virtual network (MARCO, SLCN, MCEL, MTSN, SIRI, SCHR).
Earthquake detection and phase arrival time picking For the detection of small events possibly missed by the manual approach due principally to their low SNR, we applied the single-station template matching algorithm  (Stabile et al. 2021). It takes into account waveform similarity between 3-component continuous data streams recorded at a single station, and properly chosen earthquake waveforms (master templates), recorded at the same station. The analysis was performed on seismic data recorded by the two nearest stations to the cluster: SARCL (3. 5 km epicentral distance from the mainshock) and SPINS (5. 9 km epicentral distance from the mainshock). We used 4 and 6 master templates for SARCL and SPINS stations, respectively (Supplementary Figure  S1  and S2 ) which were therefore cross-correlated with the respective continuous data stream recorded in the period between July and October 2020.