@@ -105,7 +105,7 @@ def run_sky_subtract( self, mp=True ):
105105 -------
106106 tuple
107107 Tuple containing sky subtracted image, detection
108- mask array, and sky RMS value.
108+ mask array, and sky RMS value.
109109 Output of phrosty.imagesubtraction.sky_subtract().
110110 """
111111 try :
@@ -116,7 +116,7 @@ def run_sky_subtract( self, mp=True ):
116116
117117 def save_sky_subtract_info ( self , info ):
118118 """Saves the sky-subtracted image, detection mask array,
119- and sky RMS values to attributes.
119+ and sky RMS values to attributes.
120120
121121 Parameters
122122 ----------
@@ -137,7 +137,7 @@ def get_psf( self, ra, dec ):
137137 ----------
138138 ra, dec : float
139139 The coordinates in decimal degrees where we want the PSF.
140-
140+
141141 Returns
142142 -------
143143 np.array
@@ -172,7 +172,7 @@ def get_psf( self, ra, dec ):
172172 return None
173173
174174 def keep_psf_data ( self , psf_data ):
175- """Save PSF data to attribute.
175+ """Save PSF data to attribute.
176176
177177 Parameters
178178 ----------
@@ -246,7 +246,7 @@ def __init__( self, diaobj, imgcol, band,
246246 Toggle verbose output.
247247
248248 """
249-
249+
250250 SNLogger .setLevel ( logging .DEBUG if verbose else logging .INFO )
251251 self .config = Config .get ()
252252 self .imgcol = imgcol
@@ -303,7 +303,7 @@ def _read_csv( self, csvfile ):
303303 Parameters
304304 ----------
305305 csvfile : str
306- Path to an input csv file.
306+ Path to an input csv file.
307307
308308 Returns
309309 -------
@@ -330,7 +330,7 @@ def _read_csv( self, csvfile ):
330330
331331
332332 def sky_sub_all_images ( self ):
333- """Sky subtracts all snappl.image.Image objects in
333+ """Sky subtracts all snappl.image.Image objects in
334334 self.science_images and self.template_images using
335335 Source Extractor.
336336
@@ -604,8 +604,12 @@ def add_to_results_dict( self, one_pair ):
604604 arr .append ( one_pair [ key ] )
605605
606606 if not one_pair ['success' ]:
607- self .failures ['make_lightcurve' ].append ({'science' : f"{ one_pair ['filter' ]} { one_pair ['pointing' ]} { one_pair ['sca' ]} " ,
608- 'template' : f"{ one_pair ['filter' ]} { one_pair ['template_pointing' ]} { one_pair ['template_sca' ]} "
607+ self .failures ['make_lightcurve' ].append ({'science' : f"{ one_pair ['filter' ]} \
608+ { one_pair ['pointing' ]} \
609+ { one_pair ['sca' ]} " ,
610+ 'template' : f"{ one_pair ['filter' ]} \
611+ { one_pair ['template_pointing' ]} \
612+ { one_pair ['template_sca' ]} "
609613 })
610614
611615 SNLogger .debug ( "Done adding to results dict" )
@@ -618,7 +622,7 @@ def save_stamp_paths( self, sci_image, templ_image, paths ):
618622 ----------
619623 sci_image : snappl.image.Image
620624 Science image with supernova.
621-
625+
622626 templ_image : snappl.image.Image
623627 Template image without supernova.
624628
@@ -679,9 +683,16 @@ def do_stamps( self, sci_image, templ_image ):
679683 return pathlib .Path ( zpt_stampname ), pathlib .Path ( diff_stampname ), pathlib .Path ( diffvar_stampname )
680684
681685 except :
682- SNLogger .error ( f"do_stamps failure for { sci_image .image .pointing } { sci_image .image .sca } - { templ_image .image .pointing } { templ_image .image .sca } : { x } " )
683- self .failures ['make_stamps' ].append ({'science' : f'{ sci_image .image .band } { sci_image .image .pointing } { sci_image .image .sca } ' ,
684- 'template' : f'{ templ_image .image .band } { templ_image .image .pointing } { templ_image .image .sca } '
686+ SNLogger .error ( f"do_stamps failure for { sci_image .image .pointing } \
687+ { sci_image .image .sca } - \
688+ { templ_image .image .pointing } \
689+ { templ_image .image .sca } : { x } " )
690+ self .failures ['make_stamps' ].append ({'science' : f'{ sci_image .image .band } \
691+ { sci_image .image .pointing } \
692+ { sci_image .image .sca } ' ,
693+ 'template' : f'{ templ_image .image .band } \
694+ { templ_image .image .pointing } \
695+ { templ_image .image .sca } '
685696 })
686697
687698 def make_lightcurve ( self ):
@@ -716,9 +727,16 @@ def make_lightcurve( self ):
716727 }
717728
718729 def log_error ( sci_image , templ_image , x ):
719- SNLogger .error ( f"make_phot_info_dict failure for { sci_image .image .pointing } { sci_image .image .sca } - { templ_image .image .pointing } { templ_image .image .sca } : { x } " )
720- self .failures ['make_lightcurve' ].append ({'science' : f'{ sci_image .image .band } { sci_image .image .pointing } { sci_image .image .sca } ' ,
721- 'template' : f'{ templ_image .image .band } { templ_image .image .pointing } { templ_image .image .sca } '
730+ SNLogger .error ( f"make_phot_info_dict failure for { sci_image .image .pointing } \
731+ { sci_image .image .sca } - \
732+ { templ_image .image .pointing } \
733+ { templ_image .image .sca } : { x } " )
734+ self .failures ['make_lightcurve' ].append ({'science' : f'{ sci_image .image .band } \
735+ { sci_image .image .pointing } \
736+ { sci_image .image .sca } ' ,
737+ 'template' : f'{ templ_image .image .band } \
738+ { templ_image .image .pointing } \
739+ { templ_image .image .sca } '
722740 })
723741
724742 if self .nprocs > 1 :
@@ -858,8 +876,12 @@ def log_fits_write_error( savepath, x ):
858876 for sci_image in self .science_images :
859877 SNLogger .info ( f"Processing { sci_image .image .name } minus { templ_image .image .name } " )
860878 sfftifier = None
861- fail_info = {'science' : f'{ sci_image .image .band } { sci_image .image .pointing } { sci_image .image .sca } ' ,
862- 'template' : f'{ templ_image .image .band } { templ_image .image .pointing } { templ_image .image .sca } '
879+ fail_info = {'science' : f'{ sci_image .image .band } \
880+ { sci_image .image .pointing } \
881+ { sci_image .image .sca } ' ,
882+ 'template' : f'{ templ_image .image .band } \
883+ { templ_image .image .pointing } \
884+ { templ_image .image .sca } '
863885 }
864886 i_failed = False
865887
@@ -1004,9 +1026,16 @@ def log_fits_write_error( savepath, x ):
10041026 with nvtx .annotate ( "make stamps" , color = 0xff8888 ):
10051027
10061028 def log_stamp_err ( sci_image , templ_image , x ):
1007- SNLogger .error ( f"do_stamps failure for { sci_image .image .pointing } { sci_image .image .sca } - { templ_image .image .pointing } { templ_image .image .sca } : { x } " )
1008- self .failures ['make_stamps' ].append ({'science' : f'{ sci_image .image .band } { sci_image .image .pointing } { sci_image .image .sca } ' ,
1009- 'template' : f'{ templ_image .image .band } { templ_image .image .pointing } { templ_image .image .sca } '
1029+ SNLogger .error ( f"do_stamps failure for { sci_image .image .pointing } \
1030+ { sci_image .image .sca } - \
1031+ { templ_image .image .pointing } \
1032+ { templ_image .image .sca } : { x } " )
1033+ self .failures ['make_stamps' ].append ({'science' : f'{ sci_image .image .band } \
1034+ { sci_image .image .pointing } \
1035+ { sci_image .image .sca } ' ,
1036+ 'template' : f'{ templ_image .image .band } \
1037+ { templ_image .image .pointing } \
1038+ { templ_image .image .sca } '
10101039 })
10111040
10121041 partialstamp = partial (stampmaker , self .diaobj .ra , self .diaobj .dec , np .array ([100 , 100 ]))
0 commit comments