write_dataset#

anri.io.write_dataset(sparse_path, analysisroot, sample, dset, y0, parfile=None, e2dxfile=None, e2dyfile=None, omega_motor='rot_center', dty_motor='dty')[source]#

Write an ImageD11 DataSet file for a sparse pixels file, ready for the S3DXRD pipeline.

The DataSet uses ImageD11’s standard layout: it is saved as <analysisroot>/<sample>/<sample>_<dset>/<sample>_<dset>_dataset.h5, and the peaks table, columnfiles and grains that the pipeline writes later go in the same folder.

Parameters:
  • sparse_path (str) – Sparse pixels file, e.g. from simulate_sparse(). It can live anywhere.

  • analysisroot (str) – Where the DataSet goes, and its name

  • sample (str) – Where the DataSet goes, and its name

  • dset (str) – Where the DataSet goes, and its name

  • y0 (float) – dty at which the rotation axis is in the beam

  • parfile (str | None, default: None) – Parameter file for the pipeline, e.g. the pars.json from write_pars()

  • e2dxfile (str | None, default: None) – Spatial distortion files, e.g. from write_zero_distortion(). ImageD11 needs a spatial correction to give the 2D peaks their corrected sc and fc columns.

  • e2dyfile (str | None, default: None) – Spatial distortion files, e.g. from write_zero_distortion(). ImageD11 needs a spatial correction to give the 2D peaks their corrected sc and fc columns.

  • omega_motor (str, default: 'rot_center') – Motor names used in the sparse file

  • dty_motor (str, default: 'dty') – Motor names used in the sparse file

Returns:

dsfile (str) – Path of the DataSet file