Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conda/environment.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: hydroroot_dev
channels:
- openalea3/label/dev
- openalea3/label/rc
- openalea3
- openalea3/label/rc
- openalea3/label/dev
- conda-forge
dependencies:
# list here manually conda-only deps (listed in [tool.conda.environment] section of pyproject)
Expand Down
14 changes: 7 additions & 7 deletions src/openalea/hydroroot/init_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ def __init__(self):
'read_architecture': False,
'input_dir': '',
'input_file': [],
'seed': None,
'seed': [None],
'length_file': ['data/length*order2*.csv', 'data/length*order2*.csv'],
'length_data': [],
'primary_length': 0.13,
'branching_delay': 2e-3,
'primary_length': [0.13],
'branching_delay': [2e-3],
'branching_variability': 0.25,
'order_max': 4,
'segment_length': 1.e-4,
'nude_length': 0.021,
'nude_length': [0.021],
'ref_radius': 7.0e-5,
'order_decrease_factor': 0.7}

Expand All @@ -97,8 +97,8 @@ def __init__(self):
'psi_base': 0.101325}

self.output = {
'radfold': 1.0,
'axfold': 1.0,
'radfold': [1.0],
'axfold': [1.0],
'intercepts': [0.01, 0.02, 0.03, 0.045, 0.06, 0.08],
'run_nb': 1}

Expand Down Expand Up @@ -154,7 +154,7 @@ def init_calculation(self):
# set the data used to calculate the length laws
# column names in the length law files
col_names = ('LR_length_mm', 'relative_distance_to_tip')

self.archi['length_data'] = []
for f in self.archi['length_file']:
d_path = glob.glob(f)[0]
pd = pandas.read_csv(d_path, sep = ';', header = 1, names = col_names)
Expand Down
29 changes: 16 additions & 13 deletions src/openalea/hydroroot/solver_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,18 +526,19 @@ def Jv_cnf_calculation(g, sigma, Js, Ps):
# archi_f = archi_f[0]
# df_archi = read_archi_data(archi_f) if parameter.archi['read_architecture'] else None
# index = archi_f.replace(glob.glob(parameter.archi['input_dir'])[0], "")

if parameter.archi['read_architecture']:
# architecture with filename in aqua team format
# archi_f = glob.glob(parameter.archi['input_dir'] + parameter.archi['input_file'][0])
# archi_f = archi_f[0]
fname = str(Path(parameter.archi['input_dir']) / parameter.archi['input_file'][0]) # deals with path in windows
archi_f = glob.glob(fname) # deals with wildcards ? deprecated ???
archi_f = archi_f[0]

if df_archi is None: df_archi = read_archi_data(archi_f)
index = archi_f.replace(glob.glob(parameter.archi['input_dir'])[0], "")
index = parameter.archi['input_file'][0]
if len(parameter.archi['input_file']) > 0:
index = parameter.archi['input_file'][0]

# length law data: override if necessary
if df_law is not None:
Expand Down Expand Up @@ -1254,16 +1255,18 @@ def fun3(x):


# architecture with filename in aqua team format
if df_archi is None:
# archi_f = glob.glob(parameter.archi['input_dir'] + parameter.archi['input_file'][0])
# archi_f = archi_f[0]
fname = str(Path(parameter.archi['input_dir']) / parameter.archi['input_file'][0]) # deals with path in windows
archi_f = glob.glob(fname) # deals with wildcards ? deprecated ???
archi_f = archi_f[0]

df_archi = read_archi_data(archi_f) if parameter.archi['read_architecture'] else None
index = archi_f.replace(glob.glob(parameter.archi['input_dir'])[0],"")

if len(parameter.archi['input_file']) > 0:
if df_archi is None:
# archi_f = glob.glob(parameter.archi['input_dir'] + parameter.archi['input_file'][0])
# archi_f = archi_f[0]
fname = str(Path(parameter.archi['input_dir']) / parameter.archi['input_file'][0]) # deals with path in windows
archi_f = glob.glob(fname) # deals with wildcards ? deprecated ???
archi_f = archi_f[0]

df_archi = read_archi_data(archi_f) if parameter.archi['read_architecture'] else None
index = archi_f.replace(glob.glob(parameter.archi['input_dir'])[0],"")
else:
index = ''
# length law data: override if necessary
if df_law is not None:
parameter.archi['length_data'] = df_law
Expand Down
Loading