From b7949e8e3203141bf37bc2ee92085f3ca9009a62 Mon Sep 17 00:00:00 2001 From: daquintero Date: Fri, 23 Feb 2024 11:42:34 +0100 Subject: [PATCH] FIX: More API links :rotating_light: --- .github/workflows/sync-to-proxy-repo.yaml | 1 + AdiabaticCouplerLN.ipynb | 2 +- AdjointPlugin3InverseDesign.ipynb | 4 ++-- BilayerSiNEdgeCoupler.ipynb | 4 ++-- CMOSRGBSensor.ipynb | 2 +- EdgeCoupler.ipynb | 2 +- FocusedApodGC.ipynb | 2 +- HeatSolver.ipynb | 6 +++--- MetalHeaterPhaseShifter.ipynb | 2 +- MoS2Waveguide.ipynb | 2 +- ParameterScan.ipynb | 10 +++++----- ParticleSwarmOptimizedPBS.ipynb | 2 +- Primer.ipynb | 12 ++++++------ RadiativeCoolingGlass.ipynb | 2 +- Simulation.ipynb | 2 +- TimeModulationTutorial.ipynb | 2 +- TunableChiralMetasurface.ipynb | 2 +- VizData.ipynb | 2 +- WebAPI.ipynb | 18 +++++++++--------- 19 files changed, 40 insertions(+), 39 deletions(-) diff --git a/.github/workflows/sync-to-proxy-repo.yaml b/.github/workflows/sync-to-proxy-repo.yaml index 73dcdfab..ff63a4ce 100644 --- a/.github/workflows/sync-to-proxy-repo.yaml +++ b/.github/workflows/sync-to-proxy-repo.yaml @@ -4,6 +4,7 @@ on: branches: - main - latest + - develop workflow_dispatch: inputs: env: diff --git a/AdiabaticCouplerLN.ipynb b/AdiabaticCouplerLN.ipynb index 51a37125..5e2bba90 100644 --- a/AdiabaticCouplerLN.ipynb +++ b/AdiabaticCouplerLN.ipynb @@ -350,7 +350,7 @@ "id": "00c3f15b", "metadata": {}, "source": [ - "We can run the two simulations sequentially. However, since both simulations are large, it would be much more efficient if we run them concurrently. To do so, we first define a simulation [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html) as demonstrated in the [tutorial](https://www.flexcompute.com/tidy3d/examples/notebooks/ParameterScan/). \n", + "We can run the two simulations sequentially. However, since both simulations are large, it would be much more efficient if we run them concurrently. To do so, we first define a simulation [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html) as demonstrated in the [tutorial](https://www.flexcompute.com/tidy3d/examples/notebooks/ParameterScan/). \n", "\n", "Before submitting the simulations to run on the server, we estimate the cost to ensure it is reasonable and affordable. This cost is the maximum cost assuming all time steps are used." ] diff --git a/AdjointPlugin3InverseDesign.ipynb b/AdjointPlugin3InverseDesign.ipynb index 1b40ec57..6db4db6c 100644 --- a/AdjointPlugin3InverseDesign.ipynb +++ b/AdjointPlugin3InverseDesign.ipynb @@ -159,9 +159,9 @@ "source": [ "### Input Structures\n", "\n", - "Next, we write a function to return the pixellated array given our flattened tuple of permittivity values $\\epsilon_{ij}$ using [JaxCustomMedium](../_autosummary/tidy3d.plugins.adjoint.JaxCustomMedium.html).\n", + "Next, we write a function to return the pixellated array given our flattened tuple of permittivity values $\\epsilon_{ij}$ using [JaxCustomMedium](../api/_autosummary/tidy3d.plugins.adjoint.JaxCustomMedium.html).\n", "\n", - "We start with an array of parameters between 0 and 1, apply a [ConicFilter](../_autosummary/tidy3d.plugins.adjoint.utils.filter.ConicFilter.html) and a [BinaryProjector](../_autosummary/tidy3d.plugins.adjoint.utils.filter.BinaryProjector.html) to create smooth, binarized features.\n", + "We start with an array of parameters between 0 and 1, apply a [ConicFilter](../api/_autosummary/tidy3d.plugins.adjoint.utils.filter.ConicFilter.html) and a [BinaryProjector](../api/_autosummary/tidy3d.plugins.adjoint.utils.filter.BinaryProjector.html) to create smooth, binarized features.\n", "\n", "The `JaxStructureStaticGeometry` allows for including a `jax`-compatible medium and a non-differentiable Tidy3D geometry." ] diff --git a/BilayerSiNEdgeCoupler.ipynb b/BilayerSiNEdgeCoupler.ipynb index 5805451e..baa05795 100644 --- a/BilayerSiNEdgeCoupler.ipynb +++ b/BilayerSiNEdgeCoupler.ipynb @@ -416,7 +416,7 @@ "id": "61539ff5", "metadata": {}, "source": [ - "We can run the two simulations sequentially. However, for maximum efficiency, we will run them concurrently by making a simulation [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html). To do so, we first put simulations in a Python dictionary." + "We can run the two simulations sequentially. However, for maximum efficiency, we will run them concurrently by making a simulation [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html). To do so, we first put simulations in a Python dictionary." ] }, { @@ -437,7 +437,7 @@ "id": "54ef9361", "metadata": {}, "source": [ - "Then we submit the simulation as a [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html) to run on the server." + "Then we submit the simulation as a [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html) to run on the server." ] }, { diff --git a/CMOSRGBSensor.ipynb b/CMOSRGBSensor.ipynb index f1562741..87346ea8 100644 --- a/CMOSRGBSensor.ipynb +++ b/CMOSRGBSensor.ipynb @@ -153,7 +153,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Here, we load relevant materials from Tidy3D's [material library](https://docs.flexcompute.com/projects/tidy3d/en/latest/material_library.html). Typical material choice is considered: photodetector made of silicon, metallic interconnects and shields made of aluminum, an anti-reflection layer made of silicon nitride, and most other optical components made of silica." + "Here, we load relevant materials from Tidy3D's [material library](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/material_library.html). Typical material choice is considered: photodetector made of silicon, metallic interconnects and shields made of aluminum, an anti-reflection layer made of silicon nitride, and most other optical components made of silica." ] }, { diff --git a/EdgeCoupler.ipynb b/EdgeCoupler.ipynb index 6e606ca0..c6730863 100644 --- a/EdgeCoupler.ipynb +++ b/EdgeCoupler.ipynb @@ -15,7 +15,7 @@ "\n", "Fiber-to-chip couplers are essential components in photonic integrated circuits (PICs) that need to couple in/out light using optical fibers. However, the huge mismatch between the mode sizes of a single mode fiber ($\\approx 10\\mu m$ in diameter) and a silicon wire waveguide (220 x 500 nm) can cause significant coupling loss if they are coupled directly. For this reason, the design of the fiber-to-chip coupling devices is critical for the whole system's performance and needs to be carefully accomplished. There are two main categories of fiber-to-chip optical coupling devices: [grating couplers](https://www.flexcompute.com/tidy3d/examples/notebooks/GratingCoupler/), where the optical fiber is positioned perpendicularly to the chip plane; and edge couplers, which allow in-plane light coupling by the direct alignment between the fiber and the integrated waveguide facets. \n", "\n", - "In this notebook, we will show an example of using Tidy3D to evaluate the performance of edge couplers built using inverted taper mode transformers of linear, quadratic, and exponential profiles. We will also see how to set up a [Gaussian beam](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.GaussianBeam.html) to simulate the field launched by a lensed fiber and the use of [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html) simulations to perform parameter sweeps.\n", + "In this notebook, we will show an example of using Tidy3D to evaluate the performance of edge couplers built using inverted taper mode transformers of linear, quadratic, and exponential profiles. We will also see how to set up a [Gaussian beam](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.GaussianBeam.html) to simulate the field launched by a lensed fiber and the use of [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html) simulations to perform parameter sweeps.\n", "\n", "For more integrated photonic examples such as the [8-Channel mode and polarization de-multiplexer](https://www.flexcompute.com/tidy3d/examples/notebooks/8ChannelDemultiplexer/), the [broadband bi-level taper polarization rotator-splitter](https://www.flexcompute.com/tidy3d/examples/notebooks/BilevelPSR/), and the [broadband directional coupler](https://www.flexcompute.com/tidy3d/examples/notebooks/BroadbandDirectionalCoupler/), please visit our [examples page](https://www.flexcompute.com/tidy3d/examples/). If you are new to the finite-difference time-domain (FDTD) method, we highly recommend going through our [FDTD101](https://www.flexcompute.com/fdtd101/) tutorials. FDTD simulations can diverge due to various reasons. If you run into any simulation divergence issues, please follow the steps outlined in our [troubleshooting guide](https://www.flexcompute.com/tidy3d/examples/notebooks/DivergedFDTDSimulation/) to resolve it." ] diff --git a/FocusedApodGC.ipynb b/FocusedApodGC.ipynb index 012f04cf..b4f97ee0 100644 --- a/FocusedApodGC.ipynb +++ b/FocusedApodGC.ipynb @@ -839,7 +839,7 @@ "id": "352c883f", "metadata": {}, "source": [ - "Next, we will build and run the [parameter sweep](https://www.flexcompute.com/tidy3d/examples/notebooks/ParameterScan/) using [web.run_async](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.run_async.html). Verbosity will be turned off to reduce the amount of output data." + "Next, we will build and run the [parameter sweep](https://www.flexcompute.com/tidy3d/examples/notebooks/ParameterScan/) using [web.run_async](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.asynchronous.run_async.html). Verbosity will be turned off to reduce the amount of output data." ] }, { diff --git a/HeatSolver.ipynb b/HeatSolver.ipynb index 1de3735f..bb41127e 100644 --- a/HeatSolver.ipynb +++ b/HeatSolver.ipynb @@ -559,7 +559,7 @@ "\n", "Now we can submit the three heat simulation to our servers for solving. Heat simulations share the same web API as optic simulations. That is, we can submit simulations to servers in three ways.\n", "\n", - "The first way is to use function [web.run()](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.run.html), which returns simulation results as a [HeatSimulationData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.HeatSimulationData.html) instance." + "The first way is to use function [web.run()](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.webapi.run.html), which returns simulation results as a [HeatSimulationData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.HeatSimulationData.html) instance." ] }, { @@ -760,7 +760,7 @@ "id": "86f3a7b5-cfba-4108-86d2-62feb1ba0854", "metadata": {}, "source": [ - "Alternatively, one can use [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Job.html) container." + "Alternatively, one can use [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Job.html) container." ] }, { @@ -980,7 +980,7 @@ "id": "fca5fe86-1d6a-4eff-978f-5ff64c464eb8", "metadata": {}, "source": [ - "Finally, class [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html) facilitates a convenient submission of multiple simulations. Let us, for example, submit the spherical case at several different mesh resolutions." + "Finally, class [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html) facilitates a convenient submission of multiple simulations. Let us, for example, submit the spherical case at several different mesh resolutions." ] }, { diff --git a/MetalHeaterPhaseShifter.ipynb b/MetalHeaterPhaseShifter.ipynb index da27e65d..cafbf37d 100644 --- a/MetalHeaterPhaseShifter.ipynb +++ b/MetalHeaterPhaseShifter.ipynb @@ -664,7 +664,7 @@ "id": "1328a7ef-4474-4706-916c-7d93c8860f26", "metadata": {}, "source": [ - "And submit this dictionary using [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html) functionality." + "And submit this dictionary using [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html) functionality." ] }, { diff --git a/MoS2Waveguide.ipynb b/MoS2Waveguide.ipynb index f27b2655..12f3418b 100644 --- a/MoS2Waveguide.ipynb +++ b/MoS2Waveguide.ipynb @@ -51,7 +51,7 @@ "id": "2958f7e2", "metadata": {}, "source": [ - "In our [material library](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/material_library.html), we provide a built-in option of [MoS2](../material_library.html#molybdenum-disulfide-mos2), which can be used by `MoS2_medium = td.material_library['MoS2']['Li2014']`. However, for maximum consistency, in this notebook we will use the experimentally measured refractive index provided in the [reference](https://www.science.org/doi/10.1126/science.adi2322). The refractive index is stored in a .csv file and we will use the [FastDispersionFitter](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.plugins.dispersion.FastDispersionFitter.html) to fit it with the pole residue model. Using 4 pole residue pairs, we are able to fit it very nicely. The fit can be further improved by using even more pole residue pairs, but it is unnecessary in this case. In addition, we can also manipulate the relative weights of the real and imaginar parts of the refractive index. Since in this case, both $n$ and $k$ have the same order of magnitude, we will use the default value `AdvancedFastFitterParam(weights=(1,1))`. " + "In our [material library](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/material_library.html), we provide a built-in option of [MoS2](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/material_library.html#molybdenum-disulfide-mos2), which can be used by `MoS2_medium = td.material_library['MoS2']['Li2014']`. However, for maximum consistency, in this notebook we will use the experimentally measured refractive index provided in the [reference](https://www.science.org/doi/10.1126/science.adi2322). The refractive index is stored in a .csv file and we will use the [FastDispersionFitter](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.plugins.dispersion.FastDispersionFitter.html) to fit it with the pole residue model. Using 4 pole residue pairs, we are able to fit it very nicely. The fit can be further improved by using even more pole residue pairs, but it is unnecessary in this case. In addition, we can also manipulate the relative weights of the real and imaginar parts of the refractive index. Since in this case, both $n$ and $k$ have the same order of magnitude, we will use the default value `AdvancedFastFitterParam(weights=(1,1))`. " ] }, { diff --git a/ParameterScan.ipynb b/ParameterScan.ipynb index 37c56834..49d03776 100644 --- a/ParameterScan.ipynb +++ b/ParameterScan.ipynb @@ -16,9 +16,9 @@ "\n", "In this notebook, we will show an example of using tidy3d to evaluate device performance over a set of many design parameters.\n", "\n", - "This example will also provide a walkthrough of Tidy3D's [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Job.html) and [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html) features for managing both individual simulations and sets of simulations.\n", + "This example will also provide a walkthrough of Tidy3D's [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Job.html) and [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html) features for managing both individual simulations and sets of simulations.\n", "\n", - "> Note: as of version `1.8`, the [tidy3d.web.run_async](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.run_async.html) function handles the same functionality as the batch, with a simpler syntax. As such, it could be a good alternative for parameter scan depending on how your script is set up.\n", + "> Note: as of version `1.8`, the [tidy3d.web.run_async](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.asynchronous.run_async.html) function handles the same functionality as the batch, with a simpler syntax. As such, it could be a good alternative for parameter scan depending on how your script is set up.\n", "\n", "Additionally, we will show how to do this problem using `tidy3d.plugins.design`, which provides convenience methods for defining and running parameter scans, which has a full tutorial [here](https://www.flexcompute.com/tidy3d/examples/notebooks/Design/).\n", "\n", @@ -358,7 +358,7 @@ "source": [ "## Create and Submit Job\n", "\n", - "The [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Job.html) object provides an interface for managing simulations.\n", + "The [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Job.html) object provides an interface for managing simulations.\n", "\n", "`job = Job(simulation)` will create a job and upload the simulation to our server to run.\n", "\n", @@ -856,7 +856,7 @@ "\n", "To do this, we will create a list of simulations corresponding to each parameter combination.\n", "\n", - "We will use this list to create a [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html) object, which has similar functionality to [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Job.html) but allows one to manage a *set* of jobs.\n", + "We will use this list to create a [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html) object, which has similar functionality to [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Job.html) but allows one to manage a *set* of jobs.\n", "\n", "First, we create arrays to store the input and output values." ] @@ -883,7 +883,7 @@ "source": [ "### Create Batch\n", "\n", - "We now create our list of simulations and use them to initialize a [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html).\n", + "We now create our list of simulations and use them to initialize a [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html).\n", "\n", "For more information, refer to the API reference." ] diff --git a/ParticleSwarmOptimizedPBS.ipynb b/ParticleSwarmOptimizedPBS.ipynb index 5dbfb78f..214a80b1 100644 --- a/ParticleSwarmOptimizedPBS.ipynb +++ b/ParticleSwarmOptimizedPBS.ipynb @@ -437,7 +437,7 @@ "source": [ "Defining the figure of merit (FOM) is the most important step in any optimization task. We need to define a function that calculates the FOM. This function will be repeatedly called in the PSO for each iteration. In the case of the PBS, we define the FOM as the sum of $P_{TE,bar}$ and $P_{TM,cross}$, where $P_{TE,bar}$ is the transmission of TE0 mode at the bar port and $P_{TM,cross}$ is the transmission of TM0 mode at the cross port. In this particular case, we only optimize the transmission at the central frequency. If broadband operation is desired, the FOM can be defined with respect to the entire frequency range. \n", "\n", - "For this function, the input `x` is an array with size $(N,M)$, where $N$ is the number of particles and $M$ is the dimension of the parameter space. For each particle, we need to run two simulations. Therefore, in each iteration, we need to run $2N$ simulations. The entire optimization requires $2NM$ simulations. To harness the benefit of concurrent run in Tidy3D, we put the $2N$ simulations into a [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html). Note that the final FOM is $-(P_{TE,bar}+P_{TM,cross})$ since the optimizer we will be using minimizes the FOM instead of maximizing it." + "For this function, the input `x` is an array with size $(N,M)$, where $N$ is the number of particles and $M$ is the dimension of the parameter space. For each particle, we need to run two simulations. Therefore, in each iteration, we need to run $2N$ simulations. The entire optimization requires $2NM$ simulations. To harness the benefit of concurrent run in Tidy3D, we put the $2N$ simulations into a [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html). Note that the final FOM is $-(P_{TE,bar}+P_{TM,cross})$ since the optimizer we will be using minimizes the FOM instead of maximizing it." ] }, { diff --git a/Primer.ipynb b/Primer.ipynb index ceaf5b74..eca5dfdc 100644 --- a/Primer.ipynb +++ b/Primer.ipynb @@ -522,7 +522,7 @@ "\n", "Dispersive mediums can be defined in three ways:\n", "\n", - "- Imported from our [material_library](../material_library.html).\n", + "- Imported from our [material_library](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/material_library.html).\n", "\n", "- Defined directly by specifying the parameters in the various supplied dispersive models.\n", "\n", @@ -1194,7 +1194,7 @@ "\n", "* [tidy3d.web](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/index.html#submitting-simulations) functions.\n", "\n", - "* working with [tidy3d.web.Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Job.html#tidy3d.web.Job) and [tidy3d.web.Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html#tidy3d.web.Batch) convenience containers." + "* working with [tidy3d.web.Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Job.html#tidy3d.web.Job) and [tidy3d.web.Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html#tidy3d.web.Batch) convenience containers." ] }, { @@ -1222,7 +1222,7 @@ "source": [ "### Web interface\n", "\n", - "The web interface provides a number of basic functions, but usually, the most convenient way to run a single simulation in one line is with [sim_data = web.run(sim)](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.run.html#tidy3d.web.run), which simply performs all of the necessary steps under the hood.\n", + "The web interface provides a number of basic functions, but usually, the most convenient way to run a single simulation in one line is with [sim_data = web.run(sim)](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.webapi.run.html#tidy3d.web.run), which simply performs all of the necessary steps under the hood.\n", "\n", "The output of the simultion is a separate data object called a [SimulationData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.SimulationData.html), which provides an interface for post processing and visualizing the data." ] @@ -1598,13 +1598,13 @@ "source": [ "### Containers and Batching\n", "\n", - "The convenience containers [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Job.html#tidy3d.web.Job) and [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html#tidy3d.web.Batch) allow one to manage single and multiple tasks in a more \"object oriented\" fashion.\n", + "The convenience containers [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Job.html#tidy3d.web.Job) and [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html#tidy3d.web.Batch) allow one to manage single and multiple tasks in a more \"object oriented\" fashion.\n", "\n", - "They follow the same basic API as the `web.` functions, except [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html#tidy3d.web.Batch) objects accept a dictionary of simulations and return generators that can be iterated through to give [SimulationData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.SimulationData.html) for each task, rather than returning it one by one. This cuts down on memory for several large jobs. \n", + "They follow the same basic API as the `web.` functions, except [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html#tidy3d.web.Batch) objects accept a dictionary of simulations and return generators that can be iterated through to give [SimulationData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.SimulationData.html) for each task, rather than returning it one by one. This cuts down on memory for several large jobs. \n", "\n", "While we won't cover all of the details here, for more information, see the [tutorial on the Web API](../notebooks/Webapi/index.html) or look at the examples in the other notebooks.\n", "\n", - "Finally, we provide [web.run_async](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.run_async.html), which is like `web.run()` but runs a dictionary of simulations asynchronously, and is more convenient than `Batch` in some cases." + "Finally, we provide [web.run_async](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.asynchronous.run_async.html), which is like `web.run()` but runs a dictionary of simulations asynchronously, and is more convenient than `Batch` in some cases." ] }, { diff --git a/RadiativeCoolingGlass.ipynb b/RadiativeCoolingGlass.ipynb index 21edfb6f..bcf168ee 100644 --- a/RadiativeCoolingGlass.ipynb +++ b/RadiativeCoolingGlass.ipynb @@ -610,7 +610,7 @@ "id": "efcc34a2", "metadata": {}, "source": [ - "The cost seems reasonably so we [start](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.start.html) the task and [monitor](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.monitor.html) its status. After the simulation is complete, we can print out the real cost." + "The cost seems reasonably so we [start](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.webapi.start.html) the task and [monitor](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.webapi.monitor.html) its status. After the simulation is complete, we can print out the real cost." ] }, { diff --git a/Simulation.ipynb b/Simulation.ipynb index eeb33318..b9151dfc 100644 --- a/Simulation.ipynb +++ b/Simulation.ipynb @@ -896,7 +896,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can now start the task, and if we want to, continously monitor its status, and wait until the run is successful. The [monitor](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.monitor.html#tidy3d.web.monitor) function will keep running until either a `'success'` or `'error'` status is returned." + "We can now start the task, and if we want to, continously monitor its status, and wait until the run is successful. The [monitor](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.webapi.monitor.html#tidy3d.web.monitor) function will keep running until either a `'success'` or `'error'` status is returned." ] }, { diff --git a/TimeModulationTutorial.ipynb b/TimeModulationTutorial.ipynb index b2cf1920..57c216cb 100644 --- a/TimeModulationTutorial.ipynb +++ b/TimeModulationTutorial.ipynb @@ -309,7 +309,7 @@ "source": [ "Finally, let's define the simulation object.\n", "\n", - "**Note** that in Tidy3D, by default the monitor data will be normalized against source spectrum. However, in many time modulation simulations, some of our monitor frequencies are way outside the source bandwidth, where the source spectrum is very close to 0. So it's a bad idea to use it to normalize. To obtain raw transmission data that are not normalized, here we set `normalize_index = None`. For more information about normalization, please refer to [here](https://docs.flexcompute.com/projects/tidy3d/en/latest/faq.html#how-are-results-normalized)." + "**Note** that in Tidy3D, by default the monitor data will be normalized against source spectrum. However, in many time modulation simulations, some of our monitor frequencies are way outside the source bandwidth, where the source spectrum is very close to 0. So it's a bad idea to use it to normalize. To obtain raw transmission data that are not normalized, here we set `normalize_index = None`. For more information about normalization, please refer to [here](https://docs.flexcompute.com/projects/tidy3d/en/latest/https://docs.flexcompute.com/projects/tidy3d/en/latest/faq/docs/index.html#how-are-results-normalized)." ] }, { diff --git a/TunableChiralMetasurface.ipynb b/TunableChiralMetasurface.ipynb index 22f7129f..5217f86e 100644 --- a/TunableChiralMetasurface.ipynb +++ b/TunableChiralMetasurface.ipynb @@ -525,7 +525,7 @@ "source": [ "### Run Simulation Batch\n", "\n", - "To make the simulations more efficient, we define a [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html) and submit it to run all four simulations in parallel. " + "To make the simulations more efficient, we define a [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html) and submit it to run all four simulations in parallel. " ] }, { diff --git a/VizData.ipynb b/VizData.ipynb index 1d9aeff6..f1fe5116 100644 --- a/VizData.ipynb +++ b/VizData.ipynb @@ -306,7 +306,7 @@ "\n", "Now we will run both simulations and load them into [SimulationData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.SimulationData.html) objects.\n", "\n", - "Since these will be a short and simple simulations, we can use the [web.run](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.run.html) function to do them all in one line." + "Since these will be a short and simple simulations, we can use the [web.run](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.webapi.run.html) function to do them all in one line." ] }, { diff --git a/WebAPI.ipynb b/WebAPI.ipynb index 5126d592..78349dc2 100644 --- a/WebAPI.ipynb +++ b/WebAPI.ipynb @@ -464,7 +464,7 @@ "id": "78cb3ca3", "metadata": {}, "source": [ - "While we broke down each of the individual steps above, one can also perform the entire process in one line by calling the [web.run()](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.run.html) function as follows.\n", + "While we broke down each of the individual steps above, one can also perform the entire process in one line by calling the [web.run()](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.webapi.run.html) function as follows.\n", "\n", "```python\n", "sim_data = web.run(sim, task_name='webAPI', path='data/sim.hdf5')\n", @@ -472,7 +472,7 @@ "\n", "(We won't run it again in this notebook to save time).\n", "\n", - "Sometimes this is more convenient, but other times it can be helpful to have the steps broken down one by one, for example if the simulation is long, you may want to [web.start](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.start.html) and then exit the session and load the results at a later time using [web.load](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.load.html).\n" + "Sometimes this is more convenient, but other times it can be helpful to have the steps broken down one by one, for example if the simulation is long, you may want to [web.start](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.webapi.start.html) and then exit the session and load the results at a later time using [web.load](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.webapi.load.html).\n" ] }, { @@ -482,7 +482,7 @@ "source": [ "## Job Container\n", "\n", - "The [web.Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Job.html) interface provides a more convenient way to manage single simuations, mainly because it eliminates the need for keeping track of the `task_id` and original [Simulation](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.Simulation.html).\n", + "The [web.Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Job.html) interface provides a more convenient way to manage single simuations, mainly because it eliminates the need for keeping track of the `task_id` and original [Simulation](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.Simulation.html).\n", "\n", "We can get the cost estimate of running the task before actually running it. This prevents us from accidentally running large jobs that we set up by mistake. The estimated cost is the maximum cost corresponding to running all the time steps." ] @@ -590,7 +590,7 @@ "id": "fc1465a5", "metadata": {}, "source": [ - "While [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Job.html) has methods with names identical to the web API functions above, which give some more granular control, it is often most convenient to call `.run()` so we will do that now." + "While [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Job.html) has methods with names identical to the web API functions above, which give some more granular control, it is often most convenient to call `.run()` so we will do that now." ] }, { @@ -866,7 +866,7 @@ "id": "ebceab07", "metadata": {}, "source": [ - "Another convenient thing about [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Job.html) objects is that they can be saved and loaded just like other Tidy3d components.\n", + "Another convenient thing about [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Job.html) objects is that they can be saved and loaded just like other Tidy3d components.\n", "\n", "This is convenient if you want to save and load up the results of a job that has already finished, without needing to know the `task_id`." ] @@ -958,8 +958,8 @@ "Commonly one needs to submit a batch of Simulations.\n", "One way to approach this using the web API is to upload, start, monitor, and load a series of tasks one by one, but this is clumsy and you can lose your data if the session gets interrupted.\n", "\n", - "A better way is to use the built-in [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Batch.html) object.\n", - "The batch object is like a [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.Job.html), but stores task metadata for a series of simulations." + "A better way is to use the built-in [Batch](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Batch.html) object.\n", + "The batch object is like a [Job](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.Job.html), but stores task metadata for a series of simulations." ] }, { @@ -1279,7 +1279,7 @@ "id": "0ae64033", "metadata": {}, "source": [ - "When the batch is completed, the output is not a [SimulationData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.SimulationData.html) but rather a [BatchData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.BatchData.html). The data within this [BatchData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.BatchData.html) object can either be indexed directly `batch_results[task_name]` or can be looped through `batch_results.items()` to get the [SimulationData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.SimulationData.html) for each task.\n", + "When the batch is completed, the output is not a [SimulationData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.SimulationData.html) but rather a [BatchData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.BatchData.html). The data within this [BatchData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.container.BatchData.html) object can either be indexed directly `batch_results[task_name]` or can be looped through `batch_results.items()` to get the [SimulationData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.SimulationData.html) for each task.\n", "\n", "This was chosen to reduce the memory strain from loading all [SimulationData](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.SimulationData.html) objects at once.\n", "\n", @@ -1508,7 +1508,7 @@ "\n", "Finally, one can make use of the [asyncio package](https://realpython.com/async-io-python/) to perform asynchronous processing of several simulations.\n", "\n", - "For this purpose, a [web.run_async](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.run_async.html) function is provided, which works like the regular `web.run` but accepts a dictionary of simulations. \n", + "For this purpose, a [web.run_async](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.web.api.asynchronous.run_async.html) function is provided, which works like the regular `web.run` but accepts a dictionary of simulations. \n", "\n", "Here is the previous example repeated using this feature." ]