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

Update YII and NPQ measurements and options #826

Merged
merged 11 commits into from
Oct 13, 2021
Merged

Conversation

nfahlgren
Copy link
Member

Describe your changes
Updates the pcv.photosynthesis.analyze_yii and pcv.photosynthesis.analyze_npq functions.

  • Removes the bins option from analyze_yii and hardcodes the histogram to 100 bins because the YII ranges are fixed to 0–1 and 100 creates bins with a width of 0.01, which we felt was sufficient. It also ensures that the bin labels, which are recorded as observation labels are unique.
  • Records bin positions as start points instead of midpoints for aesthetics.
  • Records the YII and NPQ mode (the bin label with the maximum count) and mean values.
  • Updates the histogram plots to plot the mean, median, and mode values.
  • Removes the bins option from analyze_npq and hardcodes the histogram to 100 bins. NPQ does not have a normalized range, so bin width will vary with the range but 100 bins are typically sufficient for a smooth plot.
  • Adds min_bin and max_bin options to analyze_npq to control the histogram range. min_bin defaults to zero and max_bin to auto (the maximum observed value), but both can be set or set to auto.
  • Documentation and tests were updated accordingly.

Type of update
Is this a: New feature or feature enhancement

Associated issues
Closes #814 and #818

@nfahlgren nfahlgren added the enhancement Enhancements to existing features label Oct 13, 2021
@nfahlgren nfahlgren added this to the PlantCV v4.x milestone Oct 13, 2021
@nfahlgren nfahlgren added this to Pull Requests in PlantCV4 via automation Oct 13, 2021
@codecov
Copy link

codecov bot commented Oct 13, 2021

Codecov Report

Merging #826 (24f0a49) into 4.x (6d105fc) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               4.x      #826   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          150       150           
  Lines         6631      6657   +26     
=========================================
+ Hits          6631      6657   +26     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
plantcv/plantcv/photosynthesis/analyze_npq.py 100.00% <100.00%> (ø)
plantcv/plantcv/photosynthesis/analyze_yii.py 100.00% <100.00%> (ø)

@nfahlgren nfahlgren merged commit 4b57cec into 4.x Oct 13, 2021
PlantCV4 automation moved this from Pull Requests to Done Oct 13, 2021
@nfahlgren nfahlgren deleted the add-mode-measurement-ps branch October 13, 2021 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancements to existing features
Projects
PlantCV4
  
Done
2 participants