|
1 |
| -.. _astroquery.cdms: |
| 1 | +.. _astroquery.linelists.cdms: |
2 | 2 |
|
3 |
| -**************************************************************************** |
4 |
| -Cologne Database for Molecular Spectroscopy (CDMS) Queries (astroquery.cdms) |
5 |
| -**************************************************************************** |
| 3 | +****************************************************************************************** |
| 4 | +Cologne Database for Molecular Spectroscopy (CDMS) Queries (``astroquery.linelists.cdms``) |
| 5 | +****************************************************************************************** |
6 | 6 |
|
7 | 7 | Getting Started
|
8 | 8 | ===============
|
@@ -149,23 +149,24 @@ shown below:
|
149 | 149 | >>> plt.scatter(temp,part)
|
150 | 150 | >>> plt.xlabel('Temperature (K)')
|
151 | 151 | >>> plt.ylabel('Partition Function Value')
|
152 |
| - >>> plt.title('Parititon Fn vs Temp') |
| 152 | + >>> plt.title('Partition Function vs Temperature') |
153 | 153 |
|
154 | 154 | .. plot::
|
155 | 155 | :context: reset
|
156 | 156 |
|
| 157 | + import numpy as np |
157 | 158 | import matplotlib.pyplot as plt
|
158 | 159 | from astroquery.linelists.cdms import CDMS
|
159 | 160 |
|
160 | 161 | result = CDMS.get_species_table()
|
161 |
| - mol = result[result['TAG'] == 28503] #do not include signs of TAG for this |
| 162 | + mol = result[result['TAG'] == 28503] # do not include signs of TAG for this |
162 | 163 | keys = [k for k in mol.keys() if 'lg' in k]
|
163 | 164 | temp = np.array([float(k.split('(')[-1].split(')')[0]) for k in keys])
|
164 | 165 | part = list(mol[keys][0])
|
165 | 166 | plt.scatter(temp,part)
|
166 | 167 | plt.xlabel('Temperature (K)')
|
167 | 168 | plt.ylabel('Partition Function Value')
|
168 |
| - plt.title('Parititon Fn vs Temp') |
| 169 | + plt.title('Partition Function vs Temperature') |
169 | 170 |
|
170 | 171 | For non-linear molecules like H2CO, curve fitting methods can be used to
|
171 | 172 | calculate production rates at different temperatures with the proportionality:
|
@@ -204,12 +205,13 @@ other temperatures using curve fitting models:
|
204 | 205 | .. plot::
|
205 | 206 | :context: reset
|
206 | 207 |
|
| 208 | + import numpy as np |
207 | 209 | import matplotlib.pyplot as plt
|
208 | 210 | from astroquery.linelists.cdms import CDMS
|
209 | 211 | from scipy.optimize import curve_fit
|
210 | 212 |
|
211 | 213 | result = CDMS.get_species_table()
|
212 |
| - mol = result[result['TAG'] == 30501] #do not include signs of TAG for this |
| 214 | + mol = result[result['TAG'] == 30501] # do not include signs of TAG for this |
213 | 215 | def f(T, a):
|
214 | 216 | return np.log10(a*T**(1.5))
|
215 | 217 | keys = [k for k in mol.keys() if 'lg' in k]
|
@@ -248,12 +250,13 @@ We can then compare linear interpolation to the fitted interpolation above:
|
248 | 250 | .. plot::
|
249 | 251 | :context: reset
|
250 | 252 |
|
| 253 | + import numpy as np |
251 | 254 | import matplotlib.pyplot as plt
|
252 | 255 | from astroquery.linelists.cdms import CDMS
|
253 | 256 | from scipy.optimize import curve_fit
|
254 | 257 |
|
255 | 258 | result = CDMS.get_species_table()
|
256 |
| - mol = result[result['TAG'] == 30501] #do not include signs of TAG for this |
| 259 | + mol = result[result['TAG'] == 30501] # do not include signs of TAG for this |
257 | 260 | def f(T, a):
|
258 | 261 | return np.log10(a*T**(1.5))
|
259 | 262 | keys = [k for k in mol.keys() if 'lg' in k]
|
|
0 commit comments