Home › Forums › FDTD › Write phase data of observation point to a text-file › Reply To: Write phase data of observation point to a text-file
Hello Christopher,
As Steve stated you are limited to only exporting the time series data for an observation point. You would need to perform the DFT yourself. The script you would need to run within OptiFDTD would be the following (note that my observation point is ObservationPoint1 and I am running an Ey polarized source).
dim observationPoint1
set observationPoint1 = ObservePtMgr.GetObjFromID(“ObservationPoint1”)
ParamMgr.Simulate
WGMgr.Sleep( 50 )
dim TimeSeries
set TimeSeries = observationPoint1.GetTimeSeries(“Ey”)
TimeSeries.WriteF2D(“Ey.f2d”)
You would then need to process this in Matlab, I have attached a matlab script that will calculate the dft with real, imag, amp, and phase. Note this fft is based on the number of time samples and will not show the oscillations at the lower frequencies. Make sure the filename in the dlmread is the same as the filename you used in the WriteF2D command.
Hope this helps.
Scott
Categories
- All
-
Knowledge
Contains a detailed Q&A knowledge base. -
General
All non-technical questions. -
System
Optical system design and analysis. -
Instrument
Communicate and control different kinds of instruments. -
SPICE
Opto-electronic circuit design. -
FDTD
Finite-Difference Time-Domain simulation. -
BPM
Beam Propagation Method analysis and design. -
Grating
Fiber optic grating simulation. -
Fiber
Optical fiber design and characterization. -
Exchange
Users can exchange design files.
(Matlab, C++, etc.)