From 70f6bead203874e9217409ab975e4354aad26707 Mon Sep 17 00:00:00 2001 From: Yannick Augenstein Date: Thu, 10 Oct 2024 15:54:34 +0200 Subject: [PATCH] Add `freqs` alias for `Metric.f` --- CHANGELOG.md | 2 +- tidy3d/plugins/expressions/metrics.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6eb81dc90..841bd36613 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `tidy3d.plugins.pytorch` to wrap autograd functions for interoperability with PyTorch via the `to_torch` wrapper. ### Changed -- Renamed `Metric.freqs` --> `Metric.f` and made frequency argument optional, in which case all frequencies from the relevant monitor will be extracted. +- Renamed `Metric.freqs` --> `Metric.f` and made frequency argument optional, in which case all frequencies from the relevant monitor will be extracted. Metrics can still be initialized with both `f` or `freqs`. ### Fixed - Some validation fixes for design region. diff --git a/tidy3d/plugins/expressions/metrics.py b/tidy3d/plugins/expressions/metrics.py index fc79940fd8..16ebf308fe 100644 --- a/tidy3d/plugins/expressions/metrics.py +++ b/tidy3d/plugins/expressions/metrics.py @@ -69,6 +69,7 @@ class ModeAmp(Metric): None, title="Frequency Array", description="The frequency array. If None, all frequencies in the monitor will be used.", + alias="freqs", ) direction: Direction = pd.Field( "+",