Skip to content
Snippets Groups Projects
Commit a5e99652 authored by nfontrod's avatar nfontrod
Browse files

src/nt_composition/config.py: modification of get_density_file by adding a new...

src/nt_composition/config.py: modification of get_density_file by adding a new parameter king to distinguish between density and distance figure
parent b4c6b30c
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,8 @@ def get_weight_folder(weight: int, global_weight: int, ft_type: str):
def get_density_file(weight: int, global_weight: int, project: str,
ft_type: str, ft: str, fig: bool = False):
ft_type: str, ft: str, fig: bool = False,
kind: str = 'density'):
"""
Get the filename that will contain the density data or figure.
......@@ -49,6 +50,7 @@ def get_density_file(weight: int, global_weight: int, project: str,
:param ft_type: A feature type
:param ft: A feature
:param fig: Say if the result file is a figure or not
:param kind: The kind of the figure
:return: The filename that will contain the density data or figure.
"""
if fig:
......@@ -57,7 +59,7 @@ def get_density_file(weight: int, global_weight: int, project: str,
ext = "txt"
res_folder = get_weight_folder(weight, global_weight, ft_type) / project
res_folder.mkdir(exist_ok=True, parents=True)
return res_folder / f"{project}_{ft_type}_{ft}_density.{ext}"
return res_folder / f"{project}_{ft_type}_{ft}_{kind}.{ext}"
def get_density_recap(weight: int, global_weight: int,
......@@ -135,7 +137,7 @@ class ConfigNt:
"""
A class containing every parameters used in the submodule nt_composition
"""
cpu = 7 # Config.cpu
cpu = Config.cpu
data = Config.data
result = Config.results
db_file = Config.db_file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment