You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Until self-calibration is included in the VLA imaging pipeline it is sometime necessary to run it outside of the workspaces environment.

Step-by-step guide

  1. Copy the calibrated ms and flagversions table to the working directory into a work area e.g. /lustre/aoc/sciops/<your dir>/<ws_request id>/working
  2. Edit run_casa.sh and selfcal_script.py (see info box below) to use the current working directory and ms name.
  3. login to nmpost-master and submit the batch job (sbatch run_casa.sh)
  4. wait a few days
  5. The job should email you when done (it may claim the job has failed when in fact to ran OK).
  6. As vlapipe, move the contents of the project directory from the original workspaces directory for the imaging run somewhere safe (just in case..) 
  7. As vlapipe, copy the contents of the new (with selcal) products directory to the original.
  8. In the original directory, gunzip the weblog.
  9. Make a note in the weblog by manually making and editing the qa_notes file in the weblog that the image has been self-calibrated. Also add an internal note that self-cal was performed.
  10. Submit for phase-2 review as usual 
  11. Clean up your working area once the job has passed QA and been ingested.


run_casa.sh:

#!/bin/sh

#Don't put any commands before the #SBATCH options or they will not work
#SBATCH --export ALL                     # Export all environment variables to the job.
#SBATCH --mem=64G                        # Amount of memory needed by the whole job.
#SBATCH -D /lustre/aoc/users/mlacy/srdp/selfcal/req1236/working # Working directory set to your Lustre area
#SBATCH --mail-type=END,FAIL             # Send email when Jobs end or fail

# casa's python requires a DISPLAY for matplot, so create a virtual X server
xvfb-run  /home/casa/packages/pipeline/casa-6.5.3-28-pipeline-2023.0.0.36/bin/casa --pipeline --nogui -c selfcal_script.py >& casa.out


selfcal_script.py:

# This CASA pipescript is meant for use with CASA 6.5.3 and pipeline 2023.1.0.42
context = h_init()
context.set_state('ProjectSummary', 'observatory', 'Karl G. Jansky Very Large Array')
context.set_state('ProjectSummary', 'telescope', 'EVLA')
try:
    hifv_importdata(vis=['23A-157.sb44369379.eb44370721.60147.8327970949.ms'], datacolumns={'data': 'raw','corrected': 'regcal_contline_all'})
    hifv_flagtargetsdata(pipelinemode="automatic")
    hif_mstransform(pipelinemode="automatic")
    hif_checkproductsize(maximsize=16384)
    hif_makeimlist(specmode='cont',datatype='regcal')
    hif_makeimages(hm_cyclefactor=3.0)
    hif_selfcal(pipelinemode="automatic")
    hif_makeimlist(specmode='cont',datatype='selfcal')
    hif_makeimages(hm_cyclefactor=3.0)
    hifv_pbcor(pipelinemode="automatic")
    hifv_exportdata(imaging_products_only=True)
finally:
    h_save()



  • No labels