odatse.util.separateT module

class odatse.util.separateT.Entry(step, walker, fx, xs)

Bases: tuple

Create new instance of Entry(step, walker, fx, xs)

_asdict()

Return a new dict which maps field names to their values.

classmethod _make(iterable)

Make a new Entry object from a sequence or iterable

_replace(**kwds)

Return a new Entry object replacing specified fields with new values

fx

Alias for field number 2

step

Alias for field number 0

walker

Alias for field number 1

xs

Alias for field number 3

odatse.util.separateT.calculate_statistics_from_separated_files(Ts: ndarray, output_dir: PathLike, thermalization_steps: int, comm: Comm | None) None[source]

Calculate and save statistical quantities (means and errors of f(x) and partition function) from separated files generated by separateT.

This function reads the separated files, result_T<Tindex>.txt in output_dir, generated by separateT. The output file is fx.txt in output_dir. The format is described as a header as follows:

# $1: 1/T
# $2: mean of f(x)
# $3: standard error of f(x)
# $4: number of replicas [Not used for exchange MC]
# $5: log(Z/Z0)
# $6: acceptance ratio
Parameters:
  • Ts (np.ndarray) – Array of temperature values.

  • output_dir (PathLike) – Directory to store the output files.

  • thermalization_steps (int) – Number of steps to discard for thermalization.

  • comm (mpi.Comm, optional) – MPI communicator for parallel processing.

odatse.util.separateT.separateT(Ts: ndarray, nwalkers: int, output_dir: PathLike, comm: Comm | None, use_beta: bool, buffer_size: int = 10000) None[source]

Separates and processes temperature data for quantum beam diffraction experiments.

Parameters:
  • Ts (np.ndarray) – Array of temperature values.

  • nwalkers (int) – Number of walkers.

  • output_dir (PathLike) – Directory to store the output files.

  • comm (mpi.Comm, optional) – MPI communicator for parallel processing.

  • use_beta (bool) – Flag to determine if beta values are used instead of temperature.

  • buffer_size (int, optional) – Size of the buffer for reading input data. Default is 10000.