<commit_before># atomic model

#TODO revisit import statements and reorganize
from scipy import interpolate
import line
import constants
import numpy as np
import sqlite3
import logging
import StringIO
import os
import h5py


try:
    import sqlparse

    sqlparse_available = True
except ImportError:
    sqlparse_available = False

logger = logging.getLogger(__name__)


default_atom_h5_path = os.path.join( os.path.dirname(__file__), 'data', 'atoms.h5')


def read_atomic_data(fname=None):
    """This function reads the atomic number, symbol, and mass from hdf5 file

    Parameters
    ----------

    fname : `str`, optional
        path to atomic.h5 file, if set to None it will read in default data directory

    Returns
    -------

    data : `~np.recarray`
        table with fields z, symbol, mass
    """

    if fname is None:
        fname = default_atom_h5_path
    data = h5py.File(fname)
    data = data['atomic']
    return data


def read_ionization_data(fname = None):
    """This function reads the atomic number, ion number, and ionization energy from hdf5 file

    Parameters
    ----------

    fname : `str`, optional
        path to atomic.h5 file, if set to None it will read in default data directory
<commit_msg>fixed spaces @kwarg<commit_after># atomic model

#TODO revisit import statements and reorganize
from scipy import interpolate
import line
import constants
import numpy as np
import sqlite3
import logging
import StringIO
import os
import h5py


try:
    import sqlparse

    sqlparse_available = True
except ImportError:
    sqlparse_available = False

logger = logging.getLogger(__name__)


default_atom_h5_path = os.path.join( os.path.dirname(__file__), 'data', 'atoms.h5')


def read_atomic_data(fname=None):
    """This function reads the atomic number, symbol, and mass from hdf5 file

    Parameters
    ----------

    fname : `str`, optional
        path to atomic.h5 file, if set to None it will read in default data directory

    Returns
    -------

    data : `~np.recarray`
        table with fields z, symbol, mass
    """

    if fname is None:
        fname = default_atom_h5_path
    data = h5py.File(fname)
    data = data['atomic']
    return data


def read_ionization_data(fname=None):
    """This function reads the atomic number, ion number, and ionization energy from hdf5 file

    Parameters
    ----------

    fname : `str`, optional
        path to atomic.h5 file, if set to None it will read in default data directory

{'fraction_non_alphanumeric': 0.0862760834670947, 'fraction_numerical': 0.008025682182985553, 'mean_word_length': 2.9508716323296356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3257630', 'n_tokens_mistral': 749, 'n_tokens_neox': 714, 'n_words': 275}