-
After running the mode solver in Tidy3D, the mode data (neff, ngroup, x, y, Ex, Ey, Ez, etc) seems to be returned as an xarray. How can I save (and load) the xarray for post-processing in the future using Tidy3D functions and methods. |
Beta Was this translation helpful? Give feedback.
Answered by
tylerflex
May 2, 2024
Replies: 2 comments
-
Hi @smgitrep the So for example, if mode_data = mode_solver.solve()
mode_data.to_file('mode_data.hdf5')
# and later
mode_data = td.ModeSolverData.from_file('mode_data.hdf5') hope that helps |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tylerflex
-
Thank you, Tyler!
…On Thu, May 2, 2024 at 10:34 AM Tyler Hughes ***@***.***> wrote:
Hi @smgitrep <https://github.com/smgitrep> the ModeSolverData can be
written to file with to_file and read using from_file.
So for example, if
mode_data = mode_solver.solve()
mode_data.to_file('mode_data.hdf5')
# and later
mode_data = td.ModeSolverData.from_file('mode_data.hdf5')
hope that helps
https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.components.base.Tidy3dBaseModel.html#tidy3d.components.base.Tidy3dBaseModel.to_file
—
Reply to this email directly, view it on GitHub
<#1657 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4IRDOZQWDVBEB5YGNUQDHDZAJ2JTAVCNFSM6AAAAABHCRHLGCVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TEOJYGMZDK>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @smgitrep the
ModeSolverData
can be written to file withto_file
and read usingfrom_file
.So for example, if
hope that helps
https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.components.base.Tidy3dBaseModel.html#tidy3d.components.base.Tidy3dBaseModel.to_file