[ํŒŒ์ด์ฌ] Low, High, Band Pass filter๋ฅผ ์ด์šฉํ•œ ์‹ ํ˜ธ ์ฒ˜๋ฆฌ, FFT ๋ณ€ํ™˜์œผ๋กœ ์ฃผํŒŒ์ˆ˜ ์˜์—ญ ํ™•์ธ.
ยท
๐Ÿ Python/Application
์•ˆ๋…•ํ•˜์„ธ์š”. Low Pass Filter, High Pass Filter, Band Pass Filter๋ฅผ ์ด์šฉํ•œ ์‹ ํ˜ธ ์ฒ˜๋ฆฌ์™€ FFT ๋ณ€ํ™˜์œผ๋กœ ์ฃผํŒŒ์ˆ˜ ์˜์—ญ์—์„œ ํ•„ํ„ฐ๊ฐ€ ์ œ๋Œ€๋กœ ๋™์ž‘ํ–ˆ๋Š”์ง€ ํ™•์ธํ•˜๋Š” ๊ฒƒ๊นŒ์ง€ ํŒŒ์ด์ฌ์œผ๋กœ ๊ตฌํ˜„ํ•ฉ๋‹ˆ๋‹ค. from scipy import signal import matplotlib.pyplot as plt import numpy as np import scipy.io import os mat_file = scipy.io.loadmat('signal1.mat') (file_path, file_id) = os.path.split('signal1.mat') # file path, file name fs = 1024 # sample rate order = 10 # order cut_off_fr..
[ํŒŒ์ด์ฌ ์‹ค์Šต] Python ์ฝ”๋”ฉ ... PDF ์–‘๋ฉด ์Šค์บ” !! ๊ต์ฐจ๋กœ ์ €์žฅํ•˜๊ธฐ !!
ยท
๐Ÿ Python/Application
์•ˆ๋…•ํ•˜์„ธ์š”. ์˜ค๋žœ๋งŒ์— ํŒŒ์ด์ฌ ์‘์šฉ์— ๊ธ€์„ ์“ฐ๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์–ด์ œ ๊ธ‰ํ•˜๊ฒŒ ๊ต์ˆ˜๋‹˜์˜ ์ง€์‹œํ•˜์— ์ฑ…์„ ์Šค์บ”๋– ์„œ ๋ณต์‚ฌํ–ˆ์Šต๋‹ˆ๋‹ค. ์•„๋ฌด๋ž˜๋„ ์–‘๋„ ์–‘์ธ ๋งŒํผ ์Šค์บ”์„ ํ•œ ํŽ˜์ด์ง€ ํ•œ ํŽ˜์ด์ง€ ๋œจ๋Š” ๊ฒƒ์ด ๋„ˆ๋ฌด ํž˜๋“ค์–ด์„œ ํŒŒ์ด์ฌ์œผ๋กœ ๊ผผ์ˆ˜ ์ข€ ์‚ฌ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค. ์ฑ… ๊ฐ™์€ ๊ฒฝ์šฐ๋Š” ์–‘๋ฉด์œผ๋กœ ๋˜์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์Šค์บ”์„ ๋œจ๋Š” ๊ฒƒ์ด ๊ต‰์žฅํžˆ ์–ด๋ ต์Šต๋‹ˆ๋‹ค. ์—ฐ์†์œผ๋กœ ํ•œ ๋ฉด๋งŒ ์Šค์บ” ๋œฐ ์ˆ˜ ์žˆ๋Š” ํ”„๋ฆฐํŠธ์ž…๋‹ˆ๋‹ค. 20 - 81 page ๋ผ๋ฉด, ์•ž : 20, 22, 24, 26 ~ 76, 78, 80 Page ๋’ค : 21, 23, 25, 27 ~ 77, 79, 81 Page ๋กœ ์Šค์บ”์„ ๋œฌ ํ›„, ์ €์žฅ๋œ pdf๋ฅผ ๊ฐํŽ˜์ด์ง€๋ฅผ ๊ต์ฐจํ•ด์„œ ํ•ฉ์ณค์Šต๋‹ˆ๋‹ค. from PyPDF2 import PdfFileReader, PdfFileWriter import os # FIle nam..
[ํŒŒ์ด์ฌ ์‘์šฉ] PDF ํ•ฉ์น˜๋Š” ํ”„๋กœ๊ทธ๋žจ(2)
ยท
๐Ÿ Python/Application
import sys import os from PyPDF2.pdf import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * class MainWidget(QWidget): def __init__(self): super().__init__() manual_label = [QLabel("PDF Application"), QLabel("Created by JS")] for i in range(0, 2): manual_label[i].setStyleSheet("Color : gray") manual_label[i].setFont(QFont("", 40 - (12 * i))) hbox = [QHBoxLayo..
[ํŒŒ์ด์ฌ ์‘์šฉ] PDF ํ•ฉ์น˜๋Š” ํ”„๋กœ๊ทธ๋žจ(1)
ยท
๐Ÿ Python/Application
์•ˆ๋…•ํ•˜์„ธ์š”. https://coding-yoon.tistory.com/68 [ํŒŒ์ด์ฌ ์‘์šฉ] QT designer to python code ( .ui -> .py) UIํŒŒ์ผ์„ ํŒŒ์ด์ฌ ์ฝ”๋“œ๋กœ ๋ณ€ํ™˜ ์•ˆ๋…•ํ•˜์„ธ์š”. ๊ฐ•์˜์ž๋ฃŒ๊ฐ€ ์ „๋ถ€ PDF์ด๋‹ค๋ณด๋‹ˆ, PDF๋กœ ํŽธ์ง‘ํ•  ์ผ์ด ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. Adobe ์˜ pdf๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š”๋ฐ, ๋ฌด๋ฃŒ๋ฒ„์ ผ์ด๋‹ค๋ณด๋‹ˆ ํ•  ์ˆ˜ ์žˆ๋Š”๊ฒŒ ๋ณ„๋กœ ์—†์—ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ž˜์„œ ํŒŒ์ด์ฌ์œผ๋กœ ํ•„์š”ํ•œ ๋ถ€๋ถ„๋งŒ ๋งŒ๏ฟฝ coding-yoon.tistory.com PDF ๊ด€๋ จ ํ”„๋กœ๊ทธ๋žจ์„ ๋งŒ๋“œ๋Š” ๋™๊ธฐ๋Š” ์œ„์— ์ ์—ˆ์—ˆ๊ณ , ์˜ค๋Š˜์€ ์ œ๊ฐ€ ๊ฐ€์žฅ ๋งŽ์ด ์‚ฌ์šฉํ•˜๋Š” PDFํ•ฉ์น˜๊ธฐ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ํŽธํ•˜๊ฒŒ QT๋กœ ๊ตฌํ˜„ํ•˜์˜€์Šต๋‹ˆ๋‹ค. http://hogulab.egloos.com/6340633 [Python] PdfMerge - ์—ฌ๋Ÿฌ pdf ํ•˜๋‚˜๋กœ ํ•ฉ์น˜๊ธฐ (GU..
[ํŒŒ์ด์ฌ ์‘์šฉ] QT designer to python code ( .ui -> .py) UIํŒŒ์ผ์„ ํŒŒ์ด์ฌ ์ฝ”๋“œ๋กœ ๋ณ€ํ™˜
ยท
๐Ÿ Python/Application
์•ˆ๋…•ํ•˜์„ธ์š”. ๊ฐ•์˜์ž๋ฃŒ๊ฐ€ ์ „๋ถ€ PDF์ด๋‹ค๋ณด๋‹ˆ, PDF๋กœ ํŽธ์ง‘ํ•  ์ผ์ด ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. Adobe ์˜ pdf๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š”๋ฐ, ๋ฌด๋ฃŒ๋ฒ„์ ผ์ด๋‹ค๋ณด๋‹ˆ ํ•  ์ˆ˜ ์žˆ๋Š”๊ฒŒ ๋ณ„๋กœ ์—†์—ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ž˜์„œ ํŒŒ์ด์ฌ์œผ๋กœ ํ•„์š”ํ•œ ๋ถ€๋ถ„๋งŒ ๋งŒ๋“ค์–ด์„œ ํ• ๋ ค๊ณ  ์ฐพ์•„๋ณด๋‹ˆ http://egloos.zum.com/hogulab/v/6340633 [Python] PdfMerge - ์—ฌ๋Ÿฌ pdf ํ•˜๋‚˜๋กœ ํ•ฉ์น˜๊ธฐ (GUI 5ํŽธ - ์ตœ์ข…) ์ด์ œ "ํ•ฉ์น˜๊ธฐ"๋ฅผ ๊ตฌํ˜„ํ•ด๋ณด์ž. ํ•ด๋‹น ๋ฒ„ํŠผ์˜ ์ฝ”๋“œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. 123456789101112131415161718def merge_PDF(self): count = self.listWidget.count() print(count) output = PdfFileWriter() for x in range egloos.zum.com..
[ํŒŒ์ด์ฌ ์‹ค์Šต] ํŒŒ์ด์ฌ์œผ๋กœ ์•Œ์•„๋ณด๋Š” ์‹ ํ˜ธ ์‹œ๊ฐ„์˜์—ญ๊ณผ ์ฃผํŒŒ์ˆ˜ ์˜์—ญ
ยท
๐Ÿ Python/Application
์•ˆ๋…•ํ•˜์„ธ์š”. ์˜ค๋Š˜์€ ํŒŒ์ด์ฌ์œผ๋กœ ์‹ ํ˜ธ์ฒ˜๋ฆฌ์˜ ๊ธฐ๋ณธ์ธ ์‹ ํ˜ธ์˜ ์‹œ๊ฐ„์˜์—ญ๊ณผ ์ฃผํŒŒ์ˆ˜ ์˜์—ญ์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์šฐ์„  ์ œ๊ฐ€ ์ง„ํ–‰ํ•˜๊ณ  ์žˆ๋Š” ํ”„๋กœ์ ํŠธ์˜ ์‹ ํ˜ธ๋ฅผ ์‚ฌ์šฉํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ์šฐ์„ , ์ € ์œ„ ๋ฐ์ดํ„ฐ๋ฅผ ์„ค๋ช…ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. AVR์˜ adc(analog to digital converter)๋ฅผ ๊ฑฐ์นœ ๋ฐ์ดํ„ฐ๋กœ 0์—์„œ 1023์˜ ์‚ฌ์ด์˜ ์ถœ๋ ฅ๊ฐ’์„ ๊ฐ€์ง‘๋‹ˆ๋‹ค. https://coding-yoon.tistory.com/13?category=823570 PWM์œผ๋กœ ์•„๋‚ ๋กœ๊ทธ ๊ฐ’์„ ์ถœ๋ ฅํ•ด๋ณด์ž! 1ํŽธ ์•ˆ๋…•ํ•˜์„ธ์š”. ์˜ค๋Š˜์€ PWM์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ์•„๋‘์ด๋…ธ์˜ ํ•€์—๋Š” I/O(input/output)ํ•€์˜ ์ข…๋ฅ˜ 3๊ฐ€์ง€๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. 1. Analog Input 2. Digital Input 3. Digital Output ํ•˜๋‚˜ ๋ถ€์กฑํ•ด๋ณด์ด์ง€ ์•Š๋‚˜..
[ํŒŒ์ด์ฌ ์‘์šฉ] pandas_datareader์˜ error๋ฌธ : FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead. from pandas.util.testing import assert_frame_equal
ยท
๐Ÿ Python/Application
์•ˆ๋…•ํ•˜์„ธ์š”. pandas_datareader์„ ์ด์šฉํ•ด์„œ ๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ๋ฅผ ํ•˜๊ธฐ ์œ„ํ•ด ์•„๋ž˜ ๋ฌธ๊ตฌ์ฒ˜๋Ÿผ ์—๋Ÿฌ๋ฌธ์ด ๋œจ๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead. from pandas.util.testing import assert_frame_equal ์•„๋ž˜ ์—๋Ÿฌ๋ฌธ์ด ๋œจ๋”๋ผ๋„ ์‹ค์ œ ์ฝ”๋”ฉํ•˜๋Š”๋ฐ๋Š” ์•„๋ฌด ๋ฌธ์ œ ์—†์Šต๋‹ˆ๋‹ค. ์œ„ ์—๋Ÿฌ๋ฌธ์€ pandas.util.testing ์—์„œ ๋” ์ด์ƒ ์‚ฌ์šฉ๋˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ๋œน๋‹ˆ๋‹ค. ๋Œ€์‹ , pandas.testing์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์œผ๋‹ˆ ์ˆ˜์ •ํ•˜๋ผ๋Š” ๊ถŒ๊ณ ๋ฌธ ๊ฐ™์€ ์ •๋„์ž…๋‹ˆ๋‹ค. ์‹คํ–‰๋  ๋•Œ๋งˆ๋‹ค ์—๋Ÿฌ๋ฌธ์ด ๋ฐœ์ƒํ•˜๋ฉด ๊ธฐ๋ถ„์ด ๋ณ„๋กœ ..
[ํŒŒ์ด์ฌ ์‹ค์Šต] Python threading VS PyQt5 QThread
ยท
๐Ÿ Python/Application
์•ˆ๋…•ํ•˜์„ธ์š”. ์˜ค๋Š˜์€ Python์— ๋‚ด์žฅ๋˜์–ด ์žˆ๋Š” threading๊ณผ PyQt5dml QThread์˜ ์ฐจ์ด์ ์— ๋Œ€ํ•ด ์ด์•ผ๊ธฐํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. threading ์“ฐ๋ ˆ๋“œ ์—ญํ• ์„ํ•˜๊ณ , QThread๋„ ์“ฐ๋ ˆ๋“œ ์—ญํ• ์„ ํ•ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ๋ถ„๋ช…ํžˆ ๋‘˜์˜ ์ฐจ์ด๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ์šฐ์„ , ์“ฐ๋ ˆ๋“œ์— ๋Œ€ํ•ด ์• ๋งคํ•˜์‹œ๋‹ค๋ฉด ์•„๋ž˜ ๊ธ€์„ ๋ณด์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. https://coding-yoon.tistory.com/45 [ํŒŒ์ด์ฌ ์‹ค์Šต] PyQt5 : QThread๋ฅผ ์‚ฌ์šฉํ•ด ์‘๋‹ต ์—†์Œ ๋ฐฉ์ง€ & ์—ฌ๋Ÿฌ ๋™์ž‘ํ•˜๊ธฐ ์•ˆ๋…•ํ•˜์„ธ์š”. ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ํ•˜๋ฉด์„œ ์—ฌ๋Ÿฌ ๋™์ž‘์„ ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ์“ฐ๋ ˆ๋“œ๋ž€ ๊ฐœ๋…์„ ์•Œ์•„์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์šฐ์„ , ์ž‘์—…๊ด€๋ฆฌ์ž๋ฅผ ํ•œ ๋ฒˆ ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. CPU๋Š” ํ•œ ๋ฒˆ์— ํ•œ ๊ฐ€์ง€์˜ ๋™์ž‘๋ฐ–์— ํ•˜์ง€ ๋ชปํ•ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ G(10์˜ 9์ œ๊ณฑ)๋‹จ.. coding-yoon.tistory.c..
[ํŒŒ์ด์ฌ ์‹ค์Šต] PyQt5 : QThread๋ฅผ ์‚ฌ์šฉํ•ด ์‘๋‹ต ์—†์Œ ๋ฐฉ์ง€ & ์—ฌ๋Ÿฌ ๋™์ž‘ํ•˜๊ธฐ
ยท
๐Ÿ Python/Application
์•ˆ๋…•ํ•˜์„ธ์š”. ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ํ•˜๋ฉด์„œ ์—ฌ๋Ÿฌ ๋™์ž‘์„ ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ์“ฐ๋ ˆ๋“œ๋ž€ ๊ฐœ๋…์„ ์•Œ์•„์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์šฐ์„ , ์ž‘์—…๊ด€๋ฆฌ์ž๋ฅผ ํ•œ ๋ฒˆ ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. CPU๋Š” ํ•œ ๋ฒˆ์— ํ•œ ๊ฐ€์ง€์˜ ๋™์ž‘๋ฐ–์— ํ•˜์ง€ ๋ชปํ•ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ G(10์˜ 9์ œ๊ณฑ)๋‹จ์œ„๋กœ ๋™์ž‘ํ•ฉ๋‹ˆ๋‹ค. ์ž‘์—…๊ด€๋ฆฌ์ž๋ฅผ ํ™•์ธํ•˜๋ฉด CPU๋Š” ํ•˜๋‚˜์ธ ๋ฐ˜๋ฉด, ํ”„๋กœ์„ธ์Šค๋Š” 184๊ฐœ๊ฐ€ 1958๊ฐœ์˜ ์“ฐ๋ ˆ๋“œ๋ฅผ ํ†ตํ•ด ๋™์ž‘ํ•˜๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. CPU๋Š” ์‹œ๊ฐ„, ์šฐ์„ ์ˆœ์œ„ ๋“ฑ ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋ฐฉ์‹์œผ๋กœ ํ• ๋‹นํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ์ด๋Ÿฐ์‹์œผ๋กœ ์“ฐ๋ ˆ๋“œ 1๋ฒˆ ์ˆ˜ํ–‰, 2๋ฒˆ ์ˆ˜ํ–‰, ๋‹ค์Œ 3๋ฒˆ ์ˆ˜ํ–‰ํ•˜๋ฉด์„œ ๋ฐ˜๋ณตํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๊ทธ ์†๋„๊ฐ€ ๊ต‰์žฅํžˆ ๋นจ๋ผ ์‚ฌ๋žŒ๋“ค์ด ์‚ฌ์šฉํ•˜๋Š”๋ฐ ์•Œ์•„์ฐจ๋ฆฌ์ง€ ๋ชปํ•ฉ๋‹ˆ๋‹ค. #์“ฐ๋ ˆ๋“œ๋ฅผ ์„ ์–ธํ•˜์ง€ ์•Š์€ ์˜ˆ์ œ from PyQt5.QtWidgets import * from PyQt5.QtCore import * i..
[ํŒŒ์ด์ฌ ์‘์šฉ] 10ํƒ„ : ๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ๋ฅผ ์œ„ํ•œ Numpy
ยท
๐Ÿ Python/Application
์•ˆ๋…•ํ•˜์„ธ์š” ์˜ค๋Š˜์€ ํŒŒ์ด์ฌ Numpy๋ฅผ ์„ค๋ช…ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. Numpy ์ค‘์—์„œ๋„ ์ œ๊ฐ€ ์ž์ฃผ ์“ฐ๋Š” ๋‚ด์šฉ ์œ„์ฃผ๋กœ ๊ฐ€๊ฒ ์Šต๋‹ˆ๋‹ค. 1. import import numpy as np 2. ๋‚ด์šฉ ์‚ฝ์ž… list_test = [] for i in range(5000*700): list_test = np.append(list_test, i) list_test๋ผ๋Š” ๋นˆ list๊ฐ€ ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค. for๋ฌธ์„ ํƒ€๊ณ  list_test์— ์ฐจ๋ก€๋Œ€๋กœ 0๋ถ€ํ„ฐ 5000*700-1๊นŒ์ง€ ๊ฐ’์ด ๋“ค์–ด๊ฐ‘๋‹ˆ๋‹ค. appendํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด list_test๋Š” 1์ฐจ ๋ฐฐ์—ด๋กœ์„œ ๊ธฐ๋Šฅํ•ฉ๋‹ˆ๋‹ค. ๋งŒ์•ฝ ๋ฐ์ดํ„ฐ์…‹์ด 5000๊ฐœ๊ฐ€ ์กด์žฌํ•˜๊ณ  ํ•˜๋‚˜์˜ ๋ฐ์ดํ„ฐ ์…‹์•ˆ์— 700๊ฐœ๊ฐ€ ๋“ค์–ด์žˆ๋‹ค๋ฉด, appendํ•จ์ˆ˜๋Š” ๊ธธ์ด๊ฐ€ 5000 * 700๊ฐœ์ธ 1์ฐจ numpy๊ฐ€ ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค. ๊ทธ๋ ‡๋‹ค๋ฉด ๋‹ค์‹œ l..
18์ง„์ˆ˜
'๐Ÿ Python/Application' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก