Skip to content

Commit

Permalink
Set coordinate_system option during creation of GalaxyCluster object
Browse files Browse the repository at this point in the history
  • Loading branch information
Caio Lima de Oliveira committed Jul 15, 2024
1 parent a2d4989 commit fd3169b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions clmm/galaxycluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class GalaxyCluster:
Redshift of galaxy cluster center
galcat : GCData
Table of background galaxy data containing at least galaxy_id, ra, dec, e1, e2, z
coordinate_system : str
Coordinate system of the galaxy cluster center (pixel or sky)
validate_input: bool
Validade each input argument
"""
Expand All @@ -52,13 +55,14 @@ def __init__(self, *args, validate_input=True, **kwargs):
self._check_types()
self.set_ra_lower(ra_low=0)

def _add_values(self, unique_id: str, ra: float, dec: float, z: float, galcat: GCData):
def _add_values(self, unique_id: str, ra: float, dec: float, z: float, coordinate_system: str, galcat: GCData, c):
"""Add values for all attributes"""
self.unique_id = unique_id
self.ra = ra
self.dec = dec
self.z = z
self.galcat = galcat
self.coordinate_system = coordinate_system

def _check_types(self):
"""Check types of all attributes"""
Expand Down Expand Up @@ -209,7 +213,6 @@ def compute_tangential_and_cross_components(
shape_component2="e2",
tan_component="et",
cross_component="ex",
coordinate_system="pixel",
geometry="curve",
is_deltasigma=False,
use_pdz=False,
Expand All @@ -225,7 +228,6 @@ def compute_tangential_and_cross_components(
dec_source: `galcat` Dec
shear1: `galcat` shape_component1
shear2: `galcat` shape_component2
coordinate_system: coordinate system of ellipticity components
geometry: `input` geometry
is_deltasigma: `input` is_deltasigma
Expand Down Expand Up @@ -282,7 +284,7 @@ def compute_tangential_and_cross_components(

# compute shears
angsep, tangential_comp, cross_comp = compute_tangential_and_cross_components(
coordinate_system=coordinate_system,
coordinate_system=self.coordinate_system,
is_deltasigma=is_deltasigma,
ra_lens=self.ra,
dec_lens=self.dec,
Expand Down

0 comments on commit fd3169b

Please sign in to comment.