Complete API reference for the ADS Testbench Development Framework.
Extract data from HFSS simulations.
HFSSDataExtractor(project_path: str, design_name: Optional[str] = None)Parameters:
project_path: Path to HFSS .aedt project filedesign_name: Name of design (uses active if None)
extract_s_parameters(
setup_name: Optional[str] = None,
sweep_name: Optional[str] = None
) -> Dict[str, np.ndarray]Extract S-parameter data.
Returns: Dictionary with frequency and S-parameter arrays
export_touchstone(
output_file: str,
setup_name: Optional[str] = None,
sweep_name: Optional[str] = None
) -> boolExport S-parameters to Touchstone file.
Returns: True if successful
get_port_impedances() -> Dict[str, complex]Get port impedances.
Returns: Dictionary of port names to impedances
close()Close HFSS project and release resources.
Extract data from Maxwell simulations.
MaxwellDataExtractor(project_path: str, design_name: Optional[str] = None)extract_inductance_matrix(setup_name: Optional[str] = None) -> np.ndarrayExtract inductance matrix.
Returns: Inductance matrix as numpy array
extract_resistance_matrix(setup_name: Optional[str] = None) -> np.ndarrayExtract resistance matrix.
Returns: Resistance matrix as numpy array
Convert AEDT data to ADS formats.
AEDTtoADSConverter(output_dir: Optional[str] = None)convert_s_parameters(
s_param_dict: Dict[str, np.ndarray],
output_file: str,
format_type: str = "touchstone"
) -> boolConvert S-parameters to specified format.
Parameters:
s_param_dict: Dictionary with frequency and S-parameter dataoutput_file: Output file pathformat_type: Format (touchstone, csv, matlab)
Returns: True if successful
Control ADS workspace and simulations.
ADSController(ads_install_path: Optional[str] = None)open_workspace(workspace_path: str) -> boolOpen ADS workspace.
create_design(design_name: str, design_type: str = "schematic") -> boolCreate new design.
Parameters:
design_name: Name for the designdesign_type: Type (schematic, layout, data_display)
run_simulation(
simulation_name: str,
parameters: Optional[Dict[str, Any]] = None
) -> boolRun simulation.
Import data into ADS.
ADSDataImporter(workspace_path: str)import_s_parameters(
source_file: str,
component_name: str,
description: str = ""
) -> boolImport S-parameters from Touchstone file.
import_csv_data(
csv_file: str,
variable_name: str,
column_mapping: Optional[Dict[str, str]] = None
) -> boolImport data from CSV file.
import_pyaedt_data(
data_dict: Dict[str, np.ndarray],
dataset_name: str
) -> boolImport data from PyAEDT results.
Generate ADS testbenches.
TestbenchGenerator(
workspace_path: str,
template_dir: Optional[str] = None
)generate_s_parameter_testbench(
component_file: str,
testbench_name: str,
freq_start: float,
freq_stop: float,
freq_points: int = 201
) -> boolGenerate S-parameter testbench.
generate_harmonic_balance_testbench(
circuit_file: str,
testbench_name: str,
fundamental_freq: float,
harmonics: int = 7,
power_sweep: Optional[List[float]] = None
) -> boolGenerate Harmonic Balance testbench.
generate_from_template(
template_name: str,
testbench_name: str,
parameters: Dict[str, Any]
) -> boolGenerate testbench from template.
Complete HFSS to ADS workflow automation.
HFSStoADSWorkflow(
hfss_project: str,
ads_workspace: str,
output_dir: Optional[str] = None
)run(
component_name: str,
create_testbench: bool = True,
verify: bool = True
) -> boolRun complete workflow.
Complete Maxwell to ADS workflow automation.
MaxwelltoADSWorkflow(
maxwell_project: str,
ads_workspace: str,
output_dir: Optional[str] = None
)run(
component_name: str,
extract_type: str = "all"
) -> boolRun complete workflow.
Parameters:
component_name: Name for componentextract_type: Type of data (all, inductance, resistance)
setup_logger(
log_file: str = "ads_testbench.log",
level: str = "INFO",
rotation: str = "10 MB",
retention: int = 5
)Set up logger with console and file output.
find_files(
directory: str,
pattern: str = "*",
recursive: bool = True
) -> List[Path]Find files matching pattern.
create_backup(
file_path: str,
backup_dir: Optional[str] = None
) -> Optional[Path]Create backup copy of file.
load_config(config_file: str) -> Dict[str, Any]Load configuration from YAML or JSON.
save_results(
data: Dict[str, Any],
output_file: str,
format: str = "auto"
) -> boolSave results to file.
validate_frequency_range(
freq_start: float,
freq_stop: float,
freq_points: int
) -> boolValidate frequency range parameters.
Common types used throughout the API:
# S-parameter data dictionary
SParamData = Dict[str, np.ndarray] # Keys: 'frequency', 'S11_mag', 'S11_phase', etc.
# Configuration dictionary
Config = Dict[str, Any]
# Simulation parameters
SimParams = Dict[str, Union[float, int, str]]# Default frequency units
FREQ_UNITS = ["Hz", "kHz", "MHz", "GHz"]
# Default formats
DATA_FORMATS = ["touchstone", "csv", "matlab", "json"]
# Design types
DESIGN_TYPES = ["schematic", "layout", "data_display"]