Giter VIP home page Giter VIP logo

esrf-bliss / ccfits Goto Github PK

View Code? Open in Web Editor NEW
1.0 9.0 1.0 1.69 MB

CCfits is an object oriented interface to the cfitsio library. It is designed to make the capabilities of cfitsio available to programmers working in C++. It is written in ANSI C++ and implemented using the C++ Standard Library with namespaces, exception handling, and member template functions. The CCfits library provides an interface that allows the user to manipulate FITS format data through the high-level building blocks of FITS files and Header-Data Units (HDUs). The implementation is designed to hide the details of performing FITS I/O from the user, who will write calls that manipulate FITS objects by passing filenames and lists of strings that represent HDUs, keywords, image data and data columns. Unlike cfitsio, which typically requires several calls to access data (e.g. open file, move to correct header, determine column containing table data, read data). CCfits is designed to make reading data atomic. For example, it exploits internally existing optimization techniques for FITS I/O, choosing the optimal reading strategy as available [see the cfitsio manual, Chapter 13] when data are read on initialization. Data written by CCfits will also be compliant with the FITS standard by specification of class constructors representing FITS dataset elements. CCfits necessarily works in a fundamentally different way than cfitsio. The general pattern of usage for CCfits is: create a FITS object, which either opens a disk file or creates a new disk file, create references to existing or new HDU objects within it, and manipulated the data through the references. For files with Write access the library is designed to keep the FITS object on disk synchronized with the memory copy. For detailed information about supported platforms and compilers, please see the HEAsoft Supported Platforms page. In addition to the architectures listed there, CCfits is also supported using MS Windows Visual C++.

License: Other

C++ 20.82% Makefile 1.19% Shell 5.95% M4 0.18% HTML 71.28% Perl 0.15% CSS 0.43%

ccfits's Introduction

To build and install CCfits  from source code on a UNIX-like (e.g. UNIX,
Linux, or Cygwin) platform, take the following steps.  For building on
a Microsoft Windows platform with Visual Developer Studio, see below.

===============================================================================
Instructions for Building CCfits on UNIX-like platforms:
===============================================================================

1. Configure
 
   By default, the GCC compiler and linker will be used.  If you want to
   compile and link with a different compiler and linker, you can set
   some environment variable before running the configure script.  For
   example, to use Sun's C++ compiler, do the following:

   > setenv CXX CC  (csh syntax)

     or

   > export CXX=CC  (bash syntax)

   You can set the absolute path to the compiler you want to use if necessary.

   CCfits requires that the CFITSIO package, version 3.08 or later, is
   available on your system.  See

     http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html

   for more information.  The configure script that you will run takes an
   option to specify the location of the CFITSIO package.

   If the CFITSIO package is installed in a directory consisting of a
   'lib' subdirectory containing "libcfitsio.a" or "libcfitsio.so" and
   an 'include' subdirectory containing "fitsio.h", then you can run the
   configure script with a single option.  For example, if the cfitsio
   package is installed in this fashion in /usr/local/cfitsio/ then the
   configure script option will be

	--with-cfitsio=/usr/local/cfitsio

   If the CFITSIO package is not installed in the above manner, then you
   need to run the configure script with two options, one to specify the
   include directory and the other to specify the library directory.  For
   example, if the cfitsio package was built in /home/user/cfitsio/ then
   the two options will be

	--with-cfitsio-include=/home/user/cfitsio 
	--with-cfitsio-libdir=/home/user/cfitsio

   For users of HEASOFT (instead of stand-alone CFITSIO):
   Note that modern distributions of HEASOFT only include a
   "libcfitsio_X.XX.so" library by default, but the configure script
   needs to find "libcfitsio.so", so you will need to create a symbolic
   link in $HEADAS/lib/ linking libcfitsio.so -> libcfitsio_X.XX.so in
   order for CCfits to configure properly.  You can then configure
   CCfits using "--with-cfitsio=$HEADAS".


   You have the option of carrying out the build in a separate directory
   from the source directory or in the same directory as the source.  In
   either case, you need to run the configure script in the directory
   where the build will occur.   For example, if building in the source
   directory with the cfitsio directory in /usr/local/cfitsio/ then the
   configure command should be issued like this:

   > ./configure --with-cfitsio=/usr/local/cfitsio

   If you do the build in a separate directory from the source, you may
   need to issue the configure command something like this:

   > ../CCfits/configure --with-cfitsio=/usr/local/cfitsio

   The configure script will create the Makefile with the path to the
   compiler you choose (or GCC by default), and the path to the CFITSIO
   package.  The configure script has other options, such as the install
   location.  To see these options type

   > ./configure --help


2. Build

   Building the C++ shared library and Java classes will be done
   automatically by running make without arguments like this:

   > gmake


3. Install

   To install, type:

   > make install

   The default install location will be /usr/local/lib for the library
   and /usr/local/include for the header files.  You can change this with
   the --prefix option when you configure, or with something like...

   > make DESTDIR=/usr/local/CCfits install

===============================================================================
Instructions for Microsft Windows build:
===============================================================================

Compiling CCfits with MS VC++ requires VC++ 7.0 or later.  This is the
compiler that comes with Visual Studio.NET.  Earlier versions of the
compiler has too many defects in the area of instanciating templates.

Take the following steps.

1. Compile the C++ code.  Open the vs.net/CCfits/CCfits.sln file with
Visual Studio.NET.  The includes paths have been set to find the
cfitsio build directory at the same level as the CCfits directory.  If
this is not the case, use Visual Studio.NET to edit the include paths
and extra library paths to where you have cfitsio installed.

Next, just use the build icon or the build menu item.
   
To build the test program, cookbook, use the
vs.net/cookbook.cookbook.sln file

Author: [email protected]
Revised 1 Nov 2006 by Bryan Irby

ccfits's People

Contributors

sebastien-petitdemange avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

simantor

ccfits's Issues

Upgrade to 2.6

Since May 2021 the official release is at version 2.6, not 2.4 as supposed here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.