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

X-Ray Speckle Visibility Spectroscopy #293

Merged
merged 36 commits into from Sep 10, 2015
Merged

X-Ray Speckle Visibility Spectroscopy #293

merged 36 commits into from Sep 10, 2015

Conversation

sameera2004
Copy link
Member

No description provided.

# number of ROI's
num_roi = np.max(label_array)

# create integration times
Copy link
Member Author

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

Copy link
Member Author

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

@ericdill ericdill mentioned this pull request Jul 21, 2015


def xsvs(image_sets, label_array, timebin_num=2, number_of_img=50):
"""
Copy link
Member

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?

Copy link
Member Author

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)

@ericdill
Copy link
Member

Do you have an example notebook for this?

@sameera2004
Copy link
Member Author

@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,
I will rebase and do the changes and add more documentation and can add the example notebook?

@codecov-io
Copy link

@sameera2004
Copy link
Member Author

@danielballan
Copy link
Member

Thanks for the notebook link, @sameera2004.

@sameera2004
Copy link
Member Author

@danielballan sure, I will put this in skxray-examples with more clarification.

@sameera2004
Copy link
Member Author

Ready for review

@sameera2004
Copy link
Member Author

@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
# number of pixels per ROI
num_pixels = np.bincount(labels, minlength=(num_roi+1))[1:]

# probability density of detecting speckles
Copy link
Member

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?

Copy link
Member

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

Copy link
Member Author

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

@sameera2004
Copy link
Member Author

@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
Copy link
Member

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
  ...
@sameera2004
Copy link
Member Author

@ericdill I changed the bin_edges Thanks for the suggestion, added the example notebook in skxray-examples , this is ready for review

@sameera2004
Copy link
Member Author

@ericdill I fixed the documentation and ready for review

########################################################################

"""
X-ray speckle visibility spectroscopy(XSVS) - Dynamic information of
Copy link
Member

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

@sameera2004
Copy link
Member Author

@ericdill , I fixed this PR according to the comments, ready for review

@ericdill
Copy link
Member

Looks good!

ericdill added a commit that referenced this pull request Sep 10, 2015
X-Ray Speckle Visibility Spectroscopy
@ericdill ericdill merged commit b764d5c into scikit-beam:master Sep 10, 2015
@sameera2004
Copy link
Member Author

@ericdill Thanks for all the help and suggestions!

@sameera2004 sameera2004 deleted the xsvs2 branch September 28, 2015 14:17
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.

None yet

4 participants