Loading observation_sim/astrometry/Astrometry_util.py +2 −2 Original line number Diff line number Diff line Loading @@ -12,8 +12,8 @@ def checkInputList(input_list, n): if not isinstance(input_list, list): raise TypeError("Input type is not list!", input_list) for i in input_list: if type(i) != type(1.1): if type(i) != type(1): if type(i) is not type(1.1): if type(i) is not type(1): raise TypeError( "Input list's element is not float or int!", input_list) if len(input_list) != n: Loading observation_sim/mock_objects/Galaxy.py +3 −3 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ class Galaxy(MockObject): raise ValueError( "!!!The number of PSF profiles and the number of bandpasses must be equal.") objs = [] if nphotons_tot == None: if nphotons_tot is None: nphotons_tot = self.getElectronFluxFilt(filt, tel, exptime) # print("nphotons_tot = ", nphotons_tot) Loading Loading @@ -92,7 +92,7 @@ class Galaxy(MockObject): return final def drawObj_multiband(self, tel, pos_img, psf_model, bandpass_list, filt, chip, nphotons_tot=None, g1=0, g2=0, exptime=150., fd_shear=None): if nphotons_tot == None: if nphotons_tot is None: nphotons_tot = self.getElectronFluxFilt(filt, tel, exptime) # print("nphotons_tot = ", nphotons_tot) Loading Loading @@ -471,7 +471,7 @@ class Galaxy(MockObject): return 1, pos_shear def getGSObj(self, psf, g1=0, g2=0, flux=None, filt=None, tel=None, exptime=150.): if flux == None: if flux is None: flux = self.getElectronFluxFilt(filt, tel, exptime) disk = galsim.Sersic(n=self.disk_sersic_idx, half_light_radius=self.hlr_disk, flux=1.0) Loading observation_sim/mock_objects/MockObject.py +3 −3 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ class MockObject(object): def drawObj_multiband(self, tel, pos_img, psf_model, bandpass_list, filt, chip, nphotons_tot=None, g1=0, g2=0, exptime=150., fd_shear=None): if nphotons_tot == None: if nphotons_tot is None: nphotons_tot = self.getElectronFluxFilt(filt, tel, exptime) # print("nphotons_tot = ", nphotons_tot) Loading Loading @@ -581,7 +581,7 @@ class MockObject(object): def drawObj_PSF(self, tel, pos_img, psf_model, bandpass_list, filt, chip, nphotons_tot=None, g1=0, g2=0, exptime=150., fd_shear=None, chip_output=None): if nphotons_tot == None: if nphotons_tot is None: nphotons_tot = self.getElectronFluxFilt(filt, tel, exptime) # print("nphotons_tot = ", nphotons_tot) Loading Loading @@ -650,7 +650,7 @@ class MockObject(object): os.makedirs(fn, exist_ok=True) fn = fn + "/ccd_{:}".format(chip.chipID) + \ "_psf_"+str(self.param['id'])+".fits" if fn != None: if fn is not None: if os.path.exists(fn): os.remove(fn) hdu = fitsio.PrimaryHDU() Loading tools/get_pointing.py +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ class Chip(object): if (xcen is None) or (ycen is None): xcen = self.cen_pix_x ycen = self.cen_pix_y if pix_scale == None: if pix_scale is None: pix_scale = self.pix_scale # dudx = -np.cos(img_rot.rad) * pix_scale # dudy = -np.sin(img_rot.rad) * pix_scale Loading observation_sim/mock_objects/SpecDisperser/__init__.py +1 −1 File changed.Contains only whitespace changes. Show changes Loading
observation_sim/astrometry/Astrometry_util.py +2 −2 Original line number Diff line number Diff line Loading @@ -12,8 +12,8 @@ def checkInputList(input_list, n): if not isinstance(input_list, list): raise TypeError("Input type is not list!", input_list) for i in input_list: if type(i) != type(1.1): if type(i) != type(1): if type(i) is not type(1.1): if type(i) is not type(1): raise TypeError( "Input list's element is not float or int!", input_list) if len(input_list) != n: Loading
observation_sim/mock_objects/Galaxy.py +3 −3 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ class Galaxy(MockObject): raise ValueError( "!!!The number of PSF profiles and the number of bandpasses must be equal.") objs = [] if nphotons_tot == None: if nphotons_tot is None: nphotons_tot = self.getElectronFluxFilt(filt, tel, exptime) # print("nphotons_tot = ", nphotons_tot) Loading Loading @@ -92,7 +92,7 @@ class Galaxy(MockObject): return final def drawObj_multiband(self, tel, pos_img, psf_model, bandpass_list, filt, chip, nphotons_tot=None, g1=0, g2=0, exptime=150., fd_shear=None): if nphotons_tot == None: if nphotons_tot is None: nphotons_tot = self.getElectronFluxFilt(filt, tel, exptime) # print("nphotons_tot = ", nphotons_tot) Loading Loading @@ -471,7 +471,7 @@ class Galaxy(MockObject): return 1, pos_shear def getGSObj(self, psf, g1=0, g2=0, flux=None, filt=None, tel=None, exptime=150.): if flux == None: if flux is None: flux = self.getElectronFluxFilt(filt, tel, exptime) disk = galsim.Sersic(n=self.disk_sersic_idx, half_light_radius=self.hlr_disk, flux=1.0) Loading
observation_sim/mock_objects/MockObject.py +3 −3 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ class MockObject(object): def drawObj_multiband(self, tel, pos_img, psf_model, bandpass_list, filt, chip, nphotons_tot=None, g1=0, g2=0, exptime=150., fd_shear=None): if nphotons_tot == None: if nphotons_tot is None: nphotons_tot = self.getElectronFluxFilt(filt, tel, exptime) # print("nphotons_tot = ", nphotons_tot) Loading Loading @@ -581,7 +581,7 @@ class MockObject(object): def drawObj_PSF(self, tel, pos_img, psf_model, bandpass_list, filt, chip, nphotons_tot=None, g1=0, g2=0, exptime=150., fd_shear=None, chip_output=None): if nphotons_tot == None: if nphotons_tot is None: nphotons_tot = self.getElectronFluxFilt(filt, tel, exptime) # print("nphotons_tot = ", nphotons_tot) Loading Loading @@ -650,7 +650,7 @@ class MockObject(object): os.makedirs(fn, exist_ok=True) fn = fn + "/ccd_{:}".format(chip.chipID) + \ "_psf_"+str(self.param['id'])+".fits" if fn != None: if fn is not None: if os.path.exists(fn): os.remove(fn) hdu = fitsio.PrimaryHDU() Loading
tools/get_pointing.py +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ class Chip(object): if (xcen is None) or (ycen is None): xcen = self.cen_pix_x ycen = self.cen_pix_y if pix_scale == None: if pix_scale is None: pix_scale = self.pix_scale # dudx = -np.cos(img_rot.rad) * pix_scale # dudy = -np.sin(img_rot.rad) * pix_scale Loading
observation_sim/mock_objects/SpecDisperser/__init__.py +1 −1 File changed.Contains only whitespace changes. Show changes