Skip to content
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

Version 1 - 116 improve output data formatting #118

Merged
merged 79 commits into from
Oct 2, 2023

Conversation

emlynjdavies
Copy link
Collaborator

@emlynjdavies emlynjdavies commented Jul 6, 2023

This is a PR to progress the main branch to Version 1.

This is a summary of where i ended up with the interpretation of the steps dictionary from a toml configuration file, and saving it to nc (instead of h5), and including a steps string that is possible to re-evaluate to re-run the analysis:
notebooks/single-image-stats.ipynb

Completed issues contained in this PR


Holo test assertion change:

Number of particles expected in this test is now 56 instead of 42. This change is likely due to different processing settings used in the test. See pyopia/tests/test_pipeline.py


Known issue with Mac M2 dependencies. For now, please use the https://github.com/SINTEF/pyopia/tree/mac-m branch if you don't have an intel mac

@emlynjdavies emlynjdavies linked an issue Jul 6, 2023 that may be closed by this pull request
pyopia/io.py Outdated Show resolved Hide resolved
pyopia/io.py Outdated Show resolved Hide resolved
@emlynjdavies emlynjdavies self-assigned this Jul 6, 2023
@emlynjdavies emlynjdavies added patch / enhancement improved functionality or patch indented for changes that require bumping only the PATCH number help wanted Extra attention is needed labels Jul 6, 2023
@emlynjdavies emlynjdavies added this to the Version 1 milestone Jul 6, 2023
@emlynjdavies
Copy link
Collaborator Author

This method will have problems when it comes to handling steps that contain inputs that are not available in a config file e.g.

'create background': pyopia.background.CreateBackground(bgfiles, pyopia.instrument.silcam.load_image)

@animmosmith would it be acceptable to insist that pipeline classes only take inputs of strings or floats that don't require computation (i.e. can be put in a config file)? this would mean a bit of refactoring?

Or are there other alternatives?

@animmosmith
Copy link
Collaborator

This method will have problems when it comes to handling steps that contain inputs that are not available in a config file e.g.

'create background': pyopia.background.CreateBackground(bgfiles, pyopia.instrument.silcam.load_image)

@animmosmith would it be acceptable to insist that pipeline classes only take inputs of strings or floats that don't require computation (i.e. can be put in a config file)? this would mean a bit of refactoring?

Or are there other alternatives?

I think reworking things to make it work with a config file is worth it. I guess with the upgrade to 3.10 we can make use of match-case constructs to enable easy switching between difference processing functions?

@emlynjdavies
Copy link
Collaborator Author

Getting back to this now, after the summer...

In the case of the background creation, we currently do:

bgfiles = files[:average_window] # provide a list of background files used to create the static background

I am thinking that we will need to change this to a folder name, which the background creator uses to find bgfiles. so it would then have the folder path and average_window as inputs in the config.

Does that sound OK @animmosmith ?

@animmosmith
Copy link
Collaborator

Getting back to this now, after the summer...

In the case of the background creation, we currently do:

bgfiles = files[:average_window] # provide a list of background files used to create the static background

I am thinking that we will need to change this to a folder name, which the background creator uses to find bgfiles. so it would then have the folder path and average_window as inputs in the config.

Does that sound OK @animmosmith ?

Yes, I think that would be easy to explain to end users if using the static background option - an additional option to the background creator tool could be either how many of the files in the folder to use (equally distributed) or what the stride length should be if sub-sampling the files in the (perhaps raw data) folder for speed.

@emlynjdavies emlynjdavies marked this pull request as ready for review September 28, 2023 20:37
@emlynjdavies emlynjdavies changed the title 116 improve output data formatting Version 1 - 116 improve output data formatting Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment