Reference Guide

This manual details, for each module of plantfusion, the functions and objects included in plantfusion, describing what they are and what they do.

indexer module

Contains class Indexer

class indexer.Indexer(global_order=[], wheat_names=[], legume_names=[], other_names=[])[source]

Bases: object

Index management tool between the FSPM wrappers

Note

Each list is list of strings where each element is an FSPM instance name exemple: global_order = ["fspm1", "fspm2", "fspm3"]

Parameters:
  • global_order (list, optional) – ordered list of all FSPM in your simulation, by default []

  • wheat_names (list, optional) – ordered list of all instances of wheat wrappers in your simulation, by default []

  • legume_names (list, optional) – ordered list of all instances of l-egume wrappers in your simulation, by default []

  • other_names (list, optional) – ordered list of all instances of custom wrappers not in plantfusion in your simulation, by default []

light_scenes_mgmt(scenes_dict)[source]

Return an ordered list of geometric scenes following global_order list from an unordered dict

Parameters:

scenes_dict (dict) – each entry is { fspm instance name : geometric scene }

Returns:

ordered list of geomtric scenes following global_order list

Return type:

list

soil_inputs(soil_dict)[source]

Return ordered lists of soil list following global_order list from an unordered dict

Parameters:

soil_dict (dict) – each entry is { fspm instance name : soil scenes } where soil scenes is a 4-tuple of each soil input list of the fspm instance

Returns:

each element of the tuple is an ordered list of soil inputs following global_order

Return type:

4-tuple

update_legume_several_species(name, number_of_species=None)[source]

Updates all ordered list of FSPM wrappers if one instance of l-egume wrapper has several species involved

Parameters:
  • name (string) – instance name

  • number_of_species (int, optional) – number of plant species in the l-egume instance, by default None

l_egume_wrapper module

light_wrapper module

planter module

soil_wrapper module

utils module

utils.create_child_folder(parentfolderpath, childfolderpath)[source]

Create a child folder from parent folder path

Parameters:
  • parentfolderpath (string) – parent folder path

  • childfolderpath (string) – name of the child folder

utils.save_df_to_csv(df, outputs_filepath, precision)[source]

Save pandas dataframes to csv

Parameters:
  • df (pandas.DataFrame) – a pandas dataframe to be saved

  • outputs_filepath (str) – the name of the CSV file to be saved

  • precision (int) – number of decimals in CSV file

wheat_wrapper module