simularium / simulariumio

Python package that converts simulation outputs to the format consumed by the Simularium viewer website
Apache License 2.0
5 stars 3 forks source link

Fix/v3 updates #94

Closed blairlyons closed 2 years ago

blairlyons commented 2 years ago

Problem

I noticed some bugs using v3 updates, and the file format spec is out of date, and also wanted to add the ability to skip frames in PhysiCell reading, like in MCell (this should be a separate PR but I did it at the same time while working with PhysiCell data, sorry!)

Solution

fixed bugs, added nth_timestep_to_read to PhysicellData, updated file format spec.

Type of change

Change summary:

Keyfiles:

  1. simulariumio/data_objects/agent_data.py - provide a name to DisplayData constructor to fix bug
  2. simulariumio/data_objects/display_data.py - try to create a DISPLAY_TYPE enum from a string display type, since that's how it is saved in JSON, to fix bug. Also added more descriptive error messages
  3. simulariumio/physicell/physicell_data.py - added nth_timestep_to_read like in McellData, to be able to skip timesteps when there's too much data.
  4. simulariumio/physicell/physicell_converter.py - use nth_timestep_to_read
  5. file_format.md - add version 3 updates