Skip to content

Commit

Permalink
Update stats.py to include extension_radial parameter in supplement()
Browse files Browse the repository at this point in the history
Part 1 of an improvement to use the full posterior when calculating the azimuthally-averaged (radial) extension.

This fix specifically adds extension_radial to the class method supplement(), part of the Samples class
  • Loading branch information
willcerny authored Apr 16, 2024
1 parent 82abffc commit 65bf152
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ugali/utils/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,14 @@ def supplement(self,coordsys='gal'):
names = ['position_angle_gal','position_angle_cel']
arrs = [pa_gal,pa_cel]
out = recfuncs.append_fields(out,names,arrs,**kwargs).view(Samples)


if ('extension' in out.names) and ('ellipticity' in out.names):
ext = out.extension
ellipticity = out.ellipticity
rext = ext * np.sqrt(1-ellipticity)

out = recfuncs.append_fields(out,['extension_radial'], [rext]).view(Samples)

return out

def get(self, names=None, burn=None, clip=None):
Expand Down

0 comments on commit 65bf152

Please sign in to comment.