jaxrts.instrument_function.instrument_from_file

jaxrts.instrument_function.instrument_from_file(filename: ~pathlib.Path, xunit: ~pint.registry.Unit = <Unit('electron_volt')>) Callable[[Quantity], Quantity][source]

Loads instrument function data from a given file.

Parameters:
  • filename (Path) – The path to the file which should be loaded. We assume a comma-separated list of energy or frequency shifts in the first, and intensity in the second column.

  • xunit (Unit, default ureg.electron_volt) – The unit of the x-axis. We allow for energy and frequency units.

Returns:

Callable – The instrument function, which takes one singular argument (the frequency shift), and returns the weight of this shift. The function is normalized to one.