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
X-Ray Speckle Visibility Spectroscopy #293
Conversation
# number of ROI's | ||
num_roi = np.max(label_array) | ||
|
||
# create integration times |
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.
@tacaswell geometric_bin_edges wil create this time_bin for integration
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.
@ericdill earlier I used to call the geometric_series as time_series here they are going to use that function
|
||
|
||
def xsvs(image_sets, label_array, timebin_num=2, number_of_img=50): | ||
""" |
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.
can you describe what this function is doing?
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.
Sure I will,(more description)
Do you have an example notebook for this? |
@ericdill Yes I have example notebook, but some of the function name changed (like geometric_series), If @tacaswell didn't start to rebase this PR, |
Uncovered Suggestions
|
Thanks for the notebook link, @sameera2004. |
@danielballan sure, I will put this in skxray-examples with more clarification. |
Ready for review |
@ericdill I removed the xsvs_fitting module ready for review |
# The first commit's message is: WIP: added the functions for static tests for image data, before doing xsvs # This is the 2nd commit message: DOC: fixed the documentation for the funstions # This is the 3rd commit message: ENH: added a time bining function for integration # This is the 4th commit message: C: added documentation for static tests # This is the 5th commit message: BUG: fixed a bug in the static tests function # This is the 6th commit message: BUG: removed a bug in the time_bin function # This is the 7th commit message: ENH: added a new function to find the maximum speckle count in any image # This is the 8th commit message: TST: added tests to test_time_bining, test_max_counts, test_intesnity_distribution
…attern Conflicts: skxray/speckle_visibility.py API: added a seperate dir for xsvs, and move the static tests module to that API: added new function to find the suitable center for the speckle pattern Conflicts: skxray/speckle_visibility.py API: added a seperate dir for xsvs, and move the static tests module to that TST: start working on tests for the speckle_visibility module sttaic tests
(Negative binomial distribution, poission distribution, gamma distribution, etc ..)
DOC: fixed the documentation DOC: fixed the documentation ENH DOC: fixed the documentation ENH BUG: fixed the bug in dict.iteritems(0 for python 3 BUG: fixed the bug for python 3 -remove the iteritems DOC: finxed the documentation ENH BUG: fixed the bug in dict.iteritems(0 for python 3 BUG: fixed the bug for python 3 -remove the iteritems BUG: changed the dict.items() back to dict.iteritems() -Problem with python 3 DOC: finxed the documentation ENH BUG: fixed the bug in dict.iteritems(0 for python 3 BUG: fixed the bug for python 3 -remove the iteritems BUG: changed the dict.items() back to dict.iteritems() -Problem with python 3 DOC: changed the documentation for speckle_visibility.py DOC: finxed the documentation ENH BUG: fixed the bug in dict.iteritems(0 for python 3 BUG: fixed the bug for python 3 -remove the iteritems BUG: changed the dict.items() back to dict.iteritems() -Problem with python 3 DOC: changed the documentation for speckle_visibility.py DOC: fixed the documentation of suitable center DOC: finxed the documentation ENH BUG: fixed the bug in dict.iteritems(0 for python 3 BUG: fixed the bug for python 3 -remove the iteritems BUG: changed the dict.items() back to dict.iteritems() -Problem with python 3 DOC: changed the documentation for speckle_visibility.py DOC: fixed the documentation of suitable center API: added new function for saxs_circular_average DOC: finxed the documentation ENH BUG: fixed the bug in dict.iteritems(0 for python 3 BUG: fixed the bug for python 3 -remove the iteritems BUG: changed the dict.items() back to dict.iteritems() -Problem with python 3 DOC: changed the documentation for speckle_visibility.py DOC: fixed the documentation of suitable center API: added new function for saxs_circular_average TST: added test function for circular_average function to find saxs integration TST: fixed the nx=6 in the tests for circular_average DOC: added more documentation DOC: added more documentation ENH: added the pixel_size to the circular_average function ENH: changes to the bi edges
DOC: fixed the documentationof the xsvs.py _process BUG: fixed the bug with python 3 ( dict.iteritem() not working) API moved the circular_average function to core.py and the test to test_core.py BUG: finxed the bug with python 3 in dict.values() BUG: python 3 DOC: fixed the documentationof the xsvs.py _process BUG: fixed the bug with python 3 ( dict.iteritem() not working) API moved the circular_average function to core.py and the test to test_core.py BUG: finxed the bug with python 3 in dict.values() BUG: python 3 TST: added tests to check the static_tests one label DOC: fixed the documentationof the xsvs.py _process BUG: fixed the bug with python 3 ( dict.iteritem() not working) API moved the circular_average function to core.py and the test to test_core.py BUG: finxed the bug with python 3 in dict.values() BUG: python 3 TST: added tests to check the static_tests one label ENH: moved the circular_average function to speckle_visibility.py ENH: changes to documentation TST: fixed the static_tests() and remove the unwanted parts in the core.py
TST: fixed the static_tests() and remove the unwanted parts in the core.py BUG: added list() to dict.values) for python 3 STY: fixed with pepe8 STY: fixed with pepe8 BUG: fixed the bug with python 3 in dict.values() BUG: python 3 STY: fixed with pepe8 BUG: fixed the bug with python 3 in dict.values() BUG: python 3 TST: added tests to check the static_tests one label ENH:fixed the core.py ENH:fixed the core.py ENH: moved the circular_average function to speckle_visibility.py ENH: changes to documentation Conflicts: skxray/speckle_visibility/speckle_visibility.py skxray/tests/test_speckle_visibility.py ENH: changes to documentation Conflicts: skxray/speckle_visibility/speckle_visibility.py skxray/tests/test_speckle_visibility.py TST: fixed the static_tests() and remove the unwanted parts in the core.py ENH: changes to documentation Conflicts: skxray/speckle_visibility/speckle_visibility.py skxray/tests/test_speckle_visibility.py TST: fixed the static_tests() and remove the unwanted parts in the core.py BUG: added list() to dict.values) for python 3 STY: fixed with pepe8 Conflicts: skxray/tests/test_speckle_visibility.py STY: fixed with pepe8 Conflicts: skxray/tests/test_speckle_visibility.py API: changed the static_test_functions and tests for them Doc: added more documentation Conflicts: skxray/core/utils.py
…tion names and fix teh bugs Conflicts: skxray/speckle_visibility/speckle_visibility.py skxray/tests/test_speckle_visibility.py Conflicts: skxray/speckle_visibility/speckle_visibility.py
ENH: added threshold mask to the bin_ceners in circular_average function
API: moved the speckle_visibility file, del the speckle_visibility dir, and rename the module to speckle_analysis.py BUG: removed the label_num = np.unique(labels)[1:] API: changed the skxray/tests/test_speckle_visibility.py to skxray/tests/test_speckle_analysis.py API: added new function for speckle count of pixels within required ROI labels ENH: added ENH API: removed the xsvs1 functions API:removed the circular_average function DOC: fixed the documentation DOC:fixed the documentation
…value and model value
# number of pixels per ROI | ||
num_pixels = np.bincount(labels, minlength=(num_roi+1))[1:] | ||
|
||
# probability density of detecting speckles |
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.
The docstring says that this is the probability density of detecting photons
. Which one is correct?
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.
This comment has not been addressed. Your in-line comments and docstrings do not match up
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.
I checked the paper, it should be probability density of detecting photons
, so I fixed it
@ericdill I fixed this PR ready for review(docstrings and other suggestions) |
max_cts : int, optional | ||
the brightest pixel in any ROI in any image in the image set. | ||
default None; if not provided can be use roi_max_counts function | ||
in skxray.roi module |
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.
Can you rewrite
default None; if not provided can be use roi_max_counts function
in skxray.roi module
to say
defaults to using skxray.core.roi.roi_max_counts to determine the brightest
pixel in any of the ROIs
* upstream/master: (31 commits) DOC: added spaces and fixed the documentation BUG: changed the mean_intensity to an array instead of returning a list STY: fixed with pep8 TST: fixed the bug in the tests ENH: changed the return of the mean_intensity function to an array(ealier it was returning a list) ENH: took out one [0] from the kymograph function and took out returning strings on the mean intensity function TST: took out the python 3 issue with dict_values() BLD: add updated .travis.yml file TST: took out pandas dependency in the test suite BLD: changed pip install to conda install pandas in .travis.yml APi: removed the mean_image_sets to combine mean_image_sets BLD: install pandas TST: fixed the issues with the mean intensity tests added new function to get combine mean intensities for image sets MNT: Remove pandas dep. ENH: Remove helper function TST: Rework and fix tests MNT: Mostly documentation DOC: Update the docstrings MNT: Remove lingering merge conflict TST: Remove test of private function ...
@ericdill I changed the bin_edges Thanks for the suggestion, added the example notebook in skxray-examples , this is ready for review |
@ericdill I fixed the documentation and ready for review |
######################################################################## | ||
|
||
""" | ||
X-ray speckle visibility spectroscopy(XSVS) - Dynamic information of |
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.
Remove the tabs from this module docstring
@ericdill , I fixed this PR according to the comments, ready for review |
Looks good! |
X-Ray Speckle Visibility Spectroscopy
@ericdill Thanks for all the help and suggestions! |
No description provided.