Write R(q) output

RunCollection

A collection of runs to assemble into a single R(Q)

add

Add a partial R(q) to the collection

Parameters:
  • q (array) –

    Q values

  • r (array) –

    R values

  • dr (array) –

    Error in R values

  • meta_data (dict) –

    Meta data for the run

  • dq (array, default: None ) –

    Q resolution

add_from_file

Read a partial result file and add it to the collection

Parameters:
  • file_path (str) –

    The path to the file to be read

merge

Merge the collection of runs

save_ascii

Save R(Q) in ASCII format. This function merges the data before saving. It writes metadata and R(Q) data to the specified file in ASCII format. The metadata includes experiment details, reduction version, run title, start time, reduction time, and other optional parameters. The R(Q) data includes Q, R, dR, and dQ values.

Parameters:
  • file_path (str) –

    The path to the file where the ASCII data will be saved.

  • meta_as_json (bool, default: False ) –

    If True, metadata will be written in JSON format. Default is False.

read_file

Read a data file and extract meta data

Parameters:
  • file_path (str) –

    The path to the file to be read