<commit_before>#------------------------------------------------------------------------------
# Name:        load_rainbow_example.py
# Purpose:     show how to load and work with Gematronik Rainbow5 format
#
# Author:      <NAME>
#
# Created:     24.09.2014
# Copyright:   (c) <NAME> 2014
# Licence:     The MIT License
#------------------------------------------------------------------------------

import wradlib as wrl
import matplotlib.pyplot as pl
import numpy as np
import matplotlib as mpl
import os
#import datetime
 

def ex_load_radolan():

    pg_filename = os.path.dirname(__file__) + '/' + '/data/raa00-pc_10015-1408030905-dwd---bin.gz'
    rw_filename = os.path.dirname(__file__) + '/' + '/data/raa01-rw_10000-1408030950-dwd---bin.gz'

    # load radolan files
    pgdata, pgattrs = wrl.io.read_RADOLAN_composite(pg_filename)
    rwdata, rwattrs = wrl.io.read_RADOLAN_composite(rw_filename)

    # print the available attributes
    print("PG Attributes:", pgattrs)
    print("RW Attributes:", rwattrs)

    # plot the images side by side
    pl.subplot(121, aspect='equal')
    x = np.arange(0,pgdata.shape[0]+1,1)
    y = np.arange(0,pgdata.shape[1]+1,1)
    X,Y = np.meshgrid(x,y)
    cmap = pl.cm.jet
    bounds = [0,1,2,3,4,5,6,9]
    norm = mpl.colors.BoundaryNorm(bounds, cmap.N)
    pl.pcolormesh(X, Y, pgdata, cmap=cmap, norm=norm)
    pl.xlim(0,max(x))
    pl.ylim(0,max(y))
    pl.colorbar(shrink=0.5)<commit_msg>FIX: typo in path<commit_after>#------------------------------------------------------------------------------
# Name:        load_rainbow_example.py
# Purpose:     show how to load and work with Gematronik Rainbow5 format
#
# Author:      <NAME>
#
# Created:     24.09.2014
# Copyright:   (c) <NAME> 2014
# Licence:     The MIT License
#------------------------------------------------------------------------------

import wradlib as wrl
import matplotlib.pyplot as pl
import numpy as np
import matplotlib as mpl
import os
#import datetime
 

def ex_load_radolan():

    pg_filename = os.path.dirname(__file__) + '/' + 'data/raa00-pc_10015-1408030905-dwd---bin.gz'
    rw_filename = os.path.dirname(__file__) + '/' + 'data/raa01-rw_10000-1408030950-dwd---bin.gz'

    # load radolan files
    pgdata, pgattrs = wrl.io.read_RADOLAN_composite(pg_filename)
    rwdata, rwattrs = wrl.io.read_RADOLAN_composite(rw_filename)

    # print the available attributes
    print("PG Attributes:", pgattrs)
    print("RW Attributes:", rwattrs)

    # plot the images side by side
    pl.subplot(121, aspect='equal')
    x = np.arange(0,pgdata.shape[0]+1,1)
    y = np.arange(0,pgdata.shape[1]+1,1)
    X,Y = np.meshgrid(x,y)
    cmap = pl.cm.jet
    bounds = [0,1,2,3,4,5,6,9]
    norm = mpl.colors.BoundaryNorm(bounds, cmap.N)
    pl.pcolormesh(X, Y, pgdata, cmap=cmap, norm=norm)
    pl.xlim(0,max(x))
    pl.ylim(0,max(y))
    pl.colorbar(shrink=0.5)
{'fraction_non_alphanumeric': 0.23351839000693964, 'fraction_numerical': 0.048577376821651634, 'mean_word_length': 2.2176339285714284, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2740972', 'n_tokens_mistral': 1114, 'n_tokens_neox': 1020, 'n_words': 206}