Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecThomson committed Dec 11, 2023
1 parent fda6d5c commit 13b8089
Showing 1 changed file with 3 additions and 30 deletions.
33 changes: 3 additions & 30 deletions arrakis/linmos.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@ def genparset(
@task(name="Run linmos")
def linmos(
parset: Optional[str], fieldname: str, image: str, holofile: Path
) -> pymongo.UpdateOne:
) -> Optional[pymongo.UpdateOne]:
"""Run linmos
Args:
parset (str): Path to parset file.
fieldname (str): Name of RACS field.
image (str): Name of Yandasoft image.
holofile (Union[Path,str]): Path to the holography file to include in the bind list.
holofile (Path): Path to the holography file to include in the bind list.
verbose (bool, optional): Verbose output. Defaults to False.
Raises:
Expand Down Expand Up @@ -283,7 +283,7 @@ def component_worker(
field: str,
cutdir: Path,
holofile: Optional[Path] = None,
) -> Union[List[str], None]:
) -> Optional[List[str]]:
src = beams["Source_ID"]
if len(comp) == 0:
logger.warn(f"Skipping island {src} -- no components found")
Expand Down Expand Up @@ -377,33 +377,6 @@ def main(

assert len(big_beams) == len(comps)

# parfiles = []
# for beams, comp in zip(big_beams, comps):
# src = beams["Source_ID"]
# if len(comp) == 0:
# logger.warn(f"Skipping island {src} -- no components found")
# continue

# image_dict: Dict[str, ImagePaths] = {}
# for stoke in stokeslist:
# image_paths = find_images.submit(
# field=field,
# src_name=src,
# beams=beams,
# stoke=stoke.capitalize(),
# datadir=cutdir,
# )
# image_dict[stoke] = image_paths

# smooth_dict = smooth_images(image_dict)
# for stoke in stokeslist:
# parfile = genparset.submit(
# image_paths=smooth_dict[stoke],
# stoke=stoke.capitalize(),
# datadir=cutdir,
# holofile=holofile,
# )
# parfiles.append(parfile)
parfiles = component_worker.map(
beams=big_beams,
comp=comps,
Expand Down

0 comments on commit 13b8089

Please sign in to comment.