Giter VIP home page Giter VIP logo

sofia-2's Introduction

SoFiA 2: Shared Dynamic Library or Standalone Binary

This is version 2 of the HI Source Finding Application (SoFiA). SoFiA 2 is a reimplementation of the original SoFiA pipeline in the C programming language. It is intended for use in HI data analysis pipelines and will be developed and maintained in parallel to SoFiA 1.x. While SoFiA 2 is still under active development, a stable release is already available at this point in time and can be used in production mode. In addition, users will be able to continue using SoFiA 1.x (https://github.com/SoFiA-Admin/SoFiA) for processing their data.

Improvements in SoFiA 2

  • Being written in C and making extensive use of multi-threading, SoFiA 2 is much faster than SoFiA 1.x.
  • SoFiA 2 requires significantly less memory than SoFiA 1.x (down from > 5 × cube size to ~ 2.3 × cube size).
  • SoFiA 2 currently has only a single external dependency (wcslib) and should therefore compile and run on any machine with a Linux or Unix operating system and the GCC compiler and wcslib installed.

Prerequisites

Please ensure that the GNU C compiler (GCC) and WCSLIB (https://www.atnf.csiro.au/people/mcalabre/WCS/) are installed on your machine, before downloading and extracting the SoFiA 2 source code into a directory of your choice. You may want to first check if WCSLIB is either already installed or available from your operating system’s software repository (wcslib-dev package on Ubuntu/Debian; wcslib-devel on Fedora/CentOS/Red Hat; wcslib on MacOS/Homebrew) before attempting to install it manually.

Both gcc and wcslib are freely available under the GNU General Public Licence. Note that earlier versions of gcc or wcslib might work as well, but this has not been tested. In principle, other compilers that are compatible with gcc and support the C99 standard might also work, e.g. Apple’s clang compiler or the Intel C compiler, possibly with some minor tweaking of the installation script.

Installation

This version is used to create either a dynamic shared library _sofia.so (that can be called from Python) or a stand-alone binary sofia. The former allows data sources to be memory arrays, as opposed to the stand-alone binary, which reads in a FITS file.

A Makefile is provided to compile the code, with several options. Note that the 'OMP' parameter is optional and will enable multi-threading using OpenMP. If your compiler does not support OpenMP, this parameter can simply be omitted to install a single-threaded version of SoFiA 2.

Once all prerequisites are installed and available, simply enter the SoFiA 2 base directory and do one of the following (for more details on compile options, see the Makefile):

1. Shared dynamic library:

Ensure you have the dependency WCSLIB mentioned above, as well as SWIG installed (sudo apt install swig). You will also need numpy and in particular the numpy swig extensions:

pip3 install numpy

This will install numpy in your ~/.local/lib/python3/site-packages directory. For me, using pip did not install the swig extensions successfully, so I downloaded numpy-1.19.4, found the numpy.i and pyfragments.swg files (under tools/swig) and copied them across to my build directory.

"Python.h" is also required (python3-dev and libpython3-dev)

Now compile as follows:

  1. "make clean"
  2. "make shared OMP=true" (leave out OMP if you don't want OpenMP)

Read the comments in the example wrapper file "sofia_obj_wrapper.py" to see additional pre-requisites and how to run it.

2. Standalone Binary:

Compile as follows:

  1. "make clean"
  2. "make exe OMP=true" (leave out OMP if you don't want OpenMP)

NOTE: Others may have created alternative ways of downloading and installing SoFiA 2. As we have no control over such third-party distributions, we cannot provide support for installation methods other than the ones described here. If you have installed SoFiA 2 through a third-party repository, please contact the administrator of that package in the case of installation issues.

Addenda

Documentation

An overview of all control parameters as well as a PDF copy of the SoFiA 2 User Manual can be found on the wiki at https://github.com/SoFiA-Admin/SoFiA-2/wiki. The wiki also contains a small test data cube and parameter file that users can download to verify their SoFiA 2 installation.

Additional tools

Several useful tools have been developed to help with running SoFiA 2 or process the output produced by the pipeline:

Citation

Users are requested to cite the following two papers in any work that is based on the use of SoFiA 2:

Feedback

Should you decide to run SoFiA 2 on your own data cubes, we would welcome any feedback on how well SoFiA 2 works for you and whether any improvements could be made. If you have a GitHub account, you can directly create a new issue (https://github.com/SoFiA-Admin/SoFiA-2/issues/new) on GitHub for questions, feature requests or bug reports. Alternatively, please feel free to directly contact the project leader, Tobias Westmeier, via e-mail at tobias.westmeier (at) uwa.edu.au to provide feedback on your experience with SoFiA 2. Note that the main purpose of SoFiA 2 is to facilitate the processing of HI data from SKA precursor surveys, and we are unlikely to be able to accommodate requests for additional features beyond this primary scope.

Copyright and licence

Copyright (C) 2021 Tobias Westmeier

SoFiA 2 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

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.