DataArray accessor methods

Each of the following functions can be used in an object-oriented style thanks to xarray’s accessor mechanism. The class shnitsel._generated_accessors.DataArrayAccessor is registered as an accessor upon import of shnitsel.xarray, which means that it is instatiated as the sh property of every xarray.DataArray.

In practice, this means that instead of writing

shnitsel.core.postprocess.to_xyz(da)

you can write

da.sh.to_xyz()

The shnitsel.xarray.DAShnitselAccessor is opinionated about whether a method is suitable for the xarray.DataArray in question. The list of suitable When working in a notebook, the HTML representation of the accessor (type da.sh) will show suitable methods and explain why the others are unsuitable. This information is also available through the da.sh.suitable list and the da.sh.unsuitable dictionary.

DataArray.sh.angle(i, j, k[, deg])

Wrapper for shnitsel.core.postprocess.angle().

DataArray.sh.assign_levels([levels])

Wrapper for shnitsel.core.xrhelpers.assign_levels().

DataArray.sh.calc_ci([confidence])

Wrapper for shnitsel.core.postprocess.calc_ci().

DataArray.sh.default_mol()

Wrapper for shnitsel.core.postprocess.default_mol().

DataArray.sh.dihedral(i, j, k, l[, deg, full])

Wrapper for shnitsel.core.postprocess.dihedral().

DataArray.sh.distance(i, j)

Wrapper for shnitsel.core.postprocess.distance().

DataArray.sh.expand_midx(midx_name, ...)

Wrapper for shnitsel.core.xrhelpers.expand_midx().

DataArray.sh.flatten_levels(idx_name, levels)

Wrapper for shnitsel.core.xrhelpers.flatten_levels().

DataArray.sh.get_bond_lengths([bond_types, mol])

Wrapper for shnitsel.core.geom.get_bond_lengths().

DataArray.sh.get_hop_types()

Wrapper for shnitsel.core.postprocess.get_hop_types().

DataArray.sh.hop_indices()

Wrapper for shnitsel.core.postprocess.hop_indices().

DataArray.sh.keep_norming([exclude])

Wrapper for shnitsel.core.postprocess.keep_norming().

DataArray.sh.last_time_where()

Wrapper for shnitsel.core.filtre.last_time_where().

DataArray.sh.mgroupby(levels)

Wrapper for shnitsel.core.xrhelpers.mgroupby().

DataArray.sh.msel(**kwargs)

Wrapper for shnitsel.core.xrhelpers.msel().

DataArray.sh.norm([dim, keep_attrs])

Wrapper for shnitsel.core.postprocess.norm().

DataArray.sh.pairwise_dists_pca(**kwargs)

Wrapper for shnitsel.core.postprocess.pairwise_dists_pca().

DataArray.sh.pca(dim[, n_components, ...])

Wrapper for shnitsel.core.ml.pca().

DataArray.sh.relativize(**sel)

Wrapper for shnitsel.core.postprocess.relativize().

DataArray.sh.sel_trajs(trajids_or_mask[, invert])

Wrapper for shnitsel.core.xrhelpers.sel_trajs().

DataArray.sh.subtract_combinations(dim[, labels])

Wrapper for shnitsel.core.postprocess.subtract_combinations().

DataArray.sh.sudi()

Wrapper for shnitsel.core.postprocess.sudi().

DataArray.sh.time_grouped_ci([confidence])

Wrapper for shnitsel.core.postprocess.time_grouped_ci().

DataArray.sh.to_mol([charge, covFactor, ...])

Wrapper for shnitsel.core.postprocess.to_mol().

DataArray.sh.to_xyz([comment])

Wrapper for shnitsel.core.postprocess.to_xyz().

DataArray.sh.traj_to_xyz()

Wrapper for shnitsel.core.postprocess.traj_to_xyz().

DataArray.sh.trajs_with_hops()

Wrapper for shnitsel.core.postprocess.trajs_with_hops().

DataArray.sh.ts_to_time([delta_t, old])

Wrapper for shnitsel.core.postprocess.ts_to_time().