seidart.visualization.im2anim module¶
- seidart.visualization.im2anim.build_animation(prjfile, channel, delay, numsteps, alpha, is_complex: bool = False, is_single_precision: bool = True, plottype: str = 'magnitude')¶
This function builds a gif from the set of images output of the FDTD modeling. The images can be in csv or unformatted Fortran binary, however, the program runs faster to use the latter. For electromagnetic simulations, plottype can be:
‘magnitude’, ‘phase’ (complex only), ‘energy_density (complex only)’
For seismic simulations, plottype can be:
‘magnitude’, ‘quiver’
- Parameters:
prjfile (str) – The full file path for the project file.
channel (str) – The channel to be used. Available channels are Ex, Ez, Vx, and Vz for the electric field and seismic velocities, respectively.
delay (int) – The amount of delay between two frames in the GIF animation.
numsteps (int) – The time step interval between the images to be used. For example, n=20 means that every 20th image will be used.
alpha (float) – Change the transparency of the model plotted in the background. 0 is fully transparent, 1 is fully opaque.
is_complex (bool, optional) – Flag indicating whether the data will be complex valued. If not flagged but the data is complex, only the real part is used.
is_single_precision (bool, optional) – Flag indicating whether the data is in single precision.
plottype (str, optional) – The type of plot to generate. Valid inputs are ‘magnitude’, ‘phase’ (complex only), and ‘energy_density’ (complex only) for EM; ‘magnitude’ and ‘quiver’ for seismic.
- Returns:
None