python과 결합한 spread sheet형태의 간단한 프로그램을 만들어 보고 싶습니다.

goraion의 이미지

롤 모델은 Sigmplot이라는 plotting + 간단한 프로그래밍 도구이고요,

사실상 작업중에 상당히 큰 포션을 차지하는게 data를 두고 이를 그래프로 그려 분석하고,

data를 sheet내에서 가공하고, sigmaplot에서 제공하는 빈약한 프로그래밍 혹은 VBA(매크로를 VBA로 지원하더군요)를 이용해서

조금 더 복잡한 수치해석 코드를 짜는 등의 방법을 이용합니다.

Sigmaplot 자체가 plot과, 간단한 regression등을 손쉽게 할 수 있는 장점이 있어서 연구실에서 잘 사용하고 있었는데,

일단 저의 주된 작업환경이 Linux라는 점과, 최근 많은 data를 가지고 왔을때 발생하는 sigmaplot에서의 문제점 등을 보다가 조금(?) 답답한 점이 많아서 공부도 할겸 취미생활도 할 겸 직접 이런 프로그램을 짜 볼 생각을 하고 있습니다.

위의 답답한 점이라는것은, 무엇이 문제인지는 모르겠으나

[1] 최근 한번에 8만개 이상의 data들을 복사해서 하는 작업들에서 잦은 충돌과 오류가 발생하고,

[2] Plotting 기능이 강력하고 편리하긴 하나, 설정 변경등을 일괄적으로 손쉽게 해 낼수 없는 문제가 존재합니다.
(Sigmaplot에서 VBA를 이용한 Macro를 지원해 주니 설정을 잘 찾아보면 찾아 낼 수 있을것 같습니다만.. 아직 찾아보진 않았네요)

[3] 자체에서 제공하는 coding mode인 Transformation mode가 너무 제한적입니다.
Sub routin이 불가능, function을 지정하는데에 한계가 있고, 같은 변수이름에 재할당 (쉽게말해서 x++ 같은거) 불가능 등등
너무 많은 제약이 있습니다.

물론 위의 내용을 다(?) 커버해주는 Matlab 모드도 있습니다만, 예전에 심심풀이로 matlab GUI를 만들어보았는데
꼭 비쥬얼베이직으로 코딩할때처럼 간단한것은 장점입니다만, 일단 Matlab 자체가 Spread Sheet기능을 기반으로 만들어지지 않았다는 단점과
Matlab으로 만든 프로그램은 해당 라이센스가 있는 컴퓨터에서만 사용가능하다는 단점이 있습니다.

제 스스로 생각할때 필요한 부분은 다음과 같습니다.

[1] CrossPlatform 기반이어야 합니다. 연구실에서 저 혼자만 계산 혹은 이론연구를 하고 나머지 동료들은 주로 실험을 하고, 실험 Data에 대한 처리를 sigmaplot이나 C로 진행을 하고 있습니다.
이러한 이유로 저는 Linux를 사용하지만 다른 동료들에게까지 Linux를 강요하고 싶지는 않습니다.
(그럴바에야 기존의 Sigmaplot을 그대로 사용하던지, Matlab을 사용하고 말지요)

[2] Spread Sheet 기반이되, 만약 data가 너무나 많아서 sheet에 쓰고 읽기가 힘들다면 굳이 spread sheet형태로 입출력을 하지 않게끔 할 수 있어야 합니다.

[3] Plotting은 Matplotlib를 생각하고 있는데, 여기에 각종 toolbox등을 두어서 마우스 클릭으로 간편하게 (꼭 Sigmaplot처럼) 각종 설정을 제어할 수 있어야 합니다.

[4] 위의 sheet나 plot에는 LaTex를 이용한 수식편집이 항상 가능해야 합니다.

[5] Python Scrpting기능을 기본으로 두어서 sheet 내의 기본기능 이외의 코딩을 손쉽게 할 수 있어야 합니다.
(꼭 엑셀의 VBA기능과 같은 부분입니다)

[6] Parallel Computing 기능이 필요합니다. 솔직히 이 부분은 모르겠습니다. 컴공 전공도 아니고, 아직까지 CFD를 하는것도 아니고 해서(최근 OpenFOAM을 조금 보고 있습니다만..) 직접적으로 여러개의 CPU에 계산을 분산시키는 방법은 쓰레드를 이용하는 방법 밖에 모릅니다. 이것도 직접 해본게 아니라 KLDP눈팅하면서 '아, 이렇게 하는구나' 라고 대충 아는 조악한 지식입니다만, 가끔 계산하다보면 4개의 프로그램으로 4개의 결과를 보이는것이 아니라, 1개의 프로그램으로 최소한 기존보다는 2배정도는 빠르게 결과를 볼 수 있게끔 만들고 싶습니다.
어쨌든 이 부분은 어느정도 프로그램이 정상가동이 된 다음 생각해 볼 문제인것 같습니다.

서두가 길어졌는데, 제가 여기 KLDP분들께 질문하고 싶은 것은 다음과 같습니다.

[1] 위에서 제가 원하는 프로그램을 장기적인 취미생활로 (혹은 인생의 동반자 느낌?) 지속하면서 개발할만한 성질의 것인지.
(잘은 모르지만, 32비트 동료 컴퓨터에서는 잘 돌아가는 녀석도 64비트 제 컴퓨터에서는 64비트용 프로그램을 돌려도 이상한 에러가 나는 경우가 많습니다. 이런것들을 아마추어라 부르기도 힘든 수준으로 다 커버하기는 생각보다 힘들수도 있겠지요)

[2] 혹은, 제가 모르고 있지만 실제로 써보면 환상적으로 좋은 프로그램이 있는지

[3] 실제적인 개발은 PyQT 혹은 QT를 이용해서 진행할까 생각하고 있는데(C++보다는 간편한 PYTHON이 좋을거 같습니다), 제가 생각하는것처럼 PYTHON등으로 이용했다가 프로그램 완성시켜놓고 느려터진 속도에 그냥 기존의 상용프로그램을 사용할 수 있을수도 있다던지... (퍼포먼스의 문제이군요)

[4] 설명하기는 귀찮지만 그냥 안하고, 기존의 프로그램 쓰고 플롯팅용 툴이나 몇개 만드는게 좋다라던지..

[5] 그런거 개발하려면 전업 개발자하고 전공에 대한 연구는 접어라던지... (농담입니다. ^^)

저보다 경험과 지식이 충분하신 여러분께 조언을 듣고 싶습니다.

생각보다 글이 길어졌는데 여기까지 읽어주셔서 감사합니다.

bushi의 이미지

bushi@SEL-SYOON-D1:~$ aptitude show r-base
Package: r-base
State: not installed
Version: 2.10.1-2
Priority: 옵션
Section: universe/math
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Uncompressed Size: 77.8k
Depends: r-base-core (>= 2.10.1-2), r-recommended (= 2.10.1-2)
Recommends: r-base-html, r-doc-html
Suggests: ess, r-doc-info | r-doc-pdf
Description: GNU R statistical computation and graphics system
 R is a system for statistical computation and graphics.  It consists of a
 language plus a run-time environment with graphics, a debugger, access to
 certain system functions, and the ability to run programs stored in script
 files. 
 
 The design of R has been heavily influenced by two existing languages: Becker,
 Chambers & Wilks' S and Sussman's Scheme.  Whereas the resulting language is
 very similar in appearance to S, the underlying implementation and semantics
 are derived from Scheme. 
 
 The core of R is an interpreted computer language which allows branching and
 looping as well0;115;0c as modular programming using functions. Most of the
 user-visible functions in R are written in R.  It is possible for the user to
 interface to procedures written in the C, C++, or FORTRAN languages for
 efficiency, and many of R's core functions do so.  The R distribution contains
 functionality for a large number of statistical procedures and underlying
 applied math computations.  There is also a large set of functions which
 provide a flexible graphical environment for creating various kinds of data
 presentations. 
 
 Additionally, over thousand extension "packages" are available from CRAN, the
 Comprehensive R Archive Network, many also as Debian packages, named
 'r-cran-<name>'. 
 
 This package is a metapackage which eases the transition from the pre-1.5.0
 package setup with its larger r-base package. Once installed, it can be safely
 removed and apt-get will automatically upgrade its components during future
 upgrades.  Providing this packages gives a way to users to then only install
 r-base-core if they so desire.
Homepage: <a href="http://www.r-project.org/
 
bushi@SEL-SYOON-D1:~$
" rel="nofollow">http://www.r-project.org/
 
bushi@SEL-SYOON-D1:~$
</a>

http://en.wikipedia.org/wiki/R_%28programming_language%29

http://en.wikipedia.org/wiki/RExcel
cedar의 이미지

http://pyspread.sourceforge.net/

About
Pyspread is a cross-platform
Python spreadsheet application. It is based on and written in the
programming language Python.



Instead of spreadsheet formulas, Python expressions are entered into
the spreadsheet cells. Each expression returns a Python object that can
be accessed from other cells. These objects can represent anything
including lists or matrices.

Pyspread screenshot
Features
  • Three
    dimensional grid with up to 85,899,345 rows and 14,316,555
    columns (64
    bit systems, depends on row height and column width). Note that a million cells require about 500 MB of memory.
  • Complex data types such as lists, trees or matrices within a single cell.
  • Macros for functionalities that are
    too complex for a single Python expression.
  • Python module access from
    each cell, which allows:
    • Arbitrary size rational numbers (via gmpy),
    • Fixed point decimal numbers for business calculations, (via
      the decimal
      module from the standard library)
    • Advanced statistics including plotting functions (via RPy)
    • Much more via <your favourite module>.
  • CSV import and export
  • Clipboard access

Pyspread screenshot



warning
The concept of pyspread allows doing everything from each cell that a
Python script can do. This powerful feature has its drawbacks. A spreadsheet may very well delete your hard
drive or send your data via the Internet. Of course this is a
non-issue if you sandbox properly or if you only use self developed
spreadsheets.



Since this is not the case for everyone (see
discussion at lwn.net),
a GPG signature based trust model for spreadsheet files has been
introduced. It ensures that only your own trusted files are executed on
loading. Untrusted files are displayed in safe mode. You can approve a
file manually. Inspect carefully.


Requirements
Pyspread runs on Linux, Windows
and *nix platforms with GTK+ support. There are reports that it works
with MacOS X as well. However, OS X is not officially supported.



Dependencies

Highly recommended for
full
functionality

  • PyMe >=0.8.1,
    Note for Windows™ users: If you want to use signatures without
    compiling PyMe try out Gpg4win.
  • gmpy
    >=1.1.0 and
  • rpy >=1.0.3.


Maturity
Pyspread is in early Beta
release. This means that the core functionality is fully implemented
but the program needs testing and polish.



On OS X, pyspread is considered Alpha because the user interface is not
displayed correctly. There are icon size issues in version 0.1.2, which
have been addressed in the development trunk. Toggle icon images are
still corrupted.


Contribute
Help making pyspread better. You do not have to code yourself for that.
Post bug reports and comments or ideas for improvement. If you are
looking for concrete contribution tasks please have a look at the forum
Contribution tasks. Each contributor will be mentioned in the About dialog of pyspread.


License Pyspread is free
software.

It is released under the GPL
v3
.



contact
mmanns < at > gmx < dot
> net


댓글 첨부 파일: 
첨부파일 크기
Image icon screenshot_sinus_large.png61.06 KB
dwfree74의 이미지

matlab 이라는 프로그램도
외국의 어느 수학 관련 교수님이
한달만에 완성했다는 이야기도 들었던 거 같습니다.
(기억에 근거해서 적다보니 사뭇 진실과 다를 수도 있겠지요..)

완성하시기를 바랍니다..^^;

kldp.net 에 많은 프로그래머들이 동참하기를 바라며...^^

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.