The Experiment Handler Reference

class neutronbraggedge.experiment_handler.experiment.Experiment(tof=None, lambda_array=None, distance_source_detector_m=None, detector_offset_micros=None)[source]

Class that allows: - convert the TOF scale into Lambda - distance source - detector - detector time offset

Arguments: * tof: tof array in s * lambda_array: mandatory only if detector_offset or distance_source_detector are unknown * distance_source_detector: mandatory only if lambda is the unknown parameter (m) * detector_offset: mandatory only if lambda is the unknown parameter (micros)

calculate_detector_offset()[source]

return the detector time offset value

If lambda_array and tof_array are provided, the offset is calculated Otherwise, the detector_offset argument must be provided

calculate_distance_source_detector()[source]

return the distance source detector

If lambda_array and tof_array are provided, the distance is calculated Otherwise, the distance_source_detector must be provided

calculate_lambda()[source]

return the lambda array when tof_array, distance_source_detector and detector_offset are provided

calculate_tof_with_detector_offset()[source]

return the tof with detector_offset applied to it

export_lambda(filename=None)[source]

export the lambda array into a CSV data file

Parameters: * filename: name of output file to create

class neutronbraggedge.experiment_handler.tof.TOF(filename=None, tof_array=None, units='s')[source]

This class handles the loading of the TOF and the automatic conversion to ‘s’

load_data()[source]

Load the data from the filename name provided

class neutronbraggedge.experiment_handler.lambda_wavelength.LambdaWavelength(filename=None, data=None)[source]

This class handles the loading of the Lambda

load_data()[source]

Load the data from the filename name provided