Closed pixelzoom closed 3 months ago
Most of this work was done as part of #30, #77, and #231. In the above commits, documentation for IOTypes was improved.
@arouinfar @Nancy-Salpepi @kathy-phet This is ready for review. Below is a summary of the relevant PhET-iO elements.
heavyAverageSpeedProperty
and lightAverageSpeedProperty
are the (running) average speeds for heavy and light particles respectively, as displayed in the Average Speed accordion box. These Properties are phetioFeatured: true
.
averageSpeedModel
handles serialization of internal elements that are used to derive the above Properties. All of its fields are for internal use only, so it is phetioFeatured: false
. AverageSpeedModelIO is its IOType, which looks like this in Studio:
heavyKineticEnergyBinCountsProperty
, lightKineticEnergyBinCountsProperty
, and totalKineticEnergyBinCountsProperty
are the bin counts displayed by the Kinetic Energy histogram. These Propertes are phetioFeatured: true
.
heavySpeedBinCountsProperty
, lightSpeedBinCountsProperty
, and totalSpeedBinCountsProperty
are the bin counts displayed by the Speed histogram. These Propertes are phetioFeatured: true
.
histogramsModel
handles serialization of internal elements that are used to derive the above Properties. All of its fields are for internal use only, so it is phetioFeatured: false
. HistogramsModelIO is its IOType, which looks like this in Studio:
particle1FlowRateModel.leftFlowRateProperty
and particle1FlowRateModel.rightFlowRateProperty
are the left and right flow rates displayed for particles of type 1. These Propertes are phetioFeatured: true
.
particle2FlowRateModel.leftFlowRateProperty
and particle2FlowRateModel.rightFlowRateProperty
are the left and right flow rates displayed for particles of type 2. These Propertes are phetioFeatured: true
.
particle1FlowRateModel
and particle2FlowRateModel
handle serialization of internal elements that are used to derive the above Properties. All of their fields are for internal use only, so they are phetioFeatured: false
. ParticleFlowRateModelIO is their IOType, which looks like this in Studio:
In #235, serialization of the histograms was optimized. HistogramsModelIO now look like this. Rather than storing raw samples of speed and KE, the samples are immediately processed into "cumulative bins", then averaged later. This greatly reduces the amount of serialized data.
@arouinfar and @Nancy-Salpepi noted a potential problem with restoring state for the Speed histogram, tracking in #261.
@arouinfar @Nancy-Salpepi if everything else looks OK here, and the state schemas look reasonable, please close this issue.
@arouinfar @Nancy-Salpepi if everything else looks OK here, and the state schemas look reasonable, please close this issue.
Looks good, closing.
Related to #231 (PhET-iO instrumentation for particles) and #236 (PhET-iO support for data fluency) ...
The following things sample the particle system:
For each of these, the samples need to be stateful. For the elements that involve a fixed time period, the accumulated time must also be stateful.