diff --git a/Catalog/C3Catalog.py b/Catalog/C3Catalog.py index f12436cf1f2cb50d8ac263322cd7be2089eb21a6..f28a1930780d2de83a3509a6ed8718557beba647 100644 --- a/Catalog/C3Catalog.py +++ b/Catalog/C3Catalog.py @@ -15,7 +15,7 @@ from ObservationSim.MockObject._util import seds, sed_assign, extAv, tag_sed, ge NSIDE = 128 class C3Catalog(CatalogBase): - def __init__(self, config, **kwargs): + def __init__(self, config, chip, **kwargs): super().__init__() self.cat_dir = os.path.join(config["data_dir"], config["input_path"]["cat_dir"]) self.seed_Av = config["random_seeds"]["seed_Av"] @@ -24,10 +24,7 @@ class C3Catalog(CatalogBase): self.normF_star = Table.read(os.path.join(self.normalize_dir, 'SLOAN_SDSS.g.fits')) self.normF_galaxy = Table.read(os.path.join(self.normalize_dir, 'lsst_throuput_g.fits')) - try: - self.chip = kwargs["chip"] - except: - raise ValueError('For Cycle-3 Catalog class, must give a "chip" object to initiate') + self.chip = chip if "star_cat" in config["input_path"] and config["input_path"]["star_cat"]: star_file = config["input_path"]["star_cat"] diff --git a/Catalog/Catalog_example.py b/Catalog/Catalog_example.py index c8af865d4e43f2344a99d6f34a8771929d96bf28..d884f35991f03230e6dab974a02cc69b67a55e31 100644 --- a/Catalog/Catalog_example.py +++ b/Catalog/Catalog_example.py @@ -33,7 +33,7 @@ class Catalog_example(CatalogBase): load the filter throughput for the input catalog's photometric system. """ - def __init__(self, config, **kwargs): + def __init__(self, config, chip, **kwargs): """Constructor method. Parameters @@ -51,6 +51,7 @@ class Catalog_example(CatalogBase): super().__init__() self.cat_dir = os.path.join(config["data_dir"], config["input_path"]["cat_dir"]) + self.chip = chip if "star_cat" in config["input_path"] and config["input_path"]["star_cat"]: star_file = config["input_path"]["star_cat"] star_SED_file = config["SED_templates_path"]["star_SED"]