NSLS-II / pyCHX

chx_analysis_codes
BSD 3-Clause "New" or "Revised" License
5 stars 6 forks source link

[v2][_commonspeckle] two time correlation function for image input data is broken #35

Open ambarb opened 3 years ago

ambarb commented 3 years ago

pyCHX.chx_correlation.two_time_corr don't edit unless needed now by CHX

pyCHX._v2.chx_correlation.two_time_corr is equivalent to what is found in sckit-beam. This function is unique in that it allows for a mult-tau - like calcuation of the two-time autocorrelation function.

This function used in a CSX environment runs into a IndexError exception. All the other basic functions that are simliar between sckit-beam and pyCHX work as expected.

As discussed with @afluerasu, @yugangzhang 's code here is unique and is nice to keep. Paper pending. Note that xi-cam is using this function in skbeam.

ambarb commented 3 years ago

note that pyCHX.Two_Time_Correlation_Functions.auto_two_Array exists for frame and photon list data. The difference between this function and the one in chx_correlation is that all possible lags are calculated (aka, brute force) in .pyCHX.Two_Time_Correlation_Functions.auto_two_Array.

ambarb commented 3 years ago

@yugangzhang @afluerasu Nexus XPCS results file is going with c-style arrays like you have in the new functions. For this function (either V1, V2 or skbeam), it is a f-style array, but the striding is short on the last index.

The function is broken here so if need to fix the function for your paper (multi-tau style two-time), then you may consider putting it in the "right shape"

image