Created
June 28, 2014 01:09
-
-
Save alekseygenerozov/3dac7cfc325c08411719 to your computer and use it in GitHub Desktop.
Alternate way to read Wang and Merritt table
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
def nuker_params(skip=False): | |
table=ascii.read('wm', fill_values=[(r'$\cap$', 'core', 'type')]) | |
columns=table.columns | |
table.rename_column(r'$\Upsilon_V $','Uv') | |
table.rename_column(r'$\alpha$','alpha') | |
table.rename_column(r'$\beta$','beta') | |
table.rename_column(r'$\Gamma$','gamma') | |
table.rename_column(r'Distance','d') | |
table.rename_column(r'$\mu_b$', 'mub') | |
table.rename_column(r'Profile\tablenotemark{b}','type') | |
table.rename_column(r'$\log_{10}(M_{\bullet}/M_{\odot})$\tablenotemark{c}', 'M_from_bulge') | |
table.rename_column(r'$\log_{10}(M_{\bullet}/M_{\odot})$\tablenotemark{e}', 'M') | |
table.rename_column(r'$\log_{10}(r_{b})$','rb') | |
table.rename_column(r'$\log_{10}\dot{N}$\tablenotemark{f}','Ndot') | |
table['rb']=10.**table['rb'] | |
table['M']=M_sun*(10.**table['M']) | |
Ib_column=column=Column(name='Ib',data=[mub_to_Ib(mub) for mub in table['mub']]) | |
table.add_column(Ib_column) | |
galaxies=dict() | |
for idx,row in enumerate(table): | |
galaxies[row['Name']]=row | |
return galaxies | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment