InstanceCatalogMaker.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:ImSimDeep 作者: jchiang87 项目源码 文件源码
def __init__(self, opsim_db, db_config=None, logger=None):
        """
        Constructor.

        Parameters
        ----------
        opsim_db : str
            sqlite3 db file containing observing plan.

        db_config : dict, optional
            Dictionary of database connection parameters.  Parameters
            for connecting to fatboy.phys.washington.edu from a
            whitelisted machine will be used.

        logger : logging.logger, optional
            Logger object.
        """
        self.gen = ObservationMetaDataGenerator(database=opsim_db,
                                                driver='sqlite')
        if db_config is not None:
            self.db_config = db_config
        else:
            self.db_config = dict(database='LSSTCATSIM',
                                  port=1433,
                                  host='fatboy.phys.washington.edu',
                                  driver='mssql+pymssql')
        if logger is None:
            logging.basicConfig(format="%(message)s", level=logging.INFO,
                                stream=sys.stdout)
            logger = logging.getLogger()
        self.logger = logger
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号