Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  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. These should also be stored in the working directory.
  3. login to nmpost-master and submit the batch job (from inside the working directory:  "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 it ran OK).
  6. As vlapipe, move the contents of the project directory from the original workspaces directory for the imaging run somewhere safe to e.g. /lustre/aoc/sciops/<your dir>/old_<ws_request id> (just in case..) . Note you need to keep them away from the paths workspaces uses (spool, image-qa in /lustre/aoc/cluster/pipeline/dsoc-prod/workspaces/...) otherwise ingest can fail.
  7. As vlapipe, copy the contents of the new (with selcalselfcal) 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. Report the CASA version that was used for the self-cal process. 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.


Info

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.34-289-pipeline-2023.01.0.36124/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_contl
inecontline_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()



...