The MOUSE project: a meticulous approach for obtaining traceable, wide-range X-ray scattering information

Herein, we provide a “systems architecture”-like overview and detailed discussions of the methodological and instrumental components that, together, comprise the “MOUSE” project (Methodology Optimization for Ultrafine Structure Exploration). The MOUSE project provides scattering information on a wide variety of samples, with traceable dimensions for both the scattering vector (q) and the absolute scattering cross-section (I). The measurable scattering vector-range of 0.012≤ q (nm-1) ≤ 92, allows information across a hierarchy of structures with dimensions ranging from ca. 0.1 to 400 nm. In addition to details that comprise the MOUSE project, such as the organisation and traceable aspects, several representative examples are provided to demonstrate its flexibility. These include measurements on alumina membranes, the tobacco mosaic virus, and dual-source information that overcomes fluorescence limitations on ZIF-8 and iron-oxide-containing carbon catalyst materials.


Introduction
Driven by increasingly demanding scientific challenges, and the scientists striving to meet them, small-angle scattering instrumentation and methodology are enjoying constant improvement [1][2][3]. In particular when utilised in situ, operando, and/or in combination with complementary techniques, X-ray scattering provides a comprehensive insight for a wide range of samples. These can include organic dispersions, metal alloys, heterogeneous catalysts, nanoparticle suspensions and membranes [4]. The appropriate analysis of the scattering from the fine structure of these materials is, however, greatly dependent upon the provision of high-quality data. In other words, the quality of the data and its uncertainties should be adequate to answer the questions posed by the experimenter. This data also needs to contain an excess of metadata, sufficient to understand the full measurement configuration and relevant experimental details. When problems exist in the collection methodology, the data correction sequence, or the instrumentation, the data quality can -unbeknownst to the user -suffer greatly. Such a lack of data quality increases the risk of unreliable interpretations of the collected data, and can severely impact trust in the method when they lead to unrealistic or incommensurate conclusions. Therefore, a comprehensive "systems architecture"-like approach is needed that considers both methodological and instrumental aspects in order to reliably collect high-quality scattering data. We present an implemented example of such a holistic approach here.
As a first step, a reliable data correction methodology must be established to ensure that the data can be comprehensively corrected using well-founded procedures, so that unreliable data can be identified quickly and clearly (insofar as possible for X-ray scattering methods). Recently, such a -1 - comprehensive, universal data correction methodology has been developed that can reliably deliver "good" data for a wide spectrum of samples (that is to say, data can be obtained in absolute units with uncertainties, emphasising the true value of the datapoints), and this correction methodology is now being applied to data from both laboratory-as well as synchrotron-based instruments [3,5].
This data correction methodology, however, is useless without the provision of accurate information (metadata) utilised for the corrections, and needs to be integrated within an overarching measurement methodology, coupled with instrumentation capable of accurately generating the necessary metadata. This holistic systems architecture approach forms the MOUSE project (Methodology Optimization for Ultrafine Structure Exploration ), thus consisting of a methodology component and an instrumental component. The methodology component of the MOUSE is composed from a multitude of good operating practices adapted from instruments and research groups around the world, whereas the instrumental component has been realized as a customized machine that is continually being modified to improve the measurements.
To assist in the neverending development of the MOUSE, a high-quality, fully traceable laboratory small-/wide-angle X-ray scattering (SAXS/WAXS) instrument forms the crucial instrumental component (hereafter referred to as the MOUSE instrument). Its experimentally relevant details are briefly summarized in appendix A, and its comprehensive design considerations are provided in appendix B. Its specifications exceed the typical requirements for a SAXS/WAXS instrument, so that various elements of the MOUSE project may be thoroughly proven in practical application.
"Ultrafine" here defined following the Oxford dictionary definition: "extremely fine in size, texture, composition, etc." -2 -That is to say, the methodology as well as the instrumentation developed in the MOUSE project is used for -and tested against -a wide range of samples, to see if limits or exceptions to the assumed universality of the methodology can be explored. To increase chances of finding such limits, the samples that are measured using the MOUSE originate both from internal institutional sources as well as from an extensive range of external collaborators. This comprehensive testing could not have been achieved without the provision of a dedicated (instrument) scientist able to apply the MOUSE methodology to a wide range of materials science projects, as well as to recognize and understand failings of the methodology, should they occur. The success of such a holistic approach, as well as the spectrum of its application, can be evaluated from the rich variety of an increasing number of papers to which the MOUSE has already contributed to. [6][7][8][9][10][11][12][13][14][15][16][17][18][19][20] 10 -2 10 -1 10 0 10 1 10 2 q (nm −1 ) A MOUSE project dataset from a ZIF-8 powder sample consisting of ≈ 35 nm particles, measured using two different X-ray sources (yellow: copper, blue: molybdenum). This dataset combines data from twelve different instrument configurations (six using copper, six using molybdenum). When using the molybdenum source, fluorescence from zinc is visible. The instrumental smearing is different for the different configurations, which will need to be accounted for in any analysis model (rather than attempting to mathematically de-smear the data, as discussed in our previous work [5]. In this paper, we will first elaborate on the characteristics of what, we believe, constitutes "high-quality" X-ray scattering information (this being the ultimate goal of the MOUSE project). This is followed by a brief exposé on how these characteristics have been addressed in relation to the MOUSE project, accompanied by example datasets collected using the MOUSE (experimental details for these examples can be found in appendix A, datasets themselves are available on Zenodo at [21]). A description of the measurement workflow that has been established around the instrument -3 -is also included, as it demonstrates what steps are required to put the underlying MOUSE principles into practice. Lastly, the many appendices contain detailed information on several aspects of the instrumentation and the methodology that likely extend beyond the interest of the majority of the intended readership. However, the interested reader is encouraged to delve into particular aspects that are described in (extensive) detail there, perhaps somewhat reminiscent of the "choose-yourown-adventure" class of literature.

The essence of quality
The MOUSE project goal is to generate scattering information that could be considered to be of high quality (cf. section B). This requires, however, a brief consideration on what might constitute high-quality information or a high-quality dataset.
High quality information may include the following: A. Methodology: data collected using a comprehensive and well-documented measurement methodology; B. Flexibility and Wide -range: the instrument should be able to handle as broad a range of samples as possible, but any modification to the benefit of flexibility that may negatively impact the data quality should be considered very carefully (e.g. air gaps or the introduction of windows in the beam). The data should also be measured over as wide a range as possible to ensure overlap with other instruments, and allowing for a comprehensive look at the sample in question; C. Statistics: determination and minimization of datapoint uncertainty, i.e. where the signal-tobackground ratio has been maximized, and a sufficient number of sample-scattered photons have been counted; D. Traceability and Uncertainties: the data is accompanied with reasonable data uncertainty estimates, with a documented reasoning behind their derivation, whilst the traceability has been considered for its measurands, and can be traced back to primary physical standards; E. Corrections: a comprehensive data correction chain with all the relevant parameters and values for the corrections are considered, and accessible alongside the data; F. Data requirements: open, FAIR and accreditation: data is stored in an open data container, accompanied by all relevant metadata necessary to understand the measurement, and troubleshoot potential causes of error; thus, the data adheres to the FAIR principles (Findable, Accessible, Interoperable and Reusable), and is catalogued in a comprehensive library; the data can (eventually) be supplied with certificates, with the laboratories and instruments accredited by internal and external quality assurances, as proxies to enable laypersons to apply a degree of trust to the data.
The end result is a dataset that holds sufficient information for experts to assess and determine what level of trust they would assign to each dataset, and optimally contains additional certificates to allow laypersons to assign trust. Each of these aforementioned requirements will be discussed individually, explaining how they have been addressed in the MOUSE project.

Methodology
An under-highlighted but critical aspect of a well-run instrument is the organization surrounding the measurements. This defines whether past measurements can be found based on e.g. sample-, user-, or time-information, if all important parameters of that measurement can be read, whether the applied data correction procedures can be retraced, and if the data analysis methods that were used to evaluate the data can be reinterpreted.  The manufacturer-supplied software that accompanied the MOUSE has been largely replaced, apart from the SPEC control system and several custom scripts. The following procedure, graphically depicted in figure 3, is performed for measuring a given sample.
Firstly, the experiment is documented in a proposal form (consisting of a machine-readable excel-sheet). This proposal form contains information on the investigator, their project, and what the investigator is trying to (dis)prove by means of the SAXS/WAXS measurements. Experienced users can also supply information on the size range of interest, and on the accuracy with which this determination is to be done. The proposal form also requires the entry of sample information, including estimates of the (atomic) composition and gravimetric density for every sample component. These are used to automatically calculate the X-ray absorption coefficient, , which in turn can be -5 -used to determine the irradiated effective sample thickness by way of the measured sample X-ray transmission. This has proven useful for powders and foil-shaped samples, but also for determining the effective sample thickness in capillaries.
Secondly, the most optimal sample measurement geometry is defined in discussion with the investigator. This sample geometry is largely defined by the restrictions of the X-ray scattering experiment, but can be adapted to more closely match the normal experimental conditions of the researcher.
The measurement parameters and configurations required to fully characterize the sample(s) in question are entered in a digital logbook (a second, machine-readable excel sheet), with one measurement series in a given configuration per row. When ready, the new rows are automatically converted to a SPEC measurement script, which ensures that the correct instrument configuration is set, that all the required steps for a correct measurement are performed, and that all required metadata will be present in the resulting file. A measurement row defines a series of measurements in one instrument configuration, i.e. the resulting data contains a number of repetitions of the measurement, each containing a separate flux, transmission factor, etc.
The metadata that is measured by the SPEC script alongside every repetition of a measurement includes: • The direct beam profile on the detector (this, by exception, is currently measured only once per instrument configuration) • The primary beam flux 0 • The primary beam center • The transmission factor of the sample • The source parameters (energy, voltage, current) • The actual slit parameters • All motor readouts, e.g. slit, beamstop, and sample positions, etc.
• All detector metadata provided by Dectris in their NeXus format, such as energy threshold settings, flatfields and countrate correction information • The vacuum chamber pressure

• The interferometer strip readout
Additional metadata is also collected and stored alongside the data. This includes metadata inserted (after data collection) from the logbook, such as: • The sample name • The overall sample X-ray absorption coefficient By following this procedure, logbook-keeping forms an integral part of the instrument operation. This ensures that all the measurements are automatically performed with the utmost care, and that the logbook is always correct; no logbook entry, no measurement. This makes the logbook an accurate reflection of the configuration of the measurements. The SPEC measurement scripts generated by this logbook information were not stored until recently. The thinking here was that, if the measurement script turns out to be inadequate, this is clear from the lacking metadata in the final NeXus measurement data. Additionally, all Python code, including the one used to generate these measurement scripts is mirrored on an institutional versioning repository (Git), and so the SPEC measurement scripts of a particular date could be regenerated as needed. In the interest of simplifying this process, however, we are now also storing the SPEC scripts.
At the end of the measurement series, the data is transferred to the host institute's networkattached storage (also for back-up purposes). Subsequently, the data from the instrument is combined and reformatted into properly annotated raw NeXus files and catalogued in our prototype SciCat database (a copy of the SciCat database system under development at the ESS (https://scicatproject.github.io/). The measurements are then processed in parallel using DAWN, and the resulting "derived" datafiles are catalogued in the database, linking back to the original raw files, alongside some relevant scientific metadata extracted from the files (see figure 3). Once these processed files are available, the bespoke (and often most laborious) analysis and interpretation process can begin. . .

Flexibility
While some instruments (and in particular those in the protein scattering community) have been meticulously tuned for measuring one class of samples very well, samples in materials science tend to come in a variety of unique shapes, sizes, states and conditions. Designing an instrument for increased flexibility from the onset means that fewer concessions need to be made when measuring such a range of non-standard samples. Fewer concessions lead to fewer sources of error, and this, in turn, leads to better data. This justification does come at the condition, however, that the increased flexibility cannot come at the cost of data quality. The flexibility of the MOUSE instrument, therefore, is a limited flexibility compared to, say, the I22 beamline at the Diamond Light Source. Many sample geometries, conditions and states can be accommodated in the oversized sample chamber of the MOUSE, but the chamber must be evacuated before measurement.
That means that for the (so far, small) subset of samples that absolutely require an atmosphere, a custom-built compact environmental chamber must be developed. Such a cell is currently being designed.

Wide q-range
Measuring over a wide-range is essential for both flexibility as well as high-quality data: to get a comprehensive understanding of a material's structure, multiple levels must be simultaneously assessed (one example of such a multi-level analysis is given in [22], albeit with this instrument's predecessor). These also serve as a double-check for the validity of the data, e.g. when measuring a composite containing metal oxide nanoparticles, the corresponding diffraction peaks must also be present. The wide range is achieved in the MOUSE mainly by virtue of its movable detector, i.e. by moving the detector closer to or further away from the sample, different ranges of the scattering vector can be obtained. Additionally, by switching between the copper and the molybdenum X-ray sources, different scattering vector ranges become accessible. For obtaining greater wideangle ranges, the detector can also be moved laterally, making high scattering vectors up to almost 100 nm −1 accessible. The resolution at these larger vectors is not great, however, and its performance as an XRD instrument is not as good as what can be obtained from dedicated diffractometers. This is due to, amongst others, the high angle of incidence of the scattered radiation and its detection at the detector plane, the parallel beam dimensions at the sample position in combination with the typical sample thickness, and the lack of a sample "spinner" for improved bulk averaging.
To combine the data from multiple scattering vector ranges, a method has been developed that merges datasets weighted by the uncertainty of their datapoints (described in detail in appendix D). As the data is already in absolute units after correction, this merging can be done without the addition of dataset scaling factors. Care must be taken to check for the prominence of effects of beam smearing before merging, and when these effects are significant, data must be collected using the same collimation settings, optimized for the longest sample-to-detector distance, before data merging can take place.

Statistics
It is critical that a measured signal is as noise-free as possible (maximizing the signal-to-background ratio), to minimize the signal degradation that occurs during the background correction. Performing the background subtraction becomes exponentially more challenging with high background levels, strongly amplifying the resultant data uncertainties. Hence, even if an ostensibly useful signal is extracted, the propagated uncertainty estimates may have reduced its usability to zero.
A deliberate choice was made to forego provisions for in-air sample environments, as this would require the installation of two additional windows and an air path, all of which would add to the instrumental background signal. For the few samples that do require an atmosphere, a compact flow-through environmental cell is currently under development. The current configuration consists of a continuous, windowless vacuum from before the first set of slits to the detector. With the first series of Dectris Eiger detector, which only has a single low-energy threshold filter, the main background contribution is that of the cosmic radiation at a rate of 1.43 × 10 −5 counts per pixel per second, which strongly determines the minimum scattering level that can be observed. Whilst an algorithm was provided by the instrument manufacturer to remove cosmic radiation from our detected images, the mathematical underpinnings of this procedure remain undocumented, and can therefore not be included in a traceable, fully open source data correction methodology.
-8 -Typically, solid (slab-geometry) samples are mounted over holes in a laser-cut template, taking care that the measured area is tape-free. Powders are sandwiched in the holes of the template between two sheets of Scotch Magic Tape™, which was found to give a low scattering signal. Liquids are measured in flow-through cells that either uses two thin, low-scattering silicon nitride (SiN) windows, which are virtually noise-free and have a transmission factor close to 99%, or extruded borosilicate capillaries, which have a transmission factor of around 70% for Cu radiation. The apparent thickness of these cells is determined using a known absorber (typically water) for each set of windows and each capillary.

Low-noise/detection limits
Defining limits of detectability for the MOUSE instrument, i.e. determining its ability to detect the signal from a given analyte before an experiment is attempted, requires consideration of multiple intertwined features. These features can be grouped into three classes: those pertaining to the sample properties, those arising from various background contributions (normalized by the primary beam flux), and aspects relating to the quality of the collected data and metadata. Only a short summary of these contributions is provided bellow, however a more thorough discussion can be found in appendix F.
In brief, the first class includes the sample properties of scattering contrast, the analyte concentration and geometry. The second class contains various backgrounds that have to be considered, in particular backgrounds arising from beam spill, parasitic scattering, cosmic radiation, and the scattering of the sample container. Added to this are sample-related backgrounds, such as the scattering signal from the dispersant itself, and backgrounds from potentially fluorescing elements in the analyte or dispersant. The third class of features, defining the detectability, involves the accuracy with which the data (including its associated metadata such as flux, time, and transmission factors) can be determined.
Practically, the overall background levels have been quantified for various sample environments in the MOUSE instrument, and are shown in figure 4. Using the current data correction procedures, and given the current quality of associated metadata, we consider that it is possible to detect an analyte signal with a magnitude no less than ca. 10% of the background signal. At low , the instrument background is dominated by the instrumental beam spill and/or tape signals. At higher , the cosmic radiation background defines the absolute lower limit for freestanding samples, but is dwarfed by the signals for tape (used for powder samples) or the water dispersant in the SiN low-noise flow-through cell. Successful subtraction of the dispersant signal with low-scattering analytes, puts exponentially higher demands on the accuracy of the coincidental measurands (e.g. incident flux and transmission factors), and demands the propagation of uncertainty for a confident analysis later on. Possible strategies for low-scattering analytes in such samples are discussed in appendix F. Flow-through capillaries are used so that an empty capillary and the dispersant background can be measured in the exact same capillary before the sample measurement is recorded. This is the only way to ensure correct, problem-free background subtraction for samples in capillaries.    figure 21, which an analyte scattering must contribute significantly to. To use these figures, simulate the analyte scattering in absolute units, multiply with the sample thickness in mm, and then compare the resulting simulated curve with the above. The analyte signal should add at least 10% to the background signal.

Traceability and uncertainties
Traceability refers to whether the measurands of the instrument can be traced back, in an unbroken chain, to a standard. This is inherently coupled with an estimation of the uncertainty throughout the chain for this measurand. When an X-ray scattering instrument is demonstrably traceable, in both and , it adds reliability to the values obtained, and an accuracy that those values can be determined within. This enables such an instrument to be used to calibrate and certify samples, which, in turn, can then be used to calibrate other instruments. This effort has been undertaken for the MOUSE instrument, which is expanded upon in detail in appendix C. There, it is shown that both the scattering cross-section, , as well as the scattering vector, , can be traceably defined, within reasonable levels of uncertainty (5% for the scattering cross-section, and a configuration-dependent uncertainty at best below 1%) for the MOUSE instrument. The traceability of the scattering cross-section is shown to be determinable using the detailed data correction methodology, without referring back to calibrants. The traceability of the scattering vector is determined using a triangulation method coupled with a traceably calibrated laser distance measure and an interferometer strip alongside the motorized detector carriage.

Corrections
As many corrections as possible are applied to the collected data. These have been comprehensively described in our previous work [5,23], and are implemented in the DAWN software package [24]. As discussed in [5], other tools are also available for data correction (e.g. ATSAS [25], DPDAK [26], PyFAI [27], pySAXS [28], Xi-CAM [29], FOXTROT [30]). However, we found these to be limited in the number and extent of implemented corrections and/or in their uncertainty propagation. Most also lacked the ability to adjust and re-order the individual correction steps. PyFAI, however, will likely be integrated as a part of our modular corrections as a faster implementation of the averaging steps.
-10 -We now also include an automated calculation of the X-ray absorption coefficient based on the atomic composition and density of the sample components, which allows for an automatic calculation of a sample's apparent thickness based on the measured X-ray absorption. Currently, only one correction has not yet been implemented: the deadtime correction. At the time of this writing, this correction is performed on the data by the detector software itself, which negatively impacts the accuracy of the uncertainty estimation. At issue here is the uncertainty estimates that derive from the counting statistics. These need to be estimated based on the actual number of detected counts, and not on the hypothetical number of incident counts obtained after the deadtime correction. For this reason, efforts are underway to disable this correction in the detector software, allowing us to determine a better estimate for the counting uncertainties. After this estimation has been performed, the deadtime correction can be applied and the uncertainties propagated through the corrections.
Besides this, however, the correction sequence described in our previous work has consistently delivered data without obvious data correction flaws (such as over-or under-subtracted backgrounds) irrespective of the type of samples. This universality has been demonstrated for measurements both on our instrument as well as at the I22 beamline at the Diamond Light Source, where the same correction sequence is used to treat their data [3]. It functions well for both strongly-and weakly scattering samples, solids, composites, liquids, as well as powders, the latter of which form a surprisingly large fraction of the samples we have measured.
Upgrades currently underway concerning the MOUSE correction sequence include an automated calculation of the scattering cross-section based on the density and atomic composition of the components within each sample to aid in automation of the analysis. Future upgrades will include automatic flags to highlight potential issues at an early stage. These flags could indicate common issues such as a strong probability for multiple scattering, transmission factors that are too low or too high (too much or too little sample in the beam, respectively), large uncertainties after correction, and incident beam instabilities.

Open data format
Any dataset loses value when it cannot be read by everyone, or when it can no longer be read at all. Such data loss becomes particularly painful when the data is required for checks or reinterpretation after publication. All recorded data should, therefore, be stored in a suitable, stable open-source archival dataformat. One such format, is the HDF5-based NeXus container, which is flexible, reasonably fast, and can comprehensively store all imaginable formats and shapes of data, alongside its associated metadata, in a clear, self-describing, hierarchical structure [31,32].
In the case of the MOUSE, all data collected from a series of measurements collected in a single instrument configuration for a given sample, is combined into a single "raw" HDF5/NeXus file. The information in this file is decorated with metadata from the instrument as well as measurement information extracted from the electronic logbook, and recently also includes sample information extracted from the SciCat database. The aforementioned data processing, which the "raw" files undergo, utilises this HDF5/NeXus file structure. This structure allows for input data and As the same logbook is used to automatically generate the measurement script, the information in the logbook has a high degree of reliability.
-11 -metadata to be read, but also means that the processing tree can be stored alongside the original and processed data, in a new "derived" datafile. Subsequently, analyses could also be stored within the HDF5/NeXus file structure, generating a comprehensive, traceable overview on how conclusions were derived from the measurement data.

FAIR
Having your data stored in a way that can be read is one thing, but the story doesn't quite end there. Good data stewardship -yet another task befalling upon good researchers -also requires that 1) you can find the data again at an unknown time in the future, that 2) it is made accessible to others, and 3) that they can reuse it for their own research. In full, the principles of data stewardship can be summarized using the four FAIR guiding principles [33,34]: • Findable: metadata and unique identifiers should be added to the data, which should be uploaded in a searchable database. We currently do this by uploading to our internal SciCat database.
• Accessible: the database should be made accessible to others using common protocol(s), with at a least searchable metadata, even if the data itself is not searchable. Currently our development database is accessible from within the organization, but not from outside (yet).
• Interoperable: data and metadata should be described using clear and consistent vocabulary, with appropriate references provided where possible. We are following the nomenclature as defined by the canSAS data format working group, codified in the NXcanSAS application definition (https://manual.nexusformat.org/classes/applications/NXcanSAS.html).
• Reusable: the data should be accompanied with metadata and appropriate information to give it provenance. The format of that this information is presented should adhere to community standards. We achieve this through utilisation of the NeXus data format and our detailed and documentation-enforcing workflow.
In summary, we are on our way to improve our data stewardship, but developments are still ongoing.

Accreditation
There are two ways of finding out if the data from an instrument can be trusted. The first and best way is for experts to check the metadata of the measurement and the instrument, to make an educated assessment on the data quality and reliability. This, however, requires the availability of a trustworthy expert with the time to thoroughly examine datasets and investigate instruments (insofar as possible). The job of the expert can be made much lighter by ensuring this information is present, either as metadata in the datafiles themselves, or in written (long)form accompanying the measurements.
A second method for trust is trust by proxy, and works better for well-established, widespread techniques such as electron microscopy or UV spectroscopy. In these cases, an independent adjudicator is hired to verify that the appropriate standards for measurement and documentation are -12 -adhered to. If so, a certificate can be bestowed upon the technique and laboratory, which is usually considered a trustworthy proxy for quality that can be assessed by anyone.
In case of the MOUSE, there are only a limited number of standards it can adhere to. There is a ISO standard for the analysis of particle size by small-angle X-ray scattering (ISO 17867), which describes the technique and highlights some analysis methods. Besides this, there are ISO 17034 (General requirements for the competence of reference material producers) and ISO 17025 (General requirements for the competence of testing and calibration laboratories), which together with GxP ("good practice") and CMC (Chemistry, Manufacturing and Control) analytical procedures and method validations, provides a framework for managing measurements on instrumentation in general. This available set of standards and guides has been used in the development of a comprehensive measurement methodology for the MOUSE. However, since the focus of the instrument lies in research rather than testing at the moment, certificates of conformity by independent adjudicators have not (yet) been pursued.

Experimental Examples
As mentioned in the introduction, the MOUSE has successfully been applied to a very wide range of materials science-relevant samples. This can be demonstrated by means of a few examples. The general experimental details used for these measurements can be found in appendix A.

Alumina membranes
The first example shows the applicability of the MOUSE to aid in materials science investigations. Here, the scattering from a porous alumina membrane is shown, these membranes are similar to those described in detail in Yildirim et al. [6]. These contain a hexagonal array of pores perpendicular to the surface plane (conforming to a P6mm spacegroup). In these membranes, the pore spacing is nominally 65, 125 and 480 nm (with a manufacturer-specified standard deviation of less than 10%), and the pore diameter 40, 50, and 180 nm, respectively. These membranes have an approximate thickness of 100 μm. The peak positions in the scattering patterns (figure 5) can be identified using peak finding methods, with their position optimized for a hexagonal lattice of the P6mm spacegroup, indicating lattice spacings of 64 and 119 nm for the smaller pitches (the largest, with a nominally 480 nm pitch, cannot be accurately determined at this stage). Given their high reproducibility, they may lend themselves well as q-calibration materials for low-q vectors in non-traceable instrumentation.

ZIF-8 and porous carbon catalysts
The second example demonstrates the wide-range, dual-source capabilities of the MOUSE, and consists of two samples. The first of the two are ZIF-8 nanoparticles, synthesised in-house using procedures detailed in [35]. Through accurate control of the synthesis conditions, the final particle size has be kept small, and the size distribution narrow. The sample was measured as a dried powder (figure 6), and shows the expected increase in fluorescence from zinc when using the molybdenum source at wide angles. The small-angle region can be fitted to obtain a size distribution, whereas the wide-angle region can be indexed to verify the structure and phase purity of the ZIF-8 powder.
The background subtraction procedure improves the wide-angle signal, which, in turn, is beneficial -13 - for the analysis. The second sample to demonstrate the wide-range, dual-source capabilities of the MOUSE is a porous carbon matrix with embedded iron carbide nanoparticles. This type of sample is described in detail in [9]. In contrast to the previous samples, these contain a high fraction of metal carbide additives. Of interest is not just the extension of the small-angle region into the XRD region, thereby serendipitously providing X-ray diffraction (XRD) data in absolute units with uncertainty estimates, but also the drastic differences in signal that a multi-source set-up can bring for fluorescing samples.

Tobacco Mosaic Virus
To demonstrate the flexibility of the instrument, as well as the limits imposed by the background, a biological sample was measured in dispersion. The liquid dispersion contains an amount of the tobacco mosaic virus (TMV), which is a helicoidal, elongated structure, whose envelope resembles a cylinder with a diameter of ca. 18 nm, and a length of ca. 300 nm [36]. The resulting curve, shown in figure 7, is compared to a curve simulated using the SPONGE. This is an in-house developed Python software package, that loads a 3D closed surface in the STereo Lithography (STL) format, -14 -   -15 -and computes the scattering pattern using the Debye equation on randomly distributed points within the surface. The SPONGE estimates data uncertainties and allows for size distributions and dynamics to be considered, as shown in our recent work on other helical structures [37].

JINST 16 P06034
Here, due to the large dimensions and the fine detail, only a 180-nm-long subunit of TMV was simulated, leading to deviations at low--values (< 0.07 nm −1 ). The remainder of the scattering curve is described well by the simulation. The TMV subunit STL model was created by Nuansing, provided under a CC-BY 3.0 license [38]. To describe the overall, large-scale structure of the TMV, the scattering of a cylinder of the correct dimensions has been shown alongside, better describing the low-behaviour. This cylinder scattering shows that very little information on the length of the cylindrical structure may be available in the measured range. Furthermore, it bears repeating that the uncertain scattering observed at low is due to the relatively high instrumental background (beam spill) signal compared to the low TMV signal at those angles. At high , the intensity decrease is uncertain due to the low analyte signal level compared to the (5-10 times higher) scattering of the water dispersant, making it exponentially more unlikely to successfully extract the correct signal even with the methods presented herein (cf. appendix F).

NIST gold nanoparticles RM8011
The correctness of the MOUSE traceability was re-verified using nominally 10 nm gold nanoparticles from NIST under catalog number RM 8011 (figure 8). A previously used sample of this material was available in the laboratory, and was measured in a low-noise flow-cell under continuous recirculation. For the background measurement, water was measured in the same low-noise flow cell prior to the sample measurement. Measurements were performed in several instrument configurations to obtain a wide range scattering pattern, with a total scattering pattern recorded over a timespan of 6 h for the background and 12 h for the gold sample. The noise levels at low are large due to the magnitude of the beam spill versus the minimal sample signal at those scattering vectors. At high , the noise is due to the low analyte signal level compared to the scattering of the water dispersant.  The gold measurement was analyzed using the software packages McSAS and SasView. Mc-SAS was applied assuming spherical scatterer geometry between 0.1 ≤ (1/ ) ≤ 7, and the resulting size distribution quantified between 2 ≤ ( ) ≤ 7, to avoid contributions from agglomerates and flat background. SasView was applied assuming spherical scatterer geometry and a normal size distribution, between 0.01 ≤ (1/ ) ≤ 0.7, with a dataset scaled to the appropriate SasView units of (cm · sr) −1 (as opposed to the standard (McSAS) units of (m · sr) −1 . The results from the fits (available in the SI), show narrow dispersities with mean radii agreeing well with the NIST-specified values as obtained using AFM: 8.5 ± 0.3, and TEM: 8.9 ± 0.1. McSAS shows a mean (number-weighted) diameter of 8.55(2), SasView shows 8.60 nm. The concentrations are about 7% higher as found both with SasView and McSAS as the specified (non-reference) value of the documentation of 51.6 μg/ml, with McSAS giving 55.3 μg/ml and Sasview 54.8 μg/ml.
The volume fraction deviates a little more than expected from the reference values. Fortunately, the sample was measured over multiple repetitions, and later repetitions revealed steadily increasing volume fractions, with the third repetition giving concentrations of 63.2 μg/ml and 63.3 μg/ml for McSAS and SasView, respectively, a 20% increase over the target value. It was found after the experiments that there was a significant coating of gold on the SiN windows of the flow-through cell, so we here find that the increase in observed concentration can likely be ascribed to the long measurement times (12 h per measurement) and the sticking of gold nanoparticles to the cell windows. Additionally, as the sample had been opened before, the initial concentration can also have increased due to some evaporation of the solvent over time. In addition to these effects, the presence of a small fraction of agglomerates is detected, in particular when comparing the intensity at low angle of these measurements compared to those of [39]. While these agglomerates are not expected to increase the observed concentration, they do hint towards changes of the sample over time. A more accurately determined volume fraction standard could be developed for improved calibration and verification of scattering instruments. Overall, however, the sample underscored the accuracy of the MOUSE methodology.

Outlook and conclusions
With the MOUSE project now suitably well developed, high-quality X-ray scattering measurements are being obtained for a steady stream of samples. Already several thousands of datasets (each consisting of many repetitions) have been collected in its first two and a half years of development. Like at synchrotron beamlines, the development of this project is reliant on the right people, appropriate equipment, as well as a well-structured methodology including proposal forms and data catalogs. Unlike synchrotrons, however, experiments in a laboratory setting are free to last as long as necessary (time-wise), and can be repeated easily when they do not work the first time around. The availability of the MOUSE instrument lowers the threshold for more daring proof-of-concept measurement strategies or materials investigations without too much pressure, and enables the development of extensions to both the instrumentation as well as the methodology.
The MOUSE instrument remains in a constant state of flux, with current efforts focusing on integrating GISAXS, upgraded sample stages, various heating-and cooling stages, tensile stages and magnetic-and electric field stages. The future will also see the integration of additional equipment, including spectrometers and an Ultra-SAXS plug-in module [52]. The MOUSE is also occasionally -17 -used as an in-line analytical instrument to follow lab-scale syntheses, an application which will be exploited more frequently in the future. With our efforts on modular improvements to the MOUSE instrument (e.g. its "M"-and "S"-sized mounts, standardized sample holders, etc.), but also of the surrounding MOUSE methodologies, we hope to encourage transfer of the knowledge and experience gained in the MOUSE project to any compatible instrument worldwide, and hopefully soon too, to a laboratory or synchrotron near you. we thank Dr. Andreas Thünemann for his input on the manuscript. Dr. Tim Snow and Dr. Jacob Filik from the Diamond Light Source are thanked for their continued integration and improvements of the SAXS data corrections in DAWN. Dr. Tim Snow is also thanked for his input on many aspects of the paper. This work was partially funded through the European Metrology Programme for Innovation and Research (EMPIR) project No. 17NRM04. Lastly, we thank all the scientists and collaborators who are the driving force for the continued development of the MOUSE.

A Experimental: a brief introduction to the MOUSE instrument
The upcoming sections will contain practical examples for illustration, this section briefly summarizes the experimental set-up and measurement aspects which will be elaborated on later. The SAXS/WAXS measurements shown in the examples were performed using the MOUSE: a heavily customized Xeuss 2.0 (Xenocs, France), installed at the Bundesanstalt für Materialforschung und -prüfung (BAM), Berlin. The MOUSE uses X-rays from microfocus X-ray tubes, followed by multilayer optics to parallelize and monochromatize the X-ray beams to a wavelength of Cu = 0.154 nm for the copper source, and Mo = 0.071 nm for the molybdenum source. These are collimated using three sets of scatterless slits (two germanium and one silicon, with the latter virtually transparent to molybdenum radiation, but very effective for copper radiation). The detector is an in-vacuum Dectris Eiger R 1M on a three-axis motorized platform, for these investigations placed at distances ranging from ca. 50-2500 mm from the sample. After correction, the data from the different distances and different sources are combined using a procedure that merges the datasets in such a way as to optimize the uncertainties in the overlapping regions (cf. appendix D), producing a single continuous curve.
The sample-to-detector distance is traceably calibrated using a triangulation method, with the detector position cross-checked with interferometer strip readings and a traceably calibrated Leica X3 laser distance measurement device (cf. section C). The space between the start of the collimation up to the detector is a continuous, uninterrupted vacuum to reduce the instrument background. Powders are mounted in flat, laser-cut sample holders, between two pieces of Scotch Magic Tape™. The thickness of the sample holder is selected based on the composition of the sample, with the apparent sample thickness then calculated based on the measured X-ray absorption, atomic composition and density of the sample. Liquids are measured either in a flow-through borosilicate capillary, or within a low-noise SiN-windowed flow cell, both with a fixed pathlength of approximately 1 mm.

JINST 16 P06034
The effective thickness of the liquid cells is determined for each cell, based on the measured X-ray absorption of water. For liquid experiments, care is taken to measure the background in the same location within the same cell, using the same beam collimation configurations, before the sample is injected into the cell.
By using both photon energies over a range of overlapping sample-to-detector distances, a very wide range in scattering vectors can be covered, and X-ray fluorescence contributions visible for some samples can be identified. The resulting data is then processed using the DAWN software package [24,40]. For the majority of samples, the following processing steps are applied in order: masking, calculating Poisson errors, correction for counting time, dark-current, transmission, selfabsorption, primary beam flux, instrument and container background, flat-field, detector efficiency, thickness, and solid angle, followed by azimuthal averaging (cf. [5]). By virtue of the completeness of the corrections, and by measuring the flux using the direct beam on the detector, the processed data is in absolute units. Scaling of the individual datasets from the various distances and sources to achieve overlap is, therefore, unnecessary. Photon counting uncertainties are propagated through the correction steps, and dynamically masked pixels are stored as metadata alongside the processed data. The data merging procedure and the uncertainty propagation for , as well as details on an additional uncertainty estimation for originating from the data merging procedure are provided in appendix D and E, respectively.

B Design and technical details
In the conceptualization stage of the MOUSE, the following design considerations were made: • The X-ray sources should be reliable over bright, to ensure the reproducibility and stability during the data collection.
• At least two X-ray sources should be present, so that energy independence and -switching can be demonstrated. Energy switching is useful for samples containing fluorescing elements (Fe, Co, Ni, Cu, Zn, etc.), for which either the one or the other source will produce lower-noise data.
• The collimation should consist of scatterless slits, three sets at best to ensure collimation flexibility • the beam path should be a continuous vacuum from the start of the collimation to the detector surface, to minimize the background scattering signal • The sample chamber must be very large, to house a wide range of sample environments without making concessions on the sample environment design in order to minimize their footprint, and to be able to house the future Ultra-SAXS plug-in. The sample chamber should come with kinematic feet for standard plates (discussed below), and be equipped with sufficient flanges for lead-through connectors.
• The detector should be a low-noise, photon-counting, direct detection system, capable of measuring the direct beam (for traceability reasons, see section C).

JINST 16 P06034
• The detector should be mounted in vacuum, on a stage capable of fast motion along the beam (up to 0.5 m/s), with the motion cross-referenced against an interferometer strip mounted next to it • Lateral movement of the detector is also required for traceability reasons (see section C).
• The overall design of the instrument should be highly adaptable and extendable, with standard connections and mounts used throughout, and standard commercial off-the-shelf (COTS) hardware used where possible.

B.1 X-ray source & optics
Two highly stable, microfocus X-ray sources are mounted on a motorized platform for automated switching. The two Xenocs GeniX 3D High flux™ X-ray sources contain a copper, and a molybdenum target, respectively. Both sources have multilayer optics directly attached to the X-ray tube, designed to parallelize the beam (no focusing). The specifications for the copper source specify a The attached FOX™ optics both defocus and partially monochromatize the beam. As experiments with other multilayer optics has shown, higher-order reflections (of brehmsstrahlung) can be passed through as well. Normally this is not an issue, but when components such as semitransparent beamstops are added to the beam path, the resulting radiation hardening effect can lead to significant misrepresentation of the detected beam intensity. The ability to measure the unattenuated primary beam intensity, therefore, is highly recommended.

B.2 Collimation
The collimation consists of three sets of hybrid "scatterless" slits, each consisting of four, individually movable metal bases, tipped by single crystal edges. The upstream two out of three sets use single-crystal germanium as the slit blade material, whereas the downstream third set uses silicon as the edge material. While the silicon slit is ideal and virtually scatterless when used with the copper source, it is too weakly attenuating to be effective for the molybdenum source. For that source, the upstream two sets must suffice. Germanium, however, is not as scatterless for copper as silicon, hence the implementation of three sets. For added flexibility, it is possible to move the middle slit in the collimation system, and can even be moved into the vacuum sample chamber if desired (and would then become the last slit).

B.3 Sample chamber
The oversized sample chamber offers an internal space measuring 550 × 550 × 600 mm, and is equipped to support a wide range of current and future sample environments. To facilitate easy and fast exchange of sample environments, the sample chamber floor contains three sets of Thorlabs -20 - KBS98 kinematic feet, allowing for placement of three 450 × 150 mm sample stage bases side-byside (see figure 9). This base plate size is compatible with the Thorlabs MB1545/M breadboards. This combination of breadboard and kinematic feet forms a standard "M-sized" MOUSE base plate, with the beam height approximately 300 mm over the surface onto which the KBS kinematic feet are mounted, with our aim of standardizing the base plate to a wide range of laboratory and synchrotron instruments.
Currently, four base plates are available. One is a Grazing Incidence plate (under development) with a tower of Newport stepper-motor driven stages for positioning and aligning a surface in the beam. Two more plates contain the upstream and downstream channel-cut crystal towers for the plug-in USAXS module. The most commonly used base plate contains a pair of orthogonally mounted Newport UTS150PP stages, so that a 150 × 150 mm horizontal and vertical translation can be achieved of a sample platform perpendicular to the beam direction. This pair of stages carries -21 -a Thorlabs KB75/M kinematic platform (our "S-sized" sample platform, with the nominal beam height of about 100 mm over the surface on which the KB75/M is mounted), to which a variety of sample racks and/or environments can be attached. At the moment, these include a rack with up to three flow-through capillaries, a rack with up to 48 tape-sandwiched samples, and a prototype heated flow-through stage. To assist in alignment of the samples inside the instrument, an on-axis camera is provided via a holed, 90 • mirror. The camera itself is mounted on a windowed flange, and sits in atmosphere on top of the sample chamber.
The sample chamber furthermore has large, dismountable front-and rear doors for convenient access. There are many flanges provided for a range of feed-throughs, including six ISO CF

B.4 Vacuum flight tube
The provision of an all-vacuum beam path significantly reduces the instrumental background. The operating vacuum level typically approaches 1 Pa, and is achieved by means of a water-cooled Roots pump (Edwards iXL120). The large detector vacuum tube encloses a space of about 0.7 m 3 , which, combined with the sample chamber volume brings the total to about 1 m 3 . The vacuum pump is able to pump this down to operation conditions (< 0.1 mbar) in under ten minutes, although a high repetition rate of this evacuation procedure would require a suitably dimensioned water cooling capacity. Currently, no more than one evacuation per twenty minutes is recommended to prevent excessive heating of the pump cooling water: a closed circuit between the pump and an air-cooled chiller unit. It should also be noted that, while we are not operating at ultra-high-vacuum (UHV) levels, there are a number of materials in the vacuum chamber capable of outgassing (including water cooling hoses, a large amount of cabling in a plastic cable snake, the sample chamber base plates, and a large slab of anodized aluminium that forms the base of our original detector translation stage). Fortunately, we have not seen an effect from this outgassing and potential sputtering in the chamber or on the detector. However, UHV-compatible materials should be used whenever feasible.
The detector sits on a motorized platform inside the vacuum chamber, with sufficient carrying capacity to support, for example, a Dectris Eiger2 R 4M (future upgrade budget permitting). The detector platform is motorized in all three orthogonal directions, so that the detector can be moved completely around the beam. The beamstop arm motions are mounted independently of the beamorthogonal motions, and so only travels back and forth with the detector carriage on the rails, and does not follow a sideways translation of the detector. Two beamstops of 2 and 4 mm can be selected, but only the 2 mm beamstop is used. The beamstop can be removed from the detector surface in a few seconds for beam flux, beam center and transmission measurements.
The longitudinal translation of the detector consists of a belt-drive motion, and is additionally equipped with a Renishaw optical interferometer strip for independent motion verification, which can be read out but is not run in a closed-loop mode. The belt-drive motion can be driven at speeds of 0.5 m/s, although normal operation moves it at half that speed, which is more than sufficient for -22 -

B.5 Detector
The current detector consists of a Dectris Eiger R 1M, which is a hybrid pixel detection system with 1030 × 1065 pixels, the majority of which are 75 × 75 × 300 μm in size. Each individual pixel has a string of detection electronics behind it, including a preamplifier/shaper, discriminator and counter [41]. This configuration requires additional hardware to enable adjustments on a per-pixel basis, which is achieved through trimbits, flatfield and energy-and threshold-specific countrate corrections. A large amount of information on these corrections is provided in the NeXus-format datafiles which are produced by the detector itself.
Not all pixels are what they seem. Firstly, there is a row of virtual (masked) pixels between the detector modules, where no real pixels exist. The virtual pixels here serve to ensure the pixel distance in the image match the real life distance between the panel pixels across the detector. Secondly, each module consists of eight detection panels. The panel edges have double-sized pixels to span the gap, whereas panel corners have quad-sized pixels. The counts collected by these oversized pixels are split by the detector hardware into normal-sized virtual pixels, which can result in overly smooth-looking information over the panel gaps as the Poisson noise is not added when splitting the counts. Naturally, the flatfield value is identical for all virtual pixels belonging to one oversized pixel.
-23 -Of note in this metadata is the countrate and flatfield information, which is recalculated whenever the detector settings are changed, in particular when the energy, frame time and energy threshold are adjusted. They are calculated based on detector-specific measurements that are done at the time of production, and assume a detector chip temperature close to 16 degrees C. When the actual chip temperature deviates from this temperature, the quality of the calculated corrections deteriorates, and care must, therefore, be taken that the detector receives adequate cooling.
The per-pixel nature of the detection electronics result in a very high dynamic range of the detector, with the maximum recommended count rate on the order of 2.8 × 10 6 counts per second per pixel (for non-oversized pixels). Due to the divergence and spot size of the laboratory X-ray beam, we do not approach this rate.

B.6 Control system
The control system used with the MOUSE is SPEC, a commercial UNIX based software package that is widely used for instrument control and data acquisition, which strongly resembles the Risø instrument control software TASCOM. It employs a command-line driven, scriptable language for controlling motors, detectors and X-ray generators, and is designed to control single instruments. As hardware support for SPEC is limited, a future upgrade will include a transition to the open-source EPICS instrument control software, for which more hardware drivers are available.
The control software communicates through a single gigabit ethernet connection with all instrument hardware, to facilitate hardware independence and control system exchange. On this ethernet bus are connected the following hardware: 1. The Dectris Control Computer (DCC) that controls the Eiger detector and does the necessary raw data file handling.

A Moxa
NPort®terminal server for communication with serial devices (RS232, RS422 and RS485) such as motor drives, pumps, chillers, temperature controllers and pressure gauges 3. The two Xenocs X-ray generators 4. The on-axis camera

An EPICS control server
As per our request, most of the hardware in the instrument is commercially available standard hardware, with a minimum of custom boards, simplifying maintenance and repairs. This adds to the flexibility of the system, allowing us to exchange, repair and upgrade components as needed. This has recently been demonstrated with the exchange of the source chiller for an SMC Thermo-con HECR chiller, the modification of several vacuum chamber feedthroughs, and the addition of two TMCM 6210 six-axis stepper motor drivers.

C Traceability and uncertainties
Traceability is the ability of the measurands to be traced back to basic physical measures. In case of a SAXS instrument, this means that the scattering vector , the photon energy, and the scattered intensity need to be unambiguously determinable, which will be discussed in the following paragraphs. In case of the MOUSE, traceability also implies that the data contains sufficient metadata so that the entire experiment, data correction and data analysis has been fully documented. This second aspect has been detailed in section 2.1. Uncertainty estimates on the absolute scaling of the resultant scattering cross-section, , and on the scattering vector, , are extremely useful in the data analysis stage. This allows for the accurate evaluation of the goodness-of-fit, to prevent over-fitting, and to decorate the resultant model parameters, from such a fit, with reasonable confidence intervals. These estimates are discussed together with traceabiltiy in detail in the following paragraphs.

C.1 Beam stability and size
The provision of a stable X-ray source is important for accurate data correction procedures. Whilst microfocus sources do not provide the brightest lab source, their low power usage and high stability are highly desirable characteristics. As the beam flux and transmission factor corrections are reliant upon a stable beam, the stability has been tested for both sources in a range of instrument configurations. In particular, the longer sample-to-detector distances require a more confined beam collimation, leading to a reduction in flux, which can negatively affect the observed beam stability. It is expected that the beam stability is a function of the precision of the liquid cooling system, the stability of the high voltage acceleration voltage source, as well as the positional stability of the electron beam on the target anode.
The result of the beam stability measurements over a time-span of 12 h is shown for one standard SAXS configuration in figure 11. The time series shows that, while there are jumps in the X-ray source output, the magnitude of these flux changes are well below 0.1% of the measured flux values, sufficiently accurate to not severely impact the data corrections. The same holds true for most of the remaining configurations (figure 12), although the accuracy drops with longer distances, where the beam is collimated to a greater extent and therefore, as a consequence, suffers from a drop in flux. To reduce its effect on the data corrections, the MOUSE has been configured to collect the beam fluxes over a longer period of time in configurations with reduced flux. The effective beam size on the detector is shown for each configuration in figure 13.

C.2 Traceability and uncertainty of q
The scattering vector is defined as Here, is the main wavelength of the radiation, related to the photon energy through = ℎ / ≈ 1.2398 × 10 −6 / , with in meters, in electronvolt, ℎ signifying the Planck constant of ℎ ≈ 4.136 × 10 −15 electronvolt-second, and c the speed of light at 299.8 × 10 6 meter per second. The scattering angle 2 is defined by the traceable values of the catheti of the right triangle subtended by the primary beam, the scattered beam (as the hypotenuse) and the detector plane, assuming that the detector plane is mounted perpendicular to the primary beam. As such, we need to traceably determine the distance of a scattered ray from the direct beam on the detector to the direct beam on the detector, as well as the sample-to-detector distance . Knowing this, the scattering angle follows from To traceably determine , the pixel dimensions of the detector need to be determined. The documentation of the Dectris Eiger 1M detector specify a frontal pixel size of 75 × 10 −6 by 75 × 10 −6 m, with (mostly) square pixels. However, this needs (traceable) verification, which is here achieved using a method similar to that presented by Meli [42]. Here, we use the detector translations perpendicular to the direct beam path, and the direct beam as a position reference. By moving the detector a given distance sideways, we can check by how many pixels the beam has moved on the detector plane, and we can use this information to infer a pixel size.
For this to be valid, the motor stage motions must also be traceably verified: we can tell the motor to move 10 mm, but if it only moves 8 mm in reality, our results are untrustworthy. We verify the motor movement by comparing the dialed motor motion with the readout from a traceably calibrated Leica X3 laser distance meter. In this procedure, the laser distance meter is placed to probe the distance from the vacuum chamber wall to the side of the detector housing, and the values for the dialed motor motion are compared to the actual motion of the detector. This is shown in figure 14 to be correct for the motions (Y, Z) perpendicular to the beam axis (X). Now, we can continue to determine the pixel size using the motions of the motors and the position of the beam.
The position of the direct beam is determined on the detector surface using the manufacturerimplemented methods to determine the center-of-mass location from a direct beam image. Using the motorized translations, the detector is shifted by several mm at a time, and the new beam position is then determined on the detector surface. By performing this measurement over the detector surface, the manufacturer's claims have been verified, as shown in figure 15.
The determination of is less straightforward, as the sample as well as the detector sensor material have a finite thickness. As a stochastic process, the position from where the scattering originates in the sample, as well as the depth where the photon is ultimately detected in the sensor cannot be accurately predicted. The calibration has traditionally either been performed using a tape measure, accepting the uncertainties in the determination of the exact position of the sample and detection depths, or using a calibrant with a somewhat defined long-distance diffraction spacing. Typical such calibrants include silver behenate and rat tail collagen, with the former not available as a standard despite its long history [43], and the latter more reminiscent of witchcraft rather than science, and particularly sensitive to changes in humidity and degree of stretching. None of these calibrants, however, have certified, traceable -spacings, and so a different solution is needed. Instead, we again draw on the experience of Meli [42], and use a triangulation method. For this method, any diffracting material will suffice, as long as the diffraction maximum originates from a suitably large D-spacing for it to show up on the detector in its common sample-detector distances. Several exposures are then collected at different sample-to-detector distances, where the relative movement of the detector between the positions is defined by the stepper motor movement, and cross-checked using an interferometer strip mounted on the side of the detector translation parallel to the beam. In addition, the motor motion and interferometer strip are themselves verified using the calibrated laser distance measure, as shown in figure 14. Using the diffraction ring sizes on the detector at each position, a "zero position" can be extrapolated where the ring size is (theoretically) minimal on the detector surface ( figure 16). This is the origin of the scattered radiation and traceably defines the sample position without requiring information on the structure of the diffracting sample itself. The remaining unknown is, in principle, the wavelength. While it is possible to place a calibrated X-ray spectrometer in the X-ray beam, this may not be necessary for laboratory sealedtube microfocus sources. These sources use distinct, sharp emission lines of the target anode material (in our case copper and molybdenum) to reach their designed flux values. Therefore, by virtue of being close to the designed flux value, we cannot be anywhere else in energy but at the emission line (the multilayer monochromator has an energy bandwidth of about Δ / = 4%). For copper, this implies a mixed ,1 and ,2 energy, at relative intensities of 100 and 51, and energies of 8048 and 8028 eV, respectively. We therefore define these as having an apparent mean energy of -29 - 8.04(1) keV, the uncertainty in wavelength here contributing insignificantly to the final uncertainty in . emission is suppressed by the monochromator. Uncertainties in can be divided into two groups: those whose distributions are defined and can be taken into account in a data analysis procedure (known colloquially as "smearing" effects), and true sources of uncertainty. The former includes contributions arising from the sample thickness, the beam profile, wavelength spread (if known), as well as the detection location within the detecting volume. These bring about a -dependent "blurring" of the recorded image, which can be taken into account through smearing of a subsequent analysis model before comparing it against the recorded data. The latter uncertainties include uncertainties in sample-to-detector distance determination, uncertainties in pixel size, and can include uncertainties in the wavelength if they cannot be measured. For the estimation on the uncertainty of the traceable value, however, we will concern ourselves with the true sources of uncertainty only, and specifically those affecting effecting the scattering angle, 2 , and the scattering vector, .
Starting with equation (C.2), the uncertainty on the value of 2 is comprised of the (propagation of) uncertainties of and . The sample-to-detector distance is calibrated principally against a calibrated laser measure, which has a determined expanded uncertainty ( = 2) of 1 mm for distances up to 3 m. These values are used to calibrate the motor motion and the zero position for the sample-to-detector distance ( figure 14 and 16, respectively).
Uncertainties on the slope and intercept values in the linear fitting procedures used above, are resulting from the employed fit procedure. This fit procedure takes the uncertainties on both the explanatory (x), as well as the response (y) variables into account, by using a modified trust-region Levenberg-Marquardt-type algorithm to estimate the function parameters and their uncertainty [44]. Here, the determined uncertainty for the laser measure calibration certificate is used, resulting in a final uncertainty in motor positioning of 0.31 mm for the beam-orthogonal directions, and 0.37 mm for the direction along the beam. The uncertainty of the final sample-to-detector distance (figure 16) is measured in tens of micrometers. We consider this to be unrealistically small, and therefore supersede this with the unexpanded ( = 1) uncertainty of the laser measure of cert = 0.5 mm.
We here use the orthogonal distance regression, or "ODR" module of the SciPy library, which is the Python interface to the Fortran-77 ODRPACK library, and propagates uncertainties both in as well as to the uncertainties of the fit parameters.
-30 -Combining these uncertainties with those arising from the sample thickness = 1 mm and detector sensor material thickness = 0.45 mm, as stated in table 1, gives us a final uncertainty estimate on of: For , the uncertainties derive from the uncertainty in pixel size, itself determined using the movement of the center of mass of the beam, moved over the detector surface using the laserinterferometer-calibrated motions. While the tolerances on pixel spacing of a detector of this particular construction are necessarily fine, indeed have to be much finer than our calibration allows, we cannot rely on this in our derivation.
When we use our calibration method, which uses the center of mass of the beam on the detector ( figure 15), the motion uncertainties are inherently convolved with the pixel size uncertainty and the accuracy of determination of the center of mass of the beam. In combination with the information on the motion uncertainties themselves from its separate calibration ( figure 14), we see that the motion uncertainty is orders of magnitude larger, and limits the accuracy of the pixel size determination. Despite this, the pixel size derived from the calibration method is determined to be on average 75.14 μm with an uncertainty across the detector face of about 21 nm. To be on the safe side, we can assume that the uncertainty of the pixel size calibration is the difference from the assumed manufactured spacing of 75 μm, i.e. 0.14 μm, to which we can add the uncertainties of the calibration to result in an overestimated pixel calibration uncertainty pixelcal = 0.161 μm, in line with other work on similar detectors [45]. Despite this deliberate overestimation, its small value does not contribute significantly to the uncertainty budget.
As the parameter is determined in a scattering experiment without moving the detector, the motion calibration uncertainty is not relevant to the uncertainty of ; its calculation relies on measuring the center of mass of the direct beam, and the position of a detected photon relative to this center of mass. Therefore, we derive the uncertainty for as a combination of the pixel size pixelsize = 0.075 mm, the (worst-case) uncertainty on the overall pixel size calibration over the length of the detector face from figure 15 to be pixelcal = 161 nm (as explained in the previous paragraph), and the accuracy of the direct beam center-of-mass determination, shown in figure 15 to be better than 0.5 pixel: Propagation of the uncertainties through equation (C.2) poses a challenge, as the uncertainty is both a function of as well as instrument configuration: the same can be measured with different precision over an infinite range of sample-to-detector distances . For example, scattering can be measured at a particular vector, close to the beamstop if is small, with a high relative uncertainty in . Alternatively, the same scattering at the same can be measured with high precision by choosing as large as possible, so that reaches the edges of the detector and has a high precision.
Therefore, the uncertainties here are derived as a function of both and . For the wavelength uncertainty, we estimate an energy spread from the source based on the difference between the two -31 -2021 JINST 16 P06034 From this in-depth consideration of non-smearing sources of uncertainty, we can see that the uncertainty is dominated by uncertainties in the pixel size at small angles, and the wavelength spread at wider angles. When measured close to the beamstop, i.e. at a distance of 2 mm from the direct beam position, the uncertainty in can be as large as 4% for one standard deviation, which translates directly into the uncertainty for any determined sizes whose analyses are reliant on those vectors. further away from the beamstop, the uncertainty in can be less than 1%.

C.3 Traceability and uncertainty in scattering cross-section I
An absolute scattering cross-section (often referred to as "absolute intensity") is defined as the ratio of the scattered photon flux to the incident (primary) photon flux, and thus indicates the probability of a photon to be scattered as it travels through a length of sample [46]. The intensity detected by our detector ( ) is related to the absolute scattering cross-section of the sample Σ Ω ( ) in units of ( −1 −1 ) through: With 0 ( ) the wavelength-dependent flux over the total incident beam (in ph/ ), ΔΩ as the solid angle of a detector pixel, ( ) as the wavelength-dependent detection efficiency of the same pixel, ( ) as the wavelength-dependent transmission factor of the sample, and the thickness of the sample (in m). ) GC SRM3600 measurement SRM3600 calibration curve (off by 3.0%) Water measurement using SiN cell Water measurement using extruded cap. Theoretical H2O at 293K, 10 5 Pa Figure 18. The MOUSE data as corrected through the comprehensive data correction scheme comes out in absolute units already. This is verified by cross-checking the obtained intensity for the NIST SRM3600 glassy carbon sample [47] against its reference dataset, and by cross-checking the scattering of water against the theoretical water scattering level. Left: overall plot showing both water and SRM3600 datasets and their reference values. Right: separated data on a linear intensity scale highlighting the degree of disagreement.
In principle, the detection efficiency is not traceably definable in this equation (although it could be estimated using either ray-tracing or simpler approximations based on the photon energy, sensor thickness, and material composition). However, if we measure ( ) as well as 0 unattenuated on the same detector, the actual detector efficiency cancels out. For the sample thickness determination, either a screw micrometer can be used, or the thickness can be derived from the measured Xray transmission, the sample density, and its atomic composition, taking care to estimate the uncertainties in parallel. With ΔΩ determined geometrically (using the aforementioned sample to detector distance and pixel size), That leaves the determination of the transmission factor, which is done by measuring the primary beam flux and the transmitted beam flux on the detector (by moving out the beamstop). The transmission factor uncertainty strongly affects the quality of the data as it is also used for the correct background subtraction, and so should be determined with a sufficiently high accuracy.
The success of this approach is demonstrated in figure 18, where the reference values of two absolute intensity standards are compared against the fully corrected curves obtained from the MOUSE and its subsequent data correction procedure. The values from the NIST SRM3600 glassy carbon sample are within 3% of their reference values [47], well within the uncertainty of the reference dataset. The water curves, scattering with a cross section several orders of magnitude lower than glassy carbon, show slight signs of background oversubtraction, as indicated by the downward trend at smaller . Such oversubtraction is likely due to slight inaccuracies in the transmisison values or flux values, pointing at possible areas of future instrumental improvement. Nevertheless, the water reference value as derived from its isothermal compressibility is proximate to the measured value [46].
As first suggested in [23], the uncertainty in the scattering cross-section ( ) for a given analyte (i.e. after its signal has traversed the aforementioned data correction steps) is best split into two components: scaling and datapoint ( ). The first is an uncertainty on the overall scaling of ( ), which is directly affecting the uncertainty on any volume fractions derived from it. The second component is a (typically considerably smaller) individual datapoint uncertainty of the dataset, -33 -which affects the volume fraction but also the accuracy with which the analyte size distribution can be characterized, as the curve fitting procedure will be weighed by these.
A step-by-step estimation of datapoint ( ) in particular from its constituents is, unfortunately, highly dependent on the particular measurement conditions, sample conditions as well as the chosen metadata collection strategies. As part of our data correction methods, these uncertainties are currently estimated on a best-effort principle, starting from Poisson counting statistics in the raw data, and propagated through the correction steps, adding the uncertainties from the metadata and other datasets (e.g. backgrounds and flatfields) when such uncertainties are made available.
It is known, however, what the absolute scaling relies on (cf. equation (C.6)), and the uncertainties of the absolute scaling scaling can be estimated from there. Based on the magnitude of the same uncertainties on the SRM3600 calibrant of about 2.6% ( = 1) [47], the contribution of scaling is expected to dominate the uncertainties on the volume fraction determination. The individual uncertainty estimates for the variables of equation (C.6) are given in table 2. These contributions may warrant an expanded explanation. Starting with the flux, these are determined in the MOUSE by first collecting the direct beam counts over 0.1s of exposure, detected on the Eiger 1M after moving out the beamstop. This first exposure is used to estimate for how long the collection should occur to collect approx. 2 × 10 6 counts. The actual counts are then divided by the collection time to get the flux with a low uncertainty of about √ 2 × 10 6 /2 × 10 6 ≈ 0.071%. For the transmission factor determination, this process is repeated, except that an additional flux measurement takes place with the sample in its measurement position. The thus reduced flux leads to a lower count with a resultant higher uncertainty. For samples that do not absorb more than 90% of the beam, the uncertainty of this determination is then estimated to be no more than ≈ √ 0.071 2 + 0.22 2 ≈ 0.23%. Any uncertainty in this transmission factor as well as the primary beam flux will lead to imperfections in the background subtraction procedure, and may show up as under-or over-subtraction.
The solid angle coverage of a pixel is determined based on the size of a pixel and its distance to the sample. This is the same calculation as in paragraph C.2, and is (for most pixels) smaller than 1%.
The biggest uncertainties derive from the determination of the sample thickness . While this can be done practically using calibrated dial micrometers for some samples, this is not possible or precise enough for samples with thickness variations, liquid cells, and powders. Instead, the -34 -sample thickness is determined using the measured X-ray absorption, which can be combined with information on the atomic composition, the X-ray energy, and the (bulk) gravimetric density to calculate the thickness. For liquid cells, the absorption of water is used to calibrate the thickness before measuring a sample. In these determinations, care is taken to use only the sample absorption. Contributions to the absorption from the sample container, determined separately, are corrected for.
The uncertainties for , then, are principally determined from the accuracy of determination of the sample absorption 1 − , the density and the sample absorption coefficient . The sample absorption uncertainty , as determined above, is less than 0.23% for freestanding samples, and less than 0.33% for samples in a container (a combination of twice the uncertainty for the transmission determination). The wavelength-dependency of the absorption coefficient is known to be minimal when not measuring close to an absorption edge, for the narrow wavelength spread of the used radiation. The atomic composition used for the calculation of is assumed to be known to a high degree of accuracy, itself is assumed to be known with an uncertainty better than 5%. Lastly, while it is well known for some materials such as water or aluminium, for other materials the density estimate can be a large contribution to the uncertainty. The literature values for polymers, for example, can easily span a range of 10%, and the density therefore should be measured on the actual sample whenever possible. Such a density determination typically can be done with an uncertainty better than 0.2% [48].
This uncertainty in can thus be estimated for a well-characterized sample to be: Using this uncertainty estimate for , we can estimate the overall scaling uncertainty scaling in the scattering cross section from eq. (C.6) as: This uncertainty estimate on the absolute scaling uncertainty is somewhat larger as that determined for SRM3600, and is dominated by the uncertainty estimate for the X-ray attenuation coefficients of materials (the value of which is based on personal communication). When better estimates are available for this, the final uncertainty can be reassessed. For the purpose of this work, it remains the current best estimate.

D Merging and rebinning of datasets measured at different sample-to-detector distances
The calculations, simulations and data merging code presented in this section are available as part of the Jupyter notebook provided in the SI.
When the beam size effects in different configurations do not affect the data, the datasets recorded at different sample-to-detector distances can be merged. These merges should be done in such a way, that the lowest possible propagated uncertainty is achieved in the overlapping regions.
-35 -This can be done by strategic weighting of the individual datapoints landing in a particular bin. In particular, in the overlapping regions, we want the good datapoints with a small uncertainty to be weighted much more heavily than poor datapoints with a large uncertainty in the resultant merged dataset.
Our starting assumptions for this are: • We have corrected, 1D or 2D datasets in absolute units, with decent uncertainty estimates.
• The ranges of these datasets overlap.
• As everything is in absolute units, arbitrary scaling factors to match dataset intensities are not needed.
• Simple error propagation is used when binning, assuming uncorrelated uncertainties.
• Datapoints are strictly assigned to one particular bin (i.e. no "pixel splitting").
• No preference is made on the source dataset of the datapoints, all datapoints are considered equal and piled into a single heap before binning.
• We are interested in finding the most accurate result, i.e. the result where the relative uncertainty is smallest (i.e. where¯/¯of a bin is minimized, with as the uncertainty estimate, and as the scattering cross-section of the bin).
The following applies to any particular bin where we want to calculate the average over. In a given bin, we have datapoints, with scattering cross-section values , and associated uncertainties . Data points with a smaller relative uncertainty should have a larger weight than datapoints with a larger uncertainty.
Unweighted, we get for the average intensity¯and propagated uncertainty¯: For averages and uncertainties of values weighted with , these become: In addition to the propagated uncertainty, we can also determine the standard error on the mean. For an unweighted system, this is defined via the standard deviation , with the standard error on the mean then defined as:

JINST 16 P06034
The standard error on the mean for weighted data, however, is not quite so easy. From Harding [49], we obtain the following definition for converting a weighted standard deviation to an estimate for the standard error on the mean: This does require the weighted standard deviation to be known, but fortunately the Python "statsmodels" package is available containing weighted population statistics methods in "statsmodels.stats.weightstats.DescrStatsW".
As determined via a gedankenexperiment, we have the following potentially relevant options for weights: • no weighting • inverse error 1 • inverse relative error • squared inverse relative error 2 • inverse relative squared error 2 We find the best option by checking which of these weightings gives us the smallest relative propagated uncertainty on the mean (as mentioned before, where¯/¯is smallest). After choosing a set of twelve random values for intensity and uncertainty, we get the following results: By running these trials, we consistently see that option 4 gives us the smallest propagated uncertainty, although there is as of yet no clear theoretical justification why option 4 should give the best results.
When this approach is applied to the weighting of datapoints in a bin, we obtain the result as shown in figure 19. The data is now merged (as mentioned without scaling) and shows very few artefacts when the weighting is applied. This can be contrasted to a simpler procedure using no datapoint weighting, shown in the right-hand side plot as a grey line. Due to the excessive size of the resultant uncertainty estimate for that plot, error bars are omitted from the grey line. The grey line shows large artefacts at the edges of the measurement ranges.
Of note is that in this procedure, we also have the option of treating the datapoint scattering vector values in an intelligent manner, i.e. where the mean is determined as the mean value of all the datapoint values appearing in a bin. This procedure is described in appendix E. re-binned datapoints without uncertainty weighting re-binned datapoints with uncertainty weighting Figure 19. Left side, the data available during the data merging/rebinning. Various uncertainty estimates are also shown, the largest of which is used as the overall uncertainty estimate. Right side: the final data (with vertical error bars barely visible) after the merging/rebinning procedure, for an uncertainty-weighted approach. In grey: the same merging but without datapoint weighting (no error bars shown). Both plots show the individual measurement ranges of each configuration. (Calcium carbonate powder sample courtesy of Dr. Claire Murray and Dr. Julia Parker, Diamond Light Source, GB)

E Binning options for the scattering vector q
During our experiments, each pixel on the detector gives us a datapoint, with the pixel collecting all photons that arrive across its surface. However, since detectors have many more pixels than the amount of datapoints we can realistically work with, we usually perform some sort of averaging or binning procedure, grouping proximate pixels together to form a single datapoint. This binning has the added benefit of producing more precise averages (and uncertainties), and making the visualisation of a data fit more useful.
The most common procedure involves defining new boundaries. Pixels with -values (e.g. centre of mass) that fall within a pair of these bounds are considered part of that bin. We then calculate the mean intensity, propagate the uncertainty on the intensity, and calculate the standard error on the mean as well for a second measure of uncertainty (see figure 20, option A).
A second version of this method, the pixel-splitting method, works slightly differently. It does not deposit all the intensity of a given pixel into a single bin, but separates the intensity between its two neighbouring bin means, with a ratio dependent on the distance from the pixel centre to the means ( figure 20, option B). The closer the pixel centre to a given bin mean, the more intensity ends up in there. This makes it somewhat more cumbersome to calculate the uncertainty statistics. One general critique to this approach is that the pixels are in essence indivisible, and that splitting the counts collected in them results in a misleading, ostensibly fine resolution that is not an accurate reflection of the coarseness of the original data.
Historically, we have been less bothered by the value of assigned to the bin. In option A, we take the mean value between the bin edges. In option B, we only work with predefined bin edges. However, our previous work estimating uncertainty budgets in , and the larger-than-expected effect on a -shift on the data, has shown that it may be prudent to be more accurate about what we do with it.
Currently, we do the binning in the traditional (A) way, but we use the actual pixel values to calculate the mean and the standard error on the mean for each bin (C). Secondly, every detector pixel is defined not just by its centre-of-mass , but also by the pixel width Δ , which are propagated as well in the binning procedure to get a second lower-limit uncertainty estimate for . This way, we end up with more accurate values on our binned data, with two uncertainties, the largest of which is the most conservative estimate. This is particularly effective in areas with a small number of pixels ending up in a bin, typically close to the beamstop in pinhole-collimated instruments. Note that for our wide-range data, we usually work with log-spaced q-bin edges. This makes the bins at small angles narrow, and the wider angles broader, but with quite low uncertainties due to the width of the bin (and therefore the amount of included photons in the computation).

F On backgrounds F.1 Determining the detectability of an analyte in a scattering experiment
Here, we discuss in detail each of the contributors affecting the detectability of a particular analyte in an X-ray scattering experiment.

F.1.1 Contrast
We can begin by considering the analyte contrast: if the analyte has a scattering length density identical to that of the dispersant, it will not be visible. Similar to contrast in electron microscopy and photography, the analyte should scatter differently compared to its surroundings. The larger the contrast, the better its detectability. Gold nanoparticles dispersed in water scatter very well, silica in water scatters reasonably well, and polystyrene or polyethylene in water scatters preciously little. The same polystyrene spheres as a dry powder on the other hand, surrounded by air or vacuum, will scatter very well. Swapping out the water for a dispersing medium with a significantly different scattering length density, therefore, may increase contrast as well. Such a dispersant swap to one offering a better contrast can be challenging, however, as materials often disperse most stably in liquids of roughly the same density, and will likely precipitate in too dissimilar liquids. This issue can be (partially) avoided by adding a stabilizer to your analyte, which surround the analyte to improve its compatibility with certain dispersants. With nanoparticles such as silver and gold, for example, this can be achieved by coating them with a polymer stabilizer to help them disperse better (and longer) in liquids. Alternatively, you can add a micelle-building dispersant that allows for the suspension of non-polar analytes in polar dispersants or vice versa. The drawback of these approaches, however, is that it adds a third component to your system, which may not be easily incorporated into the analysis.
If you have a choice in dispersants, you should choose the one for your scattering experiment, which: • stably suspends your analyte (preventing aggregation and/or agglomeration) for at least the duration of the experiment, preferably much more.
• has a scattering cross-section that is much different from that of the analyte, and • allows you to suspend a decent concentration of your analyte (see next section) • preferably is not too toxic or aggressive • preferably does not absorb the X-rays too much, for example, chloroform is a difficult choice for this reason, as the chlorine atoms quickly will absorb all of your beam • preferably does not scatter X-rays too much itself (see dispersant background section)

F.1.2 Concentration
The analyte concentration, in the dispersant, scales linearly with the amount of scattering that the analyte will generate in total. While it is attractive to increase the concentration as high as possible, significant interaction between the analyte particles can occur at any lower concentration, with ionic or magnetic interactions in particular having long-range effects. We can start seeing interparticle interference effects, i.e. scattering interaction of the analyte at concentrations as a rule of thumb above approximately 1%, which will have to be taken into account when the volume fraction exceeds this. An additional side-effect of increased concentration is the increased risk of multiple scattering. Multiple scattering occurs in samples where the analyte has a high scattering probability, e.g. in -40 -high-concentration or thicker samples with a strongly scattering analyte. Here, a photon is not scattered once, but retains a significant probability for undergoing a second, or more, scattering events after the first. As such effects complicate your analysis, it is also to be avoided. If you suspect this may play a role, you may be able to identify some of these concentration-dependent effects by measuring samples at multiple concentrations or with different thicknesses.
Lastly, increasing the concentration (in particular of heavier analytes) may affect the transmission factor of your sample, which needs to stay well north of total absorption. Thus, the concentration, if it is adjustable at all, can only be exploited to improve the detectability within these aforementioned limits.

F.1.3 Geometry
To determine the detectability for a given analyte, its approximate scattering pattern must be estimated in absolute units (as done below), for which the overall geometry needs to be known or estimated (both shape and size). The chicken-and-egg nature of this question is one of the core reasons why such detectability estimations cannot be done without any prior knowledge on the sample and the analyte. When the overall geometry and the composition of the sample is known, a scattering pattern can be simulated in absolute units and compared to the instrumental background to assess its detectability.

F.2 The effect of backgrounds on the detectability
There are several background contributions, below which it rapidly becomes impossible to detect analyte signals. This destruction of detectability by background is a well-known problem in signal analysis, where the background constitutes an unwanted noise floor with its own counting uncertainties, which rapidly negate any attempts at background subtraction unless increasingly elaborate methods for background subtraction are applied.

F.2.1 Instrumental background
The MOUSE, as nice as it may be, is still limited by physical limits imposed by reality. In particular the concessions made by the interplay of its components will contribute some (parasitic) scattering to your detected image. This is usually clearest at the detector area immediately surrounding the beamstop, but can also occur further out, in particular if you have (kapton) windows intersecting your beam. A good overview of some background contributors at a synchrotron beamline are presented by Kirby [50]. The findings for the MOUSE are shown below.
Causes for such instrumental parasitic scattering are manifold, and include the following contributions: • Scattering off edges, including slit edges and beamstop edges • Scattering from windows, for example Kapton windows that separate vacuum flight paths from some sample environments • Scattering from air paths, or partially evacuated paths • Scattering from elements in the beam path, such as beam position monitors, monochromators and other optics, insofar not removed by the collimation slits.
-41 -Another contribution can be fluorescence. If you have a particular instrument design where radiation can hit the surrounding wall material (e.g. steel) at sufficient flux, this wall material might fluoresce. If the detector energy thresholds are not able to remove this, such fluorescence will add a background to your detected signal. In practice, such sources of fluorescence are not known to dominate. A more likely fluorescence contribution can originate from the sample (although it can be argued that this is not a background contribution). Such fluorescence is possible, or even common for samples containing heavier elements such as iron or zinc, and will contribute a flat background of lower-energy photons to your measured signal. This can be avoided by selecting the appropriate energy of the synchrotron X-ray source, or by changing the laboratory source to one with a different anode target material. As always, information on the sample in question allows for the measurement to be appropriately adapted, and post hoc surprises avoided.

F.2.2 Container background
Anything intersecting with the beam may give rise to scattering, and some materials used for the sample container can scatter considerably themselves. This container background then adds to the measured background, making it harder or impossible to extract analyte signals.
Capillaries, and the commonly found Mark-tubes in particular, can pose difficulties as a) their exposed geometry is not constant perpendicular to the beam, and b) they might have inhomogeneities impossible to predict or correct for (instead, flow-through capillaries should be used whenever possible, alternatively, much more consistent extruded capillaries should be preferred). Additionally, any type of capillary can add flares to the background (asymmetric sharp features perpendicular to the capillary axis) when the top or bottom internal (and/or external) surfaces are illuminated by the beam. This gives rise to possible anisotropy in the background, and it is therefore recommended to perform the background subtraction before azimuthal averaging in a data correction workflow [5].

F.2.3 Dispersant background
Often overlooked is that the dispersant itself can also scatter significantly. If the signal of your dispersant is strong enough, this will quickly overpower the signal of your analyte. With careful background subtraction it is possible to extract a small analyte signal, but, as explained below, limitations apply: increasingly accurate measures for flux, time and transmission factors are needed, the smaller the analyte/dispersant signal ratio is. Likewise, for this to work effectively, the noise on top of the detected signals must be sufficiently small for this to work.
A minimum of this dispersant scattering can be calculated using classical fluctuation theory, which links the isothermal compressibility of a material to its scattering level, but omits any broad wide-angle peaks arising from the molecular or atomic separation. One such equation and the demonstrations thereof are shown by Dreiss [46], with water at 20 • C scattering at 1.65 1/( · ), with other dispersants scattering more strongly. This can be a considerable background for weakly scattering samples, and is, unfortunately, unavoidable unless there is freedom to increase the concentration of analyte. While intuitively a good solution, the scattering from the dispersant is not easy to adjust by changing the temperature: the scattering cross-section is dependent on the temperature, but so is the density, and these two effects counteract one another at least for the most common dispersant of water.

F.2.4 Cosmic background
In the MOUSE, cosmic radiation is a major contributor to the detection limit. This defines the noise floor to which any measurement is bound, and is particularly evident when measuring freestanding samples at medium-to high values (see below). It is considerable enough that it adds on average about 10 counts per second over the entire Eiger 1M detector surface. These cosmic rays tend to be detected as streaks, and with our detector lacking the ability to remove high energy counts, add a single count in every pixel it passes through.
The time-proportional nature of this background contribution is the reason why measuring longer does not reveal more, a 1 h measurement does not show anything new compared to a 10 minute measurement. Any visible information collected in a 10 minute measurement, however, can be improved with longer measurements for better statistics. Contrary to laboratory measurements, cosmic radiation does not significantly impact synchrotron experiments much, due to the much shorter timescales of measurement involved.

F.2.5 The effect of flux, transmission and time on the background
Another complication arising when considering background subtraction procedures, is that each input dataset will come with its own incident flux and transmission factors, as well as its own duration. For such a subtraction to be successful, sufficiently accurate values for the incident flux and transmission factor are needed, in order to end up with a useful signal with acceptable propagated uncertainties. Naturally, the accuracy of the exposure time is just as important as the accuracy of the other two, but most modern detection systems can supply sufficiently accurate exposure times for each frame.
It is also important to dispel the notion that by measuring longer, or with more flux, previously unseen details will be uncovered. While an increase in flux will speed up the measurement, this increase is associated with a concomitant (and proportional) rise in every background signal, with the sole exception of the cosmic background. The ratio between measured signal and background therefore remains unaffected. What more flux and more time will do, is that it allows for the collection of more counts faster, thus lowering the counting uncertainty, and the corrected signals should end up showing smaller uncertainties on the scattering cross-section.

F.2.6 Determining the background of the MOUSE
If enough details are known or assumed about a potential sample to investigate, and if the X-ray scattering instrument has been characterized sufficiently well, it is possible to estimate directly how detectable the analyte signal will be in a practical experiment. This is done by multiplying the scattering cross-section with the sample thickness, and comparing the resulting signal strength with the background of your instrument, complete with the signal for the necessary sample container and dispersant background. For an accurate prediction, the instrument background used here should be shown without the darkcurrent removed, without any background subtraction, and with a signal normalized to a nominal sample thickness (of, for example, 1 mm).
For the MOUSE, an example of such a background signal is shown for different configurations in figure 21. These datasets for different configurations can be combined in an overall curve showing the general background level over a given measurement range, and with a particular sample environment and/or dispersant in place. This is shown in figure 4. From these, it is possible to identify the main contributors and their magnitude are at a given scattering vector (which need to be exceeded by the analyte). We will consider three cases, the empty vacuum chamber itself, a Scotch tape background, and a low-noise flow-through cell filled with water. The background of the empty sample chamber is one which would be used for some freestanding samples, and is the smallest, most basic background that can be considered. This background is dominated by the beam spill from imperfect collimation at low angles, and limited by cosmic radiation background at wider angles. Practically, this means that the sample would need to scatter at least 1 × 10 5 (m · sr) −1 at the smallest for the MOUSE to be able to reliably detect it, and the scattering should fall off with a slope larger than ∝ −5.1 , the approximate overall slope of the beam spill background. At angles beyond = 1 nm −1 , these samples should only scatter a bit more than the cosmic background radiation levels normalized by the incident flux, i.e. at least 2 × 10 −3 (m · sr) −1 (again, at least a 10% contribution to the background signal level).
There are two ways of improving this detection limit at higher values. One option is to switch to a detector that can more efficiently reject the cosmic background radiation, thereby reducing its level. The second option is to use a brighter source. As the signals here are normalized by the incident flux, the relative contribution of the cosmic background radiation will reduce. The beam spill contribution, however, will just scale proportionally to your incident flux.
-44 -When measuring powders, the signal of the tape used for mounting the powder in needs to be exceeded. Compared to the vacuum background, this material contributes significantly to the background at all angles. Compared to water, it scatters more than water in its SiN low-noise cell at low angles, but less at higher angles. The Scotch Magic Tape™, while one of the lowestscattering tapes on the market, therefore has a non-negligible scattering contribution at both lowand wide angles.
Lastly, when measuring samples dispersed in water, the analyte needs to add significantly compared to the beam spill at low angles, but at higher angles will be severely limited by the dispersant signal, which is far from negligible. If you have a weakly scattering sample, only an extremely high accuracy background subtraction could be applied here to extract any useful analyte scattering signal. The complication of such a background subtraction will be discussed next.

F.3 The effect of data accuracy and metadata accuracy on detectability, or requirements for an extremely high accuracy background subtraction
Here, we discuss if an extremely high accuracy background subtraction may be a panacea to the significant scattering contribution imposed by the dispersant itself. Such a subtraction would require a correction sequence provisioned with excellent metadata, as well as low-noise raw data. Roughly speaking, the background subtraction process can be written as = /( ) − /( ), with the subscript "a" for the analyte, "ab" for analyte with background, and "b" for background (For a full description of the modular data correction procedure, please see Pauw [5], and please refrain from using the equation in this paragraph). From this pseudo-equation, the impact of inaccuracies should be immediately apparent: if differs only minutely from , the scattering intensities need to be collected to a very high precision, in addition to requiring extreme precision on the values for time, transmission and flux. Any inaccuracy in these values will directly affect the subtraction by a multiple of their inaccuracy. Therefore, if one wants to detect analyte signals whose magnitude is only 1% of the background signal, your total of six correction factors (two time, two flux and two transmission values) need to be at least accurate to 99.9% (i.e. have an uncertainty smaller than 0.1%, for their fluctuation to not affect the background subtraction very significantly. This is exacerbated with every additional background subtraction performed.
At the beamline presented by Kirby [50], the accuracy in determination of their metadata, as well as the accuracy with which they determine their scattering and background signals, means they are able to identify analyte signals up to 3.5 orders of magnitude below that of their dispersant. This exceptional precision is due in no small part by exceeding levels of care in the accurate collection of the metadata, and is a level far beyond achievable by most other SAXS instruments.

F.4 Addressing the background though instrumental modifications
It is possible to perform instrumental changes for improving the detectability in the MOUSE, although these require a considered approach as they affect multiple parameters simultaneously. One such change could be an improvement in the collimation to reduce the parasitic scattering. This would very likely also severely reduce the usable flux and thereby might even increase the net instrumental background level. Practically, and without large renovations, the only option would be to add another pinhole or set of slits to the vacuum sample chamber itself, directly before the -45 -sample. This may improve detectability but not reduce the minimum any further. To achieve the latter, alternative methods such as Bonse-Hart's channel-cut crystals should be considered for measuring the ultra-small-angle region (see [51]).
For synchrotron beamlines, however, it may be worth fine-tuning the collimation and background to minimize their impact on the measured scattering signal and improve detection limits, and to ensure that the metadata is as accurate as can be. This would have the biggest effect on (materials science) samples that do not rely on the analyte being suspended in water or similar solvents. For such freestanding samples, the sky (or radiation damage) is the limit.

F.5 Get over it: estimating the detectability for a given analyte
In summary, the factors affecting the detectability of your analyte include: 6. While the cosmic background cannot be affected, collection times can be shortened with increased incident flux. Secondly, detectors are becoming available that can filter out the high-energy contamination, thereby reducing the detection of the cosmic rays 7. With improved precision of flux-, transmission and time values, it becomes possible to perform more accurate background subtractions. This will help to some degree, although avoiding the background in the first place will likely be a much more effective strategy.
Data availability. All raw and derived datasets in NeXus/NXCanSAS formats, as well as the Jupyter Notebook data evaluation scripts that support the findings of this study are openly available in Zenodo at http://doi.org/10.5281/zenodo.4312953, reference number 4312953.