Commit 407524f2 authored by Yi Hu's avatar Yi Hu
Browse files

要提交的变更:

	修改:     src/crmask.py
                   将统计被宇宙线污染的像素数目加入到HISTORY中
parent 3099dd38
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
#Software package dependencies, numpy, astropy, ccdproc and deepCR
#Installation dependencies on Ubuntu 20.04
#apt install python3-numpy python3-astropy python3-ccdproc python3-pip
#python3 -m pip install pytorch deepCR
#python3 -m pip install torch deepCR
#Version 0.2

#changelog
@@ -300,6 +300,9 @@ class CRMask:
        masked_hdulist[1].header.add_history(value)
        value = 'CRMask end at   {0}'.format(end_time)
        masked_hdulist[1].header.add_history(value)
        #add total number of pixels contaminated by cosmic ray to HISTORY.
        value = 'ccdproc.cosimicray_lacosmic detected {0:d} pixels contaminated by cosmic ray'.format(np.count_nonzero(masked))
        masked_hdulist[1].header.add_history(value)

        if self.fill_flag:
            cleaned_hdulist = pyfits.HDUList()
@@ -423,6 +426,9 @@ class CRMask:
        masked_hdulist[1].header.add_history(value)
        value = 'deepCR mask model {0}'.format(clean_model)
        masked_hdulist[1].header.add_history(value)
        #add total number of pixels contaminated by cosmic ray to HISTORY.
        value = 'deepCR detected {0:d} pixels contaminated by cosmic ray'.format(np.count_nonzero(masked))
        masked_hdulist[1].header.add_history(value)

        if inpaint:
            cleaned_image = pyfits.ImageHDU(data=cleaned, header=self.hdulist[1].header)