#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# dust - Waqas Bhatti (wbhatti@astro.princeton.edu) - Dec 2017
# License: MIT. See the LICENSE file for more details.

'''
This gets extinction tables from the the 2MASS DUST service at:

http://irsa.ipac.caltech.edu/applications/DUST/

If you use this, please cite the SF11 and SFD98 papers and acknowledge the use
of 2MASS/IPAC services.

- http://www.adsabs.harvard.edu/abs/1998ApJ...500..525S
- http://www.adsabs.harvard.edu/abs/2011ApJ...737..103S

Also see:

http://irsa.ipac.caltech.edu/applications/DUST/docs/background.html

'''

#############
## LOGGING ##
#############

import logging
from astrobase import log_sub, log_fmt, log_date_fmt

DEBUG = False
if DEBUG:
    level = logging.DEBUG
else:
    level = logging.INFO
LOGGER = logging.getLogger(__name__)
logging.basicConfig(
    level=level,
    style=log_sub,
    format=log_fmt,
    datefmt=log_date_fmt,
)

LOGDEBUG = LOGGER.debug
LOGINFO = LOGGER.info
LOGWARNING = LOGGER.warning
LOGERROR = LOGGER.error
LOGEXCEPTION = LOGGER.exception


#############
## IMPORTS ##
#############

import os
import os.path
import hashlib
import re