Skip to main content

The LOFAR Local Sky Model Tool

Project description

LSMTool: the LOFAR Sky Model Tool

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

Author:

  • David Rafferty

Based on contributed scripts by:

  • Bjoern 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 CEP3 cluster. Users on CEP3 should run the following commands before using LSMTool:

source ~rafferty/init_lsmtool

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

Dependencies

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

If you have a C++11-compliant compiler, you can build a faster version of the mean shift grouping algorithm with:

cd LSMTool
python setup.py install --build_c_extentions

Note that the C++ version will give slightly different results compared to the Python version, but such differences are not expected to be important in practice.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lsmtool-1.4.7.tar.gz (362.7 kB view details)

Uploaded Source

File details

Details for the file lsmtool-1.4.7.tar.gz.

File metadata

  • Download URL: lsmtool-1.4.7.tar.gz
  • Upload date:
  • Size: 362.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for lsmtool-1.4.7.tar.gz
Algorithm Hash digest
SHA256 1aaa4d7613f8e60af57ff984cc19882d6417852714f1116d8674498b56ad8f19
MD5 9b475e203a2868a706d80032d9b94893
BLAKE2b-256 78cbfb6dd6447e0ef34bdc1a0a1ae1f8dc46e86d19eeace0cea11f604d8b7e3e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page