caracal-pipeline / caracal

Containerized Automated Radio Astronomy Calibration (CARACal) pipeline
GNU General Public License v2.0
29 stars 6 forks source link

Incorrect specweights mode for prep worker #1611

Open PhilPhysics opened 1 day ago

PhilPhysics commented 1 day ago

The specweights command within the prep worker has a mode called "uniform" that it calls from the initweights function of CASA. However the caracal pipeline uses the wtmode "weight" instead of wtmode "ones" for uniform. See below:

if pipeline.enable_task(config, "specweights"):
                specwts = config['specweights']["mode"]
                if specwts == "uniform":
                    step = 'init_ws-ms{:d}'.format(i)
                    recipe.add('cab/casa_script', step,
                                {
                                    "vis": msname,
                                    "script": "vis = os.path.join(os.environ['MSDIR'], '{:s}')\n"
                                    "initweights(vis=vis, wtmode='weight', dowtsp=True)".format(msname),
                                },
                                input=pipeline.input,
                                output=pipeline.output,
                                label='{0:s}:: Adding Spectral weights using MeerKAT noise specs ms={1:s}'.format(step, msname))
Athanaseus commented 21 hours ago

Hi @PhilPhysics thank you for reporting this.

Next time, please consider contributing if you think you have a solution that works, and we'll be happy to review it. I have pushed a fix here, #1613.

Best regards