SainsburyWellcomeCentre / aeon_mecha

Project Aeon's main library for interfacing with acquired data. Contains modules for raw data file io, data querying, data processing, data qc, database ingestion, and building computational data pipelines.
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

Review `block_ends` in block_analysis.Block #368

Open jkbhagatio opened 2 months ago

jkbhagatio commented 2 months ago

Right now we're just detecting block ends by seeing if there's a negative diff in pellet_ct values in the block_state file. However, this can fail if there are consecutive blocks with 0 pellets obtained.

Instead, we can either do:

  1. look for 0's in the block_state file, and if there is a large enough gap between consecutive 0's, assume the block ended.

or

  1. use the NaN values in PatchState that occur on block transition.

  2. is probably preferred, since it uses the block_state info directly