add script for tuning demixing
Closes RAP-90, script: tune_demixing_parameters.py
python tune_demixing_parameters.py --MS '/some/path/data/L99*MS' --sky_model /path/to/A-team-model.txt
Will examine all patches in given sky model, and output witch patches to actually use in demixing.
Further tuning with number of iterations, frequency resolution is being developed.
Requirements: LINC, lsmtool, DP3
Merge request reports
Activity
requested review from @alex
assigned to @yatawatta
@yatawatta .. thanks for this great tool. I was just wondering how to incorporate this script into a LINC workflow. It appears to me that this script is writing an output parset rather than returning an output dictionary in order to propagate it through a pipeline. Do you think this could be part of this ticket/MR or should we tackle this in a separate ticket?
I would like to have an output (return value of main) which is a dictionary that provides the following parameters used in LINC:
demixfreqresolution demixtimeresolution subtractsources ntimechunk lbfgs.historysize lbfgs.robustdof
Optional:
freqstep timestep maxiter
If you think more options might need to get specified for a better optimization then we can add it to the LINC parameter list. I would also like to have the possibility to not only provide the input skymodel file, but also a list of patches to be considered (default: all)
added 2 commits
Hi @alex I have addressed your comments, in particular now
_ --patches Patch1 [Patch1 ...] names of patches to subtract if found in sky model, if None, all patches (default: [])_
can be used to specify which directions (like CasA CygA ...) to be considered. Also returns a dict, such as
{'maxiter': 20, 'demixfreqresolution': 195312.5, 'subtractsources': ['TauA', 'VirA'], 'lbfgs.robustdof': 5, 'demixtimeresolution': 10, 'lbfgs.historysize': 10}
'freqstep' , 'timestep' : more to deal with model prediction and subtraction, so default parameters are fine here, optimizing this will not gain muth speedup 'ntimechunk' : more to deal with number of parallel threads to use, so dependent on the system, again the default value is fine (= CPU threads) 'demixtimeresolution' is set at 10 sec, which is reasonable for most observing settings.
Edited by Sarod Yatawatta