+
    i                        R t ^ RIHt ^ RIHt ^ RIHtHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHt ^R	IHt  ! R
 R]4      tR# )zG
Unit system for physical quantities; include definition of constants.
)annotations)Add)
DerivativeFunction)Mul)Pow)S)_QuantityMapperQuantity)	Dimensionc                    a  ] tR t^t$ Rt/ tR]R&   RRRR/ 3R V 3R llltR tR	 t	RRRR/ 3R
 R llt
R tV 3R ltV 3R lt]R 4       t]R 4       t]R 4       t]R 4       t]R R l4       tR tR tR R ltRtV ;t# )
UnitSystemz
UnitSystem represents a coherent set of units.

A unit system is basically a dimension system with notions of scales. Many
of the methods are defined in the same way.

It is much better if all base units have a symbol.
zdict[str, UnitSystem]_unit_systems Nc                   V ^8  d   QhRR/#    derived_unitsdict[Dimension, Quantity] )formats   "\/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/physics/units/unitsystem.py__annotate__UnitSystem.__annotate__   s      f     c                	   < V \         P                  V&   W0n        W@n        Wn        WPn        \        \        V4      \        V4      ,          4      V n        \        V4      V n        W`n	        \        SV `-  4        R # N)r   r   namedescr_base_units_dimension_systemtupleset_units_derived_unitssuper__init__)self
base_unitsunitsr   r   dimension_systemr   	__class__s   &&&&&&&r   r'   UnitSystem.__init__   s`    )-
  &	
%!1C
Oc%j89 ,+r   c                    V P                   R8w  d   V P                   # RRP                  R V P                   4       4      ,          # )zz
Return the name of the system.

If it does not exist, then it makes a list of symbols (or names) of
the base dimensions.
r   zUnitSystem((%s)), c              3  8   "   T F  p\        V4      x  K  	  R # 5ir   )str).0ds   & r   	<genexpr>%UnitSystem.__str__.<locals>.<genexpr>7   s      22 01A 0s   )r   joinr    r(   s   &r   __str__UnitSystem.__str__,   sD     99?99%		 22 $ 0 022 )2 2 2r   c                	:    R \        V P                  4      ,          # )z<UnitSystem: %s>)reprr    r7   s   &r   __repr__UnitSystem.__repr__:   s    !D)9)9$:::r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r   =   s     v vd} vr   c           	         V P                   \        V4      ,           pV P                  \        V4      ,           p\        WW4V/ V P                  CVC4      # )zExtend the current system into a new one.

Take the base and normal units of the current system to merge
them to the base and normal units given in argument.
If not provided, name and description are overridden by empty strings.
)r    r"   r$   r   r%   )r(   baser*   r   descriptionr+   r   s   &&&&&&&r   extendUnitSystem.extend=   sN     %+-eEl*$t:JLttObObLtfsLtuur   c                	    V P                   # r   )r!   r7   s   &r   get_dimension_systemUnitSystem.get_dimension_systemJ   s    %%%r   c                	r   < V P                  4       P                  pW9   d	   W!,          # \        SV `  V4      # r   )rE   _quantity_dimension_mapr&   get_quantity_dimension)r(   unitqdmr,   s   && r   rI   !UnitSystem.get_quantity_dimensionM   s4    '')AA;9w-d33r   c                	r   < V P                  4       P                  pW9   d	   W!,          # \        SV `  V4      # r   )rE   _quantity_scale_factorsr&   get_quantity_scale_factor)r(   rJ   qsfmr,   s   && r   rO   $UnitSystem.get_quantity_scale_factorS   s4    ((*BB<:w066r   c           	     	
   \        V \        4      '       d   V # V \        P                  9  dA   \        R P	                  RP                  \        \        P                  4      4      4      4      h\        P                  V ,          # )zDUnit system is not supported. Currentlysupported unit systems are {}r/   )
isinstancer   r   
ValueErrorr   r6   sorted)unit_systems   &r   get_unit_systemUnitSystem.get_unit_systemY   si    k:..j666006IIfZ%=%=>?1  ''44r   c                 	0    \         P                  R ,          # )SI)r   r   r   r   r   get_default_unit_system"UnitSystem.get_default_unit_systemh   s    ''--r   c                ,    \        V P                  4      # )zZ
Give the dimension of the system.

That is return the number of units forming the basis.
)lenr    r7   s   &r   dimUnitSystem.diml   s     4##$$r   c                6    V P                  4       P                  # )z9
Check if the underlying dimension system is consistent.
)rE   is_consistentr7   s   &r   rb   UnitSystem.is_consistentu   s     ((*888r   c                   V ^8  d   QhRR/# )r   returnr   r   )r   s   "r   r   r   ~   s     # #8 #r   c                	    V P                   # r   )r%   r7   s   &r   r   UnitSystem.derived_units}   s    """r   c                	   ^ RI Hp \        V\        4      '       d2   \        VP                   Uu. uF  q0P                  V4      NK  	  up!  # \        V\        4      '       d-   V P                  VP                  4      VP                  ,          # \        V\        4      '       d#   V P                  VP                  ^ ,          4      # \        V\        4      '       dQ   V P                  VP                  4      pVP                   F#  w  rVW@P                  V4      V,          ,          pK%  	  V# \        V\        4      '       d   VP                   Uu. uF  qpP                  V4      NK  	  pp\        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       d   \        P                   # VP"                  ! V!  # \        W4      '       d   V P%                  V4      P&                  # \        P                   # u upi u upi )    r
   c              3  *   "   T F	  q^8H  x  K  	  R# 5i)   Nr   )r2   is   & r   r4   2UnitSystem.get_dimensional_expr.<locals>.<genexpr>   s     (4a64s   FT)sympy.physics.unitsr   rS   r   argsget_dimensional_exprr   r@   expr   r   exprvariable_countr   allr   OnefuncrI   r   )	r(   rr   r   rl   r_   independentcountargro   s	   &&       r   rp   UnitSystem.get_dimensional_expr   sy   0dC  tyyIy!2215yIJJc"",,TYY7488CCc"",,TYYq\::j))++DII6C&*&9&9"00=uDD ':Jh''>BiiHis--c2iDHs(4(sss(4(((uu99d##''..t4999uu# J Is   HHc                t   ^ RI Hp \        W4      '       d   VP                  VP                  3# \        V\
        4      '       dG   ^p\        ^4      pVP                   F&  pV P                  V4      w  rgW6,          pWG,          pK(  	  W43# \        V\        4      '       dy   V P                  VP                  4      w  r8V P                  VP                  4      w  rV P                  4       P                  V
4      '       d   ^p
W9,          WV
,          ,          3# \        V\        4      '       d   V P                  VP                  ^ ,          4      w  r8VP                  R,           F^  pV P                  V4      w  rV P                  4       P                  W4      '       g   \!        RP#                  WV4      4      hW<,          pK`  	  W83# \        V\$        4      '       dq   V P                  VP                  ^ ,          4      w  r8VP&                   F9  w  rV P                  V4      w  ppVVV,          ,          pVVV,          ,          pK;  	  W83# \        V\(        4      '       d   VP                   Uu. uF  qPP                  V4      NK  	  ppV Uu. uFC  pV P                  4       P                  V^,          4      '       d   \        ^4      MV^,          NKE  	  ppVP*                  ! R V 4       !  .VO5# \        V\        4      '       d   \,        P.                  V3# V\        ^4      3# u upi u upi )zE
Return tuple with scale factor expression and dimension expression.
r
   :rk   NNz,Dimension of "{}" is {}, but it should be {}c              3  2   "   T F  q^ ,          x  K  	  R# 5i)ri   Nr   )r2   fs   & r   r4   ;UnitSystem._collect_factor_and_dimension.<locals>.<genexpr>   s     2c!cs   )rn   r   rS   scale_factor	dimensionr   r   ro   _collect_factor_and_dimensionr   r@   rq   rE   is_dimensionlessr   equivalent_dimsrT   r   r   rs   r   rv   r   ru   )r(   rr   r   factorr   ry   
arg_factorarg_dimr_   
exp_factorexp_dimaddendaddend_factor
addend_dimrw   rx   ifactoridimfdsr3   dimss   &&                   r   r   (UnitSystem._collect_factor_and_dimension   s    	1d%%$$dnn44c""F!!Iyy&*&H&H&M#
$$	 ! $$c""<<TYYGKF"&"D"DTXX"NJ((*;;GDD'g1E)FFFc""<<TYYq\JKF))B--66v> *002BB3SS$..4f"/56 6 ' ( ;j))<<TYYq\JKF&*&9&9" $ B B; O'5.(tU{" ': ;h''FJiiPis55c:iCPjmnjmefD$=$=$?$P$PQRSTQU$V$VIaL\]^_\``jmDnII2c23;d;;i((55$;1%% Qns   6L00L5L5c                   V ^8  d   QhRR/# )r   re   zset[Quantity]r   )r   s   "r   r   r      s     d d dr   c                B    \        \        R V P                  4      4      # )z;
Return the units of the system that do not have a prefix.
c                V    V P                   '       * ;'       d    V P                  '       * # r   )is_prefixedis_physical_constant)us   &r   <lambda>3UnitSystem.get_units_non_prefixed.<locals>.<lambda>   s    $5$T$Ta>T>T:T$Tr   )r#   filterr$   r7   s   &r   get_units_non_prefixed!UnitSystem.get_units_non_prefixed   s     6TVZVaVabccr   )r    r%   r!   r$   r   r   r   )__name__
__module____qualname____firstlineno____doc__r   __annotations__r'   r8   r<   rB   rE   rI   rO   staticmethodrW   r[   propertyr_   rb   r   rp   r   r   __static_attributes____classcell__)r,   s   @r   r   r      s     ,.M(-)+"BQU  AC  2; "$""t  A v&47 5 5 . . % % 9 9 # #,/&bd dr   r   N)r   
__future__r   sympy.core.addr   sympy.core.functionr   r   sympy.core.mulr   sympy.core.powerr   sympy.core.singletonr   sympy.physics.units.dimensionsr	   sympy.physics.units.quantitiesr   
dimensionsr   r   r   r   r   <module>r      s7    #  6    " : 3 !{d {dr   