def setup_inst_object(mode):
    user_name = "Test"

    inst_obj = Polaris(user_name=user_name, calibration_mapping_file=calibration_map_path,
                       calibration_directory=calibration_dir, output_directory=output_dir, mode=mode)

    sample_details = SampleDetails(height=4.0, radius=0.2985, center=[0, 0, 0], shape='cylinder')
    sample_details.set_material(chemical_formula='Si')
    inst_obj.set_sample_details(sample=sample_details)

    return inst_obj
Ejemplo n.º 2
0
def setup_inst_object(mode):
    user_name = "Test"

    inst_obj = Polaris(user_name=user_name,
                       calibration_mapping_file=calibration_map_path,
                       calibration_directory=calibration_dir,
                       output_directory=output_dir,
                       mode=mode)

    sample_details = SampleDetails(height=4.0,
                                   radius=0.2985,
                                   center=[0, 0, 0],
                                   shape='cylinder')
    sample_details.set_material(chemical_formula='Si')
    inst_obj.set_sample_details(sample=sample_details)

    return inst_obj
Ejemplo n.º 3
0
def run_focus():
    [sample_empty, _, run_number] = gen_required_run_numbers()
    sample_empty_scale = 1

    # Copy the required spline file into place first (instead of relying on the generated one)
    splined_file_name = "HRPD66031_splined.nxs"

    original_splined_path = os.path.join(input_dir, splined_file_name)
    shutil.copy(original_splined_path, spline_path)

    inst_object = setup_inst_object()

    sample = SampleDetails(shape="cylinder", center=[1, 5, 1], height=1, radius=1)
    sample.set_material(chemical_formula="Si")
    inst_object.set_sample_details(sample=sample)

    return inst_object.focus(run_number=run_number, window="10-110", sample_empty=sample_empty,
                             sample_empty_scale=sample_empty_scale, vanadium_normalisation=True,
                             do_absorb_corrections=True, multiple_scattering=False)
Ejemplo n.º 4
0
def run_focus():
    [sample_empty, _, run_number] = gen_required_run_numbers()
    sample_empty_scale = 1

    # Copy the required spline file into place first (instead of relying on the generated one)
    splined_file_name = "HRPD66031_splined.nxs"

    original_splined_path = os.path.join(input_dir, splined_file_name)
    shutil.copy(original_splined_path, spline_path)

    inst_object = setup_inst_object()

    sample = SampleDetails(shape="cylinder", center=[1, 5, 1], height=1, radius=1)
    sample.set_material(chemical_formula="Si")
    inst_object.set_sample_details(sample=sample)

    return inst_object.focus(run_number=run_number, window="10-110", sample_empty=sample_empty,
                             sample_empty_scale=sample_empty_scale, vanadium_normalisation=True,
                             do_absorb_corrections=True, multiple_scattering=False)