Code Monkey home page Code Monkey logo

artip's Introduction

Introduction

Automated Radio Telescope Image Processing Pipeline (ARTIP) is an end to end pipeline automating the entire process of flagging, calibration and imaging for radio-interferometric data.

ARTIP starts with raw data i.e. a Measurement Set and goes through multiple stages like Flux Calibration, Bandpass Calibration, Phase Calibration and Imaging to generate continuum and spectral line images. Each stage can also be run independently. The pipeline provides continuous feedback to the user through various messages, charts and logs.

It is written using standard python libraries and the CASA package.

The latest version of the pipeline can deal with datasets with (i) multiple spectral windows and (ii) multiple target sources which may have arbitrary combinations of flux/bandpass/phase calibrators. It has been tested against narrow-band (1 - 10 MHz) datasets (~ 6 to 30GB) produced by Giant Metrewave Radio Telescope, Pune (GMRT) and Very Large Array, NM (VLA).

The future versions will have support for large wideband datasets.

This version of ARTIP is developed for CASA 4.7.2, and not tested for later versions.

Obtaining ARTIP

ARTIP releases are present at https://github.com/TWARTIP/artip/releases. Download and unzip the artip package to run the pipeline.

$ unzip artip<version>.zip -d artip

Prerequisites

  1. Install Anaconda and CASA

    1.1. Installation test

        Linux:
            $ casa --help
            $ conda --version
        OSX:
            $ casapy --help
            $ conda --version
  2. Install pipeline dependencies

     $ cd artip
     $ ./setup.sh

    setup.sh will

    • Setup casa-pip for installing python modules CASA from PyPI
    • Create "artip" conda environment from artip/environment.yml

    2.1. Installation test

      $ source <rc_file_path>
      $ casa-pip -h
      $ source activate artip
      $ pyb --version

Documentation

https://github.com/TWARTIP/artipdoc/blob/master/artip_documentation.pdf

Running Pipeline

  1. Default conf directory is present at <artip_path>/conf. You can either update it or create your own conf directory having same format.

  2. Update the CASA path and model_path in <conf_dir_path>/casa.yml

  3. Specify flags from the observation logs in "<conf_dir_path>/user_defined_flags.txt". Flags follow format similar to CASA flagdata command with mode='list'.

    Below are the examples for the same :

     * Flag antennas
             reason='BAD_ANTENNA' correlation='RR,LL' mode='manual' antenna='1,18' scan='1,7,2,4,6,3,5'
     * Flag Baselines
             reason='BAD_BASELINE' correlation='RR,LL' mode='manual' antenna='11&19' scan='1,7,2,4,6,3,5'   
     * Flag Time
             reason='BAD_ANTENNA_TIME' correlation='LL' mode='manual' antenna='15' scan='1' timerange='2013/01/05/06:59:49~2013/01/05/07:00:00'
             reason='BAD_BASELINE_TIME' correlation='LL' mode='manual' antenna='7&8' scan='4' timerange='2013/01/05/06:59:49~2013/01/05/07:00:00'
    
  4. Run pipeline through command line but make sure casa_path is set properly in <conf_dir_path>/casa.yml

    $ cd <artip_path>
    $ source activate artip
    $ pyb run -P dataset="<ms_dataset_path>" -P conf="<conf_dir_path>" -P output="<output_dir>"

Pipeline Output

All the output artifacts like caltables, flag files, continuum and spectral line images are persisted in <output_path>/<ms_dataset_name> directory.

Plotting Flagging Graphs

Pipeline records antenna wise flags summary at different stages. After pipeline completion, user can generate flag summary plots using below scripts :

    $ cd <artip_path>/flagged_data_summary
    $ python generate_graph.py "<output_path>/<ms_dataset_name>"  

NOTE : Flags summary is recorded only when pipeline is run with "flag_summary: true" in <conf_dir_path>/pipeline.yml

Charts can be accessed at http://localhost:8000/chart.html

Publication acknowledgement

Include the following in publications using ARTIP:

"This paper makes use of ARTIP - the Automated Radio Telescope Imaging Pipeline developed by IUCAA (http://www.iucaa.in/) and ThoughtWorks (https://www.thoughtworks.com/)"

artip's People

Contributors

dollyg avatar gravi80 avatar ksarang90 avatar nrjgupta avatar pandearti avatar unmeshjoshi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

artip's Issues

Cannot install casa-pip

I am trying to install artip on Ubuntu (16.04) and I get this error:
Setting up casap-pip
Traceback (most recent call last):
File "setup_casapy_pip.py", line 291, in
python_version = version= get_python_version_linux()
File "setup_casapy_pip.py", line 97, in get_python_version_linux
version, casapy_parent_path, lib = get_python_path_linux()
File "setup_casapy_pip.py", line 92, in get_python_path_linux
raise ValueError("Could not determine Python version")
ValueError: Could not determine Python version
./setup.sh: line 28: casa-pip: command not found

Pipeline crash because multiple timestamp in cal table

I was trying to run ARTIP on some GSB GMRT data and it crashes everytime on the following error when running the task fluxscale

fluxscale Caught Exception: Found multiple gain solutions in a single timestamp for fieldid=1. Please check the input Caltable.

I don't understand it at all as the reference is set to "0,3" below the full casa output from the casa.log
Any idea what is going wrong here

##### Begin Task: fluxscale          #####

2018-04-21 09:56:25 INFO fluxscale:::: fluxscale(vis="pathtoms/test.ms",caltable="pathtoms/Artip_Out//test/tmp_amp2.gcal",fluxtable="pathtoms/Artip_Out//test/flux.gcal",reference="0,3",transfer=[''],
2018-04-21 09:56:25 INFO fluxscale::::+ listfile="",append=False,refspwmap=[-1],gainthreshold=-1.0,antenna="",
2018-04-21 09:56:25 INFO fluxscale::::+ timerange="",scan="",incremental=False,fitorder=1,display=False)
2018-04-21 09:56:25 INFO fluxscale::calibrater::open Using NEW VI2-driven calibrater tool
2018-04-21 09:56:25 INFO fluxscale::calibrater::open Opening MS: /home/peter/Current_Reduction/J0754+25/23_Sept/test.ms for calibration.
2018-04-21 09:56:25 INFO fluxscale::Calibrater:: Initializing nominal selection to the whole MS.
2018-04-21 09:56:25 INFO fluxscale::calibrater::fluxscale Beginning fluxscale--(MSSelection version)-------
2018-04-21 09:56:25 INFO fluxscale:::: Assuming all non-reference fields are transfer fields.
2018-04-21 09:56:25 INFO fluxscale:::: Found reference field(s): 3C48 3C286
2018-04-21 09:56:25 INFO fluxscale:::: Found transfer field(s): 0741+312
2018-04-21 09:56:25 SEVERE fluxscale::Calibrater::fluxscale Caught Exception: Found multiple gain solutions in a single timestamp for fieldid=1. Please check the input Caltable.
2018-04-21 09:56:25 SEVERE fluxscale:::: Exception Reported: Error in Calibrater::fluxscale.
2018-04-21 09:56:25 SEVERE fluxscale:::: An error occurred running task fluxscale.
2018-04-21 09:56:53 INFO ::casa

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.