diff --git a/AstroAtmosphere/refractivityModels.py b/AstroAtmosphere/refractivityModels.py index 1c58f2c..d4476c2 100644 --- a/AstroAtmosphere/refractivityModels.py +++ b/AstroAtmosphere/refractivityModels.py @@ -193,7 +193,12 @@ def slalib(l, T=288.15, p=101325, H=0, h=0, lat=-24, tlr=0.0065, eps=1e-10): Returns: n - Refractive index of atmospheric air at the given conditions ''' - from pyslalib import slalib + try: + from pyslalib import slalib + except ImportError as e: + print('pySLALIB package not found! Try installing it first.\nReturning n=1.') + return 1 + zObs = np.deg2rad(45.06563) p = p/100 R = [] diff --git a/setup.py b/setup.py index 092b891..3edf9d6 100644 --- a/setup.py +++ b/setup.py @@ -21,14 +21,14 @@ def setup_package(): # write_version_py() setup(name='AstroAtmosphere', - version='0.1.1', + version='0.1.2', description='Collection of equations for refractive index, refraction and dispersion calculations of atmospheric air.', long_description=__readme__, long_description_content_type='text/markdown', author='Joost van den Born', author_email='born@astron.nl', url='https://gitlab.astro-wise.org/micado/atmosphericmodel', - download_url='https://gitlab.astro-wise.org/micado/atmosphericmodel/-/archive/v_01/atmosphericmodel-v_01.tar.gz', + download_url='https://gitlab.astro-wise.org/micado/atmosphericmodel/-/archive/v_012/atmosphericmodel-v_012.tar.gz', license='GNU General Public License v3', data_files = [('',['LICENSE.txt'])], package_dir={'AstroAtmosphere': 'AstroAtmosphere'}, @@ -37,9 +37,8 @@ def setup_package(): packages=['AstroAtmosphere'], keywords=['REFRACTION','REFRACTIVITY','ATMOSPHERE','DISPERSION','CIDDOR'], install_requires=['numpy', - 'scipy', - 'pyslalib>=1.0.4' - ], + 'scipy'], + extras_require={'slalib':['pyslalib>=1.0.4']}, classifiers=['Programming Language :: Python :: 3', 'Operating System :: OS Independent', 'Intended Audience :: Science/Research',