dpest.wheat.ceres package

Submodules

dpest.wheat.ceres.ceres module

dpest.wheat.ceres.cul module

dpest.wheat.ceres.cul.cul(cultivar=None, cul_file_path=None, output_path=None, new_template_file_extension=None, header_start=None, tpl_first_line=None, minima=None, maxima=None, mrk='~', **parameters_grouped)[source]

Create a TPL file for CERES Wheat based on a cultivar CUL file with specified parameter modifications.

Args:

cultivar (str): Name of the cultivar to modify. This argument is required. cul_file_path (str): Full path to the cultivar CUL file. This argument is required. output_path (str): Directory to save the generated TPL file. Defaults to the current working directory. new_template_file_extension (str): Extension for the generated template file (e.g., “tpl”). header_start (str): Identifier for the header row in the CUL file. Default is ‘@VAR#’. tpl_first_line (str): First line to include in the TPL file. Default is ‘ptf ~’. minima (str): Row identifier for the minima parameter values. Default is ‘999991’. maxima (str): Row identifier for the maxima parameter values. Default is ‘999992’. parameters_grouped (dict): A dictionary where keys are group names and values are comma-separated

strings of parameter names to include in the TPL file. If not provided, defaults are loaded from the configuration file.

mrk (str, optional): Primary marker delimiter character for the template file. Defaults to ‘~’.

Returns:
dict: A dictionary containing:
  • ‘cultivar_parameters’: Current parameter values for the specified cultivar.

  • ‘minima_parameters’: Minima values for all parameters.

  • ‘maxima_parameters’: Maxima values for all parameters.

  • ‘parameters_grouped’: The grouped parameters used for template generation.

str: The full path to the generated TPL file (output_new_file_path).

Raises:

ValueError: If required arguments are missing or invalid values are encountered. FileNotFoundError: If the specified CUL file does not exist. Exception: For any other unexpected errors.

dpest.wheat.ceres.eco module

dpest.wheat.ceres.eco.eco(ecotype=None, eco_file_path=None, output_path=None, new_template_file_extension=None, header_start=None, tpl_first_line=None, minima=None, maxima=None, mrk='~', **parameters_grouped)[source]

Create a TPL file for CERES Wheat based on a ecotype ECO file with specified parameter modifications.

Args:

ecotype (str): Name of the ecotype to modify. This argument is required. eco_file_path (str): Full path to the ecotype .ECO file. This argument is required. output_path (str): Directory to save the generated TPL file. Defaults to the current working directory. new_template_file_extension (str): Extension for the generated template file (e.g., “tpl”). header_start (str): Identifier for the header row in the ECO file. Default is ‘@VAR#’. tpl_first_line (str): First line to include in the TPL file. Default is ‘ptf ~’. minima (str): Row identifier for the minima parameter values. Default is ‘999991’. maxima (str): Row identifier for the maxima parameter values. Default is ‘999992’. parameters_grouped (dict): A dictionary where keys are group names and values are comma-separated

strings of parameter names to include in the TPL file. If not provided, defaults are loaded from the configuration file.

mrk (str, optional): Primary marker delimiter character for the template file. Defaults to ‘~’.

Returns:
dict: A dictionary containing:
  • ‘ecotype_parameters’: Current parameter values for the specified ecotype.

  • ‘minima_parameters’: Minima values for all parameters.

  • ‘maxima_parameters’: Maxima values for all parameters.

  • ‘parameters_grouped’: The grouped parameters used for template generation.

str: The full path to the generated TPL file (output_new_file_path).

Raises:

ValueError: If required arguments are missing or invalid values are encountered. FileNotFoundError: If the specified ECO file does not exist. Exception: For any other unexpected errors.

Module contents