<commit_before>#-------------------------------------------------------------------------------
# Name:        clutter_gabella_example
# Purpose:
#
# Author:      <NAME>
#
# Created:     26.10.2011
# Copyright:   (c) <NAME> 2011
# Licence:     The MIT License
#-------------------------------------------------------------------------------
#!/usr/bin/env python
import wradlib.vis as vis
import wradlib.clutter as clutter
import os
import pylab as pl
# just making sure that the plots immediately pop up
pl.interactive(True)

def ex_clutter_gabella():
    # load the example data
    import numpy as np
    # Todo: link right data set
    testdata = np.loadtxt(os.path.dirname(__file__) + '/' + 'data/polar_dBZ.dat')

    # calculate the clutter map
    clmap = clutter.filter_gabella(testdata,
                                   wsize=5,
                                   thrsnorain=0.,
                                   tr1=6.,
                                   n_p=8,
                                   tr2=1.3)

    # visualize the result
    vis.polar_plot(clmap,
                   title='cluttermap')

if __name__ == '__main__':<commit_msg>FIX: Fixed name of the data file.<commit_after>#-------------------------------------------------------------------------------
# Name:        clutter_gabella_example
# Purpose:
#
# Author:      <NAME>
#
# Created:     26.10.2011
# Copyright:   (c) <NAME> 2011
# Licence:     The MIT License
#-------------------------------------------------------------------------------
#!/usr/bin/env python
import wradlib.vis as vis
import wradlib.clutter as clutter
import os
import pylab as pl
# just making sure that the plots immediately pop up
pl.interactive(True)

def ex_clutter_gabella():
    # load the example data
    import numpy as np
    # Todo: link right data set
    testdata = np.loadtxt(os.path.dirname(__file__) + '/' + 'data/polar_dBZ_fbg.gz')

    # calculate the clutter map
    clmap = clutter.filter_gabella(testdata,
                                   wsize=5,
                                   thrsnorain=0.,
                                   tr1=6.,
                                   n_p=8,
                                   tr2=1.3)

    # visualize the result
    vis.polar_plot(clmap,
                   title='cluttermap')

if __name__ == '__main__':
{'fraction_non_alphanumeric': 0.21591397849462365, 'fraction_numerical': 0.017204301075268817, 'mean_word_length': 1.1902071563088512, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1990803', 'n_tokens_mistral': 670, 'n_tokens_neox': 614, 'n_words': 163}