yasfpy.functions.material_handler ================================= .. py:module:: yasfpy.functions.material_handler .. autoapi-nested-parse:: Material table helpers. Contains utilities for reading/interpolating refractive index tables used by YASF. Attributes ---------- .. autoapisummary:: yasfpy.functions.material_handler.HASH_TYPE Functions --------- .. autoapisummary:: yasfpy.functions.material_handler.material_handler yasfpy.functions.material_handler.handle_refractiveindex_info yasfpy.functions.material_handler.handle_eodg yasfpy.functions.material_handler.handle_csv Module Contents --------------- .. py:data:: HASH_TYPE :value: 'sha256' .. py:function:: material_handler(links, cache = True, local = True) Handles the processing of material data from various sources. :param links: The link(s) to the material data source(s). :type links: str or list :param cache: cache the downloaded file using sha256 string :type cache: bool :param local: load locally cached files if available :type local: bool :returns: A dictionary containing the processed material data and information. :rtype: (dict) .. py:function:: handle_refractiveindex_info(url) Retrieves refractive index data from a given URL and processes it. :param url: The URL to retrieve the refractive index data from. :type url: str :returns: A tuple containing the processed data as a pandas DataFrame and the material name. :rtype: (tuple) :raises Exception: If the data retrieval fails. .. py:function:: handle_eodg(url) Handles the EODG material data retrieval from a given URL. :param url: The URL of the EODG material data. :type url: str :returns: A tuple containing the retrieved material data and the material name. :rtype: (tuple) :raises Exception: If the data retrieval from the URL fails. .. py:function:: handle_csv(path) Read a CSV file containing material data and extract the material name and data. :param path: The path to the CSV file. :type path: str :returns: A tuple containing the material data as a pandas DataFrame and the material name. :rtype: (tuple)