Commit 0d59783b authored by Zhang Xin's avatar Zhang Xin
Browse files

fix spec sim bug

parent d5059d30
......@@ -312,7 +312,7 @@ class Chip(FocalPlane):
BoolDeadPix = False
# Add sky background
if sky_map == None:
if sky_map is None:
sky_map = filt.getSkyNoise(exptime=self.exptime)
elif img.array.shape != sky_map.shape:
raise ValueError("The shape img and sky_map must be equal.")
......@@ -738,4 +738,4 @@ class Chip(FocalPlane):
# img_name_root = chip_output.img_name.split(".")[0]
# sub_img.write("%s/%s_%s.fits" % (chip_output.subdir, img_name_root, rowcoltag))
# del sub_img
return img
\ No newline at end of file
return img
......@@ -218,7 +218,7 @@ class Observation(object):
pointing_ID=pointing_ID,
timestamp_obs=timestamp_obs,
pointing_type=pointing_type,
sky_map=sky_map)
sky_map=sky_map, tel = self.tel)
if pointing_type == 'MS':
datetime_obs = datetime.fromtimestamp(timestamp_obs)
......@@ -373,4 +373,4 @@ class Observation(object):
pointing_type=pointing_type[ipoint],
cat_dir=self.path_dict["cat_dir"],
sed_dir=self.path_dict["SED_dir"])
print("finished running chip#%d..."%(chip.chipID), flush=True)
\ No newline at end of file
print("finished running chip#%d..."%(chip.chipID), flush=True)
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