Skip to content

Commit

Permalink
Update Acquisition.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschumacher authored Feb 29, 2024
1 parent 6c20794 commit 166a2c9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/client/julia/src/Acquisition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,13 @@ function readPeriods(rpu::Union{RedPitaya,RedPitayaCluster, RedPitayaClusterView
return data
end

"""
convertSamplesToPeriods!(rpu::Union{RedPitaya, RedPitayaCluster, RedPitayaClusterView}, samples, periods, numChan, numSampPerPeriod, numPeriods, numBlockAverages=1)
Converts a given set of samples to periods in-place.
See [`readPeriods`](@ref)
"""
function convertSamplesToPeriods!(rpu::Union{RedPitaya, RedPitayaCluster, RedPitayaClusterView}, samples, periods, numChan, numSampPerPeriod, numPeriods, numBlockAverages=1)
convertSamplesToPeriods!(samples, periods, numChan, numSampPerPeriod, numPeriods, numBlockAverages)
calibs = [x.calib for x in rpu]
Expand All @@ -331,6 +338,14 @@ function convertSamplesToPeriods!(rpu::Union{RedPitaya, RedPitayaCluster, RedPit
return periods

end

"""
convertSamplesToPeriods!(samples, periods, numChan, numSampPerPeriod, numPeriods, numBlockAverages=1)
Converts a given set of samples to periods in-place.
See [`readPeriods`](@ref)
"""
function convertSamplesToPeriods!(samples, periods, numChan, numSampPerPeriod, numPeriods, numBlockAverages=1)
temp = reshape(samples, numChan, numSampPerPeriod, numPeriods)
for d = 1:div(numChan,2)
Expand Down

0 comments on commit 166a2c9

Please sign in to comment.