Skip to content

Commit

Permalink
DOC: Added docstring to serialize_simulation function
Browse files Browse the repository at this point in the history
  • Loading branch information
kmilo9999 committed May 1, 2024
1 parent f80aaee commit b3afb5a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions hnn_core/gui/_viz_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,26 @@ def _layout_template_change(self, template_type):
self.datasets_dropdown.layout.visibility = "hidden"

def serialize_simulation(self, simulation_name):
"""
Serializes the simulation data for a given simulation name
into either a single CSV file
or a ZIP file containing multiple CSVs, depending on the number
of trials in the simulation.
Parameters:
- simulation_name (str): The name of the simulation to serialize.
This name is used to access the corresponding
data in the 'simulations' dictionary
of the instance.
Returns:
- tuple: A tuple where the first element is either
the CSV content (str) of a single trial
or the binary data of a ZIP file (bytes)
containing multiple CSV files, and the
second element is the file extension (either ".csv" or ".zip").
"""
csv_trials_output = []
# CSV file hearders
headers = 'times,agg,L2,L5'
fmt = '%f, %f, %f, %f'

Expand Down

0 comments on commit b3afb5a

Please sign in to comment.