GithubHelp home page GithubHelp logo

lsmtool's Introduction

LSMTool: the LOFAR Local Sky Model Tool

LSMTool allows the manipulation of LOFAR sky models (in the makesourcedb format).

Author:

  • David Rafferty

Based on contributed scripts from:

  • Björn Adebahr
  • Francesco de Gasperin
  • Reinout van Weeren

Contents:

  • docs/: documentation
  • tests/: contains test sky models and scripts useful for validation
  • bin/: contains lsmtool executable
  • lsmtool/: contains the main LSMTool scripts
  • lsmtool/operations/: contains the modules for operations
  • parsets/: some example parsets

The following operations are available:

  • SELECT: Select sources by source or patch properties
  • REMOVE: Remove sources by source or patch properties
  • TRANSFER: Transfer a patch scheme from one sky model to another
  • GROUP: Group sources into patches
  • UNGROUP: Remove patches
  • MOVE: Move a source or patch position
  • MERGE: Merge two or more patches into one
  • CONCATENATE: Concatenate two sky models
  • ADD: Add a source
  • SETPATCHPOSITIONS: Calculate and set patch positions
  • PLOT: Plot the sky model
  • COMPARE: Compare source fluxes and positions of two sky models

For details, please see the full documentation.

Installation

LSMTool is already installed on the LOFAR CEP2 and CEP3 clusters. Users on CEP2 and CEP3 should run the following commands before using LSMTool:

use LofIm
source ~rafferty/init_lsmtool

If you want to install LSMTool yourself, follow the instructions below.

Requirements

Downloading and Installing

Get the latest developer version by cloning the git repository:

git clone https://github.com/darafferty/LSMTool.git

Then install with:

cd LSMTool
python setup.py install

Testing

You can test that the installation worked with:

python setup.py test

If no errors occur, LSMTool is installed correctly.

Usage

The LSMTool executable can be used from the command line with a parset that defines the steps to be done. E.g.:

$ lsmtool model.sky lsmtool.parset

The parset follows the usual NDPPP/BBS format. E.g.:

# Select individual sources with Stokes I fluxes above 1 Jy
LSMTool.Steps.select.Operation = SELECT
LSMTool.Steps.select.FilterExpression = I > 1.0 Jy
LSMTool.Steps.select.OutFile = out_model.sky

LSMTool can also be used in Python scripts by importing the lsmtool module. E.g.:

>>> import lsmtool
>>> skymod = lsmtool.load('model.sky')
>>> skymod.select('I > 1.0 Jy')
>>> skymod.write('out_model.sky')

For further details, please see the full documentation.

lsmtool's People

Contributors

darafferty avatar nudomarinero avatar tammojan avatar wndywllms avatar

Watchers

 avatar  avatar

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.