FY4B_C_SPMS/options/__init__.py

30 lines
538 B
Python

# -*- coding: utf-8 -*-
"""
Created on Thu Feb 17 10:36:03 2022
@author: zhangqiankun
"""
import os
from collections import OrderedDict
import yaml
from yaml import resolver
try:
from yaml import CLoader as Loader, CDumper as Dumper
except ImportError:
from yaml import Loader, Dumper
def parse(opt_path):
with open(opt_path,mode='r')as f:
opt = yaml.load(f,Loader=Loader)
# print opt['satname']
# for hase, dataset in opt['path'].items():
# print hase,dataset
# opt['path']
return opt