yasfpy.initial_field ==================== .. py:module:: yasfpy.initial_field .. autoapi-nested-parse:: Incident field definition. This module defines :class:`~yasfpy.initial_field.InitialField`, which stores the incident beam type and polarization metadata used when constructing incident field coefficients. Classes ------- .. autoapisummary:: yasfpy.initial_field.InitialField Module Contents --------------- .. py:class:: InitialField(beam_width, focal_point, field_type = 'gaussian', amplitude = 1, polar_angle = 0, azimuthal_angle = 0, polarization = 'TE') Represents an object with various parameters for a beam of light. .. py:attribute:: field_type :value: 'gaussian' .. py:attribute:: amplitude :value: 1 .. py:attribute:: polar_angle :value: 0 .. py:attribute:: azimuthal_angle :value: 0 .. py:attribute:: polarization :value: 'TE' .. py:attribute:: beam_width .. py:attribute:: focal_point .. py:attribute:: log .. py:method:: set_polarization(polarization) Update the incident-field polarization and refresh derived flags. :param polarization: New polarization value. Can be one of: - ``"TE"`` / ``1``: transverse electric - ``"TM"`` / ``2``: transverse magnetic - ``"UNP"`` / ``0``: unpolarized .. rubric:: Notes This method recomputes the internal polarization index and the normal-incidence flag.