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

Lenient extraction of corrupted imaging data #19

Merged
merged 17 commits into from
Aug 11, 2023

Conversation

sandip-shah
Copy link
Contributor

@sandip-shah sandip-shah commented Jun 30, 2023

I work for StandardBio, and it is a known thing that the last scan sometimes is not complete.

This generates an incomplete numpy array for that acquisition.

The default "read_acquisition" is called with "strict=True", but when called with "strict=False", it will populate the missing data in the last scan with "zeros" and allow the retrieval of the acquisition.

sandip-shah and others added 2 commits June 29, 2023 22:49
I work for StandardBio, and it is a known thing that the last scan sometimes is not complete.

This generates an incomplete numpy array for that acquisition.

The default "read_acquisition" is called with "strict=True", but when called with "strict=False", it will use populate the missing data in the last scan with "zeros" and allow the retrieval of the acquisition.
@codecov
Copy link

codecov bot commented Jun 30, 2023

Codecov Report

❗ No coverage uploaded for pull request base (develop@c7527b7). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop      #19   +/-   ##
==========================================
  Coverage           ?   81.00%           
==========================================
  Files              ?        9           
  Lines              ?      616           
  Branches           ?        0           
==========================================
  Hits               ?      499           
  Misses             ?      117           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jwindhager jwindhager self-requested a review June 30, 2023 11:09
@jwindhager jwindhager self-assigned this Jun 30, 2023
@jwindhager jwindhager added the enhancement New feature or request label Jun 30, 2023
Copy link
Contributor

@jwindhager jwindhager left a comment

Choose a reason for hiding this comment

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

Hi @sandip-shah

Thank you very much for contributing to this open source project! Its great to see Standard BioTools helping to facilitate Python-based data analysis. Also, @matt-sd-watson will be happy to see this PR (see #18).

I just did a first code review and have added some suggestions for changes. I'm happy to re-review this PR once these changes (especially the one regarding numpy.append) have been incorporated.

readimc/mcd_file.py Outdated Show resolved Hide resolved
readimc/mcd_file.py Outdated Show resolved Hide resolved
readimc/mcd_file.py Outdated Show resolved Hide resolved
readimc/mcd_file.py Outdated Show resolved Hide resolved
readimc/mcd_file.py Outdated Show resolved Hide resolved
readimc/mcd_file.py Outdated Show resolved Hide resolved
readimc/mcd_file.py Outdated Show resolved Hide resolved
readimc/mcd_file.py Outdated Show resolved Hide resolved
readimc/mcd_file.py Outdated Show resolved Hide resolved
@jwindhager jwindhager changed the title Update mcd_file.py Lenient extraction of corrupted imaging data Jun 30, 2023
sandip-shah and others added 8 commits June 30, 2023 09:04
Co-authored-by: Jonas Windhager <[email protected]>
Co-authored-by: Jonas Windhager <[email protected]>
Co-authored-by: Jonas Windhager <[email protected]>
Co-authored-by: Jonas Windhager <[email protected]>
Co-authored-by: Jonas Windhager <[email protected]>
Co-authored-by: Jonas Windhager <[email protected]>
Co-authored-by: Jonas Windhager <[email protected]>
Co-authored-by: Jonas Windhager <[email protected]>
Copy link
Contributor Author

@sandip-shah sandip-shah left a comment

Choose a reason for hiding this comment

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

Thank you for accepting the change.

Let us know if you need help with anything else.

Modified
np.append(data, append_data)
to
data = np.append(data, append_data)
@jwindhager jwindhager self-requested a review June 30, 2023 16:49
@jwindhager jwindhager changed the base branch from main to develop July 6, 2023 11:35
@jwindhager
Copy link
Contributor

jwindhager commented Jul 6, 2023

Hey @sandip-shah, I'm currently working on some changes on your PR, I hope thats ok.

One quick question: does MaxX/MaxY contain the image size or the largest x/y index in the data?

EDIT: The unit tests answered that one. These metadata fields contain the image size, not the data indices.

@jwindhager
Copy link
Contributor

LGTM

@sandip-shah do you agree with my changes?

@sandip-shah
Copy link
Contributor Author

Hi,

Yes, of course, I agree with the changes, and had made them when you suggested.

Thank you for accepting the change.

Sandip

@jwindhager jwindhager requested a review from Milad4849 July 12, 2023 17:01
@mezwick
Copy link
Contributor

mezwick commented Jul 26, 2023

Hello Hello. This looks like some handy functionality! Is it part of a read_imc package release?

@jwindhager
Copy link
Contributor

Hi! This PR has been ready for a while now, but is still waiting for a review by @Milad4849.

Copy link
Contributor

@Milad4849 Milad4849 left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants