fractal-analytics-platform / fractal-tasks-core

Main tasks for the Fractal analytics platform
https://fractal-analytics-platform.github.io/fractal-tasks-core/
BSD 3-Clause "New" or "Revised" License
14 stars 6 forks source link

Ngio projection #866

Open lorenzocerrone opened 1 week ago

lorenzocerrone commented 1 week ago

Checklist before merging

github-actions[bot] commented 1 week ago

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  fractal_tasks_core/tables
  v1.py
  fractal_tasks_core/tasks
  projection.py 29, 77
Project Total  

This report was generated by python-coverage-comment-action

jluethi commented 1 week ago

This is great @lorenzocerrone !

A few brief questions: Have you tried running this projection task on a zyx dataset (no channel or time dimension)? ~Could we easily add a synthetic test case for that using an ngio generated tiny zyx OME-Zarr. That then closes https://github.com/fractal-analytics-platform/fractal-tasks-core/issues/840~

Also, would we expect this task to already work with time-data, e.g. an tczyx dataset?

How much we should test in tasks-core? We test separately in tasks core only when there is task logic specifically to those cases

Can we add an option to copy over additional tables (e.g. user can deactivate that, but we copy non-roi tables by default). We'd keep them & ignore edge-cases (like missing label images) for now. TODO Joel: provide example dataset of condition tables for this. Approach: First copy them as they are (by adding a include_table flag to the derive function or by adding a copy_tables function). Then modify the ROI tables in place in the new Zarr => let's go with a copy_tables function

TODO for myself:

tcompa commented 1 week ago

Thanks @lorenzocerrone! I added a few small comments, but the pattern is often the same (I am no expert in ngio, and then questions pop up frequently independently on the actual PR). I think we are at a stage where it would be useful to briefly discuss this live.

tcompa commented 15 hours ago

I confirm that setting both origin and attributes/plate in the output is valid, and the value which will take priority is the one in attributes/plate.