update_thermal_maps#

Project.update_thermal_maps(project, thermal_map_files)#

Update thermal map files to a Sherlock project.

Available Since: 2024R2

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

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

    list: List of thermal map files 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,
>>>     max_temperature=50.0,
>>>     max_temperature_units="C",
>>>     min_temperature=20.0,
>>>     min_temperature_units="C"
>>> )
>>> files = [
>>>     {
>>>         "file_name": "thermal_map_file.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.update_thermal_maps("Tutorial Project", files)