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

Sylvia whittle/596 zscale grains #597

Merged
merged 5 commits into from
Jun 14, 2023
Merged

Conversation

SylviaWhittle
Copy link
Collaborator

@SylviaWhittle SylviaWhittle commented Jun 2, 2023

Closes #596

This PR makes it so that the z-range set in the config file is applied to all non-binary images, not just the core image set. This has been done by editing update_plotting_config to no longer remove the zrange item from the plot_dict dictionaries and instead, sets the item to [None, None] for binary images, and sets it to the user defined range for non-binary images.

I have updated the test test_update_plotting_config in test_utils.py accordingly to check that binary and non-binary images behave as expected.

The new outputs with a z-range of [-3, 4] applied:
image
image
image
image

Binary images are still black and white, but the non-binary images are now appropriately scaled.

@SylviaWhittle SylviaWhittle requested review from ns-rse and derollins June 2, 2023 13:27
@codecov-commenter
Copy link

codecov-commenter commented Jun 2, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.12 🎉

Comparison is base (78c6e18) 80.82% compared to head (7267fc0) 80.94%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #597      +/-   ##
==========================================
+ Coverage   80.82%   80.94%   +0.12%     
==========================================
  Files          19       19              
  Lines        2832     2845      +13     
==========================================
+ Hits         2289     2303      +14     
+ Misses        543      542       -1     
Impacted Files Coverage Δ
topostats/validation.py 100.00% <ø> (ø)
topostats/io.py 81.97% <100.00%> (+0.70%) ⬆️
topostats/plotting.py 91.08% <100.00%> (+0.63%) ⬆️
topostats/utils.py 97.40% <100.00%> (ø)

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

@derollins
Copy link
Collaborator

Ran this code, it works and produces the results I wanted from issue #596

Copy link
Collaborator

@ns-rse ns-rse left a comment

Choose a reason for hiding this comment

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

Looks good and setting to [None, None] is the way it should have been in the first place. Thanks @SylviaWhittle

@SylviaWhittle SylviaWhittle added this pull request to the merge queue Jun 14, 2023
Merged via the queue into main with commit 08f807c Jun 14, 2023
@SylviaWhittle SylviaWhittle deleted the SylviaWhittle/596-zscale-grains branch October 1, 2023 19:39
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.

Z range of cropped images not set by config file
4 participants