-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add flatfield correction #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| channel_index = computed_params.monochrome_channels.index(channel_name) | ||
| flatfields[channel_index] = basic.flatfield | ||
| if progress_callback: | ||
| progress_callback() |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
@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
pipworking 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.