Add qu imaging - #126
Conversation
(AUTO) This script generates polarization cubes from WSClean images, calculating the average noise and frequency for each channel.
Discard channels with rms noise bigger than 5 times the median noise among all channels
Add Shane's file moving function so files don't get written to non-writeable locations
Add missing import modules
fece529 to
f762ea5
Compare
|
|
||
| return str(q_local), str(u_local), str(freq_local) | ||
|
|
||
| def build_rmsynth_cmd(args: argparse.Namespace, qfile: str, ufile: str, freqfile: str,) -> List[str]: |
There was a problem hiding this comment.
Since this is written in Python, use instead the Python packages?
For example: https://github.com/jurjen93/lofar_vlbi_polarization/blob/main/scripts/RMsynt.py
| return parser.parse_args() | ||
|
|
||
| def stage_inputs(args: argparse.Namespace): | ||
| workdir = Path.cwd() |
| return cmd | ||
|
|
||
|
|
||
| def move_outputs(stokes_q_path: str) -> None: |
There was a problem hiding this comment.
Where is this function being used? And why?
If not used: remove
| prefix: '-name' | ||
| - id: scale | ||
| type: string? | ||
| default: "0.75asec" |
There was a problem hiding this comment.
I think this should be 0.075" if we are imaging at 0.3"
| prefix: '-beam-size' | ||
| - id: taper-gaussian | ||
| type: string? | ||
| default: 1.2asec |
There was a problem hiding this comment.
This should be much lower if we are imaging at 0.3" (I set it to 0.25")
| prefix: '-taper-gaussian' | ||
| - id: niter | ||
| type: int | ||
| default: 150000 |
There was a problem hiding this comment.
This can be lower as there is not much to deconvolve in stokes Q and U
| position: 1 | ||
| shellQuote: false | ||
| prefix: '-niter' | ||
| - id: multiscale-scale-bias |
There was a problem hiding this comment.
I don't think we can and have to do multiscale cleaning for linear polarisation
| id: image_polarization | ||
| label: Polarization imaging | ||
| doc: | | ||
| This workflow will image the provided MS in Q and U, and perform Rotation Measure Synthesis to provide linear polarization images. |
There was a problem hiding this comment.
Perhaps add to the doc that this workflow is meant to feed with datasets of target sources, which are averaged to 32 seconds and XXX kHz (and with a phased-up Dutch core?)
|
Other suggestion: split the imaging in imaging IV and QU separately, as they need different commands. The Stokes Q and U imaging also benefits from using a mask from the Stokes I image. |
Adding polarization imaging workflow.
This has been tested on UHHPC, and using the flocs runner such as
flocs-run vlbi polarization-imaging --mspath=../Delay-Calibration_3C351_ep1_delaycal_ddf/facetselfcal/ --ms-suffix=.avg --num-channels 105 --image-size 128 128produces RM cubes successfully.