dataesr/scientific-paragraphs-categorization huggingface dataset:
Results We first show the ability of the algorithm to recover deformed tilt series with a phantom test. This test will also help to understand the artifacts induced by the different correction methods. We then illustrate each one of the new improvements on a standard dataset (Experimental Example 1) widely used in ours and others' publications. Finally, we show the application of our method to the alignment of datasets in the absence of fiducial markers (Experimental Examples 2 and 3).
Acknowledgement We thank  S. Trepout  for the STEM dataset on cilia of Trypanosoma brucei,  M. de Frutos  ( LPS, Orsay ) for phage purification and  J. Ortiz  ( IGBMC, Strasbourg ) for tilt series acquisition. We thank financial support from the  Spanish Ministry of Economy and Competitiveness  through Grants  BIO2016-76400-R ( AEI/FEDER, UE) , the  "Comunidad Autónoma de Madrid " through Grant:  S2017/BMD-3817 ,  Instituto de Salud Carlos III ,  PT17/0009/0010  ( ISCIII-SGEFI/ERDF ),  European Union (EU)  and  Horizon 2020  through grants: CORBEL (INFRADEV-1-2014-1, Proposal:  654248 ),  INSTRUCT-ULTRA  ( INFRADEV-03-2016-2017 , Proposal:  731005 ),  EOSC Life  ( INFRAEOSC-04-2018 , Proposal:  824087 ), HighResCells (ERC-2018-SyG, Proposal:  810057 ),  IMpaCT  ( WIDESPREAD-03-2018 -Proposal: 857203 ), EOSC-Synergy (EINFRA-EOSC-5, Proposal:  857647 ), and iNEXT-Discovery (Proposal:  871037 ).
Introduction ATLAS Metadata Interface (AMI) is a generic ecosystem for metadata aggregation, transformation and cataloguing which benefits from about 20 years of feedback in the Large Hadron Collider (LHC) context. It is the official metadata repository for datasets and production parameters of the ATLAS [1] experiment. It implements Metadata Query Language (MQL), a metadata-oriented Domain-Specific Language (DSL) allowing to query databases without specifying all the relation between tables. With its simplified and generic grammar, MQL permits writing complex queries more simply than with SQL. This document describes how AMI compiles MQL into SQL queries using the underlying table relations graph automatically extracted through a reflection mechanism. A detailed description of the AMI framework design principles is available in earlier CHEP proceedings  [2, 3, 4, 5, 6].
MQL Language MQL is a domain specific language for executing queries on a Relational DataBase Management System (RDBMS) closely to spoken language. It is one of the main addedvalue features of AMI. Initially proposed by gLite [7], a middleware project for grid computing at LHC experiments, the specification was extended by the AMI team. MQL only deals with metadata entity names while SQL uses a catalog / table / field paradigm. It provides a way to produce SQL queries with a simplified syntax less prone to error. The MQL implementation in AMI is based on its database structure reflection subsystem. The language permits including or excluding path fragments in the relationship graph and is able to deal with table cycle dependencies.
Concepts and benefits MQL queries are similar to SQL queries but easier to write. MQL queries are more user oriented than expert oriented. Even if the MQL syntax is simpler than the SQL one, it permits to execute the same kind of queries, with full control on the generated SQL. In particular, it will always be possible to write an MQL query reproducing the result of a given SQL query even if it is trading verbosity for more assumption about JOIN type. For example, consider a physicist wants to list the names of the datasets that have files with size > 0. In MQL, table relations are hidden: SELECT dataset. name WHERE file. size > 0 In SQL, it depends on the database schema (SQL joins): SELECT dataset. name FROM dataset, file WHERE dataset. id = file. datasetForeignKey AND file. size > 0 The MQL language does not contain any FROM clause nor join (on foreign keys).
Nevertheless, even if joins are not necessary in MQL queries, the end-user can provide constraints on the relation paths. If no constraint is provided, the MQL to SQL algorithm follows all the possible paths of the relation graph. As a result, for complex database structures, it could generate slow or irrelevant SQL query. The way of specifying path constraints is described Section 2. 3. In this schema, each table contains a unique auto-incremented identifier called "id". The "PROJECT" table contains projects information. This table doesn't have any foreign key (relation). The "DATASET" table contains entities representing a set of data. "DATASET" is linked to "PROJECT" with the foreign key constraint (DATASET. PROJECTFK = PROJECT. ID). The "DATASET_PARAM" table contains metadata parameters linked to the records of "DATASET".
MQL specification The MQL specification provides an interface to interact with any relational data source. It allows one to perform generic selection, insertion, modification and deletion operations, keeping benefits of the underlying relational model, but with a syntax less verbose of SQL. MQL introduces the notion of basic Qualified Identifier (QId) for representing either an entity (aka a table), or a field. Its syntax is [database. ]entity to a table and [database. entity. ]field or [entity. ]field for a field. As previously explained, there is neither a FROM clause nor join expression in MQL. In most cases, it means that if there is no cycle in the relation graph, MQL is able to autogenerate both the FROM clause and join expressions. If there are cycles, it is necessary to indicate the paths to be included or excluded by specifying between braces, at QId level, a set of constraint QId (tables or fields).
Rule QId Rule constraintQId MQL also introduces an isolation mechanism. It permits producing SQL embedded subqueries in order to perform complex relational operations on the data source. This is why, in addition to normal expression groups, delimited with parentheses, MQL introduces isolated groups delimited with square brackets. See Figure  4. The effect is to isolate the condition from the main query and thus to restrict the paths used to reach the QIds contained in the condition to only this condition. According to Figure  1 , the query represented in Figure  5  searches for dataset names, having both "Xsection" > "x" and "Luminosity" < "y" and linked to non-empty files only through the "DATASET_FILE_BRIDGE" table (the paths reaching PROJECT. id are excluded by the {!PROJECT. id} constraint).
Reflection and paths resolution The AMI framework has a JDBC based reflexion subsystem permitting the extraction of the database structure (tables, fields, foreign keys). It allows one to build a graph of relations which is put in a cache inside AMI. On top of this subsystem, AMI provides a mechanism to automatically resolve all the possible paths linking the QIds in a MQL query. As an example, from Figure  1  the following relations can be resolved: -Simple relation: DATASET <-DATASET_PARAM -Bridge: DATASET <-DATASET_FILE_BRIDGE -> FILE -Cycle: DATASET -> DATASET_TYPE -> PROJECT and DATASET -> PROJECT.
MQL parsing and QIds resolution The AMI MQL has its dedicated Java tokenizer and parser, autogenerated from a LL(*) grammar (top-down parsing) by using the Another Tool for Language Recognition (ANTLR) framework  [8]. The parsing of an MQL query produces an Abstract Syntax Tree (AST) object containing all the necessary information to, later, generate a SQL query. During the parsing, all the QIds in the query are resolved (catalogs, tables, fields, relations) using the AMI reflexion sub-system taking into account the provided QId path constraints.
Acknowledgments Over the years, we have been helped and supported by many people at  CC-IN2P3  and more recently by the  Rosetta/Philae collaboration , in particular:  Osman Aidel ,  Philippe Cheynet ,  Benoît Delaunay ,  Pierre-Etienne Macchi ,  Emil Obreshkov ,  Mattieu Puel ,  Yves Rogez ,  Mélodie Roudaud  and  Jean-René Rouet.
Conclusion Both database experts and end-users can take advantage of the AMI MQL language. It provides the same features of SQL but with a lightweight syntax. For non-expert users, it can totally mask the database relations and gives the possibility to easily perform complex queries. The AMI Core Framework takes full benefit of MQL with almost no overhead compared to SQL, especially thanks to cache usage. The new version of the AMI framework is in production in ATLAS and has already been chosen by other experiments for their metadata workflow.
MINIPIX TIMEPIX Detector and Data Acquisition Software In this study, we propose using the technology of pixel semiconductor detectors, TIMEPIX from ADVACAM (https:// advacam. com), for characterization of therapeutic proton pencil beams and validation of TPS and MC simulations. TIMEPIX is a commercial version of MEDIPIX detector developed at CERN and is widely used for radiation research, e. g. , in proton and ion beam therapy  [24] [25] [26] [27] [28] [29] , in brachytherapy  [27, 30] , in radiation dosimetry  [31] [32] [33] [34] , in particle accelerator environments  [35] , or for space radiation characterization on board of the International Space Station  [36] [37] [38]. The single particle sensitivity of the device finds applications in particle therapy as well as for very small field dosimetry needed for investigations on in-vitro and animal model systems  [39].
The signal read-out is performed in each pixel individually in a single frame acquisition time of typical length of about 1-100 ms. The MINIPIX TIMEPIX frame readout dead-time is 22 ms. Data acquisition electronics is fully integrated, connected to the computer via USB port and does not require a dedicated cooling system. The temperature effect on energy deposition measurement is negligible  [41]. For more details on the TIMEPIX detector technology, refer to  [40, 42, 43]  and references. The MINIPIX TIMEPIX detector is equipped with a data acquisition and real-time visualization software, PIXET PRO, which also provides data processing tools for cluster morphology analysis. Figure  1  (right) shows an example of data frame acquired in Krakow. The morphology of each cluster is characterized by the following: the position of the cluster center of mass, the total energy deposited, the cluster length, and the angle at which the particle enters the detector.
The cluster analysis enables identification of impinging particle type  [43]. The analysis of multiple clusters enables particle-byparticle experimental characterization of the mixed radiation fields consisting of primary and secondary protons, secondary electrons, photons, etc. Depending on the primary particle fluence, the single frame acquisition time needs to be adjusted for each measurement individually in order to minimize the overlapping of the clusters. The cluster overlapping effect occurs when different particles at short time intervals produce clusters, which are so close to each other that they overlap and are recognized by PIXET PRO software as a single cluster of larger energy deposition. The shortest single frame acquisition time (1 ms) determines the maximal primary particle fluence, which can be used for measurement.
All the measurements were performed using the lowest possible accelerator beam current of 1 nA to keep the beam current stable between measurements. The shortest acquisition time frame duration used by Timepix was 1 ms. Therefore, the time architecture of the beam is negligible for the measurements performed in the integration mode. For the 1 nA beam current, we did not perform measurements with the detector placed in the beam core (0-20 mm away from the isocentre), as, at such a current, the primary proton yield leads to detector saturation for a single acquisition frame. For dose profile measurements, the time frame duration was set by the software operator based on a real-time visual assessment of the data in the PIXET PRO software. Before starting the data acquisition, while the beam was on, the most optimal time frame duration was selected allowing acquisition of the maximal possible number of clusters in one frame and avoiding cluster overlapping effect.
The visualization and comparison of the lateral dose profiles obtained experimentally in air and in water to simulations were performed as follows. The maximum value of the lateral beam dose profile simulated in GATE/Geant4, FRED, and TPS were normalized. The dose experimental profiles were adjusted to the corresponding simulated profiles using least mean square algorithm. This was the optimal method to visualize and compare the experimental and simulation results because the dose rate at the profile maximum varies depending on primary beam energy and measurement depth. The value of relative dose rate obtained experimentally was not modified between the measurement points within a single profile. Next, we compared lateral and longitudinal dose profiles measured with MINIPIX TIMEPIX in water with the simulations of 3D dose profiles performed with clinical TPS, fast MC code FRED, and full MC code GATE/Geant4.
Calibration Measurements Figure  4  (middle panel) shows energy deposition spectra for nominal energy E150 and various β angles after angle filtering β ± 3 •. The maximum value and width of the energy deposition spectra increase with the detector angle. This is because the average track length, thus the total energy deposited by a single particle crossing the detector active volume, increases with the detector angle with respect to the beam direction. The main energy deposition peak shapes, and positions are comparable with the simulations. The mean deposited energy obtained from MINIPIX TIMEPIX measurements (after filtering), simulated in GATE/Geant4 MC and calculated based on PSTAR stopping power data are presented in Figure  4  (right panel). The mean deposited energy simulated in GATE/Geant4 is consistent within 100 keV with the value expected from the PSTAR database in the entire range of the investigated detector angles and energies.
The discrepancy between the mean energy deposition measured with MINIPIX TIMEPIX and the expected value from the PSTAR database, for detector angle β less than 73 • , ranges from 1 to 60 keV. For angles greater than 73 • it is higher, up to 550 keV. This might be an effect of registering particles scattered on the MINIPIX TIMEPIX case made of aluminum, which produce long clusters of large energy depositions. Therefore, for the beam profile measurements in water and in air, the detector angle of 45 • was chosen.
Lateral Profiles in Water Figure  6  shows MINIPIX TIMEPIX results in water performed with and without the RS for three nominal beam energies E100, E150, and E200. The measurement results of (i) the first Gaussian term obtained with the LYNX scintillating screen and (ii) the lowdose envelope (nuclear halo) obtained with MINIPIX TIMEPIX are compared with GATE/Geant4 and FRED MC simulations. We observed an excellent agreement between the shape of the profiles obtained experimentally with LYNX and MINIPIX TIMEPIX and simulated with full MC code GATE/Geant4 up to 150 mm far from the beam core. The shapes of the lateral dose profiles were also accurately reproduced at different depths in water and behind the RS. In FRED simulations, the shapes of the lateral dose profiles in comparison to MINIPIX TIMEPIX measurements were well-mimicked up to four orders of magnitude.
The disagreement for more distant measurement points is due to the fact the FRED code does not transport secondary gammas and electrons. Note, that in terms of performance, tracking rate achieved with GPU-accelerated MC code FRED was up to 3. 6 • 10 6 primary/s on a single GPU card, compared to 1. 1 • 10 3 primary/s with GATE/Geant4 running on CPU cluster.
Acknowledgements We gratefully acknowledge the  NSCL  staff for collaborating on the mechanical design and fabrication of GADGET, technical assistance, and for providing the 23 Al beam. We thank the  NSCL gamma group  for assistance with SeGA. This work was supported by the  U. S. National Science Foundation  under Grants No. PHY-1102511 ,  PHY-1565546  and  PHY-1913554 , and the  U. S. Department of Energy, Office of Science , under award No. DE-SC0016052. We also acknowledge support by the  Spanish MINECO  grant  AYA2017-86274-P , by the  E. U. FEDER  funds, and by the  AGAUR/Generalitat de Catalunya  grant  SGR-661/2017. This article benefited from discussions within the  ChETEC' COST Action  ( CA16117 ).
Numerical Illustration To show the numerical efficiency of our approach compared to the naive method (which corresponds to the Gradient Descent method applied sequentially to the set of problems (2) by varying λ), we will show the potential of the proposed approach on a very simple problem  [8] , defined by f (x) = (x 1 -1) 2 + (x 1 -x 2 ) 2 , (x 2 -3) 2 + (x 1 -x 2 ) 2 ⊤ Since we have two objective functions, the vector λ has two components λ 1 and λ 2 where λ 1 + λ 2 = 1. In our experiment, we descritize λ in a uniform grid with a grid stepsize d (the desired distance between the lattice points). In our Matlab illustration, we will call Multi-GD the naive method and GD+Newton Pathfollowing the implementation of our Algorithm 1 (where we used Gradient Descent method to find the first Pareto optimal point and then apply the Newton path-following procedure).
See S1 for posture estimation details. G. Histograms of bout and interbout durations from whole dataset. H. Histogram of heading direction change per bout (∆heading) for all bouts. I. Histogram of mean eye vergence per interbout for all interbouts. For each interbout, all eye vergence measurements are averaged. Larvae typically explore with eyes diverged and hunt with eyes converged. Local minimum at 24°(dashed line). J. The field of view in the video dataset is large enough to see the fish and its local environment (circle diameter = 8. 12 mm, size indicated as circle within orange square in B). The focal plane is near the water surface. K. Locations, sizes, shapes, and relative velocities of all found surface objects preceding swim bout initiation are extracted. Relative motion of 3 objects are shown.
We encode fish posture (S1) in every image frame by estimating the vergence angle  31  of each eye and the shape of the tail 46 (1F). Larvae can accelerate rapidly (e. g. during escape swims), which can cause the online tracking system to fail. Also, offline pose estimation is occasionally compromised due to motion blur (during very high speed swims) or body roll (causing one eye to occlude the other in the image). We retain only video segments in which all postural features can be accurately extracted in every image frame for further analysis (see Methods). The processed dataset contains 40 hours of behavioral data parsed into bout and interbout epochs (4002 video segments) (1G). Across all swim bouts (n = 200,559), the change in heading angle per bout is narrowly and symmetrically distributed (1H).
"  65 Continued development of such tools should allow for improved quantification of ethologically relevant behaviors occurring in naturalistic environments. Importantly, these tools should capture the dynamics of minimal behavioral elements, scale to big datasets, and be compatible with modern techniques to record neural population activity. Here, we describe such an approach for the study of larval zebrafish behavior. In this study, we first acquired high resolution behavioral and environmental data of larval zebrafish exploring and hunting in an unrestrictive naturalistic environment. We then used dimensionality reduction and density-based clustering to categorize individual swim bouts into discrete types. Finally, we constructed a probabilistic generative model (specifically, a marked renewal process) that predicts future larval zebrafish behavior by combining information about hunger state, multiple timescales of behavioral history, and the positions and properties of potential prey in its local environment.
These modifications will allow for higher resolution pose estimation (e. g. by including pectoral fin dynamics, pitch and roll estimates, and tail half-beat analysis  14  ), facilitate more comprehensive bout-type classification, and yield significantly longer continuous behavioral sequences. Richer datasets will enable future models to extract nuanced environmental dependencies, like prolonged attention to single prey amongst many distractors during long hunt sequences (Bolton et al. , manuscript in preparation). Such models might also combine behavioral history information with raw environmental video  77  to sharpen behavioral predictions. Future models may simultaneously infer discrete behavioral states and their dynamics  8, 15, 78, 79  , though the non-Markovian dependencies on past behavior present new challenges  80.
Next, the camera moved automatically on the gantry to maintain position above the fish and capture video with a frame-rate of 60Hz and 2 millisecond exposure duration per frame. The fish was tracked for 3 minutes or until it reached the edge of the arena or tracking failed. The fish could evade the tracking camera with a high-speed escape maneuver, but these events were fairly rare. At the end of each trial, the camera returned to the arena center, video data was transferred from memory to hard disk, and concentric gratings were once again used to bring the fish back to the arena center to initiate another trial (up to 18 trials per fish). If the fish did not return to the center within 10-15 minutes, the experiment was terminated. The tracking algorithm was written to keep the darkest pixel in the image (usually contained within one of the eyes of the fish) within a small bounding box located at the image center.
If the darkest pixel was located outside this bounding box, a command was sent to the motors to reposition the camera to the location of that darkest pixel. In this way, the camera moved smoothly from point to point to follow the fish, using the "Pulse Burst Positioning Mode" setting for the ClearPath motors. We run the ClearPath motors with Teknic's jerk-limiting RAS technology engaged to generate smooth motion trajectories and minimize vibration during point to point movement. Experiments were run using PsychToolBox in Matlab.
Temporal Segmentation of Bout and Interbout Epochs Bout and interbout epochs were identified by taking the absolute value of the frame to frame difference in heading angle and thresholding this time-series at 0. 7 degrees. This binary signal was then dilated (radius = 2 elements) and eroded (radius = 1 element) with built-in Matlab functions (imdilate, imerode) to merge bout fragments and expand bout epochs to include one extra frame at the beginning and end of each bout. These operations set the minimal duration of both bout and interbout epochs to 3 frames (50 ms). |∆tail-shape| per bout: This non-negative 1-dimensional quantity summarizes how much the tail changes shape during the 10 frames used to represent each swim bout (as in 2B). To compute this quantity, let the 10-frame tail angle measurements be placed in an array T with shape 20 x 10.
First, the magnitude of frame to frame changes in each tail segment angle are computed to give a new array with shape 20 x 9. |∆tail-shape| is the sum of the absolute values of these 180 array elements. This value is divided by 180 to give units: radians per segment per frame. In Matlab syntax, this is computed as: abs_delta_tail_shape = sum(sum(abs(diff(T, n=1, dim=2)))) / 180.
While it is common to preprocess data with PCA prior to running tSNE, we achieved qualitatively similar embedding results with and without this step, so we simply ran tSNE on the 220-D inputs. Each of the 200,559 swim bouts are represented as 220-D vectors as described above and are embedded in a 2-D space with tSNE. We implement tSNE with Barnes-Hut approximations with CUDA to decrease tSNE runtime (https://github. com/georgedimitriadis/t_sne_bhcuda). Euclidean distance was used as a distance metric. Following embedding, 5 bout classes were identified with the routines described in S2. The 3 largest clusters were then further subdivided by kinematic variables, |∆heading| and |∆tail-shape|, as described in S6 and above.