larvaworld.lib.util.naming ========================== .. py:module:: larvaworld.lib.util.naming .. autoapi-nested-parse:: Class managing parameter naming Classes ------- .. autoapisummary:: larvaworld.lib.util.naming.NamingRegistry Module Contents --------------- .. py:class:: NamingRegistry(*args: Any, **kwargs: Any) Bases: :py:obj:`larvaworld.lib.util.dictsNlists.AttrDict` Registry for systematic parameter naming and LaTeX formatting. Provides dynamic attribute-based naming functions for scientific parameters, supporting prefixes, suffixes, separators, and LaTeX math notation. Used throughout larvaworld for consistent parameter naming conventions. The registry supports: - Dynamic naming with prefixes (e.g., 'final_', 'initial_') - Parameter name expansions (e.g., 'vel' → 'velocity') - XY coordinate generation for body points - Midline and contour point naming - LaTeX math formatting via TexNaming Attributes: k_pref: List of supported prefix keywords k_pairs: Dictionary mapping short names to full names tex: TexNaming instance for LaTeX formatting Example: >>> nam = NamingRegistry() >>> nam.vel('x') # velocity naming 'velocity_x' >>> nam.final('position') # prefix naming 'final_position' >>> nam.xy('head') # XY coordinates ['head_x', 'head_y'] >>> nam.midline(3) # body points ['head', 'point2', 'tail'] .. py:attribute:: k_pref :value: ['final', 'initial', 'cum', 'lin', 'scal', 'abs', 'dst_to', 'bearing_to', 'non'] .. py:attribute:: k_pairs .. py:attribute:: tex .. py:method:: get_kws(k: str) -> dict .. py:method:: get_func(k: str) .. py:method:: num(chunk: str) -> str .. py:method:: xy(points, flat: bool = False, xsNys: bool = False) .. py:method:: chunk_track(chunk_name: str, params: str) .. py:method:: contour(Nc: int) .. py:method:: midline(N: int, type: str = 'point', reverse: bool = False) .. py:method:: contour_xy(Nc: int, flat: bool = False, xsNys: bool = False) .. py:method:: midline_xy(N: int, reverse: bool = False, flat: bool = False, xsNys: bool = False) .. py:property:: centroid_xy .. py:property:: traj_xy .. py:method:: at(p: str, t: str) -> str .. py:method:: atStartStopChunk(p: str, chunk: str) .. py:property:: on_food .. py:property:: off_food