<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Perturbations of a Coefficient
Every diffusion coefficient can be subjected to some perturbation. This script presents perturbations that we investigate in the tests. It also shows the utilization of the 'buildcoef2d' class and its benefits in terms of perturbations. First, we show the original coefficient, determine the elements we want to perturb and simulate each perturbation. For further explanations of the 'buildcoef2d' perturbation functions, we refer to the thesis.
Step1:  Change in value
Step2:  Disappearance
Step3:  Shift
Step4:  Summary
<ASSISTANT_TASK:>
Python Code:
import os
import sys
import numpy as np
%matplotlib notebook
import matplotlib.pyplot as plt
from visualize import drawCoefficient, ExtradrawCoefficient
import buildcoef2d
bg = 0.05     #background
val = 1       #values
NWorldFine = np.array([42, 42])
CoefClass = buildcoef2d.Coefficient2d(NWorldFine,
                bg                = bg,       # background
                val               = val,      # values
                length            = 2,        # length
                thick             = 2,        # thickness
                space             = 2,        # space between values
                probfactor        = 1,        # probability of an value
                right             = 1,        # shape 1
                down              = 0,        # shape 2
                diagr1            = 0,        # shape 3
                diagr2            = 0,        # shape 4
                diagl1            = 0,        # shape 5
                diagl2            = 0,        # shape 6
                LenSwitch         = None,     # various length
                thickSwitch       = None,     # various thickness
                ChannelHorizontal = None,     # horizontal Channels
                ChannelVertical   = None,     # vertical Channels
                BoundarySpace     = True      # additional space on the boundary
                )
A = CoefClass.BuildCoefficient()              # coefficient in a numpy array
A = A.flatten()
plt.figure("Original")
drawCoefficient(NWorldFine, A)
plt.title("Original")
plt.show()
# What entries will be perturbed
numbers = [13,20,27,44,73]  
Explanation: Perturbations of a Coefficient
Every diffusion coefficient can be subjected to some perturbation. This script presents perturbations that we investigate in the tests. It also shows the utilization of the 'buildcoef2d' class and its benefits in terms of perturbations. First, we show the original coefficient, determine the elements we want to perturb and simulate each perturbation. For further explanations of the 'buildcoef2d' perturbation functions, we refer to the thesis.
End of explanation
B = CoefClass.SpecificValueChange( Number           = numbers,  
                                   ratio            = -0.4,
                                   randomvalue      = None,
                                   negative         = None,
                                   ShapeRestriction = True,
                                   ShapeWave        = None,
                                   probfactor       = 1,
                                   Original         = True)
B = B.flatten()
plt.figure("Change in value")
drawCoefficient(NWorldFine, B)
plt.title("Change in value")
plt.show()
Explanation: Change in value
End of explanation
C = CoefClass.SpecificVanish(      Number           = numbers,
                                   PartlyVanish     = None,
                                   probfactor       = 1,
                                   Original          = True)
C = C.flatten()
plt.figure("Disappearance")
drawCoefficient(NWorldFine, C)
plt.title("Disappearance")
plt.show()
Explanation: Disappearance
End of explanation
D = CoefClass.SpecificMove(        Number           = numbers,
                                   steps            = 1,
                                   randomstep       = None,
                                   randomDirection  = None,
                                   Right            = 1,
                                   BottomRight      = 1,
                                   Bottom           = 1,
                                   BottomLeft       = 1,
                                   Left             = 1,
                                   TopLeft          = 1,
                                   Top              = 1,
                                   TopRight         = 1,
                                   Original         = True)
D = D.flatten()
plt.figure("Shift")
drawCoefficient(NWorldFine, D)
plt.title("Shift")
plt.show()
Explanation: Shift
End of explanation
plt.figure('Perturbatons')
ExtradrawCoefficient(NWorldFine, A, B, C, D)
plt.show()
Explanation: Summary
End of explanation
<END_TASK>