Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.adass.org/adass/proceedings/adass03/P4-16/
Дата изменения: Fri Aug 27 18:15:19 2004
Дата индексирования: Tue Oct 2 05:33:43 2012
Кодировка:

Поисковые слова: ion drive
ADASS 2003 Conference Proceedings Next: Preliminary design of the SCUBA-2 Data Reduction Pipeline
Up: High Performance Computing
Previous: Chandra Level 3 Processing: Creating an Automated Source Catalog for Chandra Data
Table of Contents - Subject Index - Author Index - Search - PS reprint - PDF reprint

Haridas, V., Budavári, T., O'Mullane, W., Szalay, A. S., Thakar, A., Conti, A., Volpicelli, A., & Pence, B. 2003, in ASP Conf. Ser., Vol. 314 Astronomical Data Analysis Software and Systems XIII, eds. F. Ochsenbein, M. Allen, & D. Egret (San Francisco: ASP), 424

Making FITS available on Dot Net and its applications

Vivek Haridas, Tamás Budavári, William O'Mullane, Alex Szalay and Ani Thakar
Department of Physics and Astronomy, Johns Hopkins University, Email: haridas@pha.jhu.edu

Alberto Conti and Antonio Volpicelli
Space Telescope Science Institute

Bill Pence
NASA/GSFC

Abstract:

The Flexible Image Transport System (FITS) is a powerful and widely adopted means of exchanging Astronomical Data. There are also a great number of tools and libraries available on many platforms to facilitate working with FITS.

We present the FitsLib , A library written to facilitate development of astronomical data analysis tools on the Microsoft.Net Platform. This has been developed as a wrapper over one of the very popular and time tested FITS libraries, CFITSIO. Fits.Net library merges the advantages of speed and ruggedness of CFITSIO with the language independence of the Microsoft.Net technology and a simple Document Object Model (DOM). We believe this library will be intuitive for .NET programmers.

We present the design and usage patterns of the library in C-Sharp. We also discuss performance issues of the library. Finally we present a number of applications and web services, which are currently running on this library.

1. Introduction

We wished to use the CFITSIO package in developing image cutout services on the Microsoft's .Net Platform in the C-Sharp language. This is a comprehensive library and we did not feel translation was viable, C-Sharp does allow use of managed C++. We set out to wrap a minimal set of routines in the managed C++ programming environment.

This minimal set, however, grew larger as more functionality was required in C-Sharp. It became apparent that developing code with so many pointers and unmanaged data objects in C-Sharp would prove to be prohibitive, both for development and for maintenance. This led to the design of an object-oriented wrapper that eased the memory and safety issues involved with pointers.

Initially a minimal package was developed which could perform reading operations on FITS files. Slowly more features were added until most of the popular FITS operations are now possible

An undercurrent of a Document Object Model like structure can be seen throughout the package. We felt that it would match closely with the structure of a FITS file and would be easy to associate with for a programmer in an Object Oriented Language such as C-Sharp.

2. Design Overview

One of the design decisions was to make the library Common Language Runtime compatible (CLR). This would enable the wrapper to be used across different .Net languages such as C-Sharp, Visual Basic and Managed C++.

This resulted in the whole design being done in two stages. In the first stage a CLR compliant interface was designed. In the second stage this interface was implemented by instantiating and operating on the appropriate CFITSIO data structures.


2.1 The Interface

The interface intends to provide an intuitive Document Object Model (DOM) like layout for a FITS file. Features such as indexing, properties and polymorphism are utilized here to give a DOM layout for the classes involved.

The FitsFactory provides methods for creation of new interfaces to FITS files. The Fits interface opens FITS files for read or write operations. There are also specific interfaces for Fits Table and Image units. The FitsHeader interface provides access to header information in every unit. FitsData is the data structure representing a cell of a Table and also the image buffers.

2.2 The Implementation

The implementation focuses on issues such as memory management, invoking the underlying CFITSIO routines, error management, implementing object-oriented data structures and maintaining CFITSIO data structures. Specific classes implement each of the interface classes managing the tasks mentioned above (2.1.).

CFitsTable and CFitsImage are the two major implementation classes. The CFitsTable class implements a major portion of the different interfaces to the Fits Table. The CFitsData class implements the FitsData interface by wrapping the fits table vectors and image buffers inside it.

3. Performance Observations

The object oriented and memory managed .Net interface is easy to use but, introduces a small overhead compared with direct CFITSIO usage.

Performance testing of such interfaces is non trivial. It was observed that for some very large FITS files the .NET package appears to outperform the CFITSIO, which seems anomalous. This could be due to host of independent variants such as memory paging, code optimization or garbage collection on the .Net platform.

However, when tested over a range of different operational requirements and loads, some overhead can be observed.

The performance comparisons shown above were done between similar pieces of CFITSIO and FitsLib program code. Additionally, some mathematical operations were done on the data being used in the tables and images. This was done to minimize the effects of code optimization.

Figure 1: Performance Statistics
\begin{figure}
\plotone{P4-16_1.eps}\end{figure}

4. Applications

Thanks to active usage and support from a small number of developers from the initial stage, the tool is already employed successfully in a few applications and WebServices, some of which are listed below.

4.1 Galex Summary

The GALEX Summary page allows users to browse images in depth and obtain details of individual GALEX objects.

Among the information provided are the object unique identifier, its coordinates in the GALEX combined object catalog and in the individual band passes (Far UV and Near UV).

4.2 Catalog Archive Server - JOBS

This is a system used to process queries against large astronomical databases. It uses a system of queues and personal databases to accommodate a variety of different queries in a timely and efficient manner.

4.3 CAS - Service

This is an XML Web Services interface to the SDSS Catalog Archive Server (CAS). It provides access to catalog data and returns the result in different formats.

5. Summary

FitsLib is a library meant for for astronomers and developers working on Microsoft's .Net Platform. It offers a DOM like layout and the convenience of a .Net language along with the speed of CFITSIO.

The latest documentation, samples, source and binary downloads are available from http://skyservice.pha.jhu.edu/develop/FitsLib/ .

References

HEASARC, CFITSIO User's Reference Guide,
http://heasarc.gsfc.nasa.gov/docs/software/fitsio/c/c_user/cfitsio.html

NASA/GSFC, A User's Guide for the Flexible Image Transport System,
http://archive.stsci.edu/fits/users_guide/

Erich Gamma et al., Addison-Wesley Pub Co, Design Patterns,
http://www.awprofessional.com/titles/0-201-63361-2/

Microsoft Corporation, Microsoft Developer Network,
http://msdn.microsoft.com/netframework/,
http://msdn.microsoft.com/vcsharp/,
http://msdn.microsoft.com/visualc/


© Copyright 2004 Astronomical Society of the Pacific, 390 Ashton Avenue, San Francisco, California 94112, USA
Next: Preliminary design of the SCUBA-2 Data Reduction Pipeline
Up: High Performance Computing
Previous: Chandra Level 3 Processing: Creating an Automated Source Catalog for Chandra Data
Table of Contents - Subject Index - Author Index - Search - PS reprint - PDF reprint