add_thermal_maps#

Project.add_thermal_maps(project, add_thermal_map_files)#

Add thermal map files to a Sherlock project.

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

  • add_thermal_map_files (list) –

    List of thermal map files consisting of these properties:

    • thermal_map_filestr

      Full path to the thermal map file to add.

    • thermal_map_file_propertieslist

      List of thermal map properties consisting of these properties:

      • file_namestr

        Name of the thermal file to update.

      • file_typeThermalMapsFileType

        Thermal maps file type.

      • file_commentstr, optional

        Comment to associate with the file.

      • thermal_board_sideThermalBoardSide

        Thermal board side.

      • file_dataCsvExcelFile|IcepakFile|ImageFile

        The properties of the thermal map file to update.

      • thermal_profilesList of str

        List of thermal profiles.

      • cca_namesList 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.

Returns:

Status code of the response. 0 for success.

Return type:

int

Examples

>>> from ansys.sherlock.core.launcher import launch_sherlock
>>> from ansys.sherlock.core.types.project_types import (
    BoardBounds,
    ImageBounds,
    ImageFile,
    LegendBounds,
    LegendOrientation,
    ThermalBoardSide,
    ThermalMapsFileType,
)
>>> sherlock = launch_sherlock()
>>> 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"
)
>>> add_thermal_map_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", add_thermal_map_files)