Skip to content

Commit

Permalink
delete
Browse files Browse the repository at this point in the history
  • Loading branch information
jurjen93 committed Sep 14, 2023
1 parent a40c8da commit 427d167
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions subtract/subtract_with_wsclean.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ def run_DP3(self, phaseshift: str = None, freqavg: str = None,
parser.add_argument('--output_name', type=str, help='name of output files (default is model image name)')
parser.add_argument('--model_image_folder', type=str,
help='folder where model images are stored (if not given script takes model images from run folder)')
parser.add_argument('--model_images', nargs='+',
help='instead of --model_image_folder, you can also specify the model images to use')
parser.add_argument('--no_local_north', action='store_true', help='do not move box to local north')
parser.add_argument('--use_region_cube', action='store_true', help='use region cube')
parser.add_argument('--h5parm_predict', type=str, help='h5 solution file')
Expand All @@ -544,8 +546,7 @@ def run_DP3(self, phaseshift: str = None, freqavg: str = None,
parser.add_argument('--print_only_commands', action='store_true', help='only print commands for testing purposes')
parser.add_argument('--forwidefield', action='store_true',
help='will search for the polygon_info.csv file to extract information from')
parser.add_argument('--skip_predict', action='store_true',
help='skip predict and do only subtract')
parser.add_argument('--skip_predict', action='store_true', help='skip predict and do only subtract')
args = parser.parse_args()

if not args.skip_predict:
Expand All @@ -564,6 +565,9 @@ def run_DP3(self, phaseshift: str = None, freqavg: str = None,
os.system('cp ' + args.model_image_folder + '/*-model.fits .')
else:
sys.exit("ERROR: missing model images in folder "+args.model_image_folder)
elif args.model_images is not None:
for model in args.model_images:
os.system('cp '+model+' .')

# rename model images
if args.output_name is not None:
Expand Down Expand Up @@ -640,9 +644,9 @@ def run_DP3(self, phaseshift: str = None, freqavg: str = None,
if args.phasecenter is not None or \
args.freqavg is not None or \
args.timeavg is not None or \
args.concat is not None or \
args.applybeam is not None or \
args.applycal is not None:
args.concat or \
args.applybeam or \
args.applycal:
print('############## RUN DP3 ##############')
if args.applycal_h5 is not None:
applycalh5 = args.applycal_h5
Expand All @@ -655,3 +659,7 @@ def run_DP3(self, phaseshift: str = None, freqavg: str = None,

object.run_DP3(phaseshift=phasecenter, freqavg=freqavg, timeavg=timeavg,
concat=args.concat, applybeam=args.applybeam, applycal_h5=applycalh5, dirname=dirname)

print(f"DONE: See output --> sub{object.scale}*.ms")
else:
print(f"DONE: Output is SUBTRACT_DATA column in input MS")

0 comments on commit 427d167

Please sign in to comment.