simulariumio/mcell/mcell_converter.py
def _get_dimensions_of_cellblender_data(
        path_to_binary_files: str, nth_timestep_to_read: int
    ) -> DimensionData:
        """
        Parse cellblender binary files to get the number of timesteps
        and maximum agents per timestep
        """
        result = DimensionData(0, 0)
        for file_name in os.listdir(path_to_binary_files):
            if not McellConverter._should_read_cellblender_binary_file(
                file_name, nth_timestep_to_read
            ):
                continue
            result.total_steps += 1
            n_agents = McellConverter._count_agents_in_binary_cellblender_viz_frame(
                os.path.join(path_to_binary_files, file_name)
            )
            if n_agents > result.max_agents:
                result.max_agents = n_agents
        return result

        Parse cellblender binary files to get the number of timesteps
        and maximum agents per timestep
        
Parse cellblender binary files to get the number of timesteps
and maximum agents per timestep
Parse cellblender binary files to get the number of timesteps and maximum agents per timestep
def _get_dimensions_of_cellblender_data(
        path_to_binary_files: str, nth_timestep_to_read: int
    ) -> DimensionData:
        result = DimensionData(0, 0)
        for file_name in os.listdir(path_to_binary_files):
            if not McellConverter._should_read_cellblender_binary_file(
                file_name, nth_timestep_to_read
            ):
                continue
            result.total_steps += 1
            n_agents = McellConverter._count_agents_in_binary_cellblender_viz_frame(
                os.path.join(path_to_binary_files, file_name)
            )
            if n_agents > result.max_agents:
                result.max_agents = n_agents
        return result
def _get_dimensions_of_cellblender_data ( path_to_binary_files : str , nth_timestep_to_read : int ) -> DimensionData : result = DimensionData ( 0 , 0 ) for file_name in os . listdir ( path_to_binary_files ) : if not McellConverter . _should_read_cellblender_binary_file ( file_name , nth_timestep_to_read ) : continue result . total_steps += 1 n_agents = McellConverter . _count_agents_in_binary_cellblender_viz_frame ( os . path . join ( path_to_binary_files , file_name ) ) if n_agents > result . max_agents : result . max_agents = n_agents return result
Parse cellblender binary files to get the number of timesteps
and maximum agents per timestep
Parse cellblender binary files to get the number of timesteps and maximum agents per timestep
"""
        Parse cellblender binary files to get the number of timesteps
        and maximum agents per timestep
        """
path_to_binary_files
str
nth_timestep_to_read
int