-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Fitting_Process.cal_astrometry() does not work when the model is composed only of Sersic components.
457 self.final_result_ps[i]['wcs_RaDec'] = target_ra, target_dec
458 self.final_result_ps[i]['position_xy'] = x, y
460 for i in range(len(self.final_result_galaxy)):
461 x, y = -self.final_result_galaxy[i]['center_x']/deltaPix, self.final_result_galaxy[i]['center_y']/deltaPix
462 x_orgframe = x + target_pos[0] + 1AttributeError: 'FittingProcess' object has no attribute 'final_result_galaxy'
This error is likely because the code is refering self.final_result_galaxy at line 460, but the Sersic component is not included in the model. Similarly, the same issue might occur when the point source component is not included in the model (this case, an error should be occur at line 452). To resolve this, how about adding conditional checks just before lines 452 and 460 to compute the astrometry only if the point source and Sersic components are included in the model?