Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
parsec_isochrones/constants.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
69 lines (63 sloc)
2.76 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Thu Dec 21 16:37:38 2017 | |
@author: mints | |
""" | |
from collections import namedtuple | |
_PARAMS = {'2MASS': {'mag_columns': [23, 24, 25, 33, 34], | |
'mag_names': ['J', 'H', 'K', 'W1', 'W2'], | |
'photsys_file': 'tab_mag_2mass_spitzer_wise.dat', | |
'photsys_version': 'yang', | |
'prefix': 'w'}, | |
'2MASS_old': { | |
'mag_columns': [8, 9, 10, 18, 19], | |
'mag_names': ['J', 'H', 'K', 'W1', 'W2'], | |
'photsys_file': 'tab_mag_2mass_spitzer_wise.dat', | |
'photsys_version': 'yang', | |
'prefix': 'w', | |
'old': True}, | |
'DECAM_VISTA': { | |
'mag_columns': list(range(23, 34)), | |
'mag_names': ['DECAM%s' % s for s in list('ugrizY')] + \ | |
['VISTA%s' % s for s in list('ZYJH') + ['Ks']], | |
'photsys_file': 'tab_mag_decam_vista.dat', | |
'photsys_version': 'yang', | |
'prefix': 'DV'}, | |
'Gaia_old': { | |
'mag_columns': [8, 9, 10], | |
'mag_names': ['G', 'G_BP', 'G_RP'], | |
'photsys_file': 'tab_mag_gaiaDR2.dat', | |
'photsys_version': 'yang', | |
'prefix': 'g', | |
'old': True}, | |
'PS1_old': { | |
'mag_columns': [8, 9, 10, 11, 12, 13], | |
'mag_names': ['gP1', 'rP1', 'iP1', 'zP1', 'yP1', 'wP1'], | |
'photsys_file': 'tab_mag_panstarrs1.dat', | |
'photsys_version': 'yang', | |
'prefix': 'ps', | |
'old': True}, | |
'SDSS': {'mag_columns': [23, 24, 25, 26, 27], | |
'mag_names': ['u', 'g', 'r', 'i', 'z'], | |
'photsys_file': 'tab_mag_sloan.dat', | |
'photsys_version': 'odfnew', | |
'prefix': 's'}, | |
'UBV': {'mag_columns': [23, 24, 25, 26, 27, 28, 29, 30], | |
'mag_names': ['U', 'B', 'V', 'R', 'I', 'J', 'H', 'K'], | |
'photsys_file': 'tab_mag_ubvrijhk.dat', | |
'photsys_version': 'yang', | |
'prefix': 'bv'}, | |
'UBV_old': { | |
'mag_columns': list(range(8, 16)), | |
'mag_names': ['U', 'B', 'V', 'R', 'I', 'J', 'H', 'K'], | |
'photsys_file': 'tab_mag_ubvrijhk.dat', | |
'photsys_version': 'yang', | |
'prefix': 'bv', | |
'old': True}} | |
LOGG_SUN = 4.43775 | |
def to_nt(d): | |
if 'old' not in d: | |
d['old'] = False | |
return namedtuple("Parameter", d.keys())(*d.values()) | |
PARAMS = {key: to_nt(value) for key, value in _PARAMS.items()} |