Esempio n. 1
0
def run():

    import select_peak_positions
    import build_datafile_structure
    import use_soh_for_3DFT
    import inpkfd as ip
    import logging as log

    log.info("Path %s started.\n", __name__)

    pos_est, gsqr_est = select_peak_positions.run(ip.gsqr_max, ip.negative_k,
                                                  ip.remove_000)
    build_datafile_structure.run(pos_est)
    use_soh_for_3DFT.run(pos_est, ip.source_location, ip.mass, ip.a_lattice,
                         ip.N_atoms, ip.k_steps, ip.run_soh)
    #calc_peak_intensities.run()
    #calc_debye_waller.run()
    #plot.run()

    log.info("Path %s finished.\n", __name__)

    return
Esempio n. 2
0
def run():

    import inpkfd as ip

    import select_peak_positions
    import build_datafile_structure
    import use_soh_for_3DFT
    import calc_peak_intensities
    import calc_debye_waller
    import write_output_files
    import plot_debye_waller
    import plot_peaks

    import logging as log

    log.info("Path %s started.\n", __name__)

    pos_est, gsqr_est = select_peak_positions.run(ip.gsqr_max, ip.negative_k,
                                                  ip.remove_000)

    peak_str = build_datafile_structure.run(pos_est)

    use_soh_for_3DFT.run(pos_est, ip.source_name, ip.timestep, ip.mass,
                         ip.a_lattice, ip.N_atoms, ip.k_steps, ip.run_soh,
                         ip.num_cores)

    peak_centre, integrated_intensity = calc_peak_intensities.run(
        pos_est, ip.source_name, ip.timestep)

    debye_temperature, temperature, gsqr_per_angstrom, ln_intensity = calc_debye_waller.run(
        peak_centre, integrated_intensity, ip.a_lattice, ip.mass,
        ip.temperature, ip.uncompressed_debye_temperature,
        ip.single_term_model_gamma_0_values,
        ip.single_term_model_exponent_values,
        ip.triple_term_model_gamma_0_values, ip.triple_term_model_constants)

    write_output_files.run(debye_temperature, temperature, pos_est,
                           peak_centre, gsqr_per_angstrom,
                           integrated_intensity, ln_intensity)

    plot_debye_waller.run(gsqr_per_angstrom, ln_intensity, pos_est,
                          ip.temperature, ip.mass)

    if ip.make_final_peak_plots is True:

        plot_peaks.run(peak_str, peak_centre, ip.source_name, ip.timestep)

    log.info("Path %s finished.\n", __name__)

    return
Esempio n. 3
0
def run():

    import inpkfd as ip

    import select_peak_positions
    import build_datafile_structure
    import use_dynamic_peakfinding_for_3DFT
    import calc_peak_intensities
    import calc_debye_waller
    import write_output_files
    import plot_debye_waller
    import plot_peaks
    import find_compression_ratio
    import fit_to_peak_centres
    import overstep_peak_edges
    import calc_md_temperature

    import logging as log

    log.info("Path %s started.\n", __name__)

    current_md_temperature = ip.temperature

    if ip.calc_md_temperature_from_dump_file is True:

        current_md_temperature = calc_md_temperature.run(
            ip.source_name, ip.temperature,
            ip.calculated_temperature_dimensionality, ip.mass,
            ip.velocity_columns, ip.number_velocity_bins)

    raw_pos_est, raw_gsqr_est = select_peak_positions.run(
        ip.gsqr_max, ip.negative_k, ip.remove_000, ip.crystal_type)

    current_pos_est = raw_pos_est

    current_gsqr_est = raw_gsqr_est

    peak_str = build_datafile_structure.run(current_pos_est)

    compression_ratio = find_compression_ratio.run(
        ip.run_soh, ip.uncompressed_peak_positions,
        ip.compression_ratio_undershoot, ip.compression_ratio_overshoot,
        ip.source_name, ip.mass, ip.a_lattice, ip.lineout_k_steps, ip.timestep,
        ip.soh_command)

    fitted_pos_est = fit_to_peak_centres.run(
        ip.run_soh, raw_pos_est, current_pos_est, current_gsqr_est,
        compression_ratio, ip.source_name, ip.N_atoms, ip.mass, ip.a_lattice,
        ip.k_steps_find_centre_1DFT, ip.k_steps_find_centre_3DFT, ip.timestep,
        ip.soh_command, ip.make_plots_peak_centre_fit)

    current_pos_est = fitted_pos_est

    k_start_accurate, k_stop_accurate = overstep_peak_edges.run(
        current_pos_est, ip.peak_edge_undershoot, ip.peak_edge_overshoot)

    use_dynamic_peakfinding_for_3DFT.run(current_pos_est, raw_pos_est,
                                         ip.source_name, ip.timestep, ip.mass,
                                         ip.a_lattice, ip.k_steps, ip.run_soh,
                                         k_start_accurate, k_stop_accurate,
                                         ip.soh_command)

    peak_centre, integrated_intensity = calc_peak_intensities.run(
        raw_pos_est, ip.source_name, ip.timestep)

    debye_temperature, xrd_temperature, model_debye_temperatures, gsqr_per_angstrom, ln_intensity, slope = calc_debye_waller.run(
        peak_centre, integrated_intensity, ip.a_lattice, ip.mass,
        current_md_temperature, ip.uncompressed_debye_temperature,
        ip.single_term_model_gamma_0_values,
        ip.single_term_model_exponent_values,
        ip.triple_term_model_gamma_0_values, ip.triple_term_model_constants,
        compression_ratio, ip.polynomial_coeff)

    write_output_files.run(debye_temperature, xrd_temperature,
                           model_debye_temperatures, current_pos_est,
                           peak_centre, gsqr_per_angstrom,
                           integrated_intensity, ln_intensity, slope)

    plot_debye_waller.run(gsqr_per_angstrom, ln_intensity, raw_pos_est,
                          current_md_temperature, ip.mass,
                          ip.uncompressed_peak_positions)

    if ip.make_final_peak_plots is True:

        plot_peaks.run(peak_str, peak_centre, ip.source_name, ip.timestep)

    log.info("Path %s finished.\n", __name__)

    return