Commit ff14160e authored by PAduverne's avatar PAduverne
Browse files

did some cosmetic changes in the comments of the code

parent 629d372a
......@@ -24,13 +24,13 @@ def u_sdss():
return ['u', "u'", 'sdss u', 'SDSS u']
def g_sdss():
return ['g', "g'", 'sdss g', 'SDSS g']
return ['g', "g'", 'sdss g', 'SDSS g', "G'", 'G']
def r_sdss():
return ['r', "r'", 'sdss r', 'SDSS r']
return ['r', "r'", 'sdss r', 'SDSS r', "R'"]
def i_sdss():
return ['i', "i'", 'sdss i', 'SDSS i']
return ['i', "i'", 'sdss i', 'SDSS i', "I'"]
def z_sdss():
return ['z', "z'", 'sdss z', 'SDSS z']
......@@ -45,10 +45,10 @@ def V_jc():
return ['V', 'VMag']
def R_jc():
return ['R', 'RMag']
return ['R', 'RMag', 'Rc']
def I_jc():
return ['I', 'IMag']
return ['I', 'IMag', 'Ic']
def c():
return ['C', 'c', 'Clear', 'clear', 'L', 'l', 'Luminance', 'luminance']
......@@ -689,7 +689,10 @@ def from_PS2clear(band, PS_Table):
PS_Table['flux_g'] = 3631 * 10**(-0.4 * PS_Table["gmag"])
PS_Table['cmag'] = -2.5 * np.log10((PS_Table['flux_r'] +
PS_Table['flux_g']) / 3631)
PS_Table['error'] = np.sqrt(PS_Table["rmag"]**2 + PS_Table["gmag"]**2)
PS_Table['error'] = np.sqrt((PS_Table['flux_r'] / (PS_Table['flux_g'] +
PS_Table['flux_r']))**2 * PS_Table["e_rmag"]**2 +
(PS_Table['flux_g'] / (PS_Table['flux_g'] +
PS_Table['flux_r']))**2 * PS_Table["e_gmag"]**2)
return PS_Table
......@@ -844,12 +847,12 @@ def change_photometric_system(image_phot_syst, cata_phot_syst,
if cata_phot_syst == 'ps':
if 'jc' in image_phot_syst:
print('Changing from Pan-STARRS photometric\
system to Johnson-Cousins')
print('Changing from Pan-STARRS photometric \n'
'system to Johnson-Cousins')
phot_table = from_PS2Johnson(band, phot_table)
if 'other' in image_phot_syst:
print('Changing from Pan-STARRS photometric\
system to Unfiltered')
print('Changing from Pan-STARRS photometric \n'
'system to Unfiltered')
phot_table = from_PS2clear(band, phot_table)
if cata_phot_syst == 'sdss':
if 'jc' in image_phot_syst:
......@@ -857,24 +860,24 @@ def change_photometric_system(image_phot_syst, cata_phot_syst,
system to Johnson-Cousins')
phot_table = from_SDSS2Johnson(band, phot_table)
if 'other' in image_phot_syst:
print('Changing from SDSS photometric\
system to Unfiltered')
print('Changing from SDSS photometric \n'
'system to Unfiltered')
phot_table = from_PS2clear(band, phot_table)
if cata_phot_syst == 'gaia':
if 'jc' in image_phot_syst:
print()
phot_table = from_gaia2Johnson(band, phot_table)
if ('sdss' or 'ps') in image_phot_syst:
print('Changing from Gaia photometric\
system to SDSS/Pan-STARRS')
print('Changing from Gaia photometric \n'
'system to SDSS/Pan-STARRS')
phot_table = from_gaia2SDSS(band, phot_table)
if 'other' in image_phot_syst:
raise ValueError('No transformation law for Gaia -> Unfiltered')
if cata_phot_syst == 'usno':
if 'jc' in image_phot_syst:
print('from usno to jc')
print('Changing from USNO-B1 photometric\
system to Johnson-Cousins')
print('Changing from USNO-B1 photometric \n'
'system to Johnson-Cousins')
phot_table = from_usno2Johnson(band, phot_table)
else:
raise ValueError('No transformation law\
......
Markdown is supported
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