Commit 7555acb8 authored by Simone Mastrogiovanni's avatar Simone Mastrogiovanni
Browse files

added Kcorr for bJ and K bands. Added bJ band

parent 6d4f1608
......@@ -17,7 +17,7 @@ from ..utilities.calc_kcor import calc_kcor
DEG2RAD = math.pi/180.0
color_names = {'B': None, 'K': None, 'u': 'u - r', 'g': 'g - r', 'r': 'g - r',
'i': 'g - i', 'z': 'r - z', 'W1': None}
'i': 'g - i', 'z': 'r - z', 'W1': None,'bJ': None}
# Taken from limits of K corrections from fig 4 of
# https://ui.adsabs.harvard.edu/abs/2010MNRAS.405.1409C/abstract
......@@ -77,7 +77,7 @@ catalog_options = [
make_option("--catalog", default=None, metavar="NAME",
help="""Specify a galaxy catalog by name. Known catalogs are: DESI, DES, GLADE, GLADE+"""),
make_option("--catalog_band", default='B', type=str,
help = "Observation band of galaxy catalog (B,K,u,g,r,i,z) (must be compatible with the catalogue provided)"),
help = "Observation band of galaxy catalog (B,K,W1,bJ,u,g,r,i,z) (must be compatible with the catalogue provided)"),
]
def load_catalog(name, band):
......@@ -274,6 +274,12 @@ class GalaxyCatalog:
if band == 'W1':
k_corr = -1*(4.44e-2+2.67*z+1.33*(z**2.)-1.59*(z**3.)) #From Maciej email
return k_corr
elif band == 'K':
# https://iopscience.iop.org/article/10.1086/322488/pdf 4th page lhs
return -6.0*np.log10(1+z)
elif band == 'bJ':
# Fig 5 caption from https://arxiv.org/pdf/astro-ph/0111011.pdf
return (z+6*np.power(z,2.))/(1+15*np.power(z,3.))
else:
try:
kcor = calc_kcor(band, z, color_name, color_value)
......@@ -355,8 +361,8 @@ class OldStyleDESI(OldStyleCatalog):
super().__init__(catalog_file = catalog_file, name = 'DESI')
class OldStyleGLADEPlus(OldStyleCatalog):
supported_bands = {'B', 'K', 'W1'}
def __init__(self, catalog_file = 'glade+.hdf5', band='W1'):
supported_bands = {'B', 'K', 'W1','bJ'}
def __init__(self, catalog_file = 'glade+.hdf5', band='bJ'):
self.colnames = set(self.colnames).union([f'm_{b}' for b in self.supported_bands])
super().__init__(catalog_file = catalog_file, name = 'GladePlus')
......
......@@ -20,7 +20,7 @@ class SchechterParams():
"""
Parameters
----------
band : observation band (B,K,u,g,r,i,z)
band : observation band (B,K,bJ,u,g,r,i,z)
"""
self.Mstar = None
......@@ -42,8 +42,14 @@ class SchechterParams():
def default_values(self, band):
if band == 'B':
return -1.21, -19.70, -22.96, -12.96
elif band =='bJ':
# From https://arxiv.org/pdf/astro-ph/0111011.pdf
# Mmax from Abstract, of the paper above, valid for fit.
return -1.21, -19.66, -22.96, -16.5
elif band == 'K':
return -1.02, -23.55, -27.0, -12.96
# https://iopscience.iop.org/article/10.1086/322488/pdf
# Mmax from Fig 3 of the above reference
return -1.09, -23.39, -27.0, -19.5
elif band == 'u': #These values are actually u', g', r', i', zi, a.k.a. redshifted to the median redshift (0.1) of SDSS.
return -0.92, -17.93, -21.93, -15.54
elif band == 'g':
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment