AFL.automation.shared.DatasetWidget#
Classes
|
|
|
|
|
|
|
defaultdict(default_factory=None, /, [...]) --> dict with default factory |
- class AFL.automation.shared.DatasetWidget.DatasetWidget(dataset: Dataset, sample_dim: str = 'sample', scatt_variables: List[str] | None = None, comps_variable: str | None = None, comps_color_variable: str | None = None, xmin: float = 0.001, xmax: float = 1.0)[source]#
- __init__(dataset: Dataset, sample_dim: str = 'sample', scatt_variables: List[str] | None = None, comps_variable: str | None = None, comps_color_variable: str | None = None, xmin: float = 0.001, xmax: float = 1.0)[source]#
Interactive widget for viewing compositionally varying scattering data
- Parameters:
dataset (xr.Dataset) – xarray.Dataset containing scattering data and compositions to be plotted.
sample_dim (str) – The name of the xarray dimension corresponding to sample variation, typically “sample”
comps_variable (Optional[str]) –
The name of the xarray variable to plot as compositional data. Optional, if not specified, can be customized in the GUI.
Only the first two columns of the data will be used in the plot. If the compositions are in separate `xarray.DataArray`s, they should be grouped into single `xarray.DataArray`s like so:
`python ds['comps'] = ds[['A','B','C']].to_array('component').transpose(...,'component') `
comps_color_variable (Optional[str]) – The name of the xarray variable to use as the colorscale of the compositional data scatter plot. Optional, if not specified, can be customized in the GUI.
xmin (float) – Set the default q-range of the scattering data. Can be customized in the GUI
xmax (float) – Set the default q-range of the scattering data. Can be customized in the GUI
Usage
-----
```python –
DatasetWidget(ds) (widget =)
widget.run()
``` –
- class AFL.automation.shared.DatasetWidget.DatasetWidget_Model(dataset: Dataset, sample_dim: str)[source]#
-
- property dataset#
- class AFL.automation.shared.DatasetWidget.DatasetWidget_View(initial_scatt_variables: List[str] | None = None, initial_comps_variable: str | None = None, initial_comps_color_variable: str | None = None)[source]#