allen-cell-animated / colorizer-data

example scripts and utilities for preparing data for the time series colorizer app
Other
1 stars 0 forks source link

feature: Auto-detect feature types #30

Closed ShrimpCryptid closed 9 months ago

ShrimpCryptid commented 9 months ago

Big feature spun off of a comment made by @toloudis! This is part of the changes in #26.

Expected review time: large, 30-40 min

This allows the writer to take in an INDETERMINATE feature type, and attempt to infer the feature's type from the data values. It also adds an extra validation step to the writer, where it checks the data type before writing. Features will be skipped if they have incorrect types, based on requested behavior by scientists.

I recommend starting with writer.py to see the high-level view of the changes that happened, and then looking at utils.py for the new utility methods. There are also unit tests added in test_utils.py.

I've tested these new changes with Derek's dataset; you can view the first few datasets converted here: https://dev-aics-dtp-001.int.allencell.org/nucmorph-colorizer/dist/index.html?collection=https%3A%2F%2Fdev-aics-dtp-001.int.allencell.org%2Fmicroscopy%2FClusterOutput%2FH2B_Deliverable_AnalysisPipelineOutput%2FH2B_Deliverable_InputImages_123Timelapses_Composite_Output%2Fcolorizer%2Fcollection.json&dataset=3500005807_1&feature=Col4MigratoryCell&color=matplotlib-cool&palette-key=adobe

ShrimpCryptid commented 9 months ago

@toloudis re-requesting your review because of some significant API changes that were made.