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

dials.find_spots: fix counting in histogram output #1827

Merged
merged 2 commits into from
Jul 30, 2021
Merged

Conversation

rjgildea
Copy link
Contributor

@rjgildea rjgildea commented Jul 30, 2021

Fixes #1826

@graeme-winter
Copy link
Contributor

I am looking at the diffs and I don't see how this fixes the problem, because I don't see how this is a problem. However I will look again in a mo once it is green and the tests are passed.

@rjgildea
Copy link
Contributor Author

Using:

$ dials.import $(dials.data get -q fumarase)/*.img
$ dials.find_spots imported.expt

On main:

Histogram of per-image spot count for imageset 1:
35258 spots found on 60 images (max 1047 / bin)
*                                                           
*                                                           
*                                                          *
*                                                          *
************** ****** * *** *** ***  ******          *     *
************** ***************************** ************* *
******************************************** ***************
************************************************************
************************************************************
************************************************************
1                          image                          60

Histogram of per-image spot count for imageset 1:
37328 spots found on 60 images (max 1102 / bin)
*                                                           
*                                                           
*                                                          *
*                            *                             *
************** * *************   **   * ***                *
************** ***************************** ***************
******************************************** ***************
************************************************************
************************************************************
************************************************************
1                          image                          60

With this PR:

Histogram of per-image spot count for imageset 0:
35258 spots found on 60 images (max 1047 / bin)
*                                                           
*                                                           
*                                                          *
*                                                          *
************** ****** * *** *** ***  ******          *     *
************** ***************************** ************* *
******************************************** ***************
************************************************************
************************************************************
************************************************************
1                          image                          60

Histogram of per-image spot count for imageset 1:
37328 spots found on 60 images (max 1102 / bin)
*                                                           
*                                                           
*                                                          *
*                            *                             *
************** * *************   **   * ***                *
************** ***************************** ***************
******************************************** ***************
************************************************************
************************************************************
************************************************************
1                          image                          60

@rjgildea
Copy link
Contributor Author

I am looking at the diffs and I don't see how this fixes the problem, because I don't see how this is a problem. However I will look again in a mo once it is green and the tests are passed.

i was coming from the inner loop over all experiments, so it was always equal to the index of the last experiment in the list. It should have come from the outer loop over imagesets.

Copy link
Contributor

@graeme-winter graeme-winter left a comment

Choose a reason for hiding this comment

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

Now I get it it is one of those trivial but valuable fixes - thank you! Such things are annoying when you find them 🙂

+10 pts and one issue closing card

@rjgildea rjgildea enabled auto-merge (squash) July 30, 2021 15:43
@codecov
Copy link

codecov bot commented Jul 30, 2021

Codecov Report

Merging #1827 (95d6433) into main (a827a65) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1827   +/-   ##
=======================================
  Coverage   67.13%   67.13%           
=======================================
  Files         617      617           
  Lines       69416    69416           
  Branches     9655     9655           
=======================================
  Hits        46601    46601           
  Misses      20873    20873           
  Partials     1942     1942           

@rjgildea rjgildea merged commit 850fb80 into main Jul 30, 2021
@rjgildea rjgildea deleted the fix-counting branch July 30, 2021 17:06
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.

dials.find_spots: text output is misleading
3 participants