Conversation
This contains the method for computing the average curvature of a given signal. This is serve as a helper function for representing the fluctuations at high Q for IQ data (to be implemented in QOI.py).
This contains the method for computing the average curvature of a given signal. This is serve as a helper function for representing the fluctuations at high Q for IQ data (to be implemented in QOI.py).
Codecov Report
@@ Coverage Diff @@
## master #70 +/- ##
==========================================
- Coverage 92.16% 91.29% -0.88%
==========================================
Files 19 19
Lines 919 942 +23
==========================================
+ Hits 847 860 +13
- Misses 72 82 +10
Continue to review full report at Codecov.
|
|
This looks good, it needs a test |
This contains the method for computing the average curvature of a given signal. This is serve as a helper function for representing the fluctuations at high Q for IQ data. The QOI file is updated in this commit. A test for the avg_curvature function has also been added in this commit.
This contains the method for computing the average curvature of a given signal. This is serve as a helper function for representing the fluctuations at high Q for IQ data. The QOI file is updated in this commit. A test for the avg_curvature function has also been added in this commit.
This contains the method for computing the average curvature of a given signal. This is serve as a helper function for representing the fluctuations at high Q for IQ data. The QOI file is updated in this commit. A test for the avg_curvature function has also been added in this commit.
This contains the method for computing the average curvature of a given signal. This is serve as a helper function for representing the fluctuations at high Q for IQ data. The QOI file is updated in this commit. A test for the avg_curvature function has also been added in this commit.
This contains the method for computing the average curvature of a given signal. This is serve as a helper function for representing the fluctuations at high Q for IQ data. The QOI file is updated in this commit. A test for the avg_curvature function has also been added in this commit.
This contains the method for computing the average curvature of a given signal. This is serve as a helper function for representing the fluctuations at high Q for IQ data. The QOI file is updated in this commit. A test for the avg_curvature function has also been added in this commit.
sbillinge
left a comment
There was a problem hiding this comment.
I am a little skeptical that this will do what we want it to, but let's try and see. Do you have some test data that samples liquid, some low-frequency oscillation and some high-frequency structural signal and make sure that this gives the expected answer?
xpdtools/tools.py
Outdated
|
|
||
|
|
||
| def avg_curvature(y, x, high_val): | ||
| """Computes the average of the curvature of a given signal past a |
|
|
||
| def avg_curvature(y, x, high_val): | ||
| """Computes the average of the curvature of a given signal past a | ||
| (currently) user provided high Q value, this will be used as the scalar |
There was a problem hiding this comment.
don't say what this will be used for. If it is just for that qoi it shouldn't be a separate function. If it has more broad application, it should be its own function but the docstring should just describe what it does.
This contains the method for computing the average curvature of a given signal. This is serve as a helper function for representing the fluctuations at high Q for IQ data. The QOI file is updated in this commit. A test for the avg_curvature function has also been added in this commit. Two methods for computing the pearsons correlation coefficient have been added in this commit as well as tests for both. Still need to implement them into the qoi file.
| return locals() | ||
|
|
||
|
|
||
| def fluc_high_q(iq_comp, high_q_val=45, **kwargs): |
| def fluc_high_q(iq_comp, high_q_val=45, **kwargs): | ||
| q = iq_comp.pluck(0) | ||
| iq = iq_comp.pluck(1) | ||
| high_q_fluc = avg_curvature(iq, q, high_q_val) |
There was a problem hiding this comment.
You might use the q and mean and combine them, see: https://github.com/xpdAcq/xpdtools/blob/master/xpdtools/pipelines/raw_pipeline.py#L340
This needs to run through a starmap.
This contains the method for computing the average curvature of a given signal. This will serve as a helper function for representing the fluctuations at high Q for IQ data (to be implemented in QOI.py).