Commit c5298bda authored by Fang Yuedong's avatar Fang Yuedong
Browse files

add chip parameter to Catalog classes

parent 7e4fe4e3
......@@ -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"]
......
......@@ -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"]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment