simulariumio/cellpack/cellpack_converter.py
def _parse_dimensions(all_ingredients, total_steps=1) -> DimensionData:
        """
        Parse cellPack results file to get the total number of agents and
        the max curve length
        """
        result = DimensionData(0, 0)
        for ingredient in all_ingredients:
            ingredient_results_data = ingredient["results"]
            result.max_agents += len(ingredient_results_data["results"])
            if "nbCurve" in ingredient_results_data:
                result.max_agents += ingredient_results_data["nbCurve"]

                for i in range(ingredient_results_data["nbCurve"]):
                    curve = "curve" + str(i)
                    if len(ingredient_results_data[curve]) > result.max_subpoints:
                        result.max_subpoints = len(ingredient_results_data[curve])
        result.total_steps = total_steps
        return result

        Parse cellPack results file to get the total number of agents and
        the max curve length
        
Parse cellPack results file to get the total number of agents and
the max curve length
Parse cellPack results file to get the total number of agents and the max curve length
def _parse_dimensions(all_ingredients, total_steps=1) -> DimensionData:
        result = DimensionData(0, 0)
        for ingredient in all_ingredients:
            ingredient_results_data = ingredient["results"]
            result.max_agents += len(ingredient_results_data["results"])
            if "nbCurve" in ingredient_results_data:
                result.max_agents += ingredient_results_data["nbCurve"]
                for i in range(ingredient_results_data["nbCurve"]):
                    curve = "curve" + str(i)
                    if len(ingredient_results_data[curve]) > result.max_subpoints:
                        result.max_subpoints = len(ingredient_results_data[curve])
        result.total_steps = total_steps
        return result
def _parse_dimensions ( all_ingredients , total_steps = 1 ) -> DimensionData : result = DimensionData ( 0 , 0 ) for ingredient in all_ingredients : ingredient_results_data = ingredient [ "results" ] result . max_agents += len ( ingredient_results_data [ "results" ] ) if "nbCurve" in ingredient_results_data : result . max_agents += ingredient_results_data [ "nbCurve" ] for i in range ( ingredient_results_data [ "nbCurve" ] ) : curve = "curve" + str ( i ) if len ( ingredient_results_data [ curve ] ) > result . max_subpoints : result . max_subpoints = len ( ingredient_results_data [ curve ] ) result . total_steps = total_steps return result
Parse cellPack results file to get the total number of agents and
the max curve length
Parse cellPack results file to get the total number of agents and the max curve length
"""
        Parse cellPack results file to get the total number of agents and
        the max curve length
        """
all_ingredients
total_steps