# Path: gammacat/utils.py
# def _to_crab_flux():
#     def fill_value_array(shape):
#     def resize_sed_array(array, shape):
#     def fill_list(cls, data, key):
# def load_yaml(path):
# def write_yaml(data, path):
# def load_json(path):
# def write_json(data, path):
# def print_simbad_pos(name):
# def table_to_list_of_dict(table):
# def validate_schema(path, data, schema):
# def log_list_difference(actual, expected):
#     def __init__(self, table, resource):
#     def read(cls, filename, format='ascii.ecsv'):
#     def _read_resource_info(cls, table, location):
#     def validate_table_colnames(self, expected_colnames):
#     def make_table_columns_uniform(self, col_specs):
#     def validate_input_meta(self):
# FLUX_TO_CRAB = _to_crab_flux()
# E_INF = 1e6 * u.Unit('TeV')
# class ECSVFormatError(Exception):
# class NA:
# class TableProcessor:


import yaml
from astropy.table import Table
from gammacat.utils import table_to_list_of_dict, yaml_make_ordereddict_work



def main():
    filename = 'tgevcat.ecsv'
    print('Reading {}'.format(filename))
    table = Table.read(filename, format='ascii.ecsv')

    data = table_to_list_of_dict(table)

    filename = 'tgevcat.yaml'
    print('Writing {}'.format(filename))
    with open(filename, 'w') as fh:
        yaml.dump(data, fh, default_flow_style=False)



# Path: gammacat/utils.py
# def _to_crab_flux():
#     def fill_value_array(shape):
#     def resize_sed_array(array, shape):
#     def fill_list(cls, data, key):
# def load_yaml(path):
# def write_yaml(data, path):
# def load_json(path):
# def write_json(data, path):
# def print_simbad_pos(name):
# def table_to_list_of_dict(table):
# def validate_schema(path, data, schema):
# def log_list_difference(actual, expected):
#     def __init__(self, table, resource):
#     def read(cls, filename, format='ascii.ecsv'):
#     def _read_resource_info(cls, table, location):
#     def validate_table_colnames(self, expected_colnames):
#     def make_table_columns_uniform(self, col_specs):
#     def validate_input_meta(self):
# FLUX_TO_CRAB = _to_crab_flux()
# E_INF = 1e6 * u.Unit('TeV')
# class ECSVFormatError(Exception):
# class NA:
# class TableProcessor:


# Path: other_data_collections/tgevcat/make.py
import yaml
from astropy.table import Table
from gammacat.utils import table_to_list_of_dict, yaml_make_ordereddict_work




def main():
    filename = 'tgevcat.ecsv'
    print('Reading {}'.format(filename))
    table = Table.read(filename, format='ascii.ecsv')

    data = table_to_list_of_dict(table)

    filename = 'tgevcat.yaml'
    print('Writing {}'.format(filename))
    with open(filename, 'w') as fh:
        yaml.dump(data, fh, default_flow_style=False)



if __name__ == '__main__':