Skip to content

Commit

Permalink
ENH v4 cats
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr committed May 22, 2024
1 parent d4b3d12 commit d0d90bb
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion montara/make_input_desgal.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def _get_tile_bounds_at_point(cen_ra, cen_dec, buff=0):
return rav, decv


def ratio_mag(mag, *coeffs):
def ratio_mag_v3(mag, *coeffs):
if len(coeffs) == 0:
coeffs = [
-1.06490672e+02,
Expand All @@ -348,6 +348,19 @@ def ratio_mag(mag, *coeffs):
return 1.0 / (1.0 + np.exp(-poly))


def ratio_mag_v4(mag, *coeffs):
if len(coeffs) == 0:
coeffs = [-3.05005992e+01, 1.29795854e-01, -1.39023858e-04, 4.33811478e-08]
x = mag
poly = np.zeros_like(x)
for i, c in enumerate(coeffs):
poly += c * x**(2*i)
return 1.0 / (1.0 + np.exp(-poly))


ratio_mag = ratio_mag_v4


def _get_cosmos_renorm(cosmos):
bins = np.linspace(17, 27, 100)
hcosmos = np.histogram(cosmos["mag_i_dered"], bins=bins, density=True)[0]
Expand Down

0 comments on commit d0d90bb

Please sign in to comment.