dara.generate_control_file module#
Generate a control file for BGMN.
- copy_instrument_files(instrument_profile, working_dir)[source]#
Copy the instrument file (.geq) to the working directory.
- Parameters:
working_dir (
Path) – the working directory- Return type:
str- Returns:
The name of the instrument
- copy_xy_pattern(pattern_path, working_dir)[source]#
Copy the xy pattern to the working directory.
- Return type:
Path
- generate_control_file(pattern_path, str_paths, instrument_profile, working_dir=None, *, n_threads=8, wmin=None, wmax=None, eps1=0.0, eps2='0_-0.05^0.05', wavelength='Cu')[source]#
Generate a control file for BGMN.
- Parameters:
pattern_path (
Path) – the path to the pattern file. It has to be in .xy formatstr_paths (
list[Path]) – the paths to the STR filesinstrument_profile (
str|Path) – the name of the instrument, if it is a path, it must be ended with .geqworking_dir (
Path|None) – the working directoryn_threads (
int) – the number of threads to usewmin (
float|None) – the minimum wavelengthwmax (
float|None) – the maximum wavelengtheps1 (
float|str) – the epsilon1 value, it is used to refine zero pointeps2 (
float|str) – the epsilon2 value, it is used to refine sample heightwavelength (
Union[Literal['Cu','Co','Cr','Fe','Mo'],float]) – the wavelength to use. If a float is provided, it is used as the wavelength in nm (synchrotron radiation). If a string is provided, it is the target material in X-ray tubes.
- Return type:
Path