From 0023e63aebaef4f2f978deb3c52b618d6260f665 Mon Sep 17 00:00:00 2001 From: dwest77a Date: Mon, 20 Jan 2025 15:56:44 +0000 Subject: [PATCH] Added ctype option to scan so it carries through to compute --- padocc/phases/scan.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/padocc/phases/scan.py b/padocc/phases/scan.py index 25b7daf..666048f 100644 --- a/padocc/phases/scan.py +++ b/padocc/phases/scan.py @@ -149,7 +149,7 @@ def help(self, fn=print): fn('Scan Options:') fn(' > project.run() - Run a scan for this project') - def _run(self, mode: str = 'kerchunk') -> None: + def _run(self, mode: str = 'kerchunk', ctype: Union[str,None] = None) -> None: """Main process handler for scanning phase""" self.logger.info(f'Starting scan-{mode} operation for {self.proj_code}') @@ -171,7 +171,7 @@ def _run(self, mode: str = 'kerchunk') -> None: if mode == 'zarr': self._scan_zarr(limiter=limiter) elif mode == 'kerchunk': - self._scan_kerchunk(limiter=limiter) + self._scan_kerchunk(limiter=limiter, ctype=ctype) elif mode == 'cfa': self._scan_cfa(limiter=limiter) else: @@ -183,7 +183,7 @@ def _run(self, mode: str = 'kerchunk') -> None: self.update_status('scan','Success',jobid=self._logid) return 'Success' - def _scan_kerchunk(self, limiter: Union[int,None] = None): + def _scan_kerchunk(self, limiter: Union[int,None] = None, ctype: Union[str,None] = None): """ Function to perform scanning with output Kerchunk format. """ @@ -200,7 +200,7 @@ def _scan_kerchunk(self, limiter: Union[int,None] = None): limiter=limiter, is_trial=True) - mini_ds.create_refs() + mini_ds.create_refs(ctype=ctype) if mini_ds.extra_properties is not None: self.base_cfg['data_properties'].update(mini_ds.extra_properties)