[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dennou-ruby:000744] IIPS abstracts


IIPS, 私と川那辺君で一見ずつ喋るということで申し込もうと思います。
コメントありましたらよろしくお願いします。DCL&NumArray 関係で働


Object-oriented handling of numerical data for scientific analysis and
visualization --- basic idea and implementation for Ruby

Takeshi Horinouchi and Naoki Kawanabe
Radio Science Center for Space and Atmosphere, Kyoto University

Kinds and size of data an atmospheric scientist deals with have been
increasing rapidly as global research corporation and computer power
grow. To manage this situation, it would be needed for him or her to
have a software or a programming library with which different kinds of
data can be treated efficiently in a consolidated way. The
consolidation may be achieved by making use of the object-oriented
way to separate data and accessors to them. We propose a framework to
realize it and implement it with the object-oriented language Ruby.

Numerical data of physical quantities that we handle are typically
gridded, whether regularly or not. A first step to handle the data
concisely would be to combine them with their grid values and other
information such as units to form an "object". This is the way of
organizing data that file formats such as NetCDF and HDF4 suppose to
make the data self-descriptive. Then it becomes possible to devise
abstract operations on the data as physical quantities rather than
just as numerical arrays. An example of such operations is to slice a
multi-dimensional data in terms of physical coordinate values. The
organization into an object would also serve for visualization, since
axes and titles can be drawn automatically from information stored in
the object.

By using object-oriented languages, we can hide internal structure of
a data object from the user and make him or her access them only
through abstract operations. The accessors can be the same in many
cases whether the actual data resides entirely on computer memory or
are kept in a file (letting the data object consisting of file
handlers). Self-descriptive file formats such as those stated above
can easily be adapted to this framework, and even non-self-descriptive
formats can be conformed if the user provides ancillary information.

To realize such data handling we have been developing a class library
for use in the object-oriented language Ruby. Since broad formats can
be covered and the accessors to data will be consolidated as much as
possible, users of the library would naturally develop applications
that can be used easily by others. Therefore, the library is expected
to be a basis on which data-handling applications are developed and
shared in research communities.

Ruby is perhaps the best object-oriented scripting language to date
and is freely available from http://www.ruby-lang.org. Since it can be
used interactively, it is suitable for interactive data analysis. Yet,
an interactive trial and error can be organized smoothly into a
program if needed. Since Ruby offers strong network support, we are
envisioning to extend our library to be able to handle remotely-stored
data. The original distribution of Ruby does not have efficient
multi-dimensional numerical arrays nor scientific visualization tools
needed by the library. The companion paper by Kawanabe et al presents
our development of such infrastructure.

Development for scientific analysis and visualization with the
object-oriented language Ruby

Naoki Kawanabe, Takeshi Horinouchi, Masato Shiotani
(Radio Science Center for Space and Atmosphere, Kyoto University)
Kentaro Goto (), Keiko Kuroi (), and Noriyoshi Takahashi ()

Kinds and size of data an atmospheric scientist deals with have been
increasing rapidly as global research corporation and computer power
grow. The companion paper by Horinouchi and Kawanabe propose a method
to facilitate consolidated handling of data in various formats. It
also presents its realization as a class library for the
object-oriented language Ruby. The library requires a computationaly
efficient numerical array class and a visualization library, which are
not included in the original distribution of Ruby. This paper presents
our development of these basic libraries.

Ruby has a pre-defined array class, but it is not suitable for large
computing. This is because the elements of an array can be any ruby
objects, which hinders efficient computation. We have instead
developed a multi-dimensional array class specialized in handling
numeric data. It is written in C and the contents of an array are
stored under a C pointer. Thanks to the flexibility of Ruby's syntax
we could legitimately incorporate advanced features that are available
in limited languages such as Yorick. It is worth noting that to extend
Ruby by C is well established and the extension libraries can be
linked dynamically without recompiling Ruby itself under many
operating systems. Further, we are planning to port Ruby on super
computers and adapt the array class for vector processors.

The scientific visualization library is based on Dennou Club
Library (DCL). DCL covers 1D and 2D graphics in depth with strong
capability for layout and coordinate transformation including map
projection. It also has limited 3D graphic functions. It is written in
FORTRAN77 and is translated into C. First, we made a "wrapping"
interface for Ruby to the C version. The interface consists of
functions that correspond one by one to functions in DCL. Upon this
interface, we are developing a user-friendly graphic library that is
suitable for interactive use as well as for programming. Furthermore,
we are planning to develop graphical user interface that can be used
both on UNIX platforms and Windows. It is also envisioned further to
incorporate fully functional 3D graphics.