write_pars#

anri.io.write_pars(folder, geometry, phases)[source]#

Write ImageD11 parameter files: geometry.par, one <phase>.par per phase, and pars.json.

Parameters:
  • folder (str) – Where to write them

  • geometry (dict) – Detector and beam parameters, as in an ImageD11 .par file. ImageD11 needs t_x, t_y, t_z and omegasign to compute peak geometry (e.g. DataSet.update_colfile_pars): those missing are written as 0, 0, 0 and 1 (the only omegasign anri supports).

  • phases (dict) – {phase_name: {"cell__a": ..., ..., "cell_lattice_[P,A,B,C,I,F,R]": ...}}

Returns:

path (str) – Path of pars.json, which ImageD11.unitcell.Phases (and DataSet.phases) read