
    ig                     R    S r SSKrSSKrSSKJr  SSKJr  SSKrS r	 " S S5      r
g)z
This code is refer from:
https://github.com/open-mmlab/mmocr/blob/main/mmocr/datasets/pipelines/textdet_targets/fcenet_targets.py
    N)fft)normc                 R    [        U 5      S:X  d   e[        U S   U S   S-   -  5      $ )N      r   :0yE>)lenabs)vecs    f/var/www/html/banglarbhumi/venv/lib/python3.13/site-packages/paddleocr/ppocr/data/imaug/fce_targets.pyvector_sloper      s.    s8q==s1vQ$'((    c                      ^  \ rS rSrSr      SU 4S jjrS rS rS rS r	S r
S	 rSS
 jrS rS rS rS rS rS rS\4S jrS rS rS rSrU =r$ )FCENetTargets   at  Generate the ground truth targets of FCENet: Fourier Contour Embedding
for Arbitrary-Shaped Text Detection.

[https://arxiv.org/abs/2104.10442]

Args:
    fourier_degree (int): The maximum Fourier transform degree k.
    resample_step (float): The step size for resampling the text center
        line (TCL). It's better not to exceed half of the minimum width.
    center_region_shrink_ratio (float): The shrink ratio of text center
        region.
    level_size_divisors (tuple(int)): The downsample ratio on each level.
    level_proportion_range (tuple(tuple(int))): The range of text sizes
        assigned to each level.
c                    > [         TU ]  5         [        U[        5      (       d   e[        U[        5      (       d   e[	        U5      [	        U5      :X  d   eXl        X l        X0l        X@l        XPl	        X`l
        g N)super__init__
isinstancetupler	   fourier_degreeresample_stepcenter_region_shrink_ratiolevel_size_divisorslevel_proportion_rangeorientation_thr)	selfr   r   r   r   r   r   kwargs	__class__s	           r   r   FCENetTargets.__init__0   sv     	-u55550%8888&'3/E+FFFF,**D'#6 &<#.r   c           	         UR                   S:  a   U[        USS9S-   R                  S5      -  nOU[        USS9S-   -  nUR                   S:  a   U[        USS9S-   R                  S5      -  nOU[        USS9S-   -  n[        R                  " [        R
                  " [        R                  " X4-  SS9SS5      5      $ )Nr   axisr   r#   r   g            ?)ndimr   reshapenparccosclipsum)r   vec1vec2	unit_vec1	unit_vec2s        r   vector_angleFCENetTargets.vector_angleF   s    99q=T 3d :CCGLLIT 3d :;I99q=T 3d :CCGLLIT 3d :;Iyy	(=B!GsSTTr   c                 B   UR                   S:X  d   eUR                  S   S:  d   eUR                  S   S:X  d   e[        U[        5      (       d   eUS:  d   e[	        [        U5      S-
  5       Vs/ s H  n[        XS-      X   -
  5      PM     nn[        U5      n[        R                  " S/U-   5      nU[        U5      S-   -  nSnUS   /n	[	        SU5       H  nX7-  n
US-   [        U5      :  a/  XUS-      :  a$  US-  nUS-   [        U5      :  a  XUS-      :  a  M$  XU   -
  nU[        U5      :  a    O0XU   -  nX   XS-      X   -
  U-  -   nU	R                  U5        M     U	R                  US   5        [        R                  " U	5      n	U	$ s  snf )zResample n points on a line.

Args:
    line (ndarray): The points composing a line.
    n (int): The resampled points number.

Returns:
    resampled_line (ndarray): The points composing the resampled line.
r   r   r   g        r   r#   )r(   shaper   intranger	   r   r-   r*   cumsumfloatappendarray)r   linenilength_listtotal_lengthlength_cumsumdelta_lengthcurrent_edge_indresampled_linecurrent_line_lencurrent_edge_end_shiftend_shift_ratiocurrent_points                 r   resample_lineFCENetTargets.resample_lineQ   s    yyA~~zz!}!!!zz!}!!!!S!!!!1uu<A#d)a-<PQ<PqtDQK$'12<PQ;'		3%+"56#uQx$7q'q!A / !1$s='99$6F6J(KK A%  !1$s='99$6F6J(KK &6FV8W%W"3{#334CS7TTO&1,-0FF!"" 
 !!-0' ( 	d2h'.1? Rs   5Fc                    UR                   S:X  d   eUR                  S   S:  d   eUR                  S   S:X  d   eU R                  XR                  5      u  p#X   X   pT[        R
                  " X/5      nUS   S:  a  [        U5      US'   XbS   US    nXcS   US   [        U5      -    n[        R                  " USS9[        R                  " USS9-
  n	U	S   S:  a  XpOXxpXEX4$ )a  Get the respective points composing head edge, tail edge, top
sideline and bottom sideline.

Args:
    points (ndarray): The points composing a text polygon.

Returns:
    head_edge (ndarray): The two points composing the head edge of text
        polygon.
    tail_edge (ndarray): The two points composing the tail edge of text
        polygon.
    top_sideline (ndarray): The points composing top curved sideline of
        text polygon.
    bot_sideline (ndarray): The points composing bottom curved sideline
        of text polygon.
r   r      r   r$   )r(   r5   find_head_tailr   r*   vstackr	   mean)r   points	head_inds	tail_inds	head_edge	tail_edge
pad_points	sideline1	sideline2sideline_mean_shifttop_sidelinebot_sidelines               r   reorder_poly_edgeFCENetTargets.reorder_poly_edge   s   $ {{a||A!###||A!####226;O;OP	%0&2C9YY/0
Q<!v;IaL|il;	|y|c&k/IK	 ggia82779ST;UUq!A%)2,)2,\??r   c                 `
   UR                   S:X  d   eUR                  S   S:  d   eUR                  S   S:X  d   e[        U[        5      (       d   e[	        U5      S:  Ga  [
        R                  " XS   /5      nUSS USS -
  n/ n/ n[        U5       H  u  pxUS-
  US-   4 V	s/ s H  o[	        U5      -  PM     n
n	XJ   n[
        R                  " U R                  X5      5      nU R                  US   US   5      nUR                  U5        UR                  U5        M     [
        R                  " U5      [
        R                  -  n[
        R                  " U5      [
        R                  -  n[
        R                  " USS9n[
        R                  " [        USS U-
  SS9[        USS U-
  SS95      nU[
        R                   " U5      -  n[
        R"                  " [	        U5      5      nSU-  S	U-  -   nUS
U-  -  n[	        U5      S-  S:X  a)  U[	        U5      S-  S-
  ==   S-  ss'   US==   S-  ss'   USU-  -  n[
        R$                  " UU/5      n[
        R"                  " [	        U5      [	        U5      S-
  45      n[
        R&                  " [	        U5      S-
  5      [        [	        U5      S-
  5      -  n	S[
        R(                  " S[
        R                  -  5      S-  -  [
        R*                  " [
        R,                  " U	S-
  S-  S5      * S-  5      -  nU[
        R                   " U5      -  n[/        [	        U5      5       H-  nUU   UUS-   U[	        U5      -   S-
   U-  S-  -   UUSS24'   M/     [
        R0                  " UR3                  5       UR                  5      u  nnUU-   S-   [	        U5      -  nUS-   [	        U5      -  nUS-   [	        U5      -  nUU:  a  UUnnUUnnUU/nUU/nUU4$ [5        US   US   -
  5      [5        US   US   -
  5      -   [5        US   US   -
  5      [5        US   US   -
  5      -   :  a  SS/SS//nSS/SS//n OSS/SS//nSS/SS//n [        UU S   S      UU S   S      -
  5      [        UU S   S      UU S   S      -
  5      -   n![        UUS   S      UUS   S      -
  5      [        UUS   S      UUS   S      -
  5      -   n"U!U"U-  :  a  US   nUS   nUU4$ U S   nU S   nUU4$ s  sn	f )a  Find the head edge and tail edge of a text polygon.

Args:
    points (ndarray): The points composing a text polygon.
    orientation_thr (float): The threshold for distinguishing between
        head edge and tail edge among the horizontal and vertical edges
        of a quadrangle.

Returns:
    head_inds (list): The indexes of two points composing head edge.
    tail_inds (list): The indexes of two points composing tail edge.
r   r   rL   r   Nr#   r$         ?g333333?gffffff?g?   r'          @333333?)r(   r5   r   r9   r	   r*   rN   	enumerater-   r2   r:   r;   pirO   maximumr   maxzerosconcatenatearangesqrtexppowerr7   unravel_indexargmaxr   )#r   rP   r   rU   edge_vec	theta_sumadjacent_vec_thetar>   	edge_vec1xadjacent_indadjacent_edge_vectemp_theta_sumtemp_adjacent_thetatheta_sum_scoreadjacent_theta_scorepoly_center	edge_dist
dist_scoreposition_scorescore	pad_scorescore_matrixgaussian
head_starttail_increment
tail_starthead_endtail_endrQ   rR   horizontal_edge_indsvertical_edge_indsvertical_len_sumhorizontal_len_sums#                                      r   rM   FCENetTargets.find_head_tail   s    {{a||A!###||A!###/51111v;?F1I#67J!!"~
3B7HI!# )( 3<=E1q5>J>aCM 1>J$,$:!!#(9(9)(W!X&*&7&7%a(*;A*>'#   0"))*=> !4 !hhy1BEE9O#%88,>#?"%%#G ''&q1K

Z^k1;Z_{2<I #RVVI%66JXXc(m4N/)D3G,GGETJ&&E6{Q!#E
a! 35:5r"a'"S>))Eu~6I88SZUa$@AL		#e*q.)E#e*q.,AAA773;'#-/&&"((AGs?C881<=> 
  "&&"22H3u:&!HQ1s5z>A+=?(JSPQ QT" ' *,)9)9##%|'9'9*&J %~59S[HJ"Q#f+5H"Q#f+5H(")3ZJ
%-x(#X.I#X.I> )##; F1Iq	12\q	F1I%6 VAY23lq	F1I%7 
 *+AA'7$'(!fq!f%5")*AA'7$'(!fq!f%5"#)!,Q/06:LQ:OPQ:R3SS )!,Q/06:LQ:OPQ:R3SS 
 "&+A.q12V<PQR<STU<V5WW"+A.q12V<PQR<STU<V5WW"  "4"FF03	03	
 )## /q1	.q1	)##a  Ks   )T+c           
         UR                   UR                   s=:X  a  S:X  d   e   eUR                  S   UR                  S   s=:X  a  S:X  d   e   eUR                  S   S:  d   eUR                  S   S:  d   e[        U[        5      (       d   e[	        [        [        U5      S-
  5       Vs/ s H  n[        XS-      X   -
  5      PM     sn5      n[	        [        [        U5      S-
  5       Vs/ s H  n[        X$S-      X$   -
  5      PM     sn5      nXV-   S-  n[        [        [        U5      U-  5      S5      nU R                  X5      n	U R                  X(5      n
X4$ s  snf s  snf )a  Resample two sidelines to be of the same points number according to
step size.

Args:
    sideline1 (ndarray): The points composing a sideline of a text
        polygon.
    sideline2 (ndarray): The points composing another sideline of a
        text polygon.
    resample_step (float): The resampled step size.

Returns:
    resampled_line1 (ndarray): The resampled line 1.
    resampled_line2 (ndarray): The resampled line 2.
r   r   r   )r(   r5   r   r9   r-   r7   r	   r   re   r6   rI   )r   rV   rW   r   r>   length1length2r@   resample_point_numresampled_line1resampled_line2s              r   resample_sidelines FCENetTargets.resample_sidelines  ss     ~~4144444q!Y__Q%7<1<<<<<q!Q&&&q!Q&&&-////<A#i.STBT<UV<UqT)E"Y\12<UV
 <A#i.STBT<UV<UqT)E"Y\12<UV
  )Q. U<%8=%H!I1M,,YK,,YK// W Ws   2E)6E.c                    [        U[        5      (       d   eUu  p4[        R                  " X44[        R                  5      n/ nU GH  nUR                  SS5      nU R                  U5      u    pnU R                  XU R                  5      u  pUSSS2   n[        U5      [        U5      :w  a  Mk  X-   S-  n[        US   US   -
  5      S-  n[        US   US   -
  5      S-  n[        XR                  -  5      n[        UU R                  -  5      n[        U5      UU-   S-   :  a3  UU[        U5      U-
   nUU[        U5      U-
   nUU[        U5      U-
   n[        S[        U5      S-
  5       H  nUU   UU   UU   -
  U R                  -  -   nUUS-      UUS-      UUS-      -
  U R                  -  -   nUUS-      UUS-      UUS-      -
  U R                  -  -   nUU   UU   UU   -
  U R                  -  -   n[        R                  " UUUU/5      R                  [        R                   5      nUR#                  U5        M     GM     [$        R&                  " XVS5        U$ )zGenerate text center region mask.

Args:
    img_size (tuple): The image size of (height, width).
    text_polys (list[list[ndarray]]): The list of text polygons.

Returns:
    center_region_mask (ndarray): The text center region mask.
r#   r   Nr         @r   )r   r   r*   rf   uint8r)   r[   r   r   r	   r   r6   r7   r   rN   astypeint32r:   cv2fillPoly)r   img_size
text_polyshwcenter_region_maskcenter_region_boxespolypolygon_points_top_linebot_lineresampled_top_lineresampled_bot_linecenter_lineline_head_shrink_lenline_tail_shrink_lenhead_shrink_numtail_shrink_numr>   tltrbrblcurrent_center_boxs                            r   generate_center_region_mask)FCENetTargets.generate_center_region_mask;  s    (E**** XXqfbhh7 D!\\"a0N'+'='=n'M$AqH595L5LD$6$662 "4DbD!9%&#.@*AA-BaGK '*-?-BBCcI ! '+.@.DDEK ! ""6:L:L"LMO!"6$:L:L"LMO;/O"Ca"GG)#c+&6&H &8#c*<&=&O&" &8#c*<&=&O&" 1c+.23N)!,{1~=5566   A&)!a%0;q1u3EE5566   A&)!a%0;q1u3EE5566   N)!,{1~=5566 
 &(YYBB/?%@%G%G%Q"#**+=>- 4? n 	'a@!!r   c                    / n[        [        U5      5       HU  nX   nU[        U5      S-
  :X  a  US   nOXS-      nUR                  US   US   -
  S-  US   US   -
  S-  -   S-  5        MW     [        U5      n[        R
                  " U5      US-   -  U-  nUR                  [        R                  5      n/ n	[        [        U5      5       Hc  nX   n
X   nU[        U5      S-
  :X  a  US   nOXS-      nU
S:X  a  M2  Xe-
  U
-  n[        U
5       H  nX[U-  -   nU	R                  U5        M     Me     [        R
                  " U	5      $ )zResample one polygon with n points on its boundary.

Args:
    polygon (list[float]): The input polygon.
    n (int): The number of resampled points.
Returns:
    resampled_polygon (list[float]): The resampled polygon.
r   r   r   r^   r   )r7   r	   r:   r-   r*   r;   r   r   )r   polygonr=   lengthr>   p1p2r@   n_on_each_linenew_polygonnumdxdyjpoints                 r   resample_polygonFCENetTargets.resample_polygon  sU    s7|$ABCL1$$QZU^MMBqEBqEMa/2a52a5=Q2FF3NO % 6{((6*lT.ABaG'..rxx8s7|$A #CBCL1$$QZU^axGs?D3ZAX""5)   %  xx$$r   c                    XR                  SS9-
  n[        R                  " USS2S4   5      nUSS2S4   n[        R                  " U5      n[        R                  " XESS    5      nXV   n[        R
                  " XS USU /5      nU$ )zNormalize one polygon so that its start point is at right most.

Args:
    polygon (list[float]): The origin polygon.
Returns:
    new_polygon (lost[float]): The polygon with start point at right.
r   r$   Nr      )rO   r*   r
   argsortargminrg   )	r   r   temp_polygonrr   yindex_xindex_yindexr   s	            r   normalize_polygonFCENetTargets.normalize_polygon  s     1!55FF<1%&A**Q-))AbqkN+ nngfowv%GHr   c                     USS2S4   USS2S4   S-  -   n[        U5      [        U5      -  n[        R                  " XB* S USUS-    45      nU$ )zPerform Fourier transformation to generate Fourier coefficients ck
from polygon.

Args:
    polygon (ndarray): An input polygon.
    fourier_degree (int): The maximum Fourier degree K.
Returns:
    c (ndarray(complex)): Fourier coefficients.
Nr   r   y              ?)r   r	   r*   hstack)r   r   r   rP   c_fftcs         r   poly2fourierFCENetTargets.poly2fourier  sb     AA!33Fc&k)IIu_-.6J8J0KLMr   c                 z   [         R                  " XS-      5      [         R                  " XS-
     5      :  a  U$ [         R                  " XS-      5      [         R                  " XS-
     5      :  a  USSS2   $ [         R                  " XS-      5      [         R                  " XS-
     5      :  a  U$ USSS2   $ )zMake sure the polygon reconstructed from Fourier coefficients c in
the clockwise direction.

Args:
    polygon (list[float]): The origin polygon.
Returns:
    new_polygon (lost[float]): The polygon in clockwise point order.
r   Nr#   r   )r*   r
   )r   r   r   s      r   	clockwiseFCENetTargets.clockwise  s     66!Q&'(266!Q4F2G+HHHVVAq()*RVVAq6H4I-JJTrT7Nvva*+,rvva8J6K/LL2wr   c                 P   U R                  U5      nU R                  U5      nU R                  X25      nU R                  XB5      n[        R
                  " U5      R                  S5      n[        R                  " U5      R                  S5      n[        R                  " XV/5      nU$ )a/  Calculate Fourier signature from input polygon.

Args:
      polygon (ndarray): The input polygon.
      fourier_degree (int): The maximum Fourier degree K.
Returns:
      fourier_signature (ndarray): An array shaped (2k+1, 2) containing
          real part and image part of 2k+1 Fourier coefficients.
r&   )	r   r   r   r   r*   realr)   imagr   )r   r   r   resampled_polygonfourier_coeff	real_part
image_partfourier_signatures           r   cal_fourier_signature#FCENetTargets.cal_fourier_signature  s     !11': 223DE))*;L}EGGM*227;	WW]+33G<
IIy&=>  r   c           	         [        U[        5      (       d   eUu  p4U R                  n[        R                  " US-  S-   X44[        R
                  S9n[        R                  " US-  S-   X44[        R
                  S9nU GH  n[        R                  " X44[        R                  S9n	[        R                  " U5      R                  S5      n
[        R                  " XR                  [        R                  5      S5        U R                  U
S   U5      n[        U* US-   5       H  nUS:w  aZ  XX-   S4   -  SU	-
  XlU-   SS2SS24   -  -   XlU-   SS2SS24'   XX-   S4   -  SU	-
  X|U-   SS2SS24   -  -   X|U-   SS2SS24'   Mc  [        R                  " U	S:  5      n[        R                   " [#        U5      [        R$                  S9U-  nUSS2S4   USS2S4   nnXS4   U-
  XnUU4'   XS4   U-
  X~UU4'   M     GM     Xg4$ )aH  Generate Fourier coefficient maps.

Args:
    img_size (tuple): The image size of (height, width).
    text_polys (list[list[ndarray]]): The list of text polygons.

Returns:
    fourier_real_map (ndarray): The Fourier coefficient real part maps.
    fourier_image_map (ndarray): The Fourier coefficient image part
        maps.
r   r   dtyper   r#   r   r   Nr^   )r   r   r   r*   rf   float32r   r;   r)   r   r   r   r   r   r7   argwhereonesr	   int64)r   r   r   r   r   kreal_mapimag_mapr   maskr   r   r>   yxk_indr   rr   s                    r   generate_fourier_maps#FCENetTargets.generate_fourier_maps  s    (E****88QUQY-RZZ@88QUQY-RZZ@D88QF"((3Dhhtn,,Z8GLL~~bhh7; 66wqz1EMA2q1u%6QUAX66t8xAq!'<<= UAq[)
 QUAX66t8xAq!'<<= UAq[)
 TCZ0BGGSWRXX>BEad8R1XqA,9Q$,?!,CHAq[),9Q$,?!,CHAq[) & , !!r   c                 (   [        U[        5      (       d   eUu  p4[        R                  " X44[        R                  S9nU HL  n[        R
                  " U[        R                  S9R                  S5      n[        R                  " XWS5        MN     U$ )zGenerate text center region mask and geometry attribute maps.

Args:
    img_size (tuple): The image size (height, width).
    text_polys (list[list[ndarray]]): The list of text polygons.

Returns:
    text_region_mask (ndarray): The text region mask.
r   r   r   )
r   r   r*   rf   r   r;   r   r)   r   r   )r   r   r   r   r   text_region_maskr   r   s           r   generate_text_region_mask'FCENetTargets.generate_text_region_mask'  su     (E****88QF"((;Dhht2884<<ZHGLL)A6   r   	mask_sizec                    [         R                  " U[         R                  S9nU HZ  nUR                  SS5      R	                  [         R
                  5      R                  SSS5      n[        R                  " X5S5        M\     U$ )a  Generate effective mask by setting the ineffective regions to 0 and
effective regions to 1.

Args:
    mask_size (tuple): The mask size.
    polygons_ignore (list[[ndarray]]: The list of ignored text
        polygons.

Returns:
    mask (ndarray): The effective mask of (height, width).
r   r#   r   r   r   )r*   r   r   r)   r   r   r   r   )r   r   polygons_ignorer   r   instances         r   generate_effective_mask%FCENetTargets.generate_effective_mask=  se     wwy1#D||B*11"((;CCAr1MHLL+ $ r   c                    Uu  pEU R                   nU R                  n[        [        U5      5       Vs/ s H  n/ PM     n	n[        [        U5      5       Vs/ s H  n/ PM     n
n/ nU H  n[        R
                  " U[        R                  S9R                  S5      n[        R                  " U5      u    pn[        UU5      US-   -  n[        U5       H8  u  nnUS   Us=:  a  US   :  d  M  O  M  U	U   R                  XU   -  5        M:     M     U H  n[        R
                  " U[        R                  S9R                  S5      n[        R                  " U5      u    pn[        UU5      US-   -  n[        U5       H9  u  nnUS   Us=:  a  US   :  d  M  O  M  U
U   R                  UUU   -  5        M;     M     [        U5       H  u  nn/ nUU-  UU-  4nU R                  UU	U   5      S   nUR                  U5        U R                  UU	U   5      S   nUR                  U5        U R                  UU
U   5      S   nUR                  U5        U R!                  UU	U   5      u  nnUR                  U5        UR                  U5        UR                  [        R"                  " U5      5        M     U$ s  snf s  snf )a>  Generate ground truth target on each level.

Args:
    img_size (list[int]): Shape of input image.
    text_polys (list[list[ndarray]]): A list of ground truth polygons.
    ignore_polys (list[list[ndarray]]): A list of ignored polygons.
Returns:
    level_maps (list(ndarray)): A list of ground target on each level.
r   r   r   r   r   N)r   r   r7   r	   r*   r;   r   r)   r   boundingRectre   rb   r:   r   r   r   r   rg   )r   r   r   ignore_polysr   r   lv_size_divslv_proportion_ranger>   lv_text_polyslv_ignore_polys
level_mapsr   r   r   box_wbox_h
proportionindproportion_rangeignore_polysize_divisorcurrent_level_mapslevel_img_sizetext_regioncenter_regioneffective_maskfourier_real_mapfourier_image_mapss                                r   generate_level_targets$FCENetTargets.generate_level_targetsR  s    //"99%*3|+<%=>%=%=>',S->'?@'?!2'?@
Dhht2884<<ZHG!$!1!1'!:AqUE*a$h7J)23F)G%%#A&I6Fq6III!#&--d#5F.FG *H  (Khh{"((;CCJOG!$!1!1'!:AqUE*a$h7J)23F)G%%#A&I6Fq6III#C(//l3>O0OP *H ( "+<!8C!#</l1BCN88c 2K %%k2 <<c 2M %%m4!99 4N %%n5373M3Mc 2400 %%&67%%&89bnn-?@A3 "96 a ?@s   KKc                 p   [        U[        5      (       d   eUS   nUS   nUS   nUR                  u  pVn/ n/ n	[        XC5       H.  u  pU
SL a  U	R	                  U5        M  UR	                  U5        M0     U R                  XV4X5      nUS   US   US   S.nUR                  5        H	  u  pXU'   M     U$ )	zGenerate the ground truth targets for FCENet.

Args:
    results (dict): The input result dictionary.

Returns:
    results (dict): The output result dictionary.
imagepolysignore_tagsTr   r   r   )p3_mapsp4_mapsp5_maps)r   dictr5   zipr:   r  items)r   resultsr  polygonsr  r   r   r   polygon_maskspolygon_masks_ignoretagr   r   mappingkeyvalues                   r   generate_targetsFCENetTargets.generate_targets  s     '4(((( 7#m,++a!6LCd{$++G4$$W-	 7 00FM


 "!}!!}!!}

 "--/JC CL * r   c                 (    U R                  U5      nU$ r   )r"  )r   r  s     r   __call__FCENetTargets.__call__  s    ''0r   )r   r   r   r   r   r   )   r   ra   )r          ))r   g      ?)g?g?)g?r'   r`   )i  )__name__
__module____qualname____firstlineno____doc__r   r2   rI   r[   rM   r   r   r   r   r   r   r   r   r   r   r   r  r"  r%  __static_attributes____classcell__)r    s   @r   r   r      s    $ #&'D/,	U0d%@Nj$X#0JK"Z(%T"&!,*"X , *=~$L r   r   )r.  r   numpyr*   	numpy.fftr   numpy.linalgr   sysr   r    r   r   <module>r6     s,   
     
)
Z
 Z
r   