| Literature DB >> 19225577 |
Peter Jurica1, Cees van Leeuwen.
Abstract
Free access to scientific information facilitates scientific progress. Open-access scientific journals are a first step in this direction; a further step is to make auxiliary and supplementary materials that accompany scientific publications, such as methodological procedures and data-analysis tools, open and accessible to the scientific community. To this purpose it is instrumental to establish a software base, which will grow toward a comprehensive free and open-source language of technical and scientific computing. Endeavors in this direction are met with an important obstacle. MATLAB((R)), the predominant computation tool in many fields of research, is a closed-source commercial product. To facilitate the transition to an open computation platform, we propose Open-source MATLAB((R))-to-Python Compiler (OMPC), a platform that uses syntax adaptation and emulation to allow transparent import of existing MATLAB((R)) functions into Python programs. The imported MATLAB((R)) modules will run independently of MATLAB((R)), relying on Python's numerical and scientific libraries. Python offers a stable and mature open source platform that, in many respects, surpasses commonly used, expensive commercial closed source packages. The proposed software will therefore facilitate the transparent transition towards a free and general open-source lingua franca for scientific computation, while enabling access to the existing methods and algorithms of technical computing already available in MATLAB((R)). OMPC is available at http://ompc.juricap.com.Entities:
Keywords: Matlab; Python; compiler; technical computation
Year: 2009 PMID: 19225577 PMCID: PMC2644618 DOI: 10.3389/neuro.11.005.2009
Source DB: PubMed Journal: Front Neuroinform ISSN: 1662-5196 Impact factor: 4.081
Figure 1OMPC structure. Each .m file has to be translated to Python compatible syntax. Statements for an .m file are replaced by their Python equivalents with minimal structural changes that allow emulation. This translated code relies on features implemented in a numerical object similar to ndarray of the numpy module.
Figure 2Code injection by the . Top-left panel: original MATLAB® code; Bottom-left panel (A): translation with added code necessary for execution in Python without mfunction; Right panel (B): illustration of how mfunction inserts byte-code into automatically translated functions at runtime. This is done only the first time each mfunction is loaded into the Python interpreter. Because these additions are invisible to the user, the structure of the original code remains intact.