add_thermal_maps#
- Project.add_thermal_maps(project: str, add_thermal_map_files: list[dict[str, list[dict[str, str | ThermalMapsFileType | ThermalBoardSide | CsvExcelFile | IcepakFile | ImageFile | list[str]]] | str]]) int #
Add thermal map files to a Sherlock project.
Available Since: 2024R2
- Parameters:
project (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 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.
- 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" ) >>> 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)