import numpy as np
import matplotlib.pyplot as plt
from math import log10

def step_03_HI_forest_main(inp_dict_org):

    flag_tau_each_trans  = inp_dict_org["flag_tau_each_trans"]
    specie_trans_list_HI = inp_dict_org["HI_trans_list"]

    from WEAVEify_routines.step_02_common_routines.tau_summation_routines import \
    tau_summation_routines_main

    if flag_tau_each_trans == "y":

        from WEAVEify_routines.step_02_common_routines.main_routines_tau import \
        generate_od_data_main_all_transitions

        inp_dict_tau_HI = generate_od_data_main_all_transitions(inp_dict_org,specie_trans_list_HI)


    elif flag_tau_each_trans == "n":

        from WEAVEify_routines.step_02_common_routines.main_routines_tau import \
        generate_od_data_main_using_scaling

        inp_dict_tau_HI = generate_od_data_main_using_scaling(inp_dict_org,specie_trans_list_HI)

    inp_dict_org.update({"inp_dict_tau_HI":inp_dict_tau_HI})

    inp_dict_org = tau_summation_routines_main(inp_dict_org,flag_absorber = "HI")

    return inp_dict_org


