Skip to content

Commit

Permalink
fixed ssl download issues; renamed WD to WeingartnerDraine
Browse files Browse the repository at this point in the history
  • Loading branch information
birnstiel committed Oct 25, 2018
1 parent bac3097 commit 5f0bff9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dsharp_opac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
diel_preibisch93, \
diel_pollack1994, \
diel_draine2003, \
diel_WD2001_astrosil, \
diel_WeingartnerDraine2001_astrosil, \
diel_drainelee84_astrosil, \
diel_vacuum, \
diel_zubko96, \
Expand Down Expand Up @@ -50,7 +50,7 @@
'diel_preibisch93',
'diel_pollack1994',
'diel_draine2003',
'diel_WD2001_astrosil',
'diel_WeingartnerDraine2001_astrosil',
'diel_drainelee84_astrosil',
'diel_vacuum',
'diel_zubko96',
Expand Down
5 changes: 4 additions & 1 deletion dsharp_opac/dsharp_opac.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,11 @@ def download(packagedir):
"""
import json
import os
import ssl
from urllib.request import urlretrieve

ssl._create_default_https_context = ssl._create_unverified_context

if not os.path.isdir(packagedir):
packagedir = os.path.dirname(packagedir)

Expand Down Expand Up @@ -799,7 +802,7 @@ def __init__(self, species, **kwargs):
self.print_reference()


class diel_WD2001_astrosil(diel_const):
class diel_WeingartnerDraine2001_astrosil(diel_const):
"""
Returns the dielectric constants for astronomical silicates from
Weingartner & Draine 2001. The data comes from file `eps_suvSil`
Expand Down
2 changes: 1 addition & 1 deletion tests/default_opacities.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@
"\n",
"# get the silicates and extrapolate\n",
"\n",
"draine_sil = opacity.diel_WD2001_astrosil()\n",
"draine_sil = opacity.diel_WeingartnerDraine2001_astrosil()\n",
"draine_sil.extrapolate_constants_up(0.05,1,kind='linear')\n",
"\n",
"# mix the graphite grains\n",
Expand Down
2 changes: 1 addition & 1 deletion tests/opacity_package_tests.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
],
"source": [
"r = opacity.diel_luca('silicate', extrapol=True)\n",
"c1 = opacity.diel_WD2001_astrosil()\n",
"c1 = opacity.diel_WeingartnerDraine2001_astrosil()\n",
"c2 = opacity.diel_draine2003_astrosil()\n",
"opacity.compare_nk([c1, c2, r], orig_data=True);"
]
Expand Down

0 comments on commit 5f0bff9

Please sign in to comment.