spateo.tdr.models.models_migration.morphofield_model ==================================================== .. py:module:: spateo.tdr.models.models_migration.morphofield_model Functions --------- .. autoapisummary:: spateo.tdr.models.models_migration.morphofield_model.construct_field spateo.tdr.models.models_migration.morphofield_model.construct_field_streams spateo.tdr.models.models_migration.morphofield_model.construct_field_plain Module Contents --------------- .. py:function:: construct_field(model: pyvista.PolyData, vf_key: str = 'VecFld_morpho', arrows_scale_key: Optional[str] = None, n_sampling: Optional[Union[int, numpy.ndarray]] = None, sampling_method: str = 'trn', factor: float = 1.0, key_added: str = 'v_arrows', label: Union[str, list, numpy.ndarray] = 'vector field', color: Union[str, list, dict, numpy.ndarray] = 'gainsboro', alpha: float = 1.0, **kwargs) -> Tuple[pyvista.PolyData, Optional[str]] Create a 3D vector field arrows model. :param model: A model that provides coordinate information and vector information for constructing vector field models. :param vf_key: The key under which are the vector information. :param arrows_scale_key: The key under which are scale factor of the entire object. :param n_sampling: n_sampling is the number of coordinates to keep after sampling. If there are too many coordinates in start_points, the generated arrows model will be too complex and unsightly, so sampling is used to reduce the number of coordinates. :param sampling_method: The method to sample data points, can be one of ``['trn', 'kmeans', 'random']``. :param factor: Scale factor applied to scaling array. :param key_added: The key under which to add the labels. :param label: The label of arrows models. :param color: Color to use for plotting model. :param alpha: The opacity of the color to use for plotting model. :param \*\*kwargs: Additional parameters that will be passed to ``construct_arrows`` function. :returns: A 3D vector field arrows model. plot_cmap: Recommended colormap parameter values for plotting. .. py:function:: construct_field_streams(model: pyvista.PolyData, vf_key: str = 'VecFld_morpho', source_center: Optional[Tuple[float]] = None, source_radius: Optional[float] = None, tip_factor: Union[int, float] = 10, tip_radius: float = 0.2, key_added: str = 'v_streams', label: Union[str, list, numpy.ndarray] = 'vector field', stream_color: str = 'gainsboro', tip_color: str = 'orangered', alpha: float = 1.0, **kwargs) Integrate a vector field to generate streamlines. :param model: A model that provides coordinate information and vector information for constructing vector field models. :param vf_key: The key under which are the active vector field information. :param source_center: Length 3 tuple of floats defining the center of the source particles. Defaults to the center of the dataset. :param source_radius: Float radius of the source particle cloud. Defaults to one-tenth of the diagonal of the dataset’s spatial extent. :param tip_factor: Scale factor applied to scaling the tips. :param tip_radius: Radius of the tips. :param key_added: The key under which to add the labels. :param label: The label of arrows models. :param stream_color: Color to use for plotting streamlines. :param tip_color: Color to use for plotting tips. :param alpha: The opacity of the color to use for plotting model. :param \*\*kwargs: Additional parameters that will be passed to ``streamlines`` function. :returns: 3D vector field streamlines model. src: The source particles as pyvista.PolyData as well as the streamlines. plot_cmap: Recommended colormap parameter values for plotting. :rtype: streams_model .. py:function:: construct_field_plain(model: pyvista.PolyData, vf_key: str = 'VecFld_morpho', n_sampling: Optional[Union[int, numpy.ndarray]] = None, sampling_method: str = 'trn', factor: float = 1.0, key_added: str = 'v_arrows', label: Union[str, list, numpy.ndarray] = 'vector field', color: Union[str, list, dict, numpy.ndarray] = 'gainsboro', alpha: float = 1.0, tip_factor: Union[int, float] = 5, tip_radius: float = 0.2, **kwargs) -> Tuple[pyvista.PolyData, Optional[str]] Create a 3D vector field arrows model with plain lines. :param model: A model that provides coordinate information and vector information for constructing vector field models. :param vf_key: The key under which are the active vector field information. :param n_sampling: n_sampling is the number of coordinates to keep after sampling. If there are too many coordinates in start_points, the generated arrows model will be too complex and unsightly, so sampling is used to reduce the number of coordinates. :param sampling_method: The method to sample data points, can be one of ``['trn', 'kmeans', 'random']``. :param factor: Scale factor applied to scaling array. :param key_added: The key under which to add the labels. :param label: The label of vector field model. :param color: Color to use for plotting model. :param alpha: The opacity of the color to use for plotting model. :param tip_factor: Scale factor applied to scaling the tips. :param tip_radius: Radius of the tips. :param \*\*kwargs: Additional parameters that will be passed to ``construct_arrows`` function. :returns: 3D vector field model with arrows and lines. plot_cmap: Recommended colormap parameter values for plotting. :rtype: lines_model