From c1c616b06caf2e06c63073bbe10f4f8f49494b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20C=C3=A1rcamo?= Date: Thu, 8 Sep 2022 16:25:16 +0100 Subject: [PATCH 01/16] CHG: updating setup.cfg --- setup.cfg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.cfg b/setup.cfg index c70cb4f..9624d6d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,3 +11,8 @@ column_limit = 100 dedent_closing_brackets = true allow_split_before_dict_value = false split_before_bitwise_operator = false + +[isort] +multi_line_output = 3 +include_trailing_comma = true +line_length = 100 \ No newline at end of file From 9d7a385c63e22360aadfbdca94f8224a0dfae209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20C=C3=A1rcamo?= Date: Thu, 8 Sep 2022 16:26:12 +0100 Subject: [PATCH 02/16] CHG: updating setup.cfg --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 9624d6d..1f5baeb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,4 +15,4 @@ split_before_bitwise_operator = false [isort] multi_line_output = 3 include_trailing_comma = true -line_length = 100 \ No newline at end of file +line_length = 100 From 56e623e7e1db4ae8511e4deaf1da8065f4e26260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20C=C3=A1rcamo?= Date: Tue, 13 Sep 2022 18:30:53 +0100 Subject: [PATCH 03/16] CHG: adding dataclasses to selfcalframework --- src/selfcalframework/imaging/gpuvmem.py | 74 +++++++++++------ src/selfcalframework/imaging/imager.py | 70 +++++++--------- src/selfcalframework/imaging/tclean.py | 80 +++++++------------ src/selfcalframework/imaging/wsclean.py | 13 +-- .../selfcalibration/ampcal.py | 3 + src/selfcalframework/selfcalibration/apcal.py | 3 + .../selfcalibration/phasecal.py | 3 + .../selfcalibration/selfcal.py | 2 + 8 files changed, 119 insertions(+), 129 deletions(-) diff --git a/src/selfcalframework/imaging/gpuvmem.py b/src/selfcalframework/imaging/gpuvmem.py index 7592ef7..eb25c7f 100644 --- a/src/selfcalframework/imaging/gpuvmem.py +++ b/src/selfcalframework/imaging/gpuvmem.py @@ -5,34 +5,15 @@ from casatasks import exportfits, fixvis, immath, importfits, tclean from casatools import image +from dataclasses import dataclass, field from ..utils.image_utils import reproject from .imager import Imager +@dataclass(init=False, repr=True) class GPUvmem(Imager): - - def __init__( - self, - executable: str = "gpuvmem", - gpu_blocks: list = [16, 16, 256], - initial_values: list = [], - regfactors: list = [], - gpuids: list = [0], - residual_output: str = "residuals.ms", - model_input: str = None, - model_out: str = "mod_out.fits", - user_mask: str = None, - force_noise: float = None, - gridding_threads: int = 4, - positivity: bool = True, - ftol: float = 1e-12, - noise_cut: float = 10.0, - gridding: bool = False, - print_images: bool = False, - **kwargs - ): - """ + """ gpuvmem imager object Parameters @@ -55,9 +36,54 @@ def __init__( noise_cut : Mask threshold based one the inverse of the primary beam gridding : Whether to grid visibilities or not to increase computation speed print_images : Whether to output the intermediate images during the optimization - kwargs : General imager parameters - """ + """ + executable: str = "gpuvmem" + gpu_blocks: list = None + initial_values: list = field(init=True, repr=True, default_factory=list) + regfactors: list = field(init=True, repr=True, default_factory=list) + gpuids: list = None + residual_output: str = "residuals.ms" + model_input: str = None + model_out: str = "mod_out.fits" + user_mask: str = None + force_noise: float = None + gridding_threads: int = 4 + positivity: bool = True + ftol: float = 1e-12 + noise_cut: float = 10.0 + gridding: bool = False + print_images: bool = False + + def __init__( + self, + executable: str = "gpuvmem", + gpu_blocks: list = [16, 16, 256], + initial_values: list = [], + regfactors: list = [], + gpuids: list = [0], + residual_output: str = "residuals.ms", + model_input: str = None, + model_out: str = "mod_out.fits", + user_mask: str = None, + force_noise: float = None, + gridding_threads: int = 4, + positivity: bool = True, + ftol: float = 1e-12, + noise_cut: float = 10.0, + gridding: bool = False, + print_images: bool = False, + **kwargs + ): + super().__init__(**kwargs) + super().__post_init__() + + if self.gpu_blocks is None: + self.gpu_blocks = [16, 16, 256] + + if self.gpuids is None: + self.gpuids = [0] + self.name = "GPUvmem" self.executable = executable self.gpu_blocks = gpu_blocks diff --git a/src/selfcalframework/imaging/imager.py b/src/selfcalframework/imaging/imager.py index 50ea2da..4b87216 100755 --- a/src/selfcalframework/imaging/imager.py +++ b/src/selfcalframework/imaging/imager.py @@ -1,30 +1,13 @@ from abc import ABCMeta, abstractmethod +from dataclasses import dataclass +from dataclasses import field as _field from ..utils import (calculate_number_antennas, calculate_psnr_fits, calculate_psnr_ms) +@dataclass(init=True, repr=True) class Imager(metaclass=ABCMeta): - - def __init__( - self, - inputvis: str = "", - output: str = "", - cell: str = "", - robust: float = 2.0, - weighting: str = "briggs", - field: str = "", - spw: str = "", - stokes: str = "I", - phase_center: str = "", - data_column: str = "corrected", - M: int = 512, - N: int = 512, - niter: int = 100, - noise_pixels: int = None, - save_model: bool = True, - verbose: bool = True - ): - """ + """ General Imager object Parameters @@ -66,31 +49,32 @@ def __init__( Whether to save the model column or not verbose : Whether to use verbose option for imagers - """ - self.inputvis = inputvis - self.output = output - self.cell = cell - self.robust = robust - self.weighting = weighting - self.field = field - self.spw = spw - self.stokes = stokes - self.phase_center = phase_center - self.data_column = data_column - self.M = M - self.N = N - self.niter = niter - self.noise_pixels = noise_pixels - self.save_model = save_model - self.verbose = verbose - self.psnr = 0.0 - self.peak = 0.0 - self.stdv = 0.0 - self.name = "" + """ + inputvis: str = "" + output: str = "" + cell: str = "" + robust: float = 2.0 + weighting: str = "briggs" + field: str = "" + spw: str = "" + stokes: str = "I" + phase_center: str = "" + data_column: str = "corrected" + M: int = 512 + N: int = 512 + niter: int = 100 + noise_pixels: int = None + save_model: bool = True + verbose: bool = True + psnr: float = _field(init=False, default=0.0) + peak: float = _field(init=False, default=0.0) + stdv: float = _field(init=False, default=0.0) + name: float = _field(init=False, default="") + nantennas: int = _field(init=False, default=0) + def __post_init__(self): if self.inputvis is not None and self.inputvis != "": self.nantennas = calculate_number_antennas(self.inputvis) - # self.__dict__.update(kwargs) def _calculate_statistics_fits( self, signal_fits_name="", residual_fits_name="", stdv_pixels=None diff --git a/src/selfcalframework/imaging/tclean.py b/src/selfcalframework/imaging/tclean.py index 4828a5e..02c05ff 100644 --- a/src/selfcalframework/imaging/tclean.py +++ b/src/selfcalframework/imaging/tclean.py @@ -1,36 +1,12 @@ from casatasks import tclean +from dataclasses import dataclass, field from .imager import Imager +@dataclass(init=True, repr=True) class Tclean(Imager): - - def __init__( - self, - nterms: int = 1, - threshold: int = 0.0, - nsigma: int = 0.0, - interactive: bool = False, - mask: str = "", - use_mask: str = "auto-multithresh", - negative_threshold: float = 0.0, - low_noise_threshold: float = 1.5, - noise_threshold: float = 4.25, - sidelobe_threshold: float = 2.0, - min_beam_frac: float = 0.3, - specmode: str = "", - gridder: str = "standard", - wproj_planes: int = -1, - deconvolver: str = "hogbom", - uvtaper: list = [], - scales: list = [], - uvrange: str = "", - pbcor: bool = False, - cycle_niter: int = 0, - clean_savemodel: str = None, - **kwargs - ): - """ + """ tclean imager object Parameters @@ -87,30 +63,32 @@ def __init__( Options to save model visibilities (none, virtual, modelcolumn) kwargs : General imager arguments - """ - super().__init__(**kwargs) - self.name = "TClean" - self.nterms = nterms - self.threshold = threshold - self.nsigma = nsigma - self.interactive = interactive - self.mask = mask - self.use_mask = use_mask - self.negative_threshold = negative_threshold - self.low_noise_threshold = low_noise_threshold - self.noise_threshold = noise_threshold - self.sidelobe_threshold = sidelobe_threshold - self.min_beam_frac = min_beam_frac - self.specmode = specmode - self.gridder = gridder - self.wproj_planes = wproj_planes - self.deconvolver = deconvolver - self.uvtaper = uvtaper - self.scales = scales - self.uvrange = uvrange - self.pbcor = pbcor - self.cycle_niter = cycle_niter - self.clean_savemodel = clean_savemodel + """ + nterms: int = 1 + threshold: int = 0.0 + nsigma: int = 0.0 + interactive: bool = False + mask: str = "" + use_mask: str = "auto-multithresh" + negative_threshold: float = 0.0 + low_noise_threshold: float = 1.5 + noise_threshold: float = 4.25 + sidelobe_threshold: float = 2.0 + min_beam_frac: float = 0.3 + specmode: str = "" + gridder: str = "standard" + wproj_planes: int = -1 + deconvolver: str = "hogbom" + uvtaper: list = field(init=True, repr=True, default_factory=list) + scales: list = field(init=True, repr=True, default_factory=list) + uvrange: str = "" + pbcor: bool = False + cycle_niter: int = 0 + clean_savemodel: str = field(init=False, repr=True, default=None) + + def __post_init__(self): + + super().__post_init__() if self.save_model: self.clean_savemodel = "modelcolumn" diff --git a/src/selfcalframework/imaging/wsclean.py b/src/selfcalframework/imaging/wsclean.py index d3a8513..35f0593 100644 --- a/src/selfcalframework/imaging/wsclean.py +++ b/src/selfcalframework/imaging/wsclean.py @@ -1,19 +1,10 @@ +from dataclasses import dataclass from .imager import Imager +@dataclass(init=True, repr=True) class WSClean(Imager): - def __init__(self, **kwargs): - """ - WSClean object - - Parameters - ---------- - kwargs : - General imager arguments - """ - super().__init__(**kwargs) - def run(self, imagename=""): """ Method that runs WSClean diff --git a/src/selfcalframework/selfcalibration/ampcal.py b/src/selfcalframework/selfcalibration/ampcal.py index 88aa3df..e237766 100644 --- a/src/selfcalframework/selfcalibration/ampcal.py +++ b/src/selfcalframework/selfcalibration/ampcal.py @@ -1,8 +1,11 @@ +from dataclasses import dataclass + from casatasks import applycal, gaincal, rmtables from .selfcal import Selfcal +@dataclass(init=False, repr=True) class Ampcal(Selfcal): def __init__(self, solnorm: bool = True, **kwargs): diff --git a/src/selfcalframework/selfcalibration/apcal.py b/src/selfcalframework/selfcalibration/apcal.py index 40022ff..32f28f5 100644 --- a/src/selfcalframework/selfcalibration/apcal.py +++ b/src/selfcalframework/selfcalibration/apcal.py @@ -1,8 +1,11 @@ +from dataclasses import dataclass + from casatasks import applycal, gaincal, rmtables from .selfcal import Selfcal +@dataclass(init=False, repr=True) class AmpPhasecal(Selfcal): def __init__(self, incremental: bool = False, solnorm: bool = True, **kwargs): diff --git a/src/selfcalframework/selfcalibration/phasecal.py b/src/selfcalframework/selfcalibration/phasecal.py index 8259947..f980974 100644 --- a/src/selfcalframework/selfcalibration/phasecal.py +++ b/src/selfcalframework/selfcalibration/phasecal.py @@ -1,8 +1,11 @@ +from dataclasses import dataclass + from casatasks import applycal, gaincal, rmtables from .selfcal import Selfcal +@dataclass(init=False, repr=True) class Phasecal(Selfcal): def __init__(self, **kwargs): diff --git a/src/selfcalframework/selfcalibration/selfcal.py b/src/selfcalframework/selfcalibration/selfcal.py index d122f80..c407261 100755 --- a/src/selfcalframework/selfcalibration/selfcal.py +++ b/src/selfcalframework/selfcalibration/selfcal.py @@ -5,6 +5,7 @@ import shutil from abc import ABCMeta, abstractmethod from pathlib import Path +from dataclasses import dataclass from casatasks import (clearcal, delmod, flagdata, flagmanager, split, statwt, uvsub) from casatools import table @@ -14,6 +15,7 @@ tb = table() +@dataclass(init=False, repr=True) class Selfcal(metaclass=ABCMeta): def __init__( From ea6911eb50389473227f25248c460746a1057fb2 Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Mon, 10 Oct 2022 20:03:39 +0100 Subject: [PATCH 04/16] FIX: fixing ms file name bug --- .../selfcalibration/selfcal.py | 38 ++++++++++++++----- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/src/selfcalframework/selfcalibration/selfcal.py b/src/selfcalframework/selfcalibration/selfcal.py index c407261..fdb99e0 100755 --- a/src/selfcalframework/selfcalibration/selfcal.py +++ b/src/selfcalframework/selfcalibration/selfcal.py @@ -116,13 +116,26 @@ def __init__( self.flag_dataset = flag_dataset self.restore_psnr = restore_psnr self.subtract_source = subtract_source + + if self.visfile is not None: + path_object = Path(self.visfile) + + current_visfile = "{0}_{2}{1}".format( + Path.joinpath(path_object.parent, path_object.stem), path_object.suffix, + self._calmode + ) + # Copying dataset and overwriting if it has already been created + if os.path.exists(current_visfile): + shutil.rmtree(current_visfile) + shutil.copytree(self.visfile, current_visfile) + # Protected variables self._caltables = [] self._caltables_versions = [] self._psnr_history = [] self._calmode = "" self._loops = 0 - self._psnr_visfile_backup = visfile + self._psnr_visfile_backup = self.visfile if self.imager is None: self._image_name = "" @@ -190,6 +203,19 @@ def input_caltable(self, caltable): else: self.__input_caltable = "" + def copy_directory_during_iterations(self, iteration): + path_object = Path(self.visfile) + + current_visfile = "{0}_{2}{1}".format( + Path.joinpath(path_object.parent, path_object.stem), path_object.suffix, str(iteration) + ) + # Copying dataset and overwriting if it has already been created + if os.path.exists(current_visfile): + shutil.rmtree(current_visfile) + shutil.copytree(self.visfile, current_visfile) + + return current_visfile + def _save_selfcal(self, caltable_version="", overwrite=True) -> None: """ Protected function that saves the flags using CASA flag manager @@ -341,16 +367,8 @@ def _finish_selfcal_iteration(self, current_iteration: int = 0) -> bool: format(current_iteration) ) - path_object = Path(self.visfile) + current_visfile = self.copy_directory_during_iterations(current_iteration) - current_visfile = "{0}_{2}{1}".format( - Path.joinpath(path_object.parent, path_object.stem), path_object.suffix, - self._calmode + str(current_iteration) - ) - # Copying dataset and overwriting if it has already been created - if os.path.exists(current_visfile): - shutil.rmtree(current_visfile) - shutil.copytree(self.visfile, current_visfile) # Saving old visfile name self._psnr_visfile_backup = self.visfile # Changing visfile attribute to new current_visfile for selfcal and imager From 764ae031b598cacc49e1d369d0dadcbf5492b275 Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Mon, 10 Oct 2022 20:05:32 +0100 Subject: [PATCH 05/16] FIX: fixing ms file name bug --- src/selfcalframework/selfcalibration/selfcal.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/selfcalframework/selfcalibration/selfcal.py b/src/selfcalframework/selfcalibration/selfcal.py index fdb99e0..828b745 100755 --- a/src/selfcalframework/selfcalibration/selfcal.py +++ b/src/selfcalframework/selfcalibration/selfcal.py @@ -128,6 +128,7 @@ def __init__( if os.path.exists(current_visfile): shutil.rmtree(current_visfile) shutil.copytree(self.visfile, current_visfile) + self.visfile = current_visfile # Protected variables self._caltables = [] From 82ea0f3a80a945e3224421c62d37e94f0ab1c145 Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Mon, 10 Oct 2022 20:20:17 +0100 Subject: [PATCH 06/16] FIX: fixing ms file name bug --- .../selfcalibration/ampcal.py | 1 + src/selfcalframework/selfcalibration/apcal.py | 1 + .../selfcalibration/phasecal.py | 1 + .../selfcalibration/selfcal.py | 31 ++++++++++--------- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/selfcalframework/selfcalibration/ampcal.py b/src/selfcalframework/selfcalibration/ampcal.py index e237766..782e4b7 100644 --- a/src/selfcalframework/selfcalibration/ampcal.py +++ b/src/selfcalframework/selfcalibration/ampcal.py @@ -25,6 +25,7 @@ def __init__(self, solnorm: bool = True, **kwargs): self._loops = len(self.solint) self.__solnorm = solnorm + self._copy_directory_at_start() self._init_selfcal() def run(self): diff --git a/src/selfcalframework/selfcalibration/apcal.py b/src/selfcalframework/selfcalibration/apcal.py index 32f28f5..26d1f10 100644 --- a/src/selfcalframework/selfcalibration/apcal.py +++ b/src/selfcalframework/selfcalibration/apcal.py @@ -28,6 +28,7 @@ def __init__(self, incremental: bool = False, solnorm: bool = True, **kwargs): self.__incremental = incremental self.__solnorm = solnorm + self._copy_directory_at_start() self._init_selfcal() def run(self): diff --git a/src/selfcalframework/selfcalibration/phasecal.py b/src/selfcalframework/selfcalibration/phasecal.py index f980974..6a4caed 100644 --- a/src/selfcalframework/selfcalibration/phasecal.py +++ b/src/selfcalframework/selfcalibration/phasecal.py @@ -22,6 +22,7 @@ def __init__(self, **kwargs): self._calmode = 'p' self._loops = len(self.solint) + self._copy_directory_at_start() self._init_selfcal() def run(self): diff --git a/src/selfcalframework/selfcalibration/selfcal.py b/src/selfcalframework/selfcalibration/selfcal.py index 828b745..f37ca9f 100755 --- a/src/selfcalframework/selfcalibration/selfcal.py +++ b/src/selfcalframework/selfcalibration/selfcal.py @@ -117,19 +117,6 @@ def __init__( self.restore_psnr = restore_psnr self.subtract_source = subtract_source - if self.visfile is not None: - path_object = Path(self.visfile) - - current_visfile = "{0}_{2}{1}".format( - Path.joinpath(path_object.parent, path_object.stem), path_object.suffix, - self._calmode - ) - # Copying dataset and overwriting if it has already been created - if os.path.exists(current_visfile): - shutil.rmtree(current_visfile) - shutil.copytree(self.visfile, current_visfile) - self.visfile = current_visfile - # Protected variables self._caltables = [] self._caltables_versions = [] @@ -204,7 +191,21 @@ def input_caltable(self, caltable): else: self.__input_caltable = "" - def copy_directory_during_iterations(self, iteration): + def _copy_directory_at_start(self): + if self.visfile is not None: + path_object = Path(self.visfile) + + current_visfile = "{0}_{2}{1}".format( + Path.joinpath(path_object.parent, path_object.stem), path_object.suffix, + self._calmode + ) + # Copying dataset and overwriting if it has already been created + if os.path.exists(current_visfile): + shutil.rmtree(current_visfile) + shutil.copytree(self.visfile, current_visfile) + self.visfile = current_visfile + + def _copy_directory_during_iterations(self, iteration): path_object = Path(self.visfile) current_visfile = "{0}_{2}{1}".format( @@ -368,7 +369,7 @@ def _finish_selfcal_iteration(self, current_iteration: int = 0) -> bool: format(current_iteration) ) - current_visfile = self.copy_directory_during_iterations(current_iteration) + current_visfile = self._copy_directory_during_iterations(current_iteration) # Saving old visfile name self._psnr_visfile_backup = self.visfile From db40b62e7d0af9cb36a7ae4b88e84d24b65ec5f4 Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Tue, 11 Oct 2022 10:58:29 +0100 Subject: [PATCH 07/16] FIX: fixing ms file name bug --- src/selfcalframework/selfcalibration/selfcal.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/selfcalframework/selfcalibration/selfcal.py b/src/selfcalframework/selfcalibration/selfcal.py index f37ca9f..5a24801 100755 --- a/src/selfcalframework/selfcalibration/selfcal.py +++ b/src/selfcalframework/selfcalibration/selfcal.py @@ -204,6 +204,7 @@ def _copy_directory_at_start(self): shutil.rmtree(current_visfile) shutil.copytree(self.visfile, current_visfile) self.visfile = current_visfile + self.imager.inputvis = current_visfile def _copy_directory_during_iterations(self, iteration): path_object = Path(self.visfile) @@ -362,6 +363,7 @@ def _finish_selfcal_iteration(self, current_iteration: int = 0) -> bool: self._caltables.pop() # Restoring to last MS self.visfile = self._psnr_visfile_backup + self.imager.inputvis = self._psnr_visfile_backup return True else: print( From fc9c68659bbf2c4caac81c029fa06679f92b199d Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Tue, 11 Oct 2022 18:14:39 +0100 Subject: [PATCH 08/16] CHG: adding print to check to which ms file are we applying the calibration --- src/selfcalframework/selfcalibration/ampcal.py | 1 + src/selfcalframework/selfcalibration/apcal.py | 1 + src/selfcalframework/selfcalibration/phasecal.py | 1 + 3 files changed, 3 insertions(+) diff --git a/src/selfcalframework/selfcalibration/ampcal.py b/src/selfcalframework/selfcalibration/ampcal.py index 782e4b7..2828c5b 100644 --- a/src/selfcalframework/selfcalibration/ampcal.py +++ b/src/selfcalframework/selfcalibration/ampcal.py @@ -73,6 +73,7 @@ def run(self): self._save_selfcal(caltable_version=version_name, overwrite=True) self._caltables_versions.append(version_name) + print("Applying calibration tables to {0} file".format(self.visfile)) applycal( vis=self.visfile, spw=self.imager.spw, diff --git a/src/selfcalframework/selfcalibration/apcal.py b/src/selfcalframework/selfcalibration/apcal.py index 26d1f10..bad44b6 100644 --- a/src/selfcalframework/selfcalibration/apcal.py +++ b/src/selfcalframework/selfcalibration/apcal.py @@ -91,6 +91,7 @@ def run(self): self._save_selfcal(caltable_version=version_name, overwrite=True) self._caltables_versions.append(version_name) + print("Applying calibration tables to {0} file".format(self.visfile)) if self.__incremental: applycal( vis=self.visfile, diff --git a/src/selfcalframework/selfcalibration/phasecal.py b/src/selfcalframework/selfcalibration/phasecal.py index 6a4caed..534e1d8 100644 --- a/src/selfcalframework/selfcalibration/phasecal.py +++ b/src/selfcalframework/selfcalibration/phasecal.py @@ -68,6 +68,7 @@ def run(self): self._save_selfcal(caltable_version=version_name, overwrite=True) self._caltables_versions.append(version_name) + print("Applying calibration tables to {0} file".format(self.visfile)) applycal( vis=self.visfile, field=self.imager.field, From c8a3dc3b3460125dd5c38ea14bdb9cae9efa61f1 Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Tue, 11 Oct 2022 19:59:10 +0100 Subject: [PATCH 09/16] CHG: adding print to check to which ms file are we applying the calibration --- src/selfcalframework/selfcalibration/selfcal.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/selfcalframework/selfcalibration/selfcal.py b/src/selfcalframework/selfcalibration/selfcal.py index 5a24801..be7e09b 100755 --- a/src/selfcalframework/selfcalibration/selfcal.py +++ b/src/selfcalframework/selfcalibration/selfcal.py @@ -197,7 +197,7 @@ def _copy_directory_at_start(self): current_visfile = "{0}_{2}{1}".format( Path.joinpath(path_object.parent, path_object.stem), path_object.suffix, - self._calmode + self._calmode + "0" ) # Copying dataset and overwriting if it has already been created if os.path.exists(current_visfile): @@ -210,7 +210,8 @@ def _copy_directory_during_iterations(self, iteration): path_object = Path(self.visfile) current_visfile = "{0}_{2}{1}".format( - Path.joinpath(path_object.parent, path_object.stem), path_object.suffix, str(iteration) + Path.joinpath(path_object.parent, path_object.stem), path_object.suffix, + self._calmode + str(iteration + 1) ) # Copying dataset and overwriting if it has already been created if os.path.exists(current_visfile): From eed61127ee1cb565ed54b1a454c0a8d8ebf66872 Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Wed, 26 Oct 2022 12:48:15 +0100 Subject: [PATCH 10/16] CHG: adding warning when corrected data column is not found --- .../selfcalibration/selfcal.py | 17 +++++++++-- src/selfcalframework/utils/selfcal_utils.py | 30 +++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/src/selfcalframework/selfcalibration/selfcal.py b/src/selfcalframework/selfcalibration/selfcal.py index be7e09b..17ff4ea 100755 --- a/src/selfcalframework/selfcalibration/selfcal.py +++ b/src/selfcalframework/selfcalibration/selfcal.py @@ -3,6 +3,7 @@ import copy import os import shutil +import warnings from abc import ABCMeta, abstractmethod from pathlib import Path from dataclasses import dataclass @@ -11,6 +12,7 @@ from casatools import table from ..imaging.imager import Imager +from ..utils.selfcal_utils import is_column_in_ms tb = table() @@ -509,10 +511,19 @@ def selfcal_output(self, overwrite=False, _statwt=False) -> str: Name of the self-calibrated measurement set file """ output_vis = self.visfile + '.selfcal' - + data_column = "" if overwrite: - os.system('rm -rf ' + output_vis) - split(vis=self.visfile, outputvis=output_vis, datacolumn='corrected') + if os.path.exists(output_vis): + shutil.rmtree(output_vis) + if is_column_in_ms(self.visfile, "CORRECTED_DATA"): + data_column = "corrected" + else: + # Raise warning + warnings.warn( + "Corrected data column is not present, data column will be extracted instead." + ) + data_column = "data" + split(vis=self.visfile, outputvis=output_vis, datacolumn=data_column) if _statwt: statwt_path = output_vis + '.statwt' if os.path.exists(statwt_path): diff --git a/src/selfcalframework/utils/selfcal_utils.py b/src/selfcalframework/utils/selfcal_utils.py index 442b50d..cb30caf 100755 --- a/src/selfcalframework/utils/selfcal_utils.py +++ b/src/selfcalframework/utils/selfcal_utils.py @@ -5,6 +5,36 @@ tb = table() +def is_column_in_ms(ms_name: str = "", column_name: str = "") -> bool: + """ + Function that returns True if column_name is present in Measurement Set file + + Parameters + ---------- + ms_name : + Measurement set name + column_name: + Column name + + Returns + ------- + True if column_name exists False otherwise + """ + if ms_name != "": + if os.path.exists(ms_name): + # Check if data_column is present in measurement set file + tb.open(tablename=ms_name) + col_names = tb.colnames() + if column_name in col_names: + return True + else: + return False + else: + raise FileNotFoundError("The Measurement Set File does not exist") + else: + raise ValueError("Measurement Set File cannot be empty") + + def get_table_rows(ms_table: str = "") -> int: """ Function that returns the number of rows of a measurement set table From 92f27908d260674e8aecadf74b9813deecc3c29e Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Wed, 26 Oct 2022 13:42:25 +0100 Subject: [PATCH 11/16] CHG: changing name --- .github/workflows/build.yaml | 8 +++--- .github/workflows/build_latest_container.yaml | 2 +- .gitignore | 2 +- Dockerfile | 4 +-- Dockerfile.prod | 10 +++---- README.md | 27 ++++++++++--------- main_files/main_ALMA.py | 4 +-- main_files/main_VLA.py | 4 +-- main_files/main_eMERLIN.py | 4 +-- pyproject.toml | 6 ++--- setup.cfg | 4 +-- src/{selfcalframework => snow}/__init__.py | 0 .../imaging/__init__.py | 0 .../imaging/gpuvmem.py | 0 .../imaging/imager.py | 0 .../imaging/tclean.py | 0 .../imaging/wsclean.py | 0 .../selfcalibration/__init__.py | 0 .../selfcalibration/ampcal.py | 0 .../selfcalibration/apcal.py | 0 .../selfcalibration/phasecal.py | 0 .../selfcalibration/selfcal.py | 0 .../utils/__init__.py | 0 .../utils/image_utils.py | 0 .../utils/selfcal_utils.py | 0 25 files changed, 38 insertions(+), 37 deletions(-) rename src/{selfcalframework => snow}/__init__.py (100%) rename src/{selfcalframework => snow}/imaging/__init__.py (100%) rename src/{selfcalframework => snow}/imaging/gpuvmem.py (100%) rename src/{selfcalframework => snow}/imaging/imager.py (100%) rename src/{selfcalframework => snow}/imaging/tclean.py (100%) rename src/{selfcalframework => snow}/imaging/wsclean.py (100%) rename src/{selfcalframework => snow}/selfcalibration/__init__.py (100%) rename src/{selfcalframework => snow}/selfcalibration/ampcal.py (100%) rename src/{selfcalframework => snow}/selfcalibration/apcal.py (100%) rename src/{selfcalframework => snow}/selfcalibration/phasecal.py (100%) rename src/{selfcalframework => snow}/selfcalibration/selfcal.py (100%) rename src/{selfcalframework => snow}/utils/__init__.py (100%) rename src/{selfcalframework => snow}/utils/image_utils.py (100%) rename src/{selfcalframework => snow}/utils/selfcal_utils.py (100%) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c4b7597..b02b709 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -47,12 +47,12 @@ jobs: run: python3 -m build - name: Build bdist package run: python3 setup.py bdist_wheel - - name: Install selfcalframework + - name: Install snow run: pip install dist/*.tar.gz - name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: selfcalframework-artifacts + name: snow-artifacts path: dist/* - name: Run commands to test that everything is OK run: | @@ -81,9 +81,9 @@ jobs: - uses: actions/download-artifact@v3 id: download with: - name: selfcalframework-artifacts + name: snow-artifacts path: dist/ - - name: Install selfcalframework from artifacts + - name: Install snow from artifacts run: pip3 install dist/*.tar.gz #- name: Test with pytest and pycov # run: pytest --cov=csromer --cov-report xml:coverage.xml --cov-report term-missing tests/ -W "ignore" -v diff --git a/.github/workflows/build_latest_container.yaml b/.github/workflows/build_latest_container.yaml index fdc58ea..cfd7094 100644 --- a/.github/workflows/build_latest_container.yaml +++ b/.github/workflows/build_latest_container.yaml @@ -51,7 +51,7 @@ jobs: run: python3 -m build - name: Build bdist package run: python3 setup.py bdist_wheel - - name: Install selfcalframework + - name: Install snow run: pip install dist/*.tar.gz - name: Upload artifacts uses: actions/upload-artifact@v3 diff --git a/.gitignore b/.gitignore index d2beb3e..f1b9de1 100755 --- a/.gitignore +++ b/.gitignore @@ -128,4 +128,4 @@ dmypy.json # Pyre type checker .pyre/ -!/src/selfcalframework/_version.py +!/src/snow/_version.py diff --git a/Dockerfile b/Dockerfile index 83b79cd..32a2891 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,5 +38,5 @@ RUN python3 --version RUN pip3 --version RUN python3 -m pip install --upgrade pip RUN python3 -m pip install mpi4py --no-cache-dir -RUN echo "Hello from selfcalframework base image" -LABEL org.opencontainers.image.source="https://github.com/miguelcarcamov/selfcalframework" +RUN echo "Hello from snow base image" +LABEL org.opencontainers.image.source="https://github.com/miguelcarcamov/snow" diff --git a/Dockerfile.prod b/Dockerfile.prod index ca34c1a..8993c17 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,8 +1,8 @@ -FROM ghcr.io/miguelcarcamov/selfcalframework:base +FROM ghcr.io/miguelcarcamov/snow:base RUN python3 --version RUN pip3 --version -RUN echo "Installing selfcalframework" -RUN pip3 install git+https://github.com/miguelcarcamov/selfcalframework.git -RUN echo "Hello from selfcalframework production image" -LABEL org.opencontainers.image.source="https://github.com/miguelcarcamov/selfcalframework" +RUN echo "Installing snow" +RUN pip3 install git+https://github.com/miguelcarcamov/snow.git +RUN echo "Hello from snow production image" +LABEL org.opencontainers.image.source="https://github.com/miguelcarcamov/snow" diff --git a/README.md b/README.md index 6fc2f7f..78560cb 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -# Object Oriented Framework for Self-calibration of radio-interferometric datasets +# **SNOW** -Many radioastronomers repeat the process of writing different scripts for self-calibration +## ca**S**a pytho**N** self-calibrati**O**n frame**W**ork + +Many radio-astronomers repeat the process of writing different scripts for self-calibration depending on their datasets. This repository holds an object-oriented Framework for self-calibration of radio-interferometric datasets that will help radio astronomers to minimize the tedious work of writing self-calibration scripts once again. The idea is to call just one main Python script that @@ -17,42 +19,41 @@ objects (phase, amplitude, amplitude-phase) having the self-calibrated dataset a ### From PYPI repository -- `pip install selfcalframework` +- `pip install snow` ### From Github -- `pip install -U git+https://github.com/miguelcarcamov/selfcalframework` +- `pip install -U git+https://github.com/miguelcarcamov/snow` ### From source ```bash -git clone https://github.com/miguelcarcamov/selfcalframework -cd selfcalframework +git clone https://github.com/miguelcarcamov/snow +cd snow pip install . ``` ### From source as developer ```bash -git clone https://github.com/miguelcarcamov/selfcalframework -cd selfcalframework +git clone https://github.com/miguelcarcamov/snow +cd snow pip install e . ``` ## Using docker container ```bash -docker pull ghcr.io/miguelcarcamov/selfcalframework:latest +docker pull ghcr.io/miguelcarcamov/snow:latest ``` -## Run selfcalframework +## Run snow ```Python # Import the modules that you want to use import sys -import numpy as np -from src.selfcalframework.selfcalibration import Phasecal, AmpPhasecal -from src.selfcalframework.imaging import Tclean +from snow.selfcalibration import Phasecal, AmpPhasecal +from snow.imaging import Tclean if __name__ == '__main__': # This step is up to you, and option to capture your arguments from terminal is using sys.argv diff --git a/main_files/main_ALMA.py b/main_files/main_ALMA.py index bf2efc0..f6511c6 100755 --- a/main_files/main_ALMA.py +++ b/main_files/main_ALMA.py @@ -1,6 +1,6 @@ import sys -from src.selfcalframework.imaging import Tclean -from src.selfcalframework.selfcalibration import AmpPhasecal, Phasecal +from snow.imaging import Tclean +from snow.selfcalibration import AmpPhasecal, Phasecal if __name__ == '__main__': visfile = sys.argv[3] diff --git a/main_files/main_VLA.py b/main_files/main_VLA.py index 7fbcb99..0dd4b0e 100755 --- a/main_files/main_VLA.py +++ b/main_files/main_VLA.py @@ -1,6 +1,6 @@ import sys -from src.selfcalframework.imaging import Tclean -from src.selfcalframework.selfcalibration import AmpPhasecal, Phasecal +from snow.imaging import Tclean +from snow.selfcalibration import AmpPhasecal, Phasecal if __name__ == '__main__': visfile = sys.argv[3] diff --git a/main_files/main_eMERLIN.py b/main_files/main_eMERLIN.py index 4ee793a..bfde915 100755 --- a/main_files/main_eMERLIN.py +++ b/main_files/main_eMERLIN.py @@ -2,8 +2,8 @@ import sys from casatasks import flagdata, mstransform, flagmanager -from src.selfcalframework.imaging import Tclean -from src.selfcalframework.selfcalibration import AmpPhasecal +from snow.imaging import Tclean +from snow.selfcalibration import AmpPhasecal if __name__ == '__main__': diff --git a/pyproject.toml b/pyproject.toml index d5b4493..83246cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=62.6.0", "setuptools-scm", "wheel"] build-backend = "setuptools.build_meta" [project] -name = "selfcalframework" +name = "snow" authors = [ {name = "Miguel Cárcamo", email = "miguel.carcamo@manchester.ac.uk"}, ] @@ -25,8 +25,8 @@ Source = "https://github.com/miguelcarcamov/selfcalframework" [tool.setuptools.packages.find] where = ["src"] -include = ["selfcalframework*"] +include = ["snow*"] namespaces = false [tool.setuptools_scm] -write_to = "src/selfcalframework/_version.py" +write_to = "src/snow/_version.py" diff --git a/setup.cfg b/setup.cfg index 1f5baeb..5ca01aa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] -name = selfcalframework -version = attr: selfcalframework.__version__ +name = snow +version = attr: snow.__version__ description = A Python object oriented framework to do self-calibration long_description = file: README.md long_description_content_type = text/markdown diff --git a/src/selfcalframework/__init__.py b/src/snow/__init__.py similarity index 100% rename from src/selfcalframework/__init__.py rename to src/snow/__init__.py diff --git a/src/selfcalframework/imaging/__init__.py b/src/snow/imaging/__init__.py similarity index 100% rename from src/selfcalframework/imaging/__init__.py rename to src/snow/imaging/__init__.py diff --git a/src/selfcalframework/imaging/gpuvmem.py b/src/snow/imaging/gpuvmem.py similarity index 100% rename from src/selfcalframework/imaging/gpuvmem.py rename to src/snow/imaging/gpuvmem.py diff --git a/src/selfcalframework/imaging/imager.py b/src/snow/imaging/imager.py similarity index 100% rename from src/selfcalframework/imaging/imager.py rename to src/snow/imaging/imager.py diff --git a/src/selfcalframework/imaging/tclean.py b/src/snow/imaging/tclean.py similarity index 100% rename from src/selfcalframework/imaging/tclean.py rename to src/snow/imaging/tclean.py diff --git a/src/selfcalframework/imaging/wsclean.py b/src/snow/imaging/wsclean.py similarity index 100% rename from src/selfcalframework/imaging/wsclean.py rename to src/snow/imaging/wsclean.py diff --git a/src/selfcalframework/selfcalibration/__init__.py b/src/snow/selfcalibration/__init__.py similarity index 100% rename from src/selfcalframework/selfcalibration/__init__.py rename to src/snow/selfcalibration/__init__.py diff --git a/src/selfcalframework/selfcalibration/ampcal.py b/src/snow/selfcalibration/ampcal.py similarity index 100% rename from src/selfcalframework/selfcalibration/ampcal.py rename to src/snow/selfcalibration/ampcal.py diff --git a/src/selfcalframework/selfcalibration/apcal.py b/src/snow/selfcalibration/apcal.py similarity index 100% rename from src/selfcalframework/selfcalibration/apcal.py rename to src/snow/selfcalibration/apcal.py diff --git a/src/selfcalframework/selfcalibration/phasecal.py b/src/snow/selfcalibration/phasecal.py similarity index 100% rename from src/selfcalframework/selfcalibration/phasecal.py rename to src/snow/selfcalibration/phasecal.py diff --git a/src/selfcalframework/selfcalibration/selfcal.py b/src/snow/selfcalibration/selfcal.py similarity index 100% rename from src/selfcalframework/selfcalibration/selfcal.py rename to src/snow/selfcalibration/selfcal.py diff --git a/src/selfcalframework/utils/__init__.py b/src/snow/utils/__init__.py similarity index 100% rename from src/selfcalframework/utils/__init__.py rename to src/snow/utils/__init__.py diff --git a/src/selfcalframework/utils/image_utils.py b/src/snow/utils/image_utils.py similarity index 100% rename from src/selfcalframework/utils/image_utils.py rename to src/snow/utils/image_utils.py diff --git a/src/selfcalframework/utils/selfcal_utils.py b/src/snow/utils/selfcal_utils.py similarity index 100% rename from src/selfcalframework/utils/selfcal_utils.py rename to src/snow/utils/selfcal_utils.py From a70a79486c3e475946e3dfb9486c0231353e64ad Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Wed, 26 Oct 2022 13:57:16 +0100 Subject: [PATCH 12/16] CHG: changing name --- Dockerfile | 4 +++- Dockerfile.prod | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 32a2891..19af2ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,5 +38,7 @@ RUN python3 --version RUN pip3 --version RUN python3 -m pip install --upgrade pip RUN python3 -m pip install mpi4py --no-cache-dir -RUN echo "Hello from snow base image" +RUN echo "Hello from SNOW base image" LABEL org.opencontainers.image.source="https://github.com/miguelcarcamov/snow" +LABEL org.opencontainers.image.description="Container image for SNOW" +LABEL org.opencontainers.image.licenses=GPL3 diff --git a/Dockerfile.prod b/Dockerfile.prod index 8993c17..037d12f 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -6,3 +6,6 @@ RUN echo "Installing snow" RUN pip3 install git+https://github.com/miguelcarcamov/snow.git RUN echo "Hello from snow production image" LABEL org.opencontainers.image.source="https://github.com/miguelcarcamov/snow" +LABEL org.opencontainers.image.description="Container image for SNOW" +LABEL org.opencontainers.image.licenses=GPL3 + From 7a244fe4f96011d799e084375707c66631d78494 Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Wed, 26 Oct 2022 14:24:59 +0100 Subject: [PATCH 13/16] CHG: updating requirements.txt --- requirements.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2d9a01b..73e3efb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,14 @@ almatasks==1.5.2 astropy==5.1 -casadata==2022.1.17 -casampi==0.5.0 -casaplotms==1.6.2 -casaplotserver==1.2.1 -casashell==6.5.0.15 -casatasks==6.5.0.15 -casatestutils==6.5.0.15 -casatools==6.5.0.15 -casaviewer==1.5.2 +casadata==2022.9.5 +casampi==0.5.01 +casaplotms==1.8.7 +casaplotserver==1.4.6 +casashell==6.5.2.26 +casatasks==6.5.2.26 +casatestutils==6.5.2.26 + casatools==6.5.2.26 +casaviewer==1.6.6 numpy==1.22.4 reproject==0.9 scipy==1.8.1 From 2876a4d53a13b947a20404c42c6c00f269c3d513 Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Wed, 26 Oct 2022 14:40:38 +0100 Subject: [PATCH 14/16] CHG: updating workflows and adding config modular CASA 6 file --- .github/workflows/build.yaml | 4 ++-- config.py | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 config.py diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b02b709..d02aba2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -56,8 +56,8 @@ jobs: path: dist/* - name: Run commands to test that everything is OK run: | - pip3 freeze | grep "selfcalframework" - python3 -c "import selfcalframework" + pip3 freeze | grep "snow" + python3 -c "import snow" test: runs-on: ubuntu-latest needs: build diff --git a/config.py b/config.py new file mode 100644 index 0000000..409b5f6 --- /dev/null +++ b/config.py @@ -0,0 +1,20 @@ +import time + +datapath=["~/.casa/data"] +rundata="~/.casa/data/rsync" +logfile='casalog-%s.log' % time.strftime("%Y%m%d-%H",time.localtime()) +telemetry_enabled = True +crashreporter_enabled = True +nologfile = False +log2term = True +nologger = True +nogui = False +colors = "LightBG" +agg = False +pipeline = False +iplog = True +user_site = False +telemetry_log_directory = /tmp +telemetry_log_limit = 20000 +telemetry_log_size_interval = 60 +telemetry_submit_interval = 604800 \ No newline at end of file From a8ff8f475890560a1affaefbabd260c2c060dc7e Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Wed, 26 Oct 2022 14:49:09 +0100 Subject: [PATCH 15/16] CHG: fix pre-commit --- .pre-commit-config.yaml | 2 +- Dockerfile.prod | 1 - README.md | 2 +- config.py | 10 +++++----- requirements.txt | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ced8d6a..7fe0ebd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,5 +29,5 @@ repos: rev: v0.31.1 hooks: - id: markdownlint-fix - entry: markdownlint -f '**/*.md' --disable MD013 MD036 MD046 MD033 MD041 + entry: markdownlint -f '**/*.md' --disable MD013 MD036 MD046 MD033 MD041 MD040 # args: [--disable MD013 MD036] diff --git a/Dockerfile.prod b/Dockerfile.prod index 037d12f..4db1ef4 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -8,4 +8,3 @@ RUN echo "Hello from snow production image" LABEL org.opencontainers.image.source="https://github.com/miguelcarcamov/snow" LABEL org.opencontainers.image.description="Container image for SNOW" LABEL org.opencontainers.image.licenses=GPL3 - diff --git a/README.md b/README.md index 78560cb..b2b73de 100755 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ docker pull ghcr.io/miguelcarcamov/snow:latest ## Run snow -```Python +```python # Import the modules that you want to use import sys from snow.selfcalibration import Phasecal, AmpPhasecal diff --git a/config.py b/config.py index 409b5f6..f77005e 100644 --- a/config.py +++ b/config.py @@ -1,8 +1,8 @@ import time -datapath=["~/.casa/data"] -rundata="~/.casa/data/rsync" -logfile='casalog-%s.log' % time.strftime("%Y%m%d-%H",time.localtime()) +datapath = ["~/.casa/data"] +rundata = "~/.casa/data/rsync" +logfile = 'casalog-%s.log' % time.strftime("%Y%m%d-%H", time.localtime()) telemetry_enabled = True crashreporter_enabled = True nologfile = False @@ -14,7 +14,7 @@ pipeline = False iplog = True user_site = False -telemetry_log_directory = /tmp +telemetry_log_directory = "/tmp" telemetry_log_limit = 20000 telemetry_log_size_interval = 60 -telemetry_submit_interval = 604800 \ No newline at end of file +telemetry_submit_interval = 604800 diff --git a/requirements.txt b/requirements.txt index 73e3efb..2a6f41b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ casaplotserver==1.4.6 casashell==6.5.2.26 casatasks==6.5.2.26 casatestutils==6.5.2.26 - casatools==6.5.2.26 +casatools==6.5.2.26 casaviewer==1.6.6 numpy==1.22.4 reproject==0.9 From 2e5a88a19f3baa1b4bb5af4c355cfb8c7f56ea91 Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Wed, 26 Oct 2022 15:10:51 +0100 Subject: [PATCH 16/16] CHG: fix pre-commit --- .github/workflows/build_latest_container.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_latest_container.yaml b/.github/workflows/build_latest_container.yaml index cfd7094..1b0b516 100644 --- a/.github/workflows/build_latest_container.yaml +++ b/.github/workflows/build_latest_container.yaml @@ -59,8 +59,8 @@ jobs: path: dist/* - name: Run commands to test that everything is finished run: | - pip3 freeze | grep "selfcalframework" - python3 -c "import selfcalframework" + pip3 freeze | grep "snow" + python3 -c "import snow" build-latest-container: runs-on: ubuntu-latest needs: build