Skip to content

Commit d0d90bb

Browse files
committed
ENH v4 cats
1 parent d4b3d12 commit d0d90bb

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

montara/make_input_desgal.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def _get_tile_bounds_at_point(cen_ra, cen_dec, buff=0):
332332
return rav, decv
333333

334334

335-
def ratio_mag(mag, *coeffs):
335+
def ratio_mag_v3(mag, *coeffs):
336336
if len(coeffs) == 0:
337337
coeffs = [
338338
-1.06490672e+02,
@@ -348,6 +348,19 @@ def ratio_mag(mag, *coeffs):
348348
return 1.0 / (1.0 + np.exp(-poly))
349349

350350

351+
def ratio_mag_v4(mag, *coeffs):
352+
if len(coeffs) == 0:
353+
coeffs = [-3.05005992e+01, 1.29795854e-01, -1.39023858e-04, 4.33811478e-08]
354+
x = mag
355+
poly = np.zeros_like(x)
356+
for i, c in enumerate(coeffs):
357+
poly += c * x**(2*i)
358+
return 1.0 / (1.0 + np.exp(-poly))
359+
360+
361+
ratio_mag = ratio_mag_v4
362+
363+
351364
def _get_cosmos_renorm(cosmos):
352365
bins = np.linspace(17, 27, 100)
353366
hcosmos = np.histogram(cosmos["mag_i_dered"], bins=bins, density=True)[0]

0 commit comments

Comments
 (0)