From c326c535bdaa744576b4d9eecef3acb53ccc77b4 Mon Sep 17 00:00:00 2001 From: Chengliang Date: Sat, 26 Oct 2024 10:12:01 +0800 Subject: [PATCH] update codestyle-PEP8 --- catalog/Catalog_example.py | 6 +++--- catalog/testCat_fits.py | 2 +- observation_sim/ObservationSim.py | 2 +- observation_sim/config/__init__.py | 2 +- observation_sim/config/header/__init__.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/catalog/Catalog_example.py b/catalog/Catalog_example.py index 4b51f0a..d3a6f28 100644 --- a/catalog/Catalog_example.py +++ b/catalog/Catalog_example.py @@ -72,7 +72,7 @@ class Catalog(CatalogBase): This is a must implemented method which is used to read in all objects, and then convert them to observation_sim.mock_objects (Star, Galaxy, or Quasar). - Currently, + Currently, the model of observation_sim.mock_objects.Star class requires: param["star"] : int specify the object type: 0: galaxy, 1: star, 2: quasar @@ -84,7 +84,7 @@ class Catalog(CatalogBase): Declination (in degrees) param["mag_use_normal"]: float the absolute magnitude in a particular filter - NOTE: if that filter is not the corresponding CSST filter, the + NOTE: if that filter is not the corresponding CSST filter, the load_norm_filt(obj) function must be implemented to load the filter throughput of that particular photometric system @@ -99,7 +99,7 @@ class Catalog(CatalogBase): Declination (in degrees) param["mag_use_normal"]: float the absolute magnitude in a particular filter - NOTE: if that filter is not the corresponding CSST filter, the + NOTE: if that filter is not the corresponding CSST filter, the load_norm_filt(obj) function must be implemented to load the filter throughput of that particular photometric system param["bfrac"] : float diff --git a/catalog/testCat_fits.py b/catalog/testCat_fits.py index 6ae1bad..9717b22 100644 --- a/catalog/testCat_fits.py +++ b/catalog/testCat_fits.py @@ -177,7 +177,7 @@ class Catalog(CatalogBase): # param["CSSTmag"]= True # param["mag_r"] = 20. # param[''] - ### more keywords for stamp### + # more keywords for stamp# param['image'] = hdu[0].data param['image'] = param['image']/(np.sum(param['image'])) obj = Stamp(param) diff --git a/observation_sim/ObservationSim.py b/observation_sim/ObservationSim.py index cb060ab..523406e 100755 --- a/observation_sim/ObservationSim.py +++ b/observation_sim/ObservationSim.py @@ -25,7 +25,7 @@ class Observation(object): def prepare_chip_for_exposure(self, chip, ra_cen, dec_cen, pointing, wcs_fp=None, slsPSFOptim=False): # Get WCS for the focal plane - if wcs_fp == None: + if wcs_fp is None: wcs_fp = self.focal_plane.getTanWCS( ra_cen, dec_cen, pointing.img_pa, chip.pix_scale) diff --git a/observation_sim/config/__init__.py b/observation_sim/config/__init__.py index bf03e61..6d22c04 100644 --- a/observation_sim/config/__init__.py +++ b/observation_sim/config/__init__.py @@ -1,2 +1,2 @@ from .ChipOutput import ChipOutput -from .Pointing import Pointing \ No newline at end of file +from .Pointing import Pointing diff --git a/observation_sim/config/header/__init__.py b/observation_sim/config/header/__init__.py index db07f26..bbe9ba5 100755 --- a/observation_sim/config/header/__init__.py +++ b/observation_sim/config/header/__init__.py @@ -1,2 +1,2 @@ from .ImageHeader import generatePrimaryHeader -from .ImageHeader import generateExtensionHeader \ No newline at end of file +from .ImageHeader import generateExtensionHeader -- GitLab