Skip to content

Commit

Permalink
Resolved merge conflict on master
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoldon committed May 2, 2019
2 parents 40bd2ac + a654264 commit d55f06f
Show file tree
Hide file tree
Showing 15 changed files with 5,932 additions and 4,279 deletions.
26 changes: 19 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
This is the CASA pipeline for e-MERLIN data, it is designed to be fully parallelised. It is, however, very early stages and will progress rapidly. It currently does work but does not do calibration yet. Feel free to change/modify.

## Dependencies ##
- CASA v5.0+ (see https://casa.nrao.edu/)
- aoflagger v2.9+ (see https://sourceforge.net/projects/aoflagger/). v2.7+ accepted but not recommended, will be deprecated.
- python2.7
- CASA v5.4+ (see https://casa.nrao.edu/)
- aoflagger v2.9+ (see https://sourceforge.net/projects/aoflagger/)

## Download ##
If you have git installed, you can get the pipeline using:
`git clone https://github.com/e-merlin/CASA_eMERLIN_pipeline.git`
`git clone https://github.com/e-merlin/eMERLIN_CASA_pipeline.git`

If you don't have git, you can download and unzip the files from [here](https://github.com/e-merlin/CASA_eMERLIN_pipeline/archive/master.zip).
If you don't have git, you can download and unzip the files from [here](https://github.com/e-merlin/eMERLIN_CASA_pipeline/archive/master.zip).

To install other dependencies e.g. aoflagger/wsclean check out either A. Offringa's websites:
- aoflagger: https://sourceforge.net/projects/aoflagger/
- wsclean: https://sourceforge.net/projects/wsclean/

Or (recommended) use the handy anaconda scripts to instantly install dependcies within the conda environment. To do this follow the instructions in this repo.: https://github.com/jradcliffe5/radio_conda_recipes

To install other dependencies e.g. aoflagger/wsclean check out either A. Offringa's websites:
- aoflagger: https://sourceforge.net/projects/aoflagger/
Expand All @@ -18,10 +23,16 @@ To install other dependencies e.g. aoflagger/wsclean check out either A. Offring
Or (**recommended!**) use the handy anaconda scripts to instantly install dependcies within the conda environment. To do this follow the instructions in this repo.: https://github.com/jradcliffe5/radio_conda_recipes

## Usage ##
To run the pipeline simply do:
The easiest case, when you have in your working directory the file inputs.txt and you have extracted the pipeline:

`casa -c eMERLIN_CASA_pipeline/eMERLIN_CASA_pipeline.py -i inputs.txt`

A more general case would be:

`casa -c /path/to/pipeline/eMERLIN_CASA_pipeline.py -i <input file>`

To run the parallelized version using MPI in CASA you can use:

`mpicasa -n <num_cores> casa -c /path/to/pipeline/eMERLIN_CASA_pipeline.py -i <input file>`

To execute the pipeline from within CASA:
Expand All @@ -35,6 +46,7 @@ To execute the pipeline from within CASA:
## Additional information ##

- [Documentation [online]](documentation/docs.md)
- [Wiki pages](https://github.com/e-merlin/CASA_eMERLIN_pipeline/wiki)
- [Wiki pages](https://github.com/e-merlin/eMERLIN_CASA_pipeline/wiki)



340 changes: 340 additions & 0 deletions default_params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,340 @@
{
"global": {
"refantmode" : "strict",
"is_mixed_mode" : "auto",
"spwmap_sp" : [],
"applymode" : "calflagstrict"
},
"import_eM": {
"constobsid" : true,
"scanreindexgap_s" : 15.0,
"antenna" : "",
"timeaverage" : true,
"timebin" : "4s",
"chanaverage" : false,
"chanbin" : 1,
"usewtspectrum" : false,
"run_hanning" : "auto",
"ms2mms" : false,
"fix_repeated_sources" : false
},
"aoflagger": {
"run" : "auto",
"fields" : "all",
"separate_bands" : false
},
"flag_apriori": {
"border_chan_perc" : 5.0,
"do_quack" : true,
"all_quack" : 4.0,
"std_cal_quack" : 300.0
},
"average": {
"field" : "",
"timebin" : "4s",
"chanbin" : 4,
"datacolumn" : "data",
"timerange" : "",
"scan" : "",
"antenna" : "",
"shift_phasecenter" : false
},
"plot_data": {
"num_proc" : 1
},
"flag_manual_avg": {
"Lo_dropout" : "",
"Lo_datacolumn" : "data",
"Lo_useflags" : true,
"Lo_spws" : ["3"],
"Lo_threshold" : 0.5,
"Lo_min_scans" : ""
},
"init_models": {
"calibrator_models" : "calibrator_models/",
"manual_fluxcal" : false,
"fluxcal_flux" : [-1],
"fluxcal_spix" : 0.0,
"fluxcal_reffreq" : "0GHz"
},
"bandpass": {
"delay_tablename" : "bpcal_d.K0",
"delay_solint" : "180s",
"delay_combine" : "spw",
"delay_prev_cal" : [],
"delay_interp" : "linear",
"delay_spw" : ["*","innerchan"],
"delay_minblperant" : 3,
"delay_minsnr" : 2,
"phase_tablename" : "bpcal_p.G0",
"phase_solint" : "int",
"phase_prev_cal" : ["bpcal_d.K0"],
"phase_interp" : "linear",
"phase_combine" : "",
"phase_spw" : ["*","innerchan"],
"phase_minblperant" : 3,
"phase_minsnr" : 2,
"ap_tablename" : "bpcal_ap.G0",
"ap_solint" : "32s",
"ap_prev_cal" : ["bpcal_d.K0","bpcal_p.G0"],
"ap_interp" : "linear",
"ap_combine" : "",
"ap_spw" : ["*","innerchan"],
"ap_minblperant" : 3,
"ap_minsnr" : 2,
"bp_tablename" : "bpcal.BP0",
"bp_solint" : "inf",
"bp_combine" : "field,scan",
"bp_interp" : "nearest,cubicflag",
"bp_spw" : ["*",""],
"bp_uvrange" : "",
"bp_fillgaps" : 8,
"bp_solnorm" : true,
"bp_prev_cal" : ["bpcal_d.K0", "bpcal_p.G0", "bpcal_ap.G0"],
"apply_calibrators" : ["bpcal.BP0"],
"apply_targets" : [],
"run_flag" : true,
"tfcrop": {
"mode" : "tfcrop",
"sources" : "bpcal",
"antenna" : "",
"scan" : "",
"spw" : "",
"correlation" : "",
"ntime" : "",
"combinescans" : false,
"datacolumn" : "corrected",
"winsize" : 3,
"timecutoff" : 4.5,
"freqcutoff" : 4.5,
"maxnpieces" : 7,
"uwstats" : "none",
"halfwin" : 1,
"extendflags" : true,
"action" : "apply",
"display" : "",
"flagbackup" : false
}
},
"bp_apply_mid": {
"apply_calibrators" : ["bpcal_d.K0", "bpcal_p.G0", "bpcal_ap.G0", "bpcal.BP0"],
"apply_targets" : []
},
"initial_gaincal": {
"delay": {
"use_fringefit" : false,
"tablename" : "allcal_d.K1",
"delay_cal" : "default",
"solint" : "180s",
"combine" : "spw",
"prev_cal" : ["bpcal.BP0"],
"interp" : "linear",
"spw" : ["*", "innerchan"],
"zerorates" : true,
"minblperant" : 3,
"minsnr" : 2
},
"p_tablename" : "allcal_p.G1",
"p_prev_cal" : ["bpcal.BP0", "allcal_d.K1"],
"p_solint" : "int",
"p_spw" : ["*", "innerchan"],
"p_combine" : "",
"p_interp" : "linear",
"p_minblperant" : 3,
"p_minsnr" : 2,
"ap_tablename" : "allcal_ap.G1",
"ap_prev_cal" : ["bpcal.BP0", "allcal_d.K1", "allcal_p.G1"],
"ap_calibrator" : "default",
"ap_solint" : "32s",
"ap_spw" : ["*", "innerchan"],
"ap_combine" : "",
"ap_interp" : "linear",
"ap_minblperant" : 3,
"ap_minsnr" : 2,
"apply_calibrators" : ["bpcal.BP0", "allcal_d.K1", "allcal_p.G1", "allcal_ap.G1"],
"apply_targets" : [],
"flagmode" : "tfcrop",
"tfcrop": {
"mode" : "tfcrop",
"sources" : "calsources",
"antenna" : "",
"scan" : "",
"spw" : "",
"correlation" : "",
"ntime" : "",
"combinescans" : false,
"datacolumn" : "residual",
"winsize" : 3,
"timecutoff" : 5.0,
"freqcutoff" : 5.0,
"maxnpieces" : 7,
"uwstats" : "none",
"halfwin" : 1,
"extendflags" : true,
"action" : "apply",
"display" : "",
"flagbackup" : false
},
"rflag": {
"mode" : "rflag",
"sources" : "calsources",
"antenna" : "",
"scan" : "",
"spw" : "",
"correlation" : "",
"ntime" : "",
"combinescans" : false,
"datacolumn" : "residual",
"timedevscale" : 4.5,
"freqdevscale" : 4.5,
"extendflags" : true,
"action" : "apply",
"display" : "",
"flagbackup" : false
}
},
"fluxscale": {
"tablename" : "allcal_ap.G1_fluxscaled",
"ampcal_table" : "allcal_ap.G1",
"apply_calibrators" : ["bpcal.BP0", "allcal_d.K1", "allcal_p.G1", "allcal_ap.G1_fluxscaled"],
"apply_targets" : []
},
"bandpass_final": {
"bp_tablename" : "bpcal.BP2",
"bp_prev_cal" : ["bpcal_d.K0", "bpcal_p.G0", "bpcal_ap.G0"],
"bp_solint" : "inf",
"bp_spw" : ["*", ""],
"bp_combine" : "field,scan",
"bp_interp" : "nearest,cubicflag",
"bp_uvrange" : "",
"bp_fillgaps" : 8,
"bp_solnorm" : true,
"apply_calibrators" : ["allcal_d.K0", "bpcal_p.G0", "bpcal_ap.G0", "bpcal.BP2"],
"apply_targets" : []
},
"gaincal_final": {
"p_tablename" : "allcal_p.G3",
"p_prev_cal" : ["bpcal.BP2", "allcal_d.K1"],
"p_solint" : "int",
"p_spw" : ["*", "innerchan"],
"p_combine" : "",
"p_interp" : "linear",
"p_minblperant" : 3,
"p_minsnr" : 2,
"ap_tablename" : "allcal_ap.G3",
"ap_prev_cal" : ["bpcal.BP2", "allcal_d.K1", "allcal_p.G3"],
"ap_calibrator" : "default",
"ap_solint" : "32s",
"ap_spw" : ["*", "innerchan"],
"ap_combine" : "",
"ap_interp" : "linear",
"ap_minblperant" : 3,
"ap_minsnr" : 2,
"p_scan_tablename" : "phscal_p_scan.G3",
"p_scan_prev_cal" : ["bpcal.BP2", "allcal_d.K1"],
"p_scan_solint" : "inf",
"p_scan_spw" : ["*", "innerchan"],
"p_scan_combine" : "",
"p_scan_interp" : "linear",
"p_scan_minblperant" : 3,
"p_scan_minsnr" : 2,
"ap_scan_tablename" : "phscal_ap_scan.G3",
"ap_scan_prev_cal" : ["bpcal.BP2", "allcal_d.K1", "allcal_p.G3"],
"ap_scan_calibrator" : "phscals",
"ap_scan_solint" : "inf",
"ap_scan_spw" : ["*", "innerchan"],
"ap_scan_combine" : "",
"ap_scan_interp" : "linear",
"ap_scan_minblperant" : 3,
"ap_scan_minsnr" : 2,
"apply_calibrators" : ["allcal_d.K1", "bpcal.BP2", "allcal_p.G3", "allcal_ap.G3"],
"apply_targets" : ["allcal_d.K1", "bpcal.BP2", "phscal_p_scan.G3", "phscal_ap_scan.G3"],
"p_offset_tablename" : "narrow_p_offset.G3",
"p_offset_prev_cal" : ["allcal_d.K1", "allcal_p.G3"],
"p_offset_solint" : "inf",
"p_offset_spw" : ["*", "innerchan"],
"p_offset_combine" : "scan",
"p_offset_interp" : "linear",
"p_offset_minblperant" : 3,
"p_offset_minsnr" : 2,
"narrow_bp_tablename" : "narrow_bpcal.BP2",
"narrow_bp_prev_cal" : ["allcal_d.K1", "allcal_p.G3", "allcal_ap.G3", "narrow_p_offset.G3"],
"narrow_bp_solint" : "inf",
"narrow_bp_spw" : ["*", ""],
"narrow_bp_combine" : "field,scan",
"narrow_bp_interp" : "nearest,cubicflag",
"narrow_bp_uvrange" : "",
"narrow_bp_fillgaps" : 8,
"narrow_bp_solnorm" : true,
"narrow_apply_calibrators": ["allcal_d.K1", "narrow_bpcal.BP2", "allcal_p.G3", "allcal_ap.G3", "narrow_p_offset.G3"],
"narrow_apply_targets" : ["allcal_d.K1", "narrow_bpcal.BP2", "phscal_p_scan.G3", "phscal_ap_scan.G3", "narrow_p_offset.G3"]
},
"applycal_all": {
"apply_calibrators" : ["allcal_d.K1", "bpcal.BP2", "allcal_p.G3", "allcal_ap.G3"],
"apply_targets" : ["allcal_d.K1", "bpcal.BP2", "phscal_p_scan.G3", "phscal_ap_scan.G3"],
"apply_narrow_calibrators": ["allcal_d.K1", "narrow_bpcal.BP2", "allcal_p.G3", "allcal_ap.G3", "narrow_p_offset.G3"],
"apply_narrow_targets" : ["allcal_d.K1", "narrow_bpcal.BP2", "phscal_p_scan.G3", "phscal_ap_scan.G3", "narrow_p_offset.G3"],
"run_statwt" : true,
"statwt_timebin" : "0.001s"
},
"flag_target": {
"mode_to_run" : "tfcrop",
"rflag": {
"mode" : "rflag",
"sources" : "targets",
"antenna" : "",
"scan" : "",
"spw" : "",
"correlation" : "",
"ntime" : "scan",
"combinescans" : false,
"datacolumn" : "corrected",
"timedevscale" : 4.5,
"freqdevscale" : 4.5,
"extendflags" : true,
"action" : "apply",
"display" : "",
"flagbackup" : false
},
"tfcrop": {
"mode" : "tfcrop",
"sources" : "targets",
"antenna" : "",
"scan" : "",
"spw" : "",
"correlation" : "",
"ntime" : "",
"combinescans" : false,
"datacolumn" : "corrected",
"winsize" : 3,
"timecutoff" : 4.5,
"freqcutoff" : 4.5,
"maxnpieces" : 7,
"uwstats" : "none",
"halfwin" : 1,
"extendflags" : true,
"action" : "apply",
"display" : "",
"flagbackup" : false
}
},
"first_images": {
"imsize" : 1024,
"niter" : 80,
"deconvolver" : "hogbom",
"nterms" : 1,
"scales" : [],
"weighting" : "briggs",
"robust" : 0.5,
"gain" : 0.1,
"nsigma" : 5.0,
"sidelobethreshold" : 1.0,
"noisethreshold" : 8.0,
"lownoisethreshold" : 1.5,
"minbeamfrac" : 0.2,
"growiterations" : 25,
"parallel" : false,
"level0" : 3.0,
"zoom_range_pix" : 150
}
}
Loading

0 comments on commit d55f06f

Please sign in to comment.