Skip to content

Conversation

@ianohara
Copy link
Collaborator

@cjfuller implemented the actual functionality here - doing flatfield correction. It is added both as a cli option, and a checkbox in the gui.

The use of basicpy caused dependency issues, though. I was able to get a setup with just pip working by removing most of the constraints on the packages (I think the numpy constraint might have been the major issue?), but replicating this with uv still resulted in build issues.

I also downgraded the python requirement to 3.10 since that's the default on ubuntu 22.04 lts.

Since customers seem more familiar with conda, Hongquan asked to go that route. So this now installs conda, creates a conda environment, and sets it up to work for both the cli and gui. The README should reflect this.

Tested By: Running the setup script in an ubuntu:22.04 docker container and making sure the cli worked. Also, running the same on my own computer and making sure both the cli and gui work (both with and without flatfield correction). I also made sure the tests pass, and all the dev scripts run.

Since we know the issue here were dependencies, it'd be good to have a few others test.

channel_index = computed_params.monochrome_channels.index(channel_name)
flatfields[channel_index] = basic.flatfield
if progress_callback:
progress_callback()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this was probably meant to be a real progress update, but we pass in the Callable[[], None] elsewhere and have a callback on our callback class specifically named for flatfield.

It may make sense to change this to flatfield progress or something, but this at least gets it working.

return row_idx % 2 == 1
case _ as unreachable:
assert_never(unreachable)
raise RuntimeError(unreachable)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Looks like we can probably get this back from typing_extentions if we want to install that.

@ianohara ianohara merged commit b1f5833 into main Feb 17, 2025
@ianohara ianohara deleted the ian/conda-and-field-correct branch February 17, 2025 19:09
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.

3 participants