Skip to content

Commit 1e4a3b2

Browse files
committed
prep for 2.4.0rc1
1 parent bac360c commit 1e4a3b2

File tree

3 files changed

+159
-22
lines changed

3 files changed

+159
-22
lines changed

CHANGELOG.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
55

66
## [Unreleased]
77

8+
### Added
9+
10+
### Changed
11+
12+
### Fixed
13+
14+
## [2.4.0rc1] - 2023-7-27
15+
816
### Added
917
- Configuration option `config.log_suppression` can be used to control the suppression of log messages.
10-
- `abort()` for `Job` and `mode solver`, Job or mode solver whose status is not success or error(e.g. running, draft) can be aborted, if Job or mode solver is abort, it can't be submitted, a new one needs to be created and submitted.
11-
- `web.abort()` and `Job.abort()` methods allowing to abort running tasks without deleting them. If a task is aborted, it cannot be restarted later, a new one needs to be created and submitted.
18+
- `web.abort()` and `Job.abort()` methods allowing user to abort running tasks without deleting them. If a task is aborted, it cannot be restarted later, a new one needs to be created and submitted.
1219
- `FastDispersionFitter` for fast fitting of material dispersion data.
13-
- `Simulation.monitors_data_size` mapping monitor name to its data size in bytes.
20+
- `Simulation.monitors_data_size` property mapping monitor name to its data size in bytes.
1421
- Source with arbitrary user-specified time dependence through `CustomSourceTime`.
1522

1623
### Changed
17-
- Add `width` and `height` options to `Simulation.plot_3d`.
18-
- `sim_with_source()`, `sim_with_monitor()`, and `sim_with_mode_solver_monitor()` methods allowing the `ModeSolver` to create a copy of its simulation with a `ModeSource`, `ModeMonitor`, or `ModeSolverMonitor` added, respectively.
24+
- Add `width` and `height` options to `Simulation.plot_3d()`.
25+
- `sim_with_source()`, `sim_with_monitor()`, and `sim_with_mode_solver_monitor()` methods allowing the `ModeSolver` to create a copy of its `Simulation` with an added `ModeSource`, `ModeMonitor`, or `ModeSolverMonitor`, respectively.
1926

2027
### Fixed
21-
- Fix the `Environment has no attribute _current` issue when set `TIDY3D_ENV=prod`
28+
- Handles `TIDY3D_ENV` properly when set to `prod`.
2229
- Redundant phase compensation for shifted source in smatrix plugin.
2330

2431
## [2.3.2] - 2023-7-21
@@ -864,7 +871,8 @@ which fields are to be projected is now determined automatically based on the me
864871
- Job and Batch classes for better simulation handling (eventually to fully replace webapi functions).
865872
- A large number of small improvements and bug fixes.
866873

867-
[Unreleased]: https://github.com/flexcompute/tidy3d/compare/v2.3.2...develop
874+
[Unreleased]: https://github.com/flexcompute/tidy3d/compare/v2.4.0rc1...pre/2.4
875+
[2.4.0rc1]: https://github.com/flexcompute/tidy3d/compare/v2.3.2...v2.4.0rc1
868876
[2.3.2]: https://github.com/flexcompute/tidy3d/compare/v2.3.1...v2.3.2
869877
[2.3.1]: https://github.com/flexcompute/tidy3d/compare/v2.3.0...v2.3.1
870878
[2.3.0]: https://github.com/flexcompute/tidy3d/compare/v2.2.3...v2.3.0

tests/test_plugins/test_dispersion_fitter.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22
import pytest
33
import responses
44

5+
import matplotlib.pylab as plt
6+
57
import tidy3d as td
68
from tidy3d.plugins.dispersion import DispersionFitter, FastDispersionFitter
79
from tidy3d.plugins.dispersion import AdvancedFastFitterParam
810
from tidy3d.plugins.dispersion.web import run as run_fitter
911

10-
1112
advanced_param = AdvancedFastFitterParam(num_iters=1, passivity_num_iters=1)
1213

1314

15+
_, AX = plt.subplots()
16+
17+
1418
@pytest.fixture
1519
def random_data():
1620
data_points = 11
@@ -98,14 +102,14 @@ def test_dispersion_plot(random_data):
98102
wvl_um, n_data, k_data = random_data
99103

100104
fitter = DispersionFitter(wvl_um=wvl_um, n_data=n_data)
101-
fitter.plot()
105+
fitter.plot(ax=AX)
102106
medium, rms = fitter.fit(num_tries=2)
103-
fitter.plot(medium)
107+
fitter.plot(medium, ax=AX)
104108

105109
fitter = DispersionFitter(wvl_um=wvl_um, n_data=n_data, k_data=k_data)
106110
fitter.plot()
107111
medium, rms = fitter.fit(num_tries=2)
108-
fitter.plot(medium)
112+
fitter.plot(medium, ax=AX)
109113

110114

111115
def test_dispersion_set_wvg_range(random_data):

0 commit comments

Comments
 (0)