oasislmf.pytools.fm.financial_structure ======================================= .. py:module:: oasislmf.pytools.fm.financial_structure Functions --------- .. autoapisummary:: oasislmf.pytools.fm.financial_structure.load_static oasislmf.pytools.fm.financial_structure.extract_financial_structure oasislmf.pytools.fm.financial_structure.create_financial_structure oasislmf.pytools.fm.financial_structure.load_financial_structure Module Contents --------------- .. py:function:: load_static(static_path) Load the raw financial data from static_path as numpy ndarray first check if .bin file is present then try .cvs try loading profile_step before falling back to normal profile, :param static_path: str static_path :return: programme : link between nodes policytc : info on layer profile : policy profile can be profile_step or profile xref : node to output_id items : items (item_id and coverage_id mapping) coverages : Tiv value for each coverage id :raise: FileNotFoundError if one of the static is missing .. py:function:: extract_financial_structure(allocation_rule, fm_programme, fm_policytc, fm_profile, stepped, fm_xref, items, coverages) :param allocation_rule: option to indicate out the loss are allocated to the output :param fm_programme: structure of the levels :param fm_policytc: structure of the layers and policy_id to apply :param fm_profile: definition of the policy_id :param fm_xref: mapping between the output of the allocation and output item_id :return: compute_infos: nodes_array: node_parents_array: node_profiles_array: output_array: .. py:function:: create_financial_structure(allocation_rule, static_path) :param allocation_rule: int back-allocation rule :param static_path: string path to the static files :return: compute_queue : the step of the computation to perform on each event node_indexes : map node to index of item in result array index_dependencies : map node to its dependent indexes node_profile : map node to profile output_item_index : list of item_id, index to put in the output .. py:function:: load_financial_structure(allocation_rule, static_path)