Skip to content

Commit

Permalink
Add brightness scaling option
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleAalbers committed Sep 15, 2022
1 parent cae9d76 commit a4774f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion paltas/Sources/galaxy_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class GalaxyCatalog(SourceBase):
"""
required_parameters = ('random_rotation','output_ab_zeropoint',
'z_source','center_x','center_y')
optional_parameters = ('pixel_width_multiplier',)
optional_parameters = ('pixel_width_multiplier',
'brightness_multiplier')
# This parameter must be set by class inheriting GalaxyCatalog
ab_zeropoint = None

Expand Down Expand Up @@ -160,10 +161,12 @@ def draw_source(self, catalog_i=None, phi=None):
# take into account the color of the object!
img *= 10**((self.source_parameters['output_ab_zeropoint']-
self.__class__.ab_zeropoint)/2.5)
img *= self.source_parameters.get('brightness_multiplier', 1)

pixel_width *= self.z_scale_factor(metadata['z'], z_new)

# Option to artificially make sources bigger or smaller
# (with constant surface brightness, so changing total flux)
pixel_width *= self.source_parameters.get('pixel_width_multiplier', 1)

# Convert to kwargs for lenstronomy
Expand Down

0 comments on commit a4774f1

Please sign in to comment.