Зондлашган геофизик сигналларга рақамли ишлов бериш алгоритмлари ва дастурий мажмуаси яратиш


Download 42.5 Kb.
Sana31.01.2023
Hajmi42.5 Kb.
#1144376
Bog'liq
dep-materiallar-varaq


Deponentlanadigan materiallarning titul varag‘i
EHM uchun dastur (Ma’lumotlar bazasi) nomi:
“ Зондлашган геофизик сигналларга рақамли ишлов бериш алгоритмлари ва дастурий мажмуаси яратиш ”

Huquq ega(lar)si :



  1. Nurmurodov Jvohir Nurmurod o’g’li

  2. _________________________________________________________

  3. _________________________________________________________

  4. _________________________________________________________

Muallif(lar):



  1. ___Zaynidinov Hakimjon Nasridinovich

  2. ___ Qobilov Sirojiddin Sherqulovich

  3. _________________________________________________________

  4. _________________________________________________________


EHM uchun dasturni identifikatsiya qiluvchi materiallar dastlabki matni (Dastur kodi)
from matplotlib.figure import Figure
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
import numpy as np
from tkinter import *
import math
root = Tk()
root.title("Birinchi proekt")
root.resizable(width=False, height=False)
WIDTH = 1200
HEIGHT = 700
canvas = Canvas(root, width=WIDTH, height=HEIGHT, bg='lightblue')
canvas.pack()
yvalues = (" Хар бўлак-квадратик ", " y= F[i]", "y= b[i]", "y=B[i] MLearning")
def bikingrafik():
N = int(nInput.get())
#M = int(MInput.get())
u = float(uInput.get())
n = 400
m = N+6
a = N+3
x = np.zeros(n)
y = np.zeros(10 * N - 1)
r = np.zeros(N)
S = np.zeros(10 * N + 3)
k = np.zeros(N)
b = np.zeros(a)
t = np.zeros(N)
p = np.zeros(n)
l = np.zeros(N)
w0 = np.zeros(N)
X = np.zeros(N)
B = np.zeros(10 * N - 1)
A = np.zeros(m)
q = np.zeros(N)
for i in range(1, N):
x[0] = 0
x[i]=x[i-1] + 0.1
#print('x[',i-1,']=', '{:.3f}'.format(x[i-1]))
for i in range(0, N):
if x[i] < 0:
y[i] = 0
#print('{:.4f}'.format(y[i]))
for i in range(0, N):
if x[i]>=0 and x[i]<=1:
y[i]=(x[i])*(x[i])/2
# print('{:.6f}'.format(y[i]))

#print('{:.4f}'.format(y[i]))


for i in range(0,N):
if x[i]>=1 and x[i] <=2:
y[i]=(6*x[i]-2*x[i]*x[i]-3)/2
for i in range(0,N):
if x[i]>=2 and x[i]<=3:
y[i] = (3 - x[i]) * (3 - x[i]) / 2
# print('{:.12f}'.format(y[i]))
for i in range(0,N):
if x[i] > 3:
y[i] = 0
# print('{:.8f}'.format(y[i]))
w = open("nv-3.txt", 'r')
D = [i for i in w]
for i in range(0, m):
A[i] = D[i]
# print(A[i])
for i in range(1, a):
b[i-1] = (-A[i-1] + 8 * A[i] - A[i+1]) / 6
#print(b[i-1])
p[0] = b[0]
if yInput.get() == yvalues[0]:
for i in range(1, N):
q[0] = u
q[i]=q[i-1] + 0.1
X[i-1]=y[i-1]
#print('X[', i - 1, ']=', '{:.8f}'.format(X[i - 1]))
ax.plot(q, X)
for i in range(1, N):
k[0] = 0
k[i]=k[i-1]+1
if yInput.get() == yvalues[1]:
for i in range(0, N):
t[i] = b[i]
# print(t[i])
ax.plot(k, t)
if yInput.get() == yvalues[2]:
for i in range(1, N):
r[0] = 0
r[i] = r[i - 1] + 0.1
l[i-1] = (-A[i-1]+8*A[i] - A[i + 1]) / 6
# ax.plot(r,l)
if yInput.get() == yvalues[3]:
for j in range(0, N):
for i in range(0, 10):
S[10*j+i]=b[j]*y[i+20] + b[j+1]*y[i+10]+b[j+2]*y[i]
#print('S[', 10*j+i, ']=', '{:.6f}'.format(S[10*j+i]))
#for i in range(0, N):
#print('A[',i,']=','{:.6f}'.format(A[i + 1]),'b[',i,']=','{:.6f}'.format(b[i]),'S[',10*i,']=','{:.6f}'.format(S[10*i]))
y[0] = 0.4
for i in range(1, 10*N-1):
y[i]=y[i-1]+0.1
for i in range(0, 10*N - 1):
B[i]=S[i]
# print( 'f[', i, ']=', '{:.6f}'.format(B[i]))
ax.plot(y,B)
canvasGrafik.draw()
##------------------------------------------##
def resetgrafik():
global ax
ax.clear()
ax.set_title(' Хар бўлак-квадратик ')
ax.set_xlabel('x кириш')
ax.set_ylabel('y чиқиш')
ax.grid(True)
canvasGrafik.draw()
frameInput = Frame(root, bg='#074447')
frameInput.place(relx=0.045, rely=0.4, relwidth=0.20, relheight=0.7, anchor='w')
ylabel = Label(frameInput, bg='#074447', text='Function', fg='white')
ylabel.place(relx=0.2, rely=0, relwidth=0.4, relheight=0.15, anchor='n')
yInput = Spinbox(frameInput, values=yvalues, fg='blue')
yInput.place(relx=0.7, rely=0.025, relwidth=0.4, relheight=0.1, anchor='n')
nlabel = Label(frameInput, bg='#074447', text='Number of signals N=', fg='white')
nlabel.place(relx=0.3, rely=0.175, relwidth=0.5, relheight=0.15, anchor='n')
nInput = Entry(frameInput)
nInput.place(relx=0.77, rely=0.2, relwidth=0.24, relheight=0.075, anchor='n')
ulabel = Label(frameInput, bg='#074447', text='С(i) Хаар step m=', fg='white')
ulabel.place(relx=0.3, rely=0.3, relwidth=0.5, relheight=0.15, anchor='n')
uInput = Entry(frameInput)
uInput.place(relx=0.77, rely=0.35, relwidth=0.24, relheight=0.075, anchor='n')
ilabel = Label(frameInput, bg='#074447', text='Number of Epok M=', fg='white')
ilabel.place(relx=0.3, rely=0.43, relwidth=0.6, relheight=0.19, anchor='n')
iInput = Entry(frameInput)
iInput.place(relx=0.77, rely=0.5, relwidth=0.24, relheight=0.075, anchor='n')
# aInput.insert(0,1)
enter_button = Button(frameInput, text='Enter', command=bikingrafik)
enter_button.place(relx=0.5, rely=0.65, relwidth=0.3, relheight=0.1, anchor='n')
reset_button = Button(frameInput, text='Reset', command=resetgrafik)
reset_button.place(relx=0.5, rely=0.8, relwidth=0.3, relheight=0.1, anchor='n')
frameGrafik = Frame(root, bg='white')
frameGrafik.place(relx=0.95, rely=0.4, relwidth=0.6, relheight=0.7, anchor='e')
f = Figure()
ax = f.add_subplot(111)
ax.set_title(' квадратик B сплайн')
ax.set_xlabel('x кириш')
ax.set_ylabel('y чиқиш')
ax.grid(True)
canvasGrafik = FigureCanvasTkAgg(f, frameGrafik)
canvasGrafik.get_tk_widget().place(relheight=1, relwidth=1)
canvasGrafik.draw()
root.mainloop()


Download 42.5 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling