Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is default Vega Model? #34

Open
exowanderer opened this issue Jul 22, 2019 · 1 comment
Open

Where is default Vega Model? #34

exowanderer opened this issue Jul 22, 2019 · 1 comment

Comments

@exowanderer
Copy link
Contributor

exowanderer commented Jul 22, 2019

  • pyNRC version: 0.8.0
  • Python version: 3.6.7
  • Operating System: Ubuntu 18.04 LTE

Description

I am trying to run the basic notebooks in the repo/notebooks directory. The notebook Coronagraph_Basics.ipynb calls on the function plot_contrasts_mjup, which has a default for the file kwarg of base_dir + 'model.AMES-Cond-2000.M-0.0.JWST.Vega'. the file 'model.AMES-Cond-2000.M-0.0.JWST.Vega' is said to come from https://phoenix.ens-lyon.fr/Grids/; but that file does not exist on that website (or is at least not easy to find).

I further assumed that this could be a file included with the pysynphot data sets; but that primarily provides models in terms of the equilibrium temperature

What I Did


From Coronagraph_Basics.ipynb in notebooks folder from pynrc github repo

from pynrc.nb_funcs import plot_contrasts, plot_planet_patches, plot_contrasts_mjup
import matplotlib.patches as mpatches

# fig, ax = plt.subplots(figsize=(8,5))
fig, axes = plt.subplots(1,2, figsize=(14,4.5))
xr=[0,5]
yr=[24,8]

# 1a. Plot contrast curves and set x/y limits
ax = axes[0]
ax, ax2, ax3 = plot_contrasts(curves, nsig, wfe_list, obs=obs, 
                              xr=xr, yr=yr, ax=ax, return_axes=True)
# 1b. Plot the locations of exoplanet companions
label = 'Companions ({})'.format(filt)
planet_dist = [np.sqrt(x**2+y**2) for x,y in loc_list]
ax.plot(planet_dist, pmags, marker='o', ls='None', label=label, color='k', zorder=10)    

# 1c. Plot Spiegel & Burrows (2012) exoplanet fluxes (Hot Start)
plot_planet_patches(ax, obs, age=age, entropy=13, av_vals=None)
ax.legend(ncol=2)

# 2. Plot in terms of MJup using COND models
ax = axes[1]
plot_contrasts_mjup(curves, nsig, wfe_list, obs=obs, age=age,
                    ax=ax, twin_ax=True, xr=xr, yr=None)
ax.set_yscale('log')
ax.set_ylim([0.08,100])
ax.legend(loc='upper right', title='COND ({:.0f} Myr)'.format(age))

fig.suptitle('{} ({} + {})'.format(name_sci, obs.filter, obs.mask), fontsize=16)

fig.tight_layout()
fig.subplots_adjust(top=0.85, bottom=0.1 , left=0.05, right=0.97)
@JarronL
Copy link
Owner

JarronL commented Nov 22, 2021

Those "Vega" indication in the AMES-Cond files simply refer to the fact that the magnitudes are reported in Vega magnitudes, as opposed to AB mags.

Pysynphot has a Vega model spectrum that can be called at any time:sp = S.Vega (https://pysynphot.readthedocs.io/en/latest/spectrum.html#vega)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants