add_thermal_maps#

Project.add_thermal_maps(project, add_thermal_map_files)#

Add thermal map files to a Sherlock project.

Available Since: 2024R2

Parameters:
  • project (str) – str: Name of the Sherlock project to add thermal maps to.

  • add_thermal_map_files (list[dict[str, list[dict[str, str | ThermalMapsFileType | ThermalBoardSide | CsvExcelFile | IcepakFile | ImageFile | list[str]]] | str]]) –

    list[dict[str, list[dict[str, str | ThermalMapsFileType | ThermalBoardSide | CsvExcelFile | IcepakFile | ImageFile | list[str]]] | str]]: List of thermal map files consisting of these properties:

    • thermal_map_file: str

      Full path to the thermal map file to add.

    • thermal_map_file_properties: list

      List of thermal map properties consisting of these properties:

      • file_name: str

        Name of the thermal file to update.

      • file_type: ThermalMapsFileType

        Thermal maps file type.

      • file_comment: str, optional

        Comment to associate with the file.

      • thermal_board_side: ThermalBoardSide

        Thermal board side.

      • file_data: CsvExcelFile | IcepakFile | ImageFile

        The properties of the thermal map file to update.

      • thermal_profiles: List of str

        List of thermal profiles.

      • cca_names: List of str, optional

        List of CCA names to provide thermal maps for. The default is None, in which case all CCAs in the project are returned.

Return type:

int

Returns:

:
int

Status code of the response. 0 for success.

Examples

>>> from ansys.sherlock.core.types.project_types import (
>>>     BoardBounds,
>>>     ImageBounds,
>>>     ImageFile,
>>>     LegendBounds,
>>>     LegendOrientation,
>>>     ThermalBoardSide,
>>>     ThermalMapsFileType,
>>> )
>>> from ansys.sherlock.core import launcher
>>> sherlock, install_dir = launcher.launch_and_connect(transport_mode="wnua")
>>> thermal_map_properties = ImageFile(
>>>     board_bounds=BoardBounds([
>>>         (1.0, 2.0),
>>>         (3.0, 4.0),
>>>         (1.0, 2.0),
>>>         (1.0, 2.0)
>>>     ]),
>>>     coordinate_units="in",
>>>     image_bounds=ImageBounds(0.0, 0.0, 10.0, 8.0),
>>>     legend_bounds=LegendBounds(1.0, 2.0, 4.0, 2.0),
>>>     legend_orientation=LegendOrientation.VERTICAL,
>>>     min_temperature=20.0,
>>>     min_temperature_units="C",
>>>     max_temperature=50.0,
>>>     max_temperature_units="C"
>>> )
>>> files = [
>>>     {
>>>         "thermal_map_file": "Thermal Image.jpg",
>>>         "thermal_map_file_properties": [
>>>             {
>>>                 "file_name": "Thermal Image.jpg",
>>>                 "file_type": ThermalMapsFileType.IMAGE,
>>>                 "file_comment": "Update thermal map",
>>>                 "thermal_board_side": ThermalBoardSide.TOP,
>>>                 "file_data": thermal_map_properties,
>>>                 "thermal_profiles": ["Environmental/1 - Temp Cycle - Min"],
>>>                 "cca_names": ["CCA1", "CCA2"]
>>>             },
>>>         ]
>>>     }
>>> ]
>>> sherlock.project.add_thermal_maps("Tutorial Project", files)