From 78edd9c0ddf95cd6505762bc72aaf6dcc0503f02 Mon Sep 17 00:00:00 2001 From: Peter Beaucage Date: Thu, 6 Apr 2023 16:49:54 -0400 Subject: [PATCH] Add error if catalog_kwargs or use_chunked_loading are used with a catalog --- src/PyHyperScattering/SST1RSoXSDB.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/PyHyperScattering/SST1RSoXSDB.py b/src/PyHyperScattering/SST1RSoXSDB.py index dc315189..93105bd8 100644 --- a/src/PyHyperScattering/SST1RSoXSDB.py +++ b/src/PyHyperScattering/SST1RSoXSDB.py @@ -93,6 +93,10 @@ def __init__( self.c = from_profile("rsoxs", **catalog_kwargs) else: self.c = catalog + if use_chunked_loading: + raise SyntaxError('use_chunked_loading is incompatible with externally supplied catalog. when creating the catalog, pass structure_clients = "dask" as a kwarg.') + if len(catalog_kwargs) != 0: + raise SyntaxError('catalog_kwargs is incompatible with externally supplied catalog. pass those kwargs to whoever gave you the catalog you passed in.') self.dark_subtract = dark_subtract self.dark_pedestal = dark_pedestal self.exposure_offset = exposure_offset