<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel rdf:about="https://community.wolfram.com">
    <title>Community RSS Feed</title>
    <link>https://community.wolfram.com</link>
    <description>RSS Feed for Wolfram Community showing any discussions tagged with Signal Processing sorted by most replies.</description>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2527035" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/96823" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3367253" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/91868" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/528474" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/463721" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1394421" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/344278" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/512209" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1562463" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1272436" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2369563" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3325627" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2166833" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2100701" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1868374" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1687073" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/833606" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1031773" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/94303" />
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2527035">
    <title>[WSG22] Daily Study Group: Signals, Systems and Signal Processing</title>
    <link>https://community.wolfram.com/groups/-/m/t/2527035</link>
    <description>A Wolfram U daily study group on &amp;#034;Signals, Systems and Signal Processing&amp;#034; begins on May 16, 2022.&#xD;
&#xD;
Join instructors [@Leila Fuladi][at0]  and [@Mariusz Jankowski][at1] and a cohort of fellow learners to study the concepts, mathematics, principles and techniques of signal processing. We&amp;#039;ll cover methods of analysis for both continuous-time and discrete-time signals and systems, sampling and introductory filter design. The concepts and methods of signals and systems play an important role in many areas of science and engineering and many everyday signal processing examples are included. A basic working knowledge of the Wolfram Language is recommended.&#xD;
&#xD;
**[REGISTER HERE][1]**&#xD;
&#xD;
![enter image description here][2]&#xD;
&#xD;
&#xD;
  [1]: https://www.bigmarker.com/series/daily-study-group-signals-systems-and-signal-processing/series_details?utm_bmcr_source=community&#xD;
  [2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=WolframUBanner.jpeg&amp;amp;userId=130003&#xD;
&#xD;
 [at0]: https://community.wolfram.com/web/leilaf&#xD;
&#xD;
 [at1]: https://community.wolfram.com/web/mariuszj</description>
    <dc:creator>Abrita Chakravarty</dc:creator>
    <dc:date>2022-05-06T22:26:34Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/96823">
    <title>Simple, fast compiled peak detection based on moving average</title>
    <link>https://community.wolfram.com/groups/-/m/t/96823</link>
    <description>Recently [b][url=http://community.wolfram.com/groups/-/m/t/91868]Christopher coded a neat wavelet-based method for peak detection[/url][/b]. Peak detection is often needed in various scientific fields: all sorts of spectral analysis, time series and general feature recognition in data come to mind right away.  There are many methods for peak detection. Besides his wavelet-based code Christopher also mentions a built-in MaxDetect function rooted in image processing. [b][url=http://reference.wolfram.com/mathematica/ref/MaxDetect.html]MaxDetect[/url][/b], though, being a rather elaborate tool for multi-dimensional data (2D, 3D images) and with a specific image-processing-minded parameter tuning, was not meant to target time series and other 1D data. This got me thinking.

[b]Can we come up with a minimal compile-able peak detection code that would be accurate, robust and fast in most situations for 1D data?[/b]

I am not an expert in the subject, but intuitively peak detection consists of two stages. 
[list]
[*][b]Finding all maxima[/b]. This can be done via Differences with selection of neighbor difference pairs that change from positive to negative. Such pair would indicate local maximum.
[*][b]Filtering out peaks[/b]. Selecting those maxima that are high splashes of amplitude with respect to its immediate neighborhood. Quoted words are relative and depend on particular data. This is why they are set as tuning parameters in the algorithm.
[/list]To illustrate 2nd point lets take a look at the [b][url=http://www.wolframalpha.com/input/?i=Albert+Einstein+Wikipedia+page+hits+history]Albert Einstein Wikipedia page hits history[/url][/b] below. Obviously a large peak in the past can be lower than current average in case if there is strong trend in the data. This is why we need windowing when looking for peaks, - to compare a peak to its immediate neighborhood. 

[url=http://www.wolframalpha.com/input/?i=Albert+Einstein+Wikipedia+page+hits+history][img=width: 600px; height: 469px;]/c/portal/getImageAttachment?filename=ScreenShot2013-08-14at3.13.07PM.png&amp;amp;userId=11733[/img][/url]

Without further ado here is a function written specifically in terms of functions that can be compiled. For example I do not use MovingAverage, but do trick with Partition instead.[mcode]PeakDetect = Compile[{{data, _Real, 1}, {width, _Integer}, {cut, _Real}}, (Table[0, {width}]~Join~
      Map[UnitStep[# - cut] &amp;amp;, data[[1 + width ;; -1 - width]] - Map[Mean, Partition[data, 1 + 2 width, 1]]]~Join~
      Table[0, {width}]) ({0}~Join~ Map[Piecewise[{{1, Sign[#] == {1, -1}}, {0, Sign[#] != {1, -1}}}] &amp;amp;, 
       Partition[Differences[data], 2, 1]]~Join~{0}), CompilationTarget -&amp;gt; &amp;#034;C&amp;#034;];[/mcode]The legend for the function arguments is the following:[list]
[*]data  1D numerical list of data
[*]width  half-width of the moving average window not including central point
[*]cut  threshold at which to cut off the peak in natural units of data amplitudes 
[/list]Now lets see some usage cases. Lets import the same Albert Einstein data as a proof of concept. [mcode]raw = WolframAlpha[ &amp;#034;albert einstein&amp;#034;, {{&amp;#034;PopularityPod:WikipediaStatsData&amp;#034;, 1}, &amp;#034;TimeSeriesData&amp;#034;}];
data = raw[[All, 2]][[All, 1]];[/mcode]We use total window width of 5 points here and cut off peak at a standard deviation of the whole data. The peak labeled May 2008 is nicely picked up even though it is comparable then current average. This peak is most probably due to publication on May 13, 2008 of [b][url=http://www.amazon.com/Einstein-Life-Universe-Walter-Isaacson/dp/0743264746]one of the most famous books about Einstein[/url][/b] marked as New York Times bestseller that also got award Quill Award. Of course you can play with controls to pick or drop peaks. On the top plot one sees data, moving average, and bands formed by moving average displaced up and down by fraction of standard deviation. Any maximum above the top band becomes a peak.

[url=http://www.amazon.com/Einstein-Life-Universe-Walter-Isaacson/dp/0743264746][img=width: 800px; height: 382px;]/c/portal/getImageAttachment?filename=9672ScreenShot2013-08-14at3.47.18PM.png&amp;amp;userId=11733[/img][/url]

The code for the app is at the very end. Lets try a different data set  recent sun spot activity. [mcode]raw = WolframAlpha[&amp;#034;sun spot&amp;#034;, {{&amp;#034;SunspotsPartialTimeSeries:SpaceWeatherData&amp;#034;, 1}, &amp;#034;TimeSeriesData&amp;#034;}];
data = raw[[All, 2]];[/mcode]We right away found on May 2013 mark - a [b][url=http://en.wikipedia.org/wiki/Solar_cycle_24#May_2013]most powerful recent event described in Wikipedia page here[/url][/b]. Please let me know if you have suggestions how to speed this up or improve it generally. I would be very curious to know your opinion and critique. 

[color=#ff0000][i]The .GIF below is large - wait till it is loaded.[/i][/color]

[img=width: 800px; height: 380px;]/c/portal/getImageAttachment?filename=sunspot.gif&amp;amp;userId=11733[/img]

The following reference could be useful:[list]
[*][b][url=http://www.tcs-trddc.com/trddc_website/pdf/SRL/Palshikar_SAPDTS_2009.pdf]Simple Algorithms for Peak Detection in Time-Series[/url][/b]
[*][b][url=http://www.mdpi.com/1999-4893/5/4/588]An Efficient Algorithm for Automatic Peak Detection in Noisy Periodic and Quasi-Periodic Signals[/url][/b]
[/list]The code for the interactive app:[mcode]Manipulate[
 tt = {#, 
     Rotate[DateString[#, {&amp;#034;MonthNameShort&amp;#034;, &amp;#034; &amp;#034;, &amp;#034;Year&amp;#034;}], Pi/2]} &amp;amp; /@
    Pick[raw, PeakDetect[data, wid, thr StandardDeviation[data]], 1][[
    All, 1]];
 
 Column[{
   
   ListLinePlot[{data, 
     ArrayPad[MovingAverage[data, 1 + 2 wid], wid, &amp;#034;Fixed&amp;#034;], 
     ArrayPad[MovingAverage[data, 1 + 2 wid], wid, &amp;#034;Fixed&amp;#034;] + 
      thr StandardDeviation[data], 
     ArrayPad[MovingAverage[data, 1 + 2 wid], wid, &amp;#034;Fixed&amp;#034;] - 
      thr StandardDeviation[data]}, AspectRatio -&amp;gt; 1/6, 
    ImageSize -&amp;gt; 800, Filling -&amp;gt; {2 -&amp;gt; {1}, 3 -&amp;gt; {4}}, 
    FrameTicks -&amp;gt; {None, Automatic}, 
    FillingStyle -&amp;gt; {Directive[Red, Opacity[.7]], 
      Directive[Blue, Opacity[.7]], Directive[Gray, Opacity[.1]]}, 
    PlotStyle -&amp;gt; Opacity[.7], PlotRange -&amp;gt; All, Frame -&amp;gt; True, 
    GridLines -&amp;gt; Automatic, PlotRangePadding -&amp;gt; 0],
   
   Show[
    DateListPlot[raw, Joined -&amp;gt; True, AspectRatio -&amp;gt; 1/6, 
     ImageSize -&amp;gt; 800, Filling -&amp;gt; Bottom, Ticks -&amp;gt; {tt, Automatic}, 
     Frame -&amp;gt; False, Mesh -&amp;gt; All, PlotRange -&amp;gt; All],
    DateListPlot[
     If[# == {}, raw[[1 ;; 2]], #, #] &amp;amp;[
      Pick[raw, PeakDetect[data, wid, thr StandardDeviation[data]], 
       1]], AspectRatio -&amp;gt; 1/6, ImageSize -&amp;gt; 800, 
     PlotStyle -&amp;gt; Directive[Red, PointSize[.007]], PlotRange -&amp;gt; All]
    , PlotRangePadding -&amp;gt; {0, Automatic}]
   
   }],
 Row[{
   Control[{{thr, 1, &amp;#034;threshold&amp;#034;}, 0, 2, Appearance -&amp;gt; &amp;#034;Labeled&amp;#034;}], 
   Spacer[100],
   Control[{{wid, 3, &amp;#034;hal-width&amp;#034;}, 1, 10, 1, Setter}]
   }]
 ][/mcode]
[b]============== UPDATE =================[/b]

Thank you all very much for contributing. I collected everyone&amp;#039;s efforts and Danny&amp;#039;s two functions in a single completely compile-able expression which seems to give shortest time; - but just vaguely faster then Danny&amp;#039;s ingenious maneuver. I very much liked format suggested by Christopher, the one that Michael also kept in his packages. But I wanted to make some benchmarking and thus followed the format returned by the function [b][url=http://reference.wolfram.com/mathematica/ref/MaxDetect.html]MaxDetect[/url][/b] - simply for the sake of speed comparison. This format is just a binary list of the length of original data with 1s in positions of found peaks. 

Here is the function:[mcode]PeakDetect = 
  Compile[{{data, _Real, 1}, {width, _Integer}, {cut, _Real}}, 
   (Table[0, {width}]~Join~
      UnitStep[
       Take[data, {1 + width, -1 - width}] - 
          (Module[{tot = Total[#1[[1 ;; #2 - 1]]], last = 0.}, 
              Table[tot = tot + #1[[j + #2]] - last; 
               last = #1[[j + 1]];
               tot, {j, 0, Length[#1] - #2}]]/#2) &amp;amp;[data, 1 + 2 width] - cut]
    ~Join~Table[0, {width}]) ({0}~Join~
      Table[If[Sign[{data[[ii + 1]] - data[[ii]], 
           data[[ii + 2]] - data[[ii + 1]]}] == {1, -1}, 1, 0], 
           {ii, 1, Length[data] - 2}]~Join~{0}), CompilationTarget -&amp;gt; &amp;#034;C&amp;#034;];
dat = RandomReal[1, 10^7];

pks = MaxDetect[dat]; // AbsoluteTiming
Total[pks]
(* ======== output ======== 
{62.807928, Null}
3333361
   ======== output ======== *)

pks = PeakDetect[dat, 1, 0]; // AbsoluteTiming
Total[pks]
(* ======== output ======== 
{1.560074, Null}
3333360
   ======== output ======== *)[/mcode]And here are the speed benchmarks on 10 million data points which shows 40 times speed-up:</description>
    <dc:creator>Vitaliy Kaurov</dc:creator>
    <dc:date>2013-08-14T21:21:54Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3367253">
    <title>Fitting data to a square wave</title>
    <link>https://community.wolfram.com/groups/-/m/t/3367253</link>
    <description>I have a question about the attached MM notebook (just a few lines). I&amp;#039;m trying to fit a lineout through the digital image of a line pair gauge to a square wave. FindFit appears to fit the mean value (b) and at least takes a stab at fitting the amplitude (a); however, it seems to make no attempt to fit the offset on the x axis (x0). Why not? What am I missing?&#xD;
&#xD;
Also, I would like to get more detail on the fit parameters, in particular, the uncertainties, but I haven&amp;#039;t been able to figure out how to get MM to dump that information. How can I do that?&#xD;
&#xD;
Thanks in advance for any help on this.&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/4ffdae82-d8c3-4e82-b69c-9d0b6f58a3af</description>
    <dc:creator>James Hall</dc:creator>
    <dc:date>2025-01-29T19:11:09Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/91868">
    <title>Wavelet-Based Peak Detection</title>
    <link>https://community.wolfram.com/groups/-/m/t/91868</link>
    <description>In Mathematica the closest thing (currently) to a peak detect function is a function called MaxDetect, which is unfortunately very slow with large datasets and could be better at finding peaks.  So (for a project which I will post here soon) I decided to write my own peak detection function.

I found a nice article from National Instruments here: [url=http://www.ni.com/white-paper/5432/en/]http://www.ni.com/white-paper/5432/en/[/url]

I have subsequently implemented this in Mathematica.

So the basic idea behind this algorithm is whenever the detail wavelet passes zero, there is a peak.  Let me explain this:

(I am assuming that you understand the basic concept of wavelets)

When you get the wavelet of a 1-dimensional object, you will get the approximation coefficients, and the detail coefficients.  As their names suggest the approximation coefficients are the basic shape of the thing (used for noise reduction) while the detail coefficients are used for the little bumps and valleys that texture the original wave.


For example

Here is some noisy data:

[img=width: 449px; height: 270px; ]/c/portal/getImageAttachment?filename=noisy.jpg&amp;amp;userId=24497[/img]


Approximate:


[img=width: 413px; height: 165px; ]/c/portal/getImageAttachment?filename=approx.jpg&amp;amp;userId=24497[/img]

Detail:
[img=width: 392px; height: 157px; ]/c/portal/getImageAttachment?filename=detail.jpg&amp;amp;userId=24497[/img]



So to access the detail vs approx wavelets from some wavelet data like this:

[mcode]data = Table[Sin[x] + RandomReal[{0, .1}], {x, 0, 2 Pi, .01}];
dwd = DiscreteWaveletTransform[data, HaarWavelet[], 3][/mcode]
So I am running a wavelet transform of data with a haar wavelet for 3 layers.

I can see the various coefficients like this:
[mcode]dwd[&amp;#034;ListPlot&amp;#034;][/mcode][img]/c/portal/getImageAttachment?filename=ScreenShot2013-08-06at8.39.46PM.png&amp;amp;userId=24497[/img]
The coefficients that end in 1 are detail wavelets while those which end in 0 are approx wavelets.
(There is a {0} and a {0,0} wavelet but it doesn&amp;#039;t show them).

The deeper you go into these coefficients the less wavelets are used to construct the wave and therefor they are more basic.
In this case we want the highest quality data so we can just look at level 1. (So the coefficient named &amp;#034;{1}&amp;#034;).


So time to get down to the real code.

Here is some example data, in this case a fourier transform.

[img=width: 764px; height: 473px; ]/c/portal/getImageAttachment?filename=data.jpg&amp;amp;userId=24497[/img]

This is a fairly easy case but you can see that the number of datapoints is giant and there is some noise toward the bottom.

So the first thing we need to do is get rid of all the little peaks we don&amp;#039;t care about.

Here &amp;#034;data&amp;#034; is the data with peaks in it and &amp;#034;min&amp;#034; is the minimum size of the peaks that will be detected.
[mcode]dwd=DiscreteWaveletTransform[If[# &amp;lt; min, 0, #] &amp;amp; /@ data, HaarWavelet[],
  1];[/mcode]
In this case I have set &amp;#034;min&amp;#034; to 1.

We can now run the inverse wavelet transform of that for the first detail coefficient:
[mcode]InverseWaveletTransform[dwd, HaarWavelet[], {1}][/mcode]Which looks like this:


[img=width: 800px; height: 491px; ]/c/portal/getImageAttachment?filename=inversewavelet.jpg&amp;amp;userId=24497[/img]

Now we detect every time those peaks cross zero.  You may also notice that there is another threshold here which I found to be useful.
[mcode]Normal[CrossingDetect[
  If[Abs[#] &amp;lt; ther, 0, #] &amp;amp; /@ 
   InverseWaveletTransform[
    DiscreteWaveletTransform[If[# &amp;lt; min, 0, #] &amp;amp; /@ data, 
     HaarWavelet[], 1], HaarWavelet[], {1}]]][/mcode]
[img=width: 800px; height: 493px; ]/c/portal/getImageAttachment?filename=peaks.jpg&amp;amp;userId=24497[/img]


This gets the position of the points in each peak:
[mcode]Flatten[Position[
  Normal[CrossingDetect[
    If[Abs[#] &amp;lt; ther, 0, #] &amp;amp; /@ 
     InverseWaveletTransform[
      DiscreteWaveletTransform[If[# &amp;lt; min, 0, #] &amp;amp; /@ data, 
       HaarWavelet[], 1], HaarWavelet[], {1}]]]
, 1]][/mcode]
We then split them into groups for each peak:
[mcode]Split[Flatten[
  Position[Normal[
    CrossingDetect[
     If[Abs[#] &amp;lt; ther, 0, #] &amp;amp; /@ 
      InverseWaveletTransform[
       DiscreteWaveletTransform[If[# &amp;lt; min, 0, #] &amp;amp; /@ data, 
        HaarWavelet[], 1], HaarWavelet[], {1}]]], 1]], 
 Abs[#1 - #2] &amp;lt; cther &amp;amp;][/mcode]
&amp;#034;cther&amp;#034; is the distance 2 points have to be appart before they are counted as sepperate peaks.  In this case I use 50 because I don&amp;#039;t want it detecting false peaks right next to the real ones.  But you could set it to split after every run of consecutive 1s.

After this it is pretty technical and so I present (drumroll) the final function!!!

[mcode]FindPeaks[data_, ther_: .2, min_: 0, cther_: 50] := 
 Function[peaks, 
   Transpose[{peaks, 
     data[[peaks]]}]][(#[[Ordering[data[[#]], -1][[1]]]] &amp;amp; /@ 
    Split[Flatten[
      Position[
       Normal[CrossingDetect[
         If[Abs[#] &amp;lt; ther, 0, #] &amp;amp; /@ 
          InverseWaveletTransform[
           DiscreteWaveletTransform[If[# &amp;lt; min, 0, #] &amp;amp; /@ data, 
            HaarWavelet[], 1], HaarWavelet[], {1}]]], 1]], 
     Abs[#1 - #2] &amp;lt; cther &amp;amp;])][/mcode]
So here is it working on the fourier transform!

[img=width: 800px; height: 495px; ]/c/portal/getImageAttachment?filename=final.jpg&amp;amp;userId=24497[/img]

The blue is the unmodified data and the red is a line from peak to peak that fell within our requirments, but with different settings we could get all of these smaller peaks off to the right.

Well that&amp;#039;s all I got so if you have any questions about the code or edits that make it better, post it here!

:D</description>
    <dc:creator>Christopher Wolfram</dc:creator>
    <dc:date>2013-08-07T00:46:29Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/528474">
    <title>Construct a function from &amp;#034;Fourier&amp;#034; - data</title>
    <link>https://community.wolfram.com/groups/-/m/t/528474</link>
    <description>Hi all,&#xD;
&#xD;
I have a question which for sure has been answered a 1000 times before, but I didnt find a satisfactory and convenient solution, albeit I have browsed the web and the Wolfram- (and other ) sites for hours.&#xD;
&#xD;
I have a list of experimental data. It is known that there is some periodicity (or even more than one). Now I apply Fourier which produces a nice other list of complex numbers. When plotting the absolute values of this list (a spectrum) I even find some peaks and I think I translate them correctly to frequencies. Now I try to construct a function which approximates my original data, and fail drastically. So I set out to get insights with a known example. But I failed as well. With some hints of Daniel Lichtblau (thanks, Dan) I could construct a procedure which worked for my simple example, but it failed already for a slightly more complicated case ( and for sure for my original data  ). See the attached notebook.&#xD;
&#xD;
I am looking for a fool-proofed (the fool am I) method to construct a good approximation for the original function, or better the values given.&#xD;
&#xD;
If anybody is interested in the original problem I will of course send all data I have.&#xD;
&#xD;
Kind regards&#xD;
Hans&#xD;
&#xD;
P.S. I am using version 7</description>
    <dc:creator>Hans Dolhaine</dc:creator>
    <dc:date>2015-07-10T18:17:43Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/463721">
    <title>Aftermath of the solar eclipse</title>
    <link>https://community.wolfram.com/groups/-/m/t/463721</link>
    <description>![enter image description here][1]&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][2]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=4902Hero.gif&amp;amp;userId=20103&#xD;
  [2]: https://www.wolframcloud.com/obj/5838919a-e64d-49fe-9193-c6ce123184f2</description>
    <dc:creator>Marco Thiel</dc:creator>
    <dc:date>2015-03-21T01:18:08Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1394421">
    <title>Accurately calculate tick tock period of mechanical watches?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1394421</link>
    <description>I&amp;#039;m looking to find the frequency of a relatively large dataset (or a relatively short audio file) of a repeating sound, like so:&#xD;
&#xD;
![sound][1]&#xD;
Here are the original files, for those willing to play. :)&#xD;
[eta2412][2]&#xD;
[data1][3]&#xD;
Other examples:&#xD;
[phenix140sc][4]&#xD;
[chaika1601][5]&#xD;
&#xD;
Blue is the original soundwave, and orange is a Highpass and Wiener filtered form at 44100Hz sample.&#xD;
&#xD;
A finely zoomed in picture of each &amp;#034;tick&amp;#034; (unfiltered in an audio program) looks like so:&#xD;
![enter image description here][6]&#xD;
&#xD;
It&amp;#039;s extremely oscillatory, however, there is a clear and obvious local maximum (when zoomed in far enough anyways (the duration of a tick is 0.016s or so)&#xD;
&#xD;
&#xD;
I&amp;#039;m not particularly interested per say in the amplitude, however what I&amp;#039;d like to do, is to be able to automate and count the freq. of the &amp;#034;beats/ticks&amp;#034;. This is currently done &amp;#039;by hand&amp;#039; for each individual file I have to deal with and when a person has MMA...well, you get the point&#xD;
&#xD;
Accuracy is a must in this case, the possible periods of the beats are at 0.200 [s] and 0.166 [s] repeating (5hz, and 6hz respectfully). Any kind of drift more than +/-0.002 second isn&amp;#039;t acceptable. &#xD;
&#xD;
&#xD;
Through many readings of [this link][7], [this link][8],[this ][9] (the last link does nearly what but alas it&amp;#039;s bpm) and many others, I&amp;#039;ve managed to cobble together something...that doesn&amp;#039;t seem to get me anywhere. &#xD;
&#xD;
    dir = NotebookDirectory[];&#xD;
    SetDirectory[dir];&#xD;
    file = &amp;#034;eta2412.m4a&amp;#034;;&#xD;
    snd = Import[file];&#xD;
    sndhpf = HighpassFilter[snd, 20000];&#xD;
    sndwf = WienerFilter[HighpassFilter[snd, 20000], 25];&#xD;
    sndSampleRate = Import[file, &amp;#034;SampleRate&amp;#034;];&#xD;
    p1 = AudioPlot[snd,  PlotRange -&amp;gt; {{0, 5}, {-1*10^-2, 1*10^-2}}];&#xD;
    p2 = AudioPlot[sndwf, PlotRange -&amp;gt; {{0, 5}, {-1*10^-2, 1*10^-2}}, PlotStyle -&amp;gt; Purple];&#xD;
    p3 = AudioPlot[sndhpf, PlotRange -&amp;gt; {{0, 5}, {-1*10^-2, 1*10^-2}}, PlotStyle -&amp;gt; Green];&#xD;
    data = Flatten[AudioData[sndwf]];&#xD;
    data1 = Drop[data, {50000, Length[data]}];&#xD;
&#xD;
I&amp;#039;ve attempted to do audio processing itself, &#xD;
&#xD;
getting to&#xD;
&#xD;
    res = AudioLocalMeasurements[sndwf,&amp;#034;RMSAmplitude&amp;#034;,PartitionGranularity -&amp;gt;{Quantity[0.1, &amp;#034;Milliseconds&amp;#034;],Quantity[0.1, &amp;#034;Milliseconds&amp;#034;]}];&#xD;
    ListLinePlot[res, PlotStyle -&amp;gt; Red, PlotRange -&amp;gt; {{0, 2}, {0, 0.005}}]&#xD;
&#xD;
    Show[AudioPlot[sndwf, PlotRange -&amp;gt; {{0, 5}, {0, 0.005}}],ListLinePlot[res, PlotStyle -&amp;gt; Red, PlotRange -&amp;gt; {{0, 5}, {0, 0.005}}], AspectRatio -&amp;gt; 3/6, ImageSize -&amp;gt; &amp;#034;Large&amp;#034;]&#xD;
&#xD;
![show][10]&#xD;
&#xD;
Now, I&amp;#039;m unfortunately at a complete loss on how to get each ticks local peak and calculate their global frequency, or rather, period. &#xD;
&#xD;
How would one go about this? I&amp;#039;ve tried in Fourier as suggested in other posts..but the noise seems too extreme to give me anything I can understand or use to get further.&#xD;
&#xD;
    ListLinePlot[p = PeriodogramArray[data1], PlotRange -&amp;gt; All, ImageSize -&amp;gt; Large]&#xD;
![fourer][11]&#xD;
&#xD;
&#xD;
I have posted this over at [stackexchange][12] as well, incase this seems familiar to anyone. But I figured I&amp;#039;d try to hit two birds with two stones, should someone there post a solution I&amp;#034;ll gladly update it here. &#xD;
Thanks for the help! :)&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=sound.png&amp;amp;userId=1222283&#xD;
  [2]: http://lizard-truth.com/wp-content/uploads/2018/07/eta2412.m4a&#xD;
  [3]: http://lizard-truth.com/wp-content/uploads/2018/07/data1.txt&#xD;
  [4]: http://lizard-truth.com/wp-content/uploads/2018/07/phenix_140sc.m4a&#xD;
  [5]: http://lizard-truth.com/wp-content/uploads/2018/07/chaika.m4a&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-07-30at12.26.25AM.png&amp;amp;userId=1222283&#xD;
  [7]: https://mathematica.stackexchange.com/questions/44955/how-to-find-the-local-maximum-of-a-list&#xD;
  [8]: https://mathematica.stackexchange.com/questions/85139/what-do-the-x-and-y-axis-stand-for-in-the-fourier-transform-domain#85167&#xD;
  [9]: https://mathematica.stackexchange.com/questions/4272/can-one-find-the-beat-of-a-tune-with-fourier-analysis#4280&#xD;
  [10]: http://community.wolfram.com//c/portal/getImageAttachment?filename=show.png&amp;amp;userId=1222283&#xD;
  [11]: http://community.wolfram.com//c/portal/getImageAttachment?filename=fourier.png&amp;amp;userId=1222283&#xD;
  [12]: https://mathematica.stackexchange.com/questions/179189/frequency-of-ticks-in-mechanical-watches</description>
    <dc:creator>Mor Bo</dc:creator>
    <dc:date>2018-07-30T08:10:55Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/344278">
    <title>Using your smart phone as the ultimate sensor array for Mathematica</title>
    <link>https://community.wolfram.com/groups/-/m/t/344278</link>
    <description>Many fantastic posts in this community describe how to connect external devices to Mathematica and how to read the data. Connecting Mathematica to an Arduino for example allows you to read and then work with data from all kinds of sensors. In most of the cases, when we speak about connected devices, additional hardware is necessary. Smart phones, on the other hand, are our permanent companions and they host a wide array of sensors that we can tap into with Mathematica. For this post, I will be using an iPhone 5 - but a similar approach can be taken with many other smart phones. [Björn Schelter][1] and myself have worked on this together.&#xD;
&#xD;
The first thing we need in order to be able to read the iPhone is a little App which can be purchased on the iTunes App store: it is called [Sensor Data][2]. When you open the app you see a screen like this one. &#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
At the top of the screen you see an IP address and a port number (after the colon!). These numbers will be important to connect to the phone and either download data or stream sensor data directly. If you click on the &amp;#034;start capture&amp;#034; the iPhone&amp;#039;s data will be stored on the phone and can be downloaded into Mathematica. In this post we are rather interested in the &amp;#034;Streaming&amp;#034; function. If you click on the respective button on the bottom you get to a screen like this:&#xD;
&#xD;
![enter image description here][4]&#xD;
&#xD;
There you can choose a frequency for the measurements and start the streaming. In fact we also can choose which sensors we want to use with the Config button. &#xD;
&#xD;
![enter image description here][5]&#xD;
&#xD;
The following Mathematica code will work when all (!) sensors are switched on. Now we are ready to connect to the iPhone. Switch the streaming on and execute the following commands:&#xD;
&#xD;
    ClearAll[&amp;#034;Global`*&amp;#034;];&#xD;
    For[i = 1, i &amp;lt; 3, i++, Quiet[InstallJava[]]];&#xD;
    Needs[&amp;#034;JLink`&amp;#034;]&#xD;
&#xD;
and then &#xD;
&#xD;
    LoadJavaClass[&amp;#034;java.util.Arrays&amp;#034;];&#xD;
    packet = JavaNew[&amp;#034;java.net.DatagramPacket&amp;#034;, JavaNew[&amp;#034;[B&amp;#034;, 1024], 1024];&#xD;
    socket = JavaNew[&amp;#034;java.net.DatagramSocket&amp;#034;, 10552];&#xD;
    socket@setSoTimeout[10];&#xD;
    listen[] := If[$Failed =!= Quiet[socket@receive[packet], Java::excptn], &#xD;
    record =JavaNew[&amp;#034;java.lang.String&amp;#034;, java`util`Arrays`copyOfRange @@ &#xD;
    packet /@ {getData[], getOffset[], getLength[]}]@toString[] //&#xD;
    Sow];&#xD;
&#xD;
Next we have to define a ScheduledTask to read the sensors:&#xD;
&#xD;
    RemoveScheduledTask[ScheduledTasks[]];&#xD;
    results = {}; &#xD;
    RunScheduledTask[AppendTo[results, Quiet[Reap[listen[]][[2, 1]]]]; If[Length[results] &amp;gt; 1200, Drop[results, 150]], 0.01];&#xD;
&#xD;
We also need to define a streaming function:&#xD;
&#xD;
    stream := Refresh[ToExpression[StringSplit[#[[1]], &amp;#034;,&amp;#034;]] &amp;amp; /@ Select[results[[-1000 ;;]], Head[#] == List &amp;amp;], UpdateInterval -&amp;gt; 0.01]&#xD;
&#xD;
Alright. Now comes the interesting part. Using &#xD;
&#xD;
    (*Compass*)&#xD;
    While[Length[results] &amp;lt; 1000, Pause[2]]; Dynamic[AngularGauge[Refresh[stream[[-1, 30]], UpdateInterval -&amp;gt; 0.01], {360, 0}, &#xD;
    ScaleDivisions -&amp;gt; None, GaugeLabels -&amp;gt; {Placed[&amp;#034;N&amp;#034;, Top], Placed[&amp;#034;S&amp;#034;, Bottom], Placed[&amp;#034;E&amp;#034;, Right], Placed[&amp;#034;W&amp;#034;, Left]}, ScaleOrigin -&amp;gt; {{5 Pi/2, Pi/2}, 1}, ScalePadding -&amp;gt; All, ImageSize -&amp;gt; Medium], SynchronousUpdating -&amp;gt; False]&#xD;
&#xD;
we can measure the bearing of our iPhone. The resulting compass moves as we move the iPhone:&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
We can also read the (x-,y-,z-) accelerometers&#xD;
&#xD;
    (*Plot Ascelerometers*)&#xD;
    While[Length[results] &amp;lt; 1000, Pause[2]]; Dynamic[Refresh[ListLinePlot[{stream[[All, 2]], stream[[All, 3]], stream[[All, 4]]}, PlotRange -&amp;gt; All], UpdateInterval -&amp;gt; 0.1]]&#xD;
&#xD;
which gives plots like this one:&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
The update is a bit bumpy, because the data is only sent every second or so from the iPhone; the measurements, however, are taken with a frequency of up to 100Hz. We can also represent the FFT of the streamed data like so:&#xD;
&#xD;
    (*Plot FFT of accelorometers*)&#xD;
    While[Length[results] &amp;lt; 1000, &#xD;
     Pause[2]]; Dynamic[&#xD;
     Refresh[ListLinePlot[&#xD;
       Log /@ {Abs[Fourier[Standardize[stream[[All, 2]]]]], &#xD;
         Abs[Fourier[Standardize[stream[[All, 3]]]]], &#xD;
         Abs[Fourier[Standardize[stream[[All, 4]]]]]}, &#xD;
       PlotRange -&amp;gt; {{0, 200}, {-5, 2.5}}, ImageSize -&amp;gt; Large], &#xD;
      UpdateInterval -&amp;gt; 0.1]]&#xD;
&#xD;
Adding a &amp;#034;real time&amp;#034; scale is also quite straight forward:&#xD;
&#xD;
(*Measurements with time scale*)&#xD;
&#xD;
    While[Length[results] &amp;lt; 1000, Pause[2]];&#xD;
    starttime = IntegerPart[stream[[2, 1]]];&#xD;
    Dynamic[Refresh[&#xD;
      ListLinePlot[&#xD;
       Transpose[{(stream[[Max[-300, -Length[stream]] ;;, 1]] - &#xD;
           starttime), stream[[Max[-300, -Length[stream]] ;;, 2]]}], &#xD;
       PlotRange -&amp;gt; All, ImageSize -&amp;gt; Large], UpdateInterval -&amp;gt; 0.01]]&#xD;
&#xD;
Well, then. We can also plot our iPhone&amp;#039;s position in space&#xD;
&#xD;
    (*3d Motion*)&#xD;
    &#xD;
    While[Length[results] &amp;lt; 1000, Pause[2]]; Dynamic[&#xD;
     Refresh[ListLinePlot[{stream[[All, 5]], stream[[All, 6]], &#xD;
        stream[[All, 7]]}, PlotRange -&amp;gt; All], UpdateInterval -&amp;gt; 0.1]]&#xD;
    &#xD;
    While[Length[results] &amp;lt; 1000, Pause[2]]; Dynamic[&#xD;
     Graphics3D[{Black, &#xD;
       Rotate[Rotate[&#xD;
         Rotate[Cuboid[{-2, -1, -0.2}, {2, 1, 0.2}], &#xD;
          stream[[-1, 7]], {0, 0, 1}], -1*stream[[-1, 6]], {0, 1, 0}], &#xD;
        stream[[-1, 5]], {1, 0, 0}]}, &#xD;
      PlotRange -&amp;gt; {{-3, 3}, {-3, 3}, {-3, 3}}, Boxed -&amp;gt; True], &#xD;
     UpdateInterval -&amp;gt; 0.1, SynchronousUpdating -&amp;gt; False]&#xD;
&#xD;
This looks like so:&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
Last but not least we can write a little GUI to access all different sensors. (This does run a bit slow though!)&#xD;
&#xD;
(*GUI all sensors*)&#xD;
&#xD;
    sensororder = {&amp;#034;Timestamp&amp;#034;, &amp;#034;Accel_X&amp;#034;, &amp;#034;Accel_Y&amp;#034;, &amp;#034;Accel_Z&amp;#034;, &amp;#034;Roll&amp;#034;, &#xD;
       &amp;#034;Pitch&amp;#034;, &amp;#034;Yaw&amp;#034;, &amp;#034;Quat.X&amp;#034;, &amp;#034;Quat.Y&amp;#034;, &amp;#034;Quat.Z&amp;#034;, &amp;#034;Quat.W&amp;#034;, &amp;#034;RM11&amp;#034;, &#xD;
       &amp;#034;RM12&amp;#034;, &amp;#034;RM13&amp;#034;, &amp;#034;RM21&amp;#034;, &amp;#034;RM22&amp;#034;, &amp;#034;RM23&amp;#034;, &amp;#034;RM31&amp;#034;, &amp;#034;RM32&amp;#034;, &amp;#034;RM33&amp;#034;, &#xD;
       &amp;#034;GravAcc_X&amp;#034;, &amp;#034;GravAcc_Y&amp;#034;, &amp;#034;GravAcc_Z&amp;#034;, &amp;#034;UserAcc_X&amp;#034;, &amp;#034;UserAcc_Y&amp;#034;, &#xD;
       &amp;#034;UserAcc_Z&amp;#034;, &amp;#034;RotRate_X&amp;#034;, &amp;#034;RotRate_Y&amp;#034;, &amp;#034;RotRate_Z&amp;#034;, &amp;#034;MagHeading&amp;#034;, &#xD;
       &amp;#034;TrueHeading&amp;#034;, &amp;#034;HeadingAccuracy&amp;#034;, &amp;#034;MagX&amp;#034;, &amp;#034;MagY&amp;#034;, &amp;#034;MagZ&amp;#034;, &amp;#034;Lat&amp;#034;, &#xD;
       &amp;#034;Long&amp;#034;, &amp;#034;LocAccuracy&amp;#034;, &amp;#034;Course&amp;#034;, &amp;#034;Speed&amp;#034;, &amp;#034;Altitude&amp;#034;, &#xD;
       &amp;#034;Proximity&amp;#034;};&#xD;
    While[Length[results] &amp;lt; 1000, Pause[2]]; Manipulate[&#xD;
     Dynamic[Refresh[&#xD;
       ListLinePlot[{stream[[All, Position[sensororder, a][[1, 1]]]], &#xD;
         stream[[All, Position[sensororder, b][[1, 1]]]], &#xD;
         stream[[All, Position[sensororder, c][[1, 1]]]]}, &#xD;
        PlotRange -&amp;gt; All, ImageSize -&amp;gt; Full], &#xD;
       UpdateInterval -&amp;gt; 0.01]], {{a, &amp;#034;Accel_X&amp;#034;}, &#xD;
      sensororder}, {{b, &amp;#034;Accel_Y&amp;#034;}, sensororder}, {{c, &amp;#034;Accel_Z&amp;#034;}, &#xD;
      sensororder}, ControlPlacement -&amp;gt; Left, &#xD;
     SynchronousUpdating -&amp;gt; False]&#xD;
&#xD;
This gives a user interface which looks like this:&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
In the drop down menu we can choose three out of all sensors. These are all available sensors:&#xD;
&#xD;
&amp;gt; &amp;#034;Timestamp&amp;#034;, &amp;#034;Accel_X&amp;#034;, &amp;#034;Accel_Y&amp;#034;, &amp;#034;Accel_Z&amp;#034;, &amp;#034;Roll&amp;#034;, &amp;#034;Pitch&amp;#034;, &amp;#034;Yaw&amp;#034;,&#xD;
&amp;gt; &amp;#034;Quat.X&amp;#034;, &amp;#034;Quat.Y&amp;#034;, &amp;#034;Quat.Z&amp;#034;, &amp;#034;Quat.W&amp;#034;, &amp;#034;RM11&amp;#034;,  &amp;#034;RM12&amp;#034;, &amp;#034;RM13&amp;#034;,&#xD;
&amp;gt; &amp;#034;RM21&amp;#034;, &amp;#034;RM22&amp;#034;, &amp;#034;RM23&amp;#034;, &amp;#034;RM31&amp;#034;, &amp;#034;RM32&amp;#034;, &amp;#034;RM33&amp;#034;, &amp;#034;GravAcc_X&amp;#034;,&#xD;
&amp;gt; &amp;#034;GravAcc_Y&amp;#034;, &amp;#034;GravAcc_Z&amp;#034;, &amp;#034;UserAcc_X&amp;#034;, &amp;#034;UserAcc_Y&amp;#034;,   &amp;#034;UserAcc_Z&amp;#034;,&#xD;
&amp;gt; &amp;#034;RotRate_X&amp;#034;, &amp;#034;RotRate_Y&amp;#034;, &amp;#034;RotRate_Z&amp;#034;, &amp;#034;MagHeading&amp;#034;, &amp;#034;TrueHeading&amp;#034;,&#xD;
&amp;gt; &amp;#034;HeadingAccuracy&amp;#034;, &amp;#034;MagX&amp;#034;, &amp;#034;MagY&amp;#034;, &amp;#034;MagZ&amp;#034;, &amp;#034;Lat&amp;#034;,   &amp;#034;Long&amp;#034;,&#xD;
&amp;gt; &amp;#034;LocAccuracy&amp;#034;, &amp;#034;Course&amp;#034;, &amp;#034;Speed&amp;#034;, &amp;#034;Altitude&amp;#034;, &amp;#034;Proximity&amp;#034;&#xD;
&#xD;
There are certainly any things that can and should be improved. The main problem seems to be that the data, even if sampled at 100Hz, is sent to the iPhone only every second or so. So it is not really real time. I hope that someone who is better at iPhone programming than I am - I am really rubbish at it- could help and write an iPhone program to stream the data in a more convenient way: one by one rather than in packets. &#xD;
&#xD;
There are many potential applications for this. Here are some I could come up with:&#xD;
&#xD;
 1. You can carry the iPhone around and measure your movements (acceleration). Attached to your hand you can measure your tremor. &#xD;
 2. The magnetometer is really cool. You can use it to find metal bars in the walls an also electric cables. &#xD;
 3. You can collect GPS data for all sorts of applications; there are ideas to use this for the detection of certain diseases. For example if it takes you longer than usual to find your car when you come from shopping that might hint at early stages of dementia --- or sleep deprivation.&#xD;
 4. When you put the phone on a machine, like a running motor, you can measure the vibrations. When you perform a frequency analysis you can check whether the motor runs alright.&#xD;
 5. Using the accelerometers I was able to measure my breathing (putting the phone on my chest).&#xD;
 &#xD;
I think that there might also be quite some potential for using the Wolfram Cloud here. Deploying a program in the cloud and reading from your phone is certainly quite interesting. The problem is that this particular app only works via WiFi. It would be nice to have one that works via 3G. &#xD;
&#xD;
So, in summary, it might be quite useful to use the iPhone&amp;#039;s sensors. The advantage is that nearly everyone carries a smartphone with them all the time. Making more of your smart phone&amp;#039;s sensors with Mathematica seems to be a nice playground for applications. I&amp;#039;d love to hear about your ideas...&#xD;
&#xD;
Cheers,&#xD;
&#xD;
Marco&#xD;
&#xD;
PS: When you are done with the streaming you should execute these commands:&#xD;
&#xD;
    (*Remove Scheduled Tasks and close link*)&#xD;
    RemoveScheduledTask[ScheduledTasks[]]; socket@close[];&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com/web/bschelter&#xD;
  [2]: https://itunes.apple.com/gb/app/sensor-data/id397619802?mt=8&#xD;
  [3]: /c/portal/getImageAttachment?filename=sensorwelcome.PNG&amp;amp;userId=48754&#xD;
  [4]: /c/portal/getImageAttachment?filename=sensorstreaming.PNG&amp;amp;userId=48754&#xD;
  [5]: /c/portal/getImageAttachment?filename=Allsensors.PNG&amp;amp;userId=48754&#xD;
  [6]: /c/portal/getImageAttachment?filename=Compass.gif&amp;amp;userId=48754&#xD;
  [7]: /c/portal/getImageAttachment?filename=Accelerometer.gif&amp;amp;userId=48754&#xD;
  [8]: /c/portal/getImageAttachment?filename=Iphonemovement.gif&amp;amp;userId=48754&#xD;
  [9]: /c/portal/getImageAttachment?filename=ScreenShot2014-09-15at23.52.46.png&amp;amp;userId=48754</description>
    <dc:creator>Marco Thiel</dc:creator>
    <dc:date>2014-09-15T23:53:14Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/512209">
    <title>Fourier Series of function defined with conditional statement</title>
    <link>https://community.wolfram.com/groups/-/m/t/512209</link>
    <description>I am trying to determine the Fourier Series coefficients of flowrate pulsations from a triplex reciprocating pump. I have the flowrate defined in terms of a function that has conditional statements. The evaluation of the FourierSeries of the function hangs up. I would really appreciate some help in figuring out how to evaluate the Fourier Series.&#xD;
![enter image description here][1]&#xD;
&#xD;
&#xD;
  [1]: /c/portal/getImageAttachment?filename=pulsations-triplex.png&amp;amp;userId=444556</description>
    <dc:creator>Kaushik Mallick</dc:creator>
    <dc:date>2015-06-10T20:25:53Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1562463">
    <title>Apply a Continued Fraction Operation to a Filter Model</title>
    <link>https://community.wolfram.com/groups/-/m/t/1562463</link>
    <description>Hello,&#xD;
Does anyone know of any way to generate a continued fraction from a Filter Model?&#xD;
Thanks.</description>
    <dc:creator>Roger Backhus</dc:creator>
    <dc:date>2018-11-29T20:55:40Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1272436">
    <title>Read SEGY data in Mathematica?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1272436</link>
    <description>Please I need code/software to read SEGY data in order to input to Mathematica</description>
    <dc:creator>Oluseun Sanuade</dc:creator>
    <dc:date>2018-01-25T17:35:21Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2369563">
    <title>Making microtonal music, and alter audio and images?</title>
    <link>https://community.wolfram.com/groups/-/m/t/2369563</link>
    <description>I would like to share some idea (s) with you out there in the big Wide World.&#xD;
&#xD;
I need some help with making microtonal music and using Mathematica to alter/modify audio and images.&#xD;
&#xD;
For example:&#xD;
&#xD;
I wish to take an audio object, to multiply it&amp;#039;s samples by a number, to convert these to another base and to reverse the digits, then listen to what effects that it has on the sound&#xD;
&#xD;
I did this with Mathematica, but I am unsure how to implement the function to change the base.&#xD;
&#xD;
If anyone wants to discuss the matter, then I would like to listen, and to talk to them and make new contacts/connections.&#xD;
&#xD;
Also, is anyone into microtonality and alternative turnings?&#xD;
&#xD;
Please advise,&#xD;
&#xD;
Regards,&#xD;
&#xD;
Mr. S R U.</description>
    <dc:creator>Sarn Richard Ursell</dc:creator>
    <dc:date>2021-09-20T11:32:26Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3325627">
    <title>How to specify incremental constraint in LongestOrderedSequence?</title>
    <link>https://community.wolfram.com/groups/-/m/t/3325627</link>
    <description>I&amp;#039;m looking for the longest ordered subsequences of integer pairs with specific incremental constraints. In these examples, I&amp;#039;d like the last value of each pair to be 1 less than the first value of the next pair. So far I&amp;#039;ve not discovered what pattern to specify.&#xD;
&#xD;
Example 1.&#xD;
&#xD;
    LongestOrderedSequence[{{4, 5}, {7, 8}, {11, 12}, {13, 14}, {15, 16},&#xD;
    {65, 66}}, (#2[[1]] - #1[[2]] == 1) &amp;amp;]&#xD;
    &#xD;
    {{4, 5}}&#xD;
I was hoping for&#xD;
&#xD;
    {{11, 12}, {13, 14}, {15, 16}}&#xD;
&#xD;
Example 2.&#xD;
&#xD;
    LongestOrderedSequence[{{2, 4}, {6, 8}, {9, 11}, {12, 14},&#xD;
    {98, 100}}, (#2[[1]] - #1[[2]] == 1) &amp;amp;]&#xD;
    &#xD;
    {{2, 4}}&#xD;
I was hoping for&#xD;
&#xD;
    {{6, 8}, {9, 11}, {12, 14}}</description>
    <dc:creator>Richard Frost</dc:creator>
    <dc:date>2024-11-21T00:43:42Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2166833">
    <title>Predicting COVID-19 using cough sounds classification</title>
    <link>https://community.wolfram.com/groups/-/m/t/2166833</link>
    <description>&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/cdf7d474-f4fb-4cbd-bbd5-f1fac8699f7a</description>
    <dc:creator>Siria Sadeddin</dc:creator>
    <dc:date>2021-01-18T22:46:11Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2100701">
    <title>Smoothing an irregular TimeSeries and calculate it&amp;#039;s Derivative</title>
    <link>https://community.wolfram.com/groups/-/m/t/2100701</link>
    <description>I&amp;#039;m not very experienced with this part of Mathematica so please bear me. &#xD;
I&amp;#039;ve a [data set][1] consisting of two columns, the first column is a date and the second is a numeric cumulative amount. I tried to create a time series, resample it and smooth, but I couldn&amp;#039;t manage to smooth it enough. I&amp;#039;m a noob with Mathematica. Can you help me to understand what I&amp;#039;m doing wrong?&#xD;
&#xD;
[![enter image description here][2]][2]&#xD;
&#xD;
    data = Import[&#xD;
        &amp;#034;https://1drv.ms/x/s!AiF0MVfYzFaAi3cO044kGlJW0Oam?e=Mt7qTv&amp;#034;][[1]];&#xD;
    &#xD;
    data2 = data[[2 ;;, {1, 2}]] &#xD;
&#xD;
    DateListPlot[data2]&#xD;
&#xD;
    ts = TimeSeries[data2, &#xD;
      ResamplingMethod -&amp;gt; {&amp;#034;Interpolation&amp;#034;, InterpolationOrder -&amp;gt; 1}]&#xD;
&#xD;
    tr = TimeSeriesResample[ts, &amp;#034;Day&amp;#034;, &#xD;
      ResamplingMethod -&amp;gt; {&amp;#034;Interpolation&amp;#034;, InterpolationOrder -&amp;gt; 1}]&#xD;
&#xD;
    MovingMap[Median, tr, Quantity[3, &amp;#034;Months&amp;#034;]]&#xD;
    &#xD;
    quotient[values_, times_] := &#xD;
     First[Differences[values]/Differences[times]]&#xD;
    &#xD;
    mm = &#xD;
     MovingMap[quotient[#BoundaryValues, #BoundaryTimes] &amp;amp;, &#xD;
      tr, {.1, Right}]&#xD;
    &#xD;
    &#xD;
    DateListPlot[mm]&#xD;
&#xD;
  [1]: https://1drv.ms/x/s!AiF0MVfYzFaAi3cO044kGlJW0Oam?e=Mt7qTv&#xD;
  [2]: https://i.stack.imgur.com/6Y6FV.png</description>
    <dc:creator>Gianluigi Salvi</dc:creator>
    <dc:date>2020-10-23T13:32:49Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1868374">
    <title>Fitting different data sets with different models using FindFit</title>
    <link>https://community.wolfram.com/groups/-/m/t/1868374</link>
    <description>Referring to a fitting made previously thanks to the help of a member:&#xD;
[Fit noisy data as a Least squares problem?][1]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com/groups/-/m/t/1864555?p_p_auth=tcwUjt8c&#xD;
&#xD;
I would like to ask for help to fit 2 noisy data sets to 2 models, referring to the same equation with different conditions.&#xD;
I have an equation T1:&#xD;
&#xD;
    Dif = 0.00000013; K0 = 0.5; z = 0; linf\[Alpha] = 0.0;&#xD;
    T1[x_, y_, t_, b_, l_, d_, m_, Intens_] /; &#xD;
      NumberQ[x] &amp;amp;&amp;amp; NumberQ[y] &amp;amp;&amp;amp; NumberQ[b] &amp;amp;&amp;amp; NumberQ[l] &amp;amp;&amp;amp; NumberQ[d] &amp;amp;&amp;amp; NumberQ[m] &amp;amp;&amp;amp;&#xD;
        NumberQ[Intens] := &#xD;
     Intens/(2*\[Pi]*K0)*&#xD;
      NIntegrate[&#xD;
       Sqrt[1 + m^2]*&#xD;
        Erfc[Sqrt[(x - \[Alpha])^2 + (y - \[Beta])^2 + (z - (m*\[Alpha] - &#xD;
                d))^2]/Sqrt[&#xD;
           Dif*4*t]]/(Sqrt[(x - \[Alpha])^2 + (y - \[Beta])^2 + (z - (m*\&#xD;
    \[Alpha] - d))^2]), {\[Beta], -b/2, b/2}, {\[Alpha], linf\[Alpha], &#xD;
        l*(1/(1 + m^2))}]&#xD;
I create noisy data for y=0 and x=0:&#xD;
&#xD;
    Block[{y = 0, t = 1, b = 0.001, l = 0.001, d = 0.0001, &#xD;
       m = -Tan[45*Pi/180], Intens = 25000}, &#xD;
      datax = Table[{x, &#xD;
         T1[x, y, t, b, l, d, m, Intens] + &#xD;
          Random[NormalDistribution[0, 0.1]]}, {x, -0.002, 0.002, &#xD;
         0.000015}]];&#xD;
    Block[{x = 0, t = 1, b = 0.001, l = 0.001, d = 0.0001, &#xD;
       m = -Tan[45*Pi/180], Intens = 25000}, &#xD;
      datay = Table[{y, &#xD;
         T1[x, y, t, b, l, d, m, Intens] + &#xD;
          Random[NormalDistribution[0, 0.1]]}, {y, -0.002, 0.002, &#xD;
         0.000015}]];&#xD;
and after, all I want to do, is to fit the two noisy data sets to the equation above for y=0 and x=0, in order to find the best fitting parameters {b,l,d,m,Intens}.&#xD;
&#xD;
I thought about using Join as follow (t=1):&#xD;
&#xD;
    alldata = Join[datax, datay];&#xD;
      fit=FindFit[alldata,T1[x,y,1,b,l,d,m,Intens],{b,l,d,m,Intens},{x,y},Method-&amp;gt;&amp;#034;LevenbergMarquardt&amp;#034;]&#xD;
&#xD;
but nothing. Could anyone help me? Thanks.</description>
    <dc:creator>Lorenzo Fuggiano</dc:creator>
    <dc:date>2020-01-28T09:46:10Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1687073">
    <title>Create custom component with custom formula or transfer function?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1687073</link>
    <description>How can I create a custom component with custom equation of transfer function? I have an equation for a low pass filter as shown below&#xD;
&#xD;
    L(t)= exp(-t/tau)/tau&#xD;
&#xD;
Thanks</description>
    <dc:creator>Lakshmi Rajagopalan</dc:creator>
    <dc:date>2019-05-20T19:29:03Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/833606">
    <title>Finding Peaks with Signal Data</title>
    <link>https://community.wolfram.com/groups/-/m/t/833606</link>
    <description>Hi All,&#xD;
&#xD;
I have a question regarding FindingPeaks with Signal Data in ListLinePlot. I have two columns with data and am trying to find the Peaks of the second column (the first column are the x-data in seconds).&#xD;
The outcome of the number of peaks are = 32, but only 1 peak showed on the plot at 1 second. What is wrong? &#xD;
Please can you help?![enter image description here][1]&#xD;
&#xD;
See file attached. Thanks.&#xD;
&#xD;
    data=test[[All,2]]; peaks=FindPeaks[data];First/@peaks;Length[peaks]; ListLinePLot[test,Epilog-&amp;gt;{Red,PointSize[0.03],Point[peaks]},PlotStyle-&amp;gt;Directive[Green,Thin]}]&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=FindingPeaks.gif&amp;amp;userId=185016</description>
    <dc:creator>Jos Klaps</dc:creator>
    <dc:date>2016-04-02T21:19:39Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1031773">
    <title>Get the original sequence in W|A with &amp;#034;inverse fft of fft of {0,1,2,3}&amp;#034;?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1031773</link>
    <description>Hi,&#xD;
&#xD;
I was verifying some manual calculations (I made on a white board) of a 4-point DFT done by the recursive Decimation in Time FFT, when I noticed that 2 of my frequency-domain points are switched - while I get {X1, X2, X3, X4}, the output of Wolfram Alpha is {X1, X4, X3, X1}.&#xD;
&#xD;
I thought I made a mistake, but I checked it a couple of times and I don&amp;#039;t think I have. So naturally I thought of getting the inverse transform, and if it doesn&amp;#039;t produce the original sequence, then the problem would likely be in WA.&#xD;
&#xD;
Why doesn&amp;#039;t &amp;#034;inverse fft of fft of {0,1,2,3}&amp;#034; produce the original secuence? (3 and 1 are also switched after the inverse transform)&#xD;
&#xD;
Thanks.&#xD;
&#xD;
&#xD;
Cheers,&#xD;
Nikolay</description>
    <dc:creator>Nikolay Tsenkov</dc:creator>
    <dc:date>2017-03-15T17:44:08Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/94303">
    <title>Modified bessel function in Mathematica</title>
    <link>https://community.wolfram.com/groups/-/m/t/94303</link>
    <description>Hello, 

Is there any body can help me to execute the below equation using For loop of the product in Mathematica...Thanks for your cooperation

[img=width: 610px; height: 76px;]/c/portal/getImageAttachment?filename=Equation%23.jpg&amp;amp;userId=11733[/img]</description>
    <dc:creator>John G</dc:creator>
    <dc:date>2013-08-10T20:01:48Z</dc:date>
  </item>
</rdf:RDF>

