Commit c0c380ab authored by Wei Chengliang's avatar Wei Chengliang
Browse files

update codestyle-PEP8

parent 6281c265
Pipeline #7400 passed with stage
in 0 seconds
...@@ -457,6 +457,10 @@ class Catalog(CatalogBase): ...@@ -457,6 +457,10 @@ class Catalog(CatalogBase):
self.objs.append(obj) self.objs.append(obj)
def free_mem(self, **kward):
self.starDDL.freeGlobeData()
del self.starDLL
def _load(self, **kwargs): def _load(self, **kwargs):
self.objs = [] self.objs = []
self.ids = 0 self.ids = 0
...@@ -499,10 +503,6 @@ class Catalog(CatalogBase): ...@@ -499,10 +503,6 @@ class Catalog(CatalogBase):
else: else:
print("number of objects in catalog: ", len(self.objs)) print("number of objects in catalog: ", len(self.objs))
def free_mem(self, **kward):
self.starDDL.freeGlobeData()
del self.starDLL
def load_sed(self, obj, **kwargs): def load_sed(self, obj, **kwargs):
if obj.type == 'star': if obj.type == 'star':
# _, wave, flux = tag_sed( # _, wave, flux = tag_sed(
......
...@@ -161,8 +161,7 @@ class Filter(object): ...@@ -161,8 +161,7 @@ class Filter(object):
psf_fwhm=psf_fwhm, pixelSize=pix_scale, throughputFn=throughput_file, readout=5.0, skyFn=skyFn, darknoise=dark_noise, exTime=exptime, fw=full_well) psf_fwhm=psf_fwhm, pixelSize=pix_scale, throughputFn=throughput_file, readout=5.0, skyFn=skyFn, darknoise=dark_noise, exTime=exptime, fw=full_well)
if full_depth_exptime is not None: if full_depth_exptime is not None:
self.mag_limiting, _ = _util.calculateLimitMag( self.mag_limiting, _ = _util.calculateLimitMag(psf_fwhm=psf_fwhm, pixelSize=pix_scale, throughputFn=throughput_file, readout=5.0, skyFn=skyFn, darknoise=dark_noise, exTime=full_depth_exptime, fw=full_well)
psf_fwhm=psf_fwhm, pixelSize=pix_scale, throughputFn=throughput_file, readout=5.0, skyFn=skyFn, darknoise=dark_noise, exTime=full_depth_exptime, fw=full_well)
print("for filter %s: mag_limiting: %.3f, mag_saturation: %.3f" % print("for filter %s: mag_limiting: %.3f, mag_saturation: %.3f" %
(self.filter_type, self.mag_limiting, self.mag_saturation)) (self.filter_type, self.mag_limiting, self.mag_saturation))
...@@ -95,9 +95,7 @@ class CatalogBase(metaclass=ABCMeta): ...@@ -95,9 +95,7 @@ class CatalogBase(metaclass=ABCMeta):
if norm_filt is not None: if norm_filt is not None:
if hasattr(norm_filt, 'bandpass_full'): if hasattr(norm_filt, 'bandpass_full'):
norm_filt = Table( norm_filt = Table(np.array(np.array([norm_filt.bandpass_full.wave_list*10.0, norm_filt.bandpass_full.func(norm_filt.bandpass_full.wave_list)])).T, names=(['WAVELENGTH', 'SENSITIVITY']))
np.array(np.array([norm_filt.bandpass_full.wave_list*10.0, norm_filt.bandpass_full.func(
norm_filt.bandpass_full.wave_list)])).T, names=(['WAVELENGTH', 'SENSITIVITY']))
norm_thr_rang_ids = norm_filt['SENSITIVITY'] > 0.001 norm_thr_rang_ids = norm_filt['SENSITIVITY'] > 0.001
else: else:
norm_filt = Table( norm_filt = Table(
......
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