Commit c7bbff33 authored by Yan Zhaojun's avatar Yan Zhaojun
Browse files

update

parent a2bcbefb
Pipeline #7090 failed with stage
in 0 seconds
...@@ -741,8 +741,8 @@ def centroid(data): ...@@ -741,8 +741,8 @@ def centroid(data):
------- -------
cx: the centroid column number, in horizontal direction definet in python image show cx: the centroid column number, in horizontal direction definet in python image show
cy: the centroid row number , in vertical direction cy: the centroid row number , in vertical direction
################# '''
''' ###
### ###
from scipy import ndimage from scipy import ndimage
cy, cx = ndimage.center_of_mass(data) cy, cx = ndimage.center_of_mass(data)
...@@ -1036,7 +1036,7 @@ class MCIsimulator(): ...@@ -1036,7 +1036,7 @@ class MCIsimulator():
Creates lensing parameters; Creates lensing parameters;
""" """
#############################
self.image_g = np.zeros( self.image_g = np.zeros(
(self.information['ysize'], self.information['xsize']), dtype=float) (self.information['ysize'], self.information['xsize']), dtype=float)
self.image_r = np.zeros( self.image_r = np.zeros(
...@@ -1062,7 +1062,7 @@ class MCIsimulator(): ...@@ -1062,7 +1062,7 @@ class MCIsimulator():
self.ghostMax = self.information['ghostratio'] self.ghostMax = self.information['ghostratio']
self.log.info('Maximum in the ghost model %e' % self.ghostMax) self.log.info('Maximum in the ghost model %e' % self.ghostMax)
return return
# ############################################## # ##############################################
def readCosmicRayInformation(self): def readCosmicRayInformation(self):
""" """
...@@ -3239,7 +3239,7 @@ class MCIsimulator(): ...@@ -3239,7 +3239,7 @@ class MCIsimulator():
#### ####
ofd_g = fits.PrimaryHDU() ofd_g = fits.PrimaryHDU()
#### World coordinate system and related parameters ##### # World coordinate system and related parameters #####
hdu_g = fits.ImageHDU(data) hdu_g = fits.ImageHDU(data)
hdu_g.header['WCSAXES'] = (np.int16(2), 'number of WCS axes') hdu_g.header['WCSAXES'] = (np.int16(2), 'number of WCS axes')
...@@ -4340,7 +4340,7 @@ class MCIsimulator(): ...@@ -4340,7 +4340,7 @@ class MCIsimulator():
hdu_r.header['BUNIT'] = ('ADU', 'physical unit of array values') hdu_r.header['BUNIT'] = ('ADU', 'physical unit of array values')
###### file information ############### # ##### file information ###############
temp = t3.utcnow() temp = t3.utcnow()
data_time = temp.strftime("%Y-%m-%dT%H:%M:%S.%f") data_time = temp.strftime("%Y-%m-%dT%H:%M:%S.%f")
...@@ -4381,7 +4381,7 @@ class MCIsimulator(): ...@@ -4381,7 +4381,7 @@ class MCIsimulator():
# #### detector and Filter information ##### # #### detector and Filter information #####
hdu_r.header['FILTER'] = (self.filter_r[:6], 'filter band') hdu_r.header['FILTER'] = (self.filter_r[:6], 'filter band')
##### Detector information #### # #### Detector information ####
hdu_r.header['DETSN'] = ( hdu_r.header['DETSN'] = (
'E2V-CCD-290-0000000', 'detector serial number') 'E2V-CCD-290-0000000', 'detector serial number')
hdu_r.header['DETNAME'] = ('blue-opt', 'detector name') hdu_r.header['DETNAME'] = ('blue-opt', 'detector name')
...@@ -4891,7 +4891,7 @@ class MCIsimulator(): ...@@ -4891,7 +4891,7 @@ class MCIsimulator():
hdu_i.header['BUNIT'] = ('ADU', 'physical unit of array values') hdu_i.header['BUNIT'] = ('ADU', 'physical unit of array values')
###### file information ############### # ##### file information ###############
temp = t3.utcnow() temp = t3.utcnow()
data_time = temp.strftime("%Y-%m-%dT%H:%M:%S.%f") data_time = temp.strftime("%Y-%m-%dT%H:%M:%S.%f")
......
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