Skip to content

Commit

Permalink
rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dbochkov-flexcompute authored and momchil-flex committed Jun 10, 2024
1 parent 23ed12f commit 2855911
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
5 changes: 1 addition & 4 deletions tests/test_components/test_parameter_perturbation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
import pytest
import tidy3d as td

from ..utils import cartesian_to_unstructured

from ..utils import assert_log_level, AssertLogLevel
from ..utils import log_capture # noqa: F401
from ..utils import cartesian_to_unstructured, AssertLogLevel

sp_arr = td.SpatialDataArray(300 * np.ones((2, 2, 2)), coords=dict(x=[1, 2], y=[3, 4], z=[5, 6]))
sp_arr_u = cartesian_to_unstructured(sp_arr)
Expand Down
1 change: 0 additions & 1 deletion tests/test_components/test_perturbation_medium.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import pydantic.v1 as pydantic
import tidy3d as td
from ..utils import AssertLogLevel, cartesian_to_unstructured
from ..utils import log_capture # noqa: F401


@pytest.mark.parametrize("unstructured", [False, True])
Expand Down
2 changes: 1 addition & 1 deletion tidy3d/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@
from .components.parameter_perturbation import (
CustomChargePerturbation,
CustomHeatPerturbation,
IndexPerturbation,
LinearChargePerturbation,
LinearHeatPerturbation,
ParameterPerturbation,
PermittivityPerturbation,
IndexPerturbation,
)

# run time spec
Expand Down
8 changes: 6 additions & 2 deletions tidy3d/components/medium.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
from .geometry.base import Geometry
from .grid.grid import Coords, Grid
from .heat_spec import HeatSpecType
from .parameter_perturbation import ParameterPerturbation, PermittivityPerturbation, IndexPerturbation
from .parameter_perturbation import (
IndexPerturbation,
ParameterPerturbation,
PermittivityPerturbation,
)
from .time_modulation import ModulationSpec
from .transformation import RotationType
from .types import (
Expand All @@ -65,7 +69,7 @@
PoleAndResidue,
TensorReal,
)
from .validators import validate_name_str, validate_parameter_perturbation
from .validators import _warn_potential_error, validate_name_str, validate_parameter_perturbation
from .viz import add_ax_if_none

# evaluate frequency as this number (Hz) if inf
Expand Down
4 changes: 2 additions & 2 deletions tidy3d/components/parameter_perturbation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import functools
from abc import ABC, abstractmethod
from typing import Callable, List, Tuple, Union, Optional
from typing import Callable, List, Optional, Tuple, Union

import matplotlib.pyplot as plt
import numpy as np
Expand All @@ -13,7 +13,7 @@
from ..components.data.validators import validate_no_nans
from ..components.types import TYPE_TAG_STR, ArrayLike, Ax, Complex, FieldVal, InterpMethod
from ..components.viz import add_ax_if_none
from ..constants import CMCUBE, KELVIN, PERCMCUBE, inf
from ..constants import CMCUBE, EPSILON_0, KELVIN, PERCMCUBE, inf
from ..exceptions import DataError
from ..log import log
from .base import Tidy3dBaseModel, cached_property
Expand Down

0 comments on commit 2855911

Please sign in to comment.