-
Notifications
You must be signed in to change notification settings - Fork 7
Conversation
Codecov Report
@@ Coverage Diff @@
## master #150 +/- ##
==========================================
- Coverage 80.59% 76.39% -4.20%
==========================================
Files 50 53 +3
Lines 3756 4554 +798
==========================================
+ Hits 3027 3479 +452
- Misses 729 1075 +346
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@mattersoflight @smguo @JohannaRahm This PR is now ready for review. Thanks! |
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.
Thanks for the PR @jennyfolkesson! The PR looks great. Please see my questions below.
np.save(file_name, np.squeeze(im_pred), allow_pickle=True) | ||
else: | ||
raise ValueError( | ||
'Unsupported file extension: {}'.format(self.image_ext), | ||
) | ||
if self.save_figs: | ||
if self.save_figs and self.image_ext != '.npy': |
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.
Why can't figures be saved if the file extension is .npy?
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.
Good point. It's not the file format I was trying to catch but 3D images which are usually the ones saved as numpy format but that's totally unclear. I'll update to check for 3d images.
flat_field_dir, | ||
'flat-field_channel-{}.npy'.format(channel_idx) | ||
) | ||
mp_fn_args.append((im_path, ff_path, block_size, meta_row)) |
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.
It looks to me that if channel_ids
is only a subset of channels in frames_metadata
, then for channels not in channel_ids
, their ff_path won't get updated. Is this the behavior you expect or I missed something?
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.
No that's not the behavior I want, thanks for catching that but. I'm now setting ff_path to None inside the for loop so no channels outside channel_ids flatfields should be messing up the calculations.
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.
Setting ff_path to None inside the for loop makes sense to me. One more comment: It looks like flatfield correction share the parameter channel_ids
as other preprocessing steps, but in most use cases we might apply flatfield correction to fluorescence channels but usually not to label-free channels. Should we make a separate channel_ids
for flatfield correction? It can be done in the next PR if it requires more code changes.
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.
Good point! Let's create an issue and I'll take care of it in a separate PR.
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.
Changes look good to me! I have one more comment but it can be addressed in the future PR. Feel free to merge the PR.
Here's another PR for you where:
Now that @JohannaRahm 's PR is merged with master I will rebase to master, then get the master_tests branch merged, then it's time for this one.
After this, I will start working on adding support for zarr input data.