fab.analysis
Analysis Functions
The analysis module provides a collection of common data analysis functions specifically
designed for processing beamtime data at FLASH. These functions are optimized to work
with xarray.Dataset and xarray.DataArray objects returned by instruments and datasources.
The module includes functions for data binning, bootstrapping and more. Instrument specific analysis functions can be found in submodules.
Configuration
Some analysis functions can be pre-configured through the YAML configuration file using the
analysis section. This allows you to set default parameters for any analysis function
without having to specify them every time the function is called.
To configure an analysis function, add an entry under the analysis section in your
fab_config.yaml file using the full module path and function name as the key:
analysis:
fab.analysis.ursa.eTof_calibration:
t_offset: 0.05
l1: 0.09
l2: 1.690
l3: 0.002
mcp_volts: 300
ev_offset: 1.05
When you call a configured function, the parameters from the config file are automatically applied as defaults. You can still override them by passing arguments explicitly:
NOTE: At the moment the function signature of configurable functions shown as (args, *kwargs) in the documentation. This is known and will be fixed in a future version of the docs. The paramters listed in the documentation text can be used.
1''' 2## Analysis Functions 3 4The analysis module provides a collection of common data analysis functions specifically 5designed for processing beamtime data at FLASH. These functions are optimized to work 6with `xarray.Dataset` and `xarray.DataArray` objects returned by instruments and datasources. 7 8The module includes functions for data binning, bootstrapping and more. Instrument specific 9analysis functions can be found in submodules. 10 11## Configuration 12 13Some analysis functions can be pre-configured through the YAML configuration file using the 14`analysis` section. This allows you to set default parameters for any analysis function 15without having to specify them every time the function is called. 16 17To configure an analysis function, add an entry under the `analysis` section in your 18`fab_config.yaml` file using the full module path and function name as the key: 19 20```yaml 21analysis: 22 fab.analysis.ursa.eTof_calibration: 23 t_offset: 0.05 24 l1: 0.09 25 l2: 1.690 26 l3: 0.002 27 mcp_volts: 300 28 ev_offset: 1.05 29 30``` 31When you call a configured function, the parameters from the config file are automatically 32applied as defaults. You can still override them by passing arguments explicitly: 33 34**NOTE**: At the moment the function signature of configurable functions shown as (*args, **kwargs) 35in the documentation. This is known and will be fixed in a future version of the docs. 36The paramters listed in the documentation text can be used. 37''' 38 39from .common import *