pyextal.jaxJoint.cli

Command line for jaxJoint.refine.refine.

Every jaxGeo option is accepted and applies to all datasets; --h5 and --dat take one value per dataset. A script lists its datasets, with any per-dataset options, and keeps the whole command line:

from pyextal.jaxJoint import cli
raise SystemExit(cli.main(doc=__doc__,
                          datasets=[dict(h5=R5), dict(h5=R4, subsample=2)],
                          steps=800, tile=180))

An option given on the command line overrides the script’s per-dataset values for every dataset; --h5 replaces the script’s list of datasets.

Attributes

Functions

build_parser([defaults, doc, weighting, out_dir])

The argument parser: jaxGeo's options plus the joint ones.

main([argv, doc, datasets, names, weighting, out_dir])

Parses the command line and runs the joint refinement.

Module Contents

pyextal.jaxJoint.cli.WEIGHTINGS = ('pixels', 'equal')
pyextal.jaxJoint.cli.build_parser(defaults=None, doc=None, weighting='pixels', out_dir=None)

The argument parser: jaxGeo’s options plus the joint ones.

Parameters:
  • defaults (RefineSettings, optional) – Supplies every common default.

  • doc (str, optional) – Text printed by --help before the method.

  • weighting – Defaults of the joint options.

  • out_dir – Defaults of the joint options.

Returns:

argparse.ArgumentParser

pyextal.jaxJoint.cli.main(argv=None, doc=None, datasets=None, names=None, weighting='pixels', out_dir=None, **defaults)

Parses the command line and runs the joint refinement.

Parameters:
  • argv (list, optional) – Arguments; sys.argv[1:] when None.

  • doc (str, optional) – The calling script’s docstring, for --help.

  • datasets (list, optional) – One entry per dataset: a dict of options that differ from the common ones (at least h5), or a path.

  • names (list, optional) – Display names.

  • weighting – 'pixels', 'equal' or one weight per dataset.

  • out_dir (Path, optional) – Where the joint summary goes.

  • **defaults – Common RefineSettings fields.

Returns:

0 on success, 1 if any dataset’s final simulation failed.

Return type:

int