Skip to content

Lambda: Update arcadia-microscopy-tools to 0.4.1 - #90

Merged
lanery merged 2 commits into
stagingfrom
rl/update-arcadia-microscopy-tools-0.4.1
Jun 9, 2026
Merged

Lambda: Update arcadia-microscopy-tools to 0.4.1#90
lanery merged 2 commits into
stagingfrom
rl/update-arcadia-microscopy-tools-0.4.1

Conversation

@lanery

@lanery lanery commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Bump arcadia-microscopy-tools to >=0.4.1 in lambda/pyproject.toml (+ regenerated uv.lock).
  • Adapt the Hina ND2 pipeline to the breaking 0.4.0 API changes:
    • get_intensities_from_channel()get_channel_intensities()
    • Channel.color is now a plain hex string (not an arcadia_pycolor.HexCode); serialize it directly, normalized to lowercase to keep the metadata JSON output stable.
  • Update test_parse_metadata.py: replace the now-invalid Channel(color=None) case (color is a required, hex-validated string in 0.4.x) with a lowercase-normalization test.

Notes

  • 0.4.0 also changed overlay blending to anchor the zero-point at transparent gray instead of transparent white, so generated composite JPGs will look slightly different even without code changes.

Test plan

  • make check-all (format, lint, typecheck — Python + web)
  • Validate the pipeline on a real ND2 file and visually sanity-check the composite overlay output

Made with Cursor

lanery and others added 2 commits June 9, 2026 11:07
Co-authored-by: Cursor <cursoragent@cursor.com>
The 0.4.0 release renamed `get_intensities_from_channel` to
`get_channel_intensities` and changed `Channel.color` from an
`arcadia_pycolor.HexCode` to a plain hex string. Update the call sites
and normalize the serialized color to lowercase to keep the metadata
JSON output stable.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
data-hub Ready Ready Preview, Comment Jun 9, 2026 6:08pm

Request Review

@lanery

lanery commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Tested via CLI on an ND2 file with only one pre-defined channel (previously failed processing):

uv run data-hub-process hina "/Users/ryanlane/arc_nas_mirror/Hina/Tyler/2026/05/96_well_OilRedO/20260529_103039_362/WellB11_Channelred,green,blue,TRITC BP_Seq0002.nd2" --output-dir ./out
/Users/ryanlane/Repositories/data-hub/.venv/lib/python3.13/site-packages/arcadia_microscopy_tools/nikon.py:147: MetadataWarning: Optical configuration 'red' did not match a predefined channel; synthesizing a channel from ND2 metadata. Pass a Channel instance to prevent this warning.
  channel = self._build_fallback_channel(nd2_channel.channel)
/Users/ryanlane/Repositories/data-hub/.venv/lib/python3.13/site-packages/arcadia_microscopy_tools/nikon.py:147: MetadataWarning: Optical configuration 'green' did not match a predefined channel; synthesizing a channel from ND2 metadata. Pass a Channel instance to prevent this warning.
  channel = self._build_fallback_channel(nd2_channel.channel)
/Users/ryanlane/Repositories/data-hub/.venv/lib/python3.13/site-packages/arcadia_microscopy_tools/nikon.py:147: MetadataWarning: Optical configuration 'blue' did not match a predefined channel; synthesizing a channel from ND2 metadata. Pass a Channel instance to prevent this warning.
  channel = self._build_fallback_channel(nd2_channel.channel)
Exported JPG: out/WellB11_Channelred,green,blue,TRITC BP_Seq0002.jpg
{
  "sizes": {
    "Z": 9,
    "C": 4,
    "Y": 4263,
    "X": 4263
  },
  "channels": [
    {
      "name": "red",
      "excitation_nm": null,
      "emission_nm": null,
      "color": "#ff0000"
    },
    {
      "name": "green",
      "excitation_nm": null,
      "emission_nm": null,
      "color": "#00ff00"
    },
    {
      "name": "blue",
      "excitation_nm": null,
      "emission_nm": null,
      "color": "#0000ff"
    },
    {
      "name": "TRITC",
      "excitation_nm": 561,
      "emission_nm": 595,
      "color": "#ffbf00"
    }
  ],
  "dimensions": [
    "MULTICHANNEL",
    "Z_STACK"
  ]
}
WellB11_Channelred,green,blue,TRITC BP_Seq0002

@wasimxyz wasimxyz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lanery
lanery merged commit 2e139e6 into staging Jun 9, 2026
4 checks passed
@lanery
lanery deleted the rl/update-arcadia-microscopy-tools-0.4.1 branch June 9, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants