<commit_before># -*- coding:Utf-8 -*-
import numpy as np
import pylayers.antprop.antenna as ant
import pdb
r"""

.. currentmodule:: pylayers.antprop.array

This module handles antenna arrays

"""
class AntSet(object):
    """ Antenna Set
    """

    def __init__(self):
        defaults = {'Na'   : 8,
                    'A'    : []
                   }

class AntArray(AntSet,Antenna):
    """
    """

    def __init__(self,**kwargs):
        defaults = {'typ': 'UA',
                    'N'   : [8,1,1],
                    'dm'   :[0.075,0,0],
                    'A'    : []
                   }

        for k in defaults:
            if k not in kwargs:
                kwargs[k]=defaults[k]

        self.typ = kwargs['typ']
        self.N   = np.array(kwargs['N'])
        self.dm  = np.array(kwargs['dm'])

        if kwargs['A']<>[]:
            self.A   = kwargs['A']
        else:
            self.A   = ant.Antenna('Omni')


    def __repr__(self):
         st = "Antenna Array : \n"
         st = st + 'typ : '+self.typ+'\n'
         st = st + 'N : '+str(self.N)+'\n'
         st = st + 'dm : '+str(self.dm)+'\n'
         return(st)
<commit_msg>array<commit_after># -*- coding:Utf-8 -*-
import numpy as np
import pylayers.antprop.antenna as ant
import pdb
r"""

.. currentmodule:: pylayers.antprop.array

This module handles antenna arrays

"""
class Array(object):
    """ Array class
    """

    def __init__(self):
        defaults = {'Na'   : 8,
                    'A'    : []
                   }

class ULArray(Array):
    """ Uniform Linear Array
    """
    pass

class AntArray(Array,Antenna):
    """ Anenna Array
    """

    def __init__(self,**kwargs):
        defaults = {'typ': 'UA',
                    'N'   : [8,1,1],
                    'dm'   :[0.075,0,0],
                    'A'    : []
                   }

        for k in defaults:
            if k not in kwargs:
                kwargs[k]=defaults[k]

        self.typ = kwargs['typ']
        self.N   = np.array(kwargs['N'])
        self.dm  = np.array(kwargs['dm'])

        if kwargs['A']<>[]:
            self.A   = kwargs['A']
        else:
            self.A   = ant.Antenna('Omni')


    def __repr__(self):
         st = "Antenna Array : \n"
         st = st + 'typ : '+self.typ+'\n'
         st = st + 'N : '+str(self.N)+'\n'
         st = st + 'dm : '+str(self.dm)+'\n'
         return(st)

{'fraction_non_alphanumeric': 0.16903171953255425, 'fraction_numerical': 0.009181969949916527, 'mean_word_length': 1.4261133603238867, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7119340', 'n_tokens_mistral': 838, 'n_tokens_neox': 787, 'n_words': 176}