Line processing recipe, should also be templateable to select specific spws for line processing.
Main issues to overcome:
- RFI Flagging of spectral lines
- Statwt downweighting spectral lines
- Hanning smoothing lowers spectral resolution
Assumptions:
- The pipeline is able to make use of different MS files in different tasks to facilitate continuum and line processing.
Example Spectral line recipe:
- hifv_importdata
- hifv_hanning(spw='')
- can take spw input for line processing, hanning smooth certain spws, leave other unsmoothed
- uses ms.hanningsmooth tool rather than mstransform
- hifv_flagdata
- hifv_vlasetjy
- hifv_priorcals
- hifv_syspower
- hifv_testBPdcals
- hifv_checkflag
- hifv_semiFinalBPdcals
- hifv_checkflag
- hifv_solint
- hifv_fluxboot
- hifv_finalcals
- hifv_applycals
- hifv_checkflag(checkflagmode='target-vla')
- Task backs up flags before RFI flagging with clear unique name
- e.g., flagmanager(mode='save',vis='20A-390.sb37850360.eb37919292.58894.32864972222.ms',versionname='before_rflag_statwt'),hifv_targetflag(intents='*TARGET*')
- hifv_statwt(pipelinemode="automatic")
- Following statwt, flags are backed up to save state following RFI flagging and statwt calculations
- e.g., flagmanager(mode='save',vis='20A-390.sb37850360.eb37919292.58894.32864972222.ms',versionname='rfi_flagged_statwt')
- hifv_plotsummary(pipelinemode="automatic")
- hif_makeimlist(intent='PHASE,BANDPASS',specmode='cont')
- hif_makeimages(hm_masking='centralregion')
- hif_mstransform(pipelinemode="automatic")
- Splits out a _cont.ms for continuum imaging
- Save flags of the _target or _cont.ms
- e.g.,flagmanager(mode='save',vis='20A-390.sb37850360.eb37919292.58894.32864972222_target.ms',versionname='rfi_flagged_statwt')
- NEW TASK: hifv_splitline
- Can take SPW input to only split out specific spws for line.ms
- restore pre RFI flagging state to main ms
- e.g.,flagmanager(mode='restore',vis='20A-390.sb37850360.eb37919292.58894.32864972222.ms',versionname='before_rflag_statwt')
- split off non non-RFI flagged data to line_temp; main goal is to get an MS with the same shape as the _target.ms to get the flags for non-RFI flagged data
- e.g., mstransform(vis='20A-390.sb37850360.eb37919292.58894.32864972222.ms',outputvis='20A-390.sb37850360.eb37919292.58894.32864972222_line.ms')
- save flags from line MS without rfi flagging
- e.g., flagmanager(mode='save',vis='20A-390.sb37850360.eb37919292.58894.32864972222_line.ms',versionname='before_rflag_statwt')
- Restore flags to main ms:
- e.g., flagmanager(mode='restore',vis='20A-390.sb37850360.eb37919292.58894.32864972222.ms',versionname='rfi_flagged_statwt')
Imaging Steps
hif_makeimlist(specmode='cont')
- Operates only on _cont.ms
hif_makeimages(hm_cyclefactor=3.0)
- Operates only on _cont.ms
- All windows used, no cont.dat used for VLA continuum imaging
- hif_makeimlist(specmode='cube+cont',spw='selected spws')
- Operates on _line.ms non-continuum subtracted
- Only inserted by template recipe if cube+cont is requested for >1 spw
hif_makeimages
- Operates on _line.ms non-continuum subtracted
- Only inserted by template recipe if cube+cont is requested for >1 spw
- hif_makeimlist(specmode='mfs', spw='', MS='line')
- Operates on _line.ms
hif_findcont
- Operates on line.ms to find continuum regions
- hif_uvcontfit
- Operates on _line.ms
hif_uvcontsub
- Operates on _line.ms
- hif_makeimlist(specmode='cube')
- Operates on _line.ms
- Needs updates for VLA to not use deconvolver='mtmfs'
hif_makeimages
Makes line cubes with VLA spectral line heuristics
- Operates on _line.ms
Imaging Steps with notional selfcal
hif_makeimlist(specmode='cont')
- Operates only on _cont.ms
hif_makeimages(hm_masking='none', hm_cyclefactor=3.0)
- Operates only on _cont.ms
- All windows used, no cont.dat used for VLA continuum imaging
- Initial continuum images determine if self-cal is possible
- hif_selfcal
- Operates only on _cont.ms to calculate solutions
- uses combine='spw'
- hif_applyselfcal
- Operates on both cont.ms and line.ms
- Splits out new self_calibrated _cont.ms and _line.ms
- self-cal-able sources now have self-calibrated data
- non-self-cal-able sources have original data
hif_makeimlist(specmode='cont', self_calibrated only=True)
- Operates only on _cont.ms
- Makes self-calibrated images, only for sources where self-cal is accepted
hif_makeimages(hm_masking='none', hm_cyclefactor=3.0)
- Operates only on _cont.ms
- All windows used, no cont.dat used for VLA continuum imaging
- Makes self-calibrated images, only for sources where self-cal is accepted
- hif_makeimlist(specmode='cube+cont',spw='selected spws')
- Operates on _line.ms non-continuum subtracted
- Only inserted by template recipe if cube+cont is requested for >1 spw
hif_makeimages
- Operates on _line.ms non-continuum subtracted
- Only inserted by template recipe if cube+cont is requested for >1 spw
- hif_makeimlist(specmode='mfs', spw='', MS='line')
- Operates on _line.ms
- Operates on the self-calibrated ms
hif_findcont
- Operates on line.ms to fine continuum regions
- Operates on the self-calibrated ms
- hif_uvcontfit
- Operates on _line.ms
- Operates on the self-calibrated ms
hif_uvcontsub
- Operates on _line.ms
- Operates on the self-calibrated ms
- hif_makeimlist(specmode='cube')
- Operates on _line.ms
- Sets up line cubes with VLA spectral line heuristics
- Operates on the self-calibrated ms
hif_makeimages
- Operates on _line.ms
- Makes line cubes with VLA spectral line heuristics
- Operates on the self-calibrated ms