1
$\begingroup$

Have a bit of an analysis issue with Fourier transform of a sinusoidal signal: I have a piece of signal that represents spatial scanning of a pattern. xcoordinate is distance and y is amplitude. I'm trying to receive a power spectrum of the signal in order to understand how "clean" the sine pattern is. the wave length is 30um and amplitude is 0.5um. The corresponding spatial frequency is ~0.03 um^-1. from some reason I get a shift in the main frequency that appears at ~0.01. Can't explain why. Can anyone offer a way to reflect the actual sine pattern? spatial sine

Fourier transform of signal periodogram

Data (thanks to andre):

xcord={0., 0.273598, 0.547196, 0.820794, 1.09439, 1.36799, 1.64159,  
    1.91519, 2.18878, 2.46238, 2.73598, 3.00958, 3.28318, 3.55677,  
    3.83037, 4.10397, 4.37757, 4.65117, 4.92476, 5.19836, 5.47196,  
    5.74556, 6.01916, 6.29275, 6.56635, 6.83995, 7.11355, 7.38715,  
    7.66074, 7.93434, 8.20794, 8.48154, 8.75514, 9.02873, 9.30233,  
    9.57593, 9.84953, 10.1231, 10.3967, 10.6703, 10.9439, 11.2175,  
    11.4911, 11.7647, 12.0383, 12.3119, 12.5855, 12.8591, 13.1327,  
    13.4063, 13.6799, 13.9535, 14.2271, 14.5007, 14.7743, 15.0479,  
    15.3215, 15.5951, 15.8687, 16.1423, 16.4159, 16.6895, 16.9631,  
    17.2367, 17.5103, 17.7839, 18.0575, 18.3311, 18.6047, 18.8783,  
    19.1519, 19.4255, 19.6991, 19.9727, 20.2463, 20.5199, 20.7934,  
    21.067, 21.3406, 21.6142, 21.8878, 22.1614, 22.435, 22.7086, 22.9822,  
    23.2558, 23.5294, 23.803, 24.0766, 24.3502, 24.6238, 24.8974, 25.171,  
    25.4446, 25.7182, 25.9918, 26.2654, 26.539, 26.8126, 27.0862,  
    27.3598, 27.6334, 27.907, 28.1806, 28.4542, 28.7278, 29.0014, 29.275,  
    29.5486, 29.8222, 30.0958, 30.3694, 30.643, 30.9166, 31.1902,  
    31.4638, 31.7374, 32.011, 32.2846, 32.5582, 32.8318, 33.1054, 33.379,  
    33.6526, 33.9262, 34.1998, 34.4733, 34.7469, 35.0205, 35.2941,  
    35.5677, 35.8413, 36.1149, 36.3885, 36.6621, 36.9357, 37.2093,  
    37.4829, 37.7565, 38.0301, 38.3037, 38.5773, 38.8509, 39.1245,  
    39.3981, 39.6717, 39.9453, 40.2189, 40.4925, 40.7661, 41.0397,  
    41.3133, 41.5869, 41.8605, 42.1341, 42.4077, 42.6813, 42.9549,  
    43.2285, 43.5021, 43.7757, 44.0493, 44.3229, 44.5965, 44.8701,  
    45.1437, 45.4173, 45.6909, 45.9645, 46.2381, 46.5117, 46.7853,  
    47.0589, 47.3325, 47.6061, 47.8797, 48.1532, 48.4268, 48.7004,  
    48.974, 49.2476, 49.5212, 49.7948, 50.0684, 50.342, 50.6156, 50.8892,  
    51.1628, 51.4364, 51.71, 51.9836, 52.2572, 52.5308, 52.8044, 53.078,  
    53.3516, 53.6252, 53.8988, 54.1724, 54.446, 54.7196, 54.9932,  
    55.2668, 55.5404, 55.814, 56.0876, 56.3612, 56.6348, 56.9084, 57.182,  
    57.4556, 57.7292, 58.0028, 58.2764, 58.55, 58.8236, 59.0972, 59.3708,  
    59.6444, 59.918, 60.1916, 60.4652, 60.7388, 61.0124, 61.286, 61.5596,  
    61.8331, 62.1067, 62.3803, 62.6539, 62.9275, 63.2011, 63.4747,  
    63.7483, 64.0219, 64.2955, 64.5691, 64.8427, 65.1163, 65.3899,  
    65.6635, 65.9371, 66.2107, 66.4843, 66.7579, 67.0315, 67.3051,  
    67.5787, 67.8523, 68.1259, 68.3995, 68.6731, 68.9467, 69.2203,  
    69.4939, 69.7675, 70.0411, 70.3147, 70.5883, 70.8619, 71.1355,  
    71.4091, 71.6827, 71.9563, 72.2299, 72.5035, 72.7771, 73.0507,  
    73.3243, 73.5979, 73.8715, 74.1451, 74.4187, 74.6923, 74.9659,  
    75.2395, 75.513, 75.7866, 76.0602, 76.3338, 76.6074, 76.881, 77.1546,  
    77.4282, 77.7018, 77.9754, 78.249, 78.5226, 78.7962, 79.0698,  
    79.3434, 79.617, 79.8906, 80.1642, 80.4378, 80.7114, 80.985, 81.2586,  
    81.5322, 81.8058, 82.0794, 82.353, 82.6266, 82.9002, 83.1738,  
    83.4474, 83.721, 83.9946, 84.2682, 84.5418, 84.8154, 85.089, 85.3626,  
    85.6362, 85.9098, 86.1834, 86.457, 86.7306, 87.0042, 87.2778,  
    87.5514, 87.825, 88.0986, 88.3722, 88.6458, 88.9194, 89.1929,  
    89.4665, 89.7401, 90.0137, 90.2873, 90.5609, 90.8345, 91.1081,  
    91.3817, 91.6553, 91.9289, 92.2025, 92.4761, 92.7497, 93.0233,  
    93.2969, 93.5705, 93.8441, 94.1177, 94.3913, 94.6649, 94.9385,  
    95.2121, 95.4857, 95.7593, 96.0329, 96.3065, 96.5801, 96.8537,  
    97.1273, 97.4009, 97.6745, 97.9481, 98.2217, 98.4953, 98.7689,  
    99.0425, 99.3161, 99.5897, 99.8633, 100.137, 100.41, 100.684,  
    100.958, 101.231, 101.505, 101.778, 102.052, 102.326, 102.599,  
    102.873, 103.146, 103.42, 103.694, 103.967, 104.241, 104.514,  
    104.788, 105.062, 105.335, 105.609, 105.882, 106.156, 106.43,  
    106.703, 106.977, 107.25, 107.524, 107.798, 108.071, 108.345,  
    108.618, 108.892, 109.166, 109.439, 109.713, 109.986, 110.26,  
    110.534, 110.807, 111.081, 111.354, 111.628, 111.902, 112.175,  
    112.449, 112.722, 112.996, 113.27, 113.543, 113.817, 114.09, 114.364,  
    114.638, 114.911, 115.185, 115.458, 115.732, 116.006, 116.279,  
    116.553, 116.826, 117.1, 117.374, 117.647, 117.921, 118.194, 118.468,  
    118.742, 119.015, 119.289, 119.562, 119.836, 120.11, 120.383,  
    120.657, 120.93, 121.204, 121.478, 121.751, 122.025, 122.298,  
    122.572, 122.846, 123.119, 123.393, 123.666, 123.94, 124.213,  
    124.487, 124.761, 125.034, 125.308, 125.581, 125.855, 126.129,  
    126.402, 126.676, 126.949, 127.223, 127.497, 127.77, 128.044,  
    128.317, 128.591, 128.865, 129.138, 129.412, 129.685, 129.959,  
    130.233, 130.506, 130.78, 131.053, 131.327, 131.601, 131.874,  
    132.148, 132.421, 132.695, 132.969, 133.242, 133.516, 133.789,  
    134.063, 134.337, 134.61, 134.884, 135.157, 135.431, 135.705,  
    135.978, 136.252, 136.525, 136.799, 137.073, 137.346, 137.62,  
    137.893, 138.167, 138.441, 138.714, 138.988, 139.261, 139.535,  
    139.809, 140.082, 140.356, 140.629, 140.903, 141.177, 141.45,  
    141.724, 141.997, 142.271, 142.545, 142.818, 143.092, 143.365,  
    143.639, 143.913, 144.186, 144.46, 144.733, 145.007, 145.281,  
    145.554, 145.828, 146.101, 146.375, 146.649, 146.922, 147.196,  
    147.469, 147.743, 148.017, 148.29, 148.564, 148.837, 149.111,  
    149.385, 149.658, 149.932, 150.205, 150.479, 150.752, 151.026, 151.3,  
    151.573, 151.847, 152.12, 152.394, 152.668, 152.941, 153.215,  
    153.488, 153.762, 154.036, 154.309, 154.583, 154.856, 155.13,  
    155.404, 155.677, 155.951, 156.224, 156.498, 156.772, 157.045,  
    157.319, 157.592, 157.866, 158.14, 158.413, 158.687, 158.96, 159.234,  
    159.508, 159.781, 160.055, 160.328, 160.602, 160.876, 161.149,  
    161.423, 161.696, 161.97, 162.244, 162.517, 162.791, 163.064,  
    163.338, 163.612, 163.885, 164.159, 164.432, 164.706, 164.98,  
    165.253, 165.527, 165.8, 166.074, 166.348, 166.621, 166.895, 167.168,  
    167.442, 167.716, 167.989, 168.263, 168.536, 168.81, 169.084,  
    169.357, 169.631, 169.904, 170.178, 170.452, 170.725, 170.999,  
    171.272, 171.546, 171.82, 172.093, 172.367, 172.64, 172.914, 173.188,  
    173.461, 173.735, 174.008, 174.282, 174.556, 174.829, 175.103,  
    175.376, 175.65, 175.924, 176.197, 176.471, 176.744, 177.018,  
    177.292, 177.565, 177.839, 178.112, 178.386, 178.659, 178.933,  
    179.207, 179.48, 179.754, 180.027, 180.301, 180.575, 180.848,  
    181.122, 181.395, 181.669, 181.943, 182.216, 182.49, 182.763,  
    183.037, 183.311, 183.584, 183.858, 184.131, 184.405, 184.679,  
    184.952, 185.226, 185.499, 185.773, 186.047, 186.32, 186.594,  
    186.867, 187.141, 187.415, 187.688, 187.962, 188.235, 188.509,  
    188.783, 189.056, 189.33, 189.603, 189.877, 190.151, 190.424,  
    190.698, 190.971, 191.245, 191.519, 191.792, 192.066, 192.339,  
    192.613, 192.887, 193.16, 193.434, 193.707, 193.981, 194.255,  
    194.528, 194.802, 195.075, 195.349, 195.623, 195.896, 196.17,  
    196.443, 196.717, 196.991, 197.264, 197.538, 197.811, 198.085,  
    198.359, 198.632, 198.906, 199.179, 199.453, 199.727, 200., 200.274,  
    200.547, 200.821, 201.095, 201.368, 201.642, 201.915, 202.189,  
    202.463, 202.736, 203.01, 203.283, 203.557, 203.831, 204.104,  
    204.378, 204.651, 204.925, 205.199, 205.472, 205.746, 206.019,  
    206.293, 206.566, 206.84, 207.114, 207.387, 207.661, 207.934,  
    208.208, 208.482, 208.755, 209.029, 209.302, 209.576, 209.85,  
    210.123, 210.397, 210.67, 210.944, 211.218, 211.491, 211.765,  
    212.038, 212.312, 212.586, 212.859, 213.133, 213.406, 213.68,  
    213.954, 214.227, 214.501, 214.774, 215.048, 215.322, 215.595,  
    215.869, 216.142, 216.416, 216.69, 216.963, 217.237, 217.51, 217.784,  
    218.058, 218.331, 218.605, 218.878, 219.152, 219.426, 219.699,  
    219.973, 220.246, 220.52, 220.794, 221.067, 221.341, 221.614,  
    221.888, 222.162, 222.435, 222.709, 222.982, 223.256, 223.53,  
    223.803, 224.077, 224.35, 224.624, 224.898, 225.171, 225.445,  
    225.718, 225.992, 226.266, 226.539, 226.813, 227.086, 227.36,  
    227.634, 227.907, 228.181, 228.454, 228.728, 229.002, 229.275,  
    229.549, 229.822, 230.096, 230.37, 230.643, 230.917, 231.19, 231.464,  
    231.738, 232.011, 232.285, 232.558, 232.832, 233.105, 233.379,  
    233.653, 233.926, 234.2, 234.473, 234.747, 235.021, 235.294, 235.568,  
    235.841, 236.115, 236.389, 236.662, 236.936, 237.209, 237.483,  
    237.757, 238.03, 238.304, 238.577, 238.851, 239.125, 239.398,  
    239.672, 239.945, 240.219, 240.493, 240.766, 241.04, 241.313,  
    241.587, 241.861, 242.134, 242.408, 242.681, 242.955, 243.229,  
    243.502, 243.776, 244.049, 244.323, 244.597, 244.87, 245.144,  
    245.417, 245.691, 245.965, 246.238, 246.512, 246.785, 247.059,  
    247.333, 247.606, 247.88, 248.153, 248.427, 248.701, 248.974,  
    249.248, 249.521, 249.795, 250.069, 250.342, 250.616, 250.889,  
    251.163, 251.437, 251.71, 251.984, 252.257, 252.531, 252.805,  
    253.078, 253.352, 253.625, 253.899, 254.173, 254.446, 254.72,  
    254.993, 255.267, 255.541, 255.814, 256.088, 256.361, 256.635,  
    256.909, 257.182, 257.456, 257.729, 258.003, 258.277}  



 ycord={1.14783, 1.11872, 1.09451, 1.08035, 1.03619, 1.02156, 0.978162,  
        0.963717, 0.925321, 0.909542, 0.896242, 0.863132, 0.817352, 0.804386,  
        0.793273, 0.755449, 0.73129, 0.732132, 0.703831, 0.662909, 0.657517,  
        0.6625, 0.640291, 0.61047, 0.628022, 0.616247, 0.608466, 0.598121,  
        0.604058, 0.605847, 0.605211, 0.61539, 0.624754, 0.630595, 0.648058,  
        0.653947, 0.669836, 0.692198, 0.694803, 0.708785, 0.725299, 0.734282,  
        0.760171, 0.79401, 0.812754, 0.837838, 0.858727, 0.880136, 0.895929,  
        0.918731, 0.9599, 0.973035, 0.99402, 1.03237, 1.06069, 1.07411,  
        1.10262, 1.14351, 1.16163, 1.1731, 1.21259, 1.25334, 1.26795,  
        1.29584, 1.33558, 1.35133, 1.37522, 1.40421, 1.42681, 1.45102,  
        1.47839, 1.48742, 1.50155, 1.54577, 1.55715, 1.55951, 1.57678,  
        1.57629, 1.58718, 1.5943, 1.59014, 1.5944, 1.58074, 1.57767, 1.5805,  
        1.5753, 1.57929, 1.57603, 1.57527, 1.55848, 1.55856, 1.54874,  
        1.52647, 1.52608, 1.51537, 1.49182, 1.47276, 1.45983, 1.45029,  
        1.41141, 1.38721, 1.38319, 1.37366, 1.33459, 1.32534, 1.31118,  
        1.27208, 1.24276, 1.23371, 1.20494, 1.17014, 1.14123, 1.11775,  
        1.09291, 1.06289, 1.04363, 1.01991, 0.996279, 0.95337, 0.945944,  
        0.920922, 0.865413, 0.845486, 0.836328, 0.797169, 0.763011, 0.749858,  
        0.736802, 0.704433, 0.679078, 0.697218, 0.663059, 0.626316, 0.643402,  
        0.628359, 0.607861, 0.609301, 0.601577, 0.602371, 0.598165, 0.600633,  
        0.611474, 0.619085, 0.633157, 0.638998, 0.646752, 0.669601, 0.675538,  
        0.681474, 0.711103, 0.732596, 0.744889, 0.77073, 0.791572, 0.804754,  
        0.835866, 0.86166, 0.867453, 0.898311, 0.9242, 0.942208, 0.960279,  
        0.98959, 1.02276, 1.04083, 1.06527, 1.10751, 1.14039, 1.1572,  
        1.19504, 1.22777, 1.24542, 1.26936, 1.30515, 1.33583, 1.35508,  
        1.38093, 1.40864, 1.42564, 1.44845, 1.47287, 1.48013, 1.51465,  
        1.52926, 1.5202, 1.54732, 1.55661, 1.56518, 1.57498, 1.57285,  
        1.57865, 1.57034, 1.56193, 1.57603, 1.56682, 1.56191, 1.57341,  
        1.57421, 1.55444, 1.55028, 1.56065, 1.53654, 1.52706, 1.523, 1.49949,  
        1.49033, 1.48635, 1.46214, 1.44785, 1.42369, 1.41455, 1.40038,  
        1.3709, 1.35175, 1.3327, 1.29399, 1.26518, 1.25543, 1.23166, 1.18799,  
        1.16844, 1.14933, 1.1158, 1.08547, 1.06199, 1.04288, 1.003, 0.982198,  
        0.962944, 0.932356, 0.894437, 0.867206, 0.850166, 0.817782, 0.773576,  
        0.761774, 0.751414, 0.712255, 0.694442, 0.691724, 0.659779, 0.640621,  
        0.651462, 0.637304, 0.616514, 0.608987, 0.604828, 0.59567, 0.595155,  
        0.607353, 0.611277, 0.614036, 0.625852, 0.629537, 0.64156, 0.664557,  
        0.666039, 0.674582, 0.692627, 0.710767, 0.734215, 0.749892, 0.763292,  
        0.781596, 0.82239, 0.852919, 0.858617, 0.887499, 0.913341, 0.924182,  
        0.950765, 0.990865, 1.02077, 1.02953, 1.06033, 1.11045, 1.12323,  
        1.13591, 1.1835, 1.2226, 1.24179, 1.26428, 1.29979, 1.32096, 1.34242,  
        1.37482, 1.39212, 1.40933, 1.4339, 1.44723, 1.47303, 1.49882,  
        1.49962, 1.51144, 1.5462, 1.557, 1.5619, 1.56859, 1.57358, 1.57368,  
        1.56527, 1.57111, 1.57695, 1.56779, 1.55863, 1.56132, 1.56614,  
        1.56079, 1.55795, 1.55311, 1.53846, 1.53952, 1.53024, 1.51105,  
        1.50205, 1.48789, 1.46373, 1.43457, 1.43041, 1.42646, 1.38261,  
        1.35794, 1.35878, 1.32922, 1.28002, 1.2618, 1.25377, 1.21916,  
        1.19383, 1.1783, 1.14551, 1.10713, 1.07802, 1.06804, 1.03888,  
        0.99875, 0.978526, 0.952466, 0.918356, 0.886925, 0.863926, 0.828534,  
        0.800609, 0.7851, 0.772292, 0.736688, 0.713975, 0.718275, 0.700891,  
        0.663226, 0.654025, 0.649718, 0.620804, 0.60852, 0.606957, 0.601548,  
        0.58936, 0.583231, 0.592007, 0.594914, 0.605078, 0.611014, 0.616951,  
        0.640976, 0.65177, 0.657362, 0.678251, 0.704151, 0.709945, 0.720919,  
        0.741808, 0.760012, 0.770853, 0.796695, 0.815365, 0.838378, 0.878372,  
        0.908032, 0.918921, 0.956743, 0.990699, 0.996589, 1.02069, 1.07488,  
        1.10926, 1.10844, 1.14583, 1.19658, 1.20733, 1.22161, 1.26818,  
        1.30048, 1.31637, 1.34099, 1.37315, 1.39521, 1.42105, 1.43689,  
        1.44979, 1.48053, 1.49535, 1.49437, 1.52442, 1.55115, 1.55204,  
        1.54862, 1.55511, 1.5659, 1.5706, 1.57148, 1.57283, 1.56867, 1.55915,  
        1.56004, 1.57067, 1.56182, 1.56254, 1.55848, 1.53949, 1.5354,  
        1.52624, 1.51202, 1.50258, 1.4936, 1.4744, 1.45019, 1.44068, 1.42678,  
        1.40217, 1.36882, 1.36016, 1.35441, 1.31575, 1.29154, 1.28096,  
        1.24739, 1.20549, 1.17887, 1.15815, 1.12409, 1.1021, 1.07391,  
        1.04369, 1.01724, 0.989108, 0.966067, 0.935601, 0.893963, 0.878449,  
        0.857839, 0.811488, 0.782329, 0.778171, 0.752418, 0.71157, 0.707316,  
        0.699799, 0.655593, 0.637722, 0.65342, 0.629902, 0.610744, 0.607539,  
        0.604498, 0.597506, 0.601276, 0.599951, 0.598531, 0.606634, 0.624833,  
        0.628317, 0.634159, 0.6475, 0.653389, 0.664278, 0.692238, 0.708366,  
        0.709684, 0.735049, 0.756558, 0.765376, 0.793431, 0.815438, 0.832281,  
        0.856242, 0.879059, 0.899948, 0.935837, 0.981726, 0.990995, 1.00679,  
        1.05099, 1.08528, 1.09117, 1.12416, 1.17295, 1.1852, 1.19973,  
        1.24314, 1.28272, 1.29856, 1.31552, 1.35524, 1.38609, 1.40693,  
        1.42684, 1.44685, 1.46862, 1.48951, 1.4904, 1.51629, 1.54218,  
        1.54307, 1.5445, 1.54984, 1.55573, 1.56202, 1.56287, 1.5634, 1.55981,  
        1.55539, 1.56607, 1.57207, 1.55785, 1.55376, 1.55457, 1.54044,  
        1.5364, 1.53695, 1.52796, 1.50907, 1.50402, 1.48977, 1.46633,  
        1.45217, 1.43902, 1.42385, 1.3891, 1.38489, 1.3843, 1.32796, 1.29885,  
        1.29807, 1.26474, 1.22465, 1.19447, 1.16624, 1.13811, 1.11395,  
        1.08979, 1.06063, 1.03521, 1.00575, 0.979075, 0.946818, 0.904842,  
        0.885683, 0.864973, 0.830767, 0.801561, 0.792354, 0.764891, 0.717522,  
        0.701574, 0.706186, 0.678257, 0.649098, 0.657911, 0.642857, 0.611622,  
        0.605292, 0.606086, 0.59188, 0.587674, 0.59583, 0.594081, 0.592598,  
        0.608344, 0.621749, 0.622437, 0.635879, 0.64172, 0.653049, 0.678986,  
        0.681406, 0.679313, 0.707993, 0.730805, 0.739581, 0.758452, 0.781168,  
        0.796962, 0.825976, 0.855282, 0.866028, 0.891864, 0.936164, 0.948642,  
        0.966544, 1.01042, 1.04271, 1.0572, 1.09309, 1.13023, 1.14349,  
        1.15692, 1.20276, 1.2536, 1.25741, 1.27528, 1.3202, 1.34109, 1.36198,  
        1.39631, 1.40876, 1.43896, 1.46117, 1.4726, 1.49839, 1.5187, 1.52454,  
        1.53078, 1.53587, 1.54676, 1.5579, 1.55354, 1.56411, 1.57009,  
        1.56614, 1.54711, 1.55795, 1.58387, 1.54951, 1.55048, 1.55154,  
        1.54189, 1.55237, 1.53884, 1.5201, 1.52053, 1.50688, 1.48221,  
        1.46805, 1.46585, 1.44403, 1.41833, 1.41142, 1.39226, 1.37221,  
        1.33988, 1.32183, 1.29459, 1.24363, 1.22118, 1.20932, 1.17521,  
        1.13356, 1.11435, 1.09151, 1.05094, 1.02027, 0.994038, 0.961436,  
        0.932511, 0.909909, 0.889104, 0.853245, 0.825882, 0.813614, 0.784551,  
        0.756611, 0.735466, 0.73626, 0.704135, 0.670718, 0.671464, 0.654435,  
        0.627501, 0.623343, 0.616816, 0.600195, 0.593404, 0.584198, 0.582433,  
        0.585785, 0.586886, 0.592373, 0.595418, 0.616757, 0.629754, 0.635548,  
        0.651342, 0.660123, 0.670965, 0.691806, 0.722647, 0.730311, 0.736105,  
        0.760172, 0.781013, 0.803486, 0.83428, 0.845074, 0.867356, 0.908102,  
        0.931062, 0.946904, 0.987745, 1.01859, 1.01683, 1.05642, 1.11,  
        1.12089, 1.13279, 1.18574, 1.22581, 1.22945, 1.25034, 1.29468,  
        1.30784, 1.3214, 1.35453, 1.37478, 1.40674, 1.43254, 1.45745,  
        1.47373, 1.50492, 1.51982, 1.52126, 1.5421, 1.55309, 1.55889,  
        1.56468, 1.57046, 1.58127, 1.57698, 1.56786, 1.57865, 1.56967,  
        1.55579, 1.57136, 1.5772, 1.55804, 1.56435, 1.55575, 1.53612,  
        1.54019, 1.52159, 1.49379, 1.47468, 1.47057, 1.45231, 1.42966,  
        1.41135, 1.40413, 1.36794, 1.34265, 1.33339, 1.30268, 1.26111,  
        1.24063, 1.2177, 1.18124, 1.15355, 1.12948, 1.09891, 1.0598, 1.02891,  
        1.00823, 0.984052, 0.958352, 0.93564, 0.913282, 0.879123, 0.854133,  
        0.838815, 0.811648, 0.777489, 0.761196, 0.74199, 0.715014, 0.6813,  
        0.676697, 0.669911, 0.62838, 0.626689, 0.620094, 0.600904, 0.584134,  
        0.572587, 0.573428, 0.57427, 0.572309, 0.583802, 0.587589, 0.599691,  
        0.605485, 0.617359, 0.648248, 0.657866, 0.656843, 0.684454, 0.703526,  
        0.716041, 0.733583, 0.752629, 0.769953, 0.789216, 0.82714, 0.839416,  
        0.863918, 0.901099, 0.924451, 0.92757, 0.977474, 1.00947, 1.02136,  
        1.05014, 1.09699, 1.11374, 1.12281, 1.17207, 1.21882, 1.22832,  
        1.24271, 1.27413, 1.30488, 1.30562, 1.34492, 1.35668, 1.3867,  
        1.41759, 1.42877, 1.43986, 1.48967, 1.49615, 1.49224, 1.52792,  
        1.54882, 1.55466, 1.57032, 1.56134, 1.57237, 1.56279, 1.56387,  
        1.56537, 1.56055, 1.55639, 1.56676, 1.56808, 1.54948, 1.56791,  
        1.55626, 1.53715, 1.53653, 1.51393, 1.49311, 1.47981, 1.47349,  
        1.46249, 1.4342, 1.41926, 1.41515, 1.37986, 1.33693, 1.32782,  
        1.31238, 1.26184, 1.24621, 1.22785, 1.19575, 1.15816, 1.13243,  
        1.09827, 1.06253, 1.03319, 1.01579, 0.987198, 0.949379, 0.923319,  
        0.902164, 0.872047, 0.837936, 0.824545, 0.817526, 0.770603, 0.759209,  
        0.745051, 0.708514, 0.67416, 0.682575, 0.675896, 0.631827, 0.6251,  
        0.625941, 0.601783, 0.592624, 0.578466, 0.581452, 0.573051, 0.57689,  
        0.588834, 0.585718, 0.600421, 0.609356, 0.620197, 0.634275, 0.643596,  
        0.646053, 0.665184, 0.680978, 0.685246, 0.707565, 0.730499, 0.750006,  
        0.771281, 0.805741, 0.827816, 0.84352, 0.885834, 0.912819, 0.913661,  
        0.956504, 1.00034, 1.00709, 1.03445, 1.09706, 1.12295, 1.11455,  
        1.17406, 1.19247, 1.20708, 1.23792, 1.27781, 1.29917, 1.29082,  
        1.33662, 1.37069, 1.3782, 1.394, 1.41951, 1.42059, 1.47633, 1.46717}
$\endgroup$
  • $\begingroup$ Sorry for the messy post... $\endgroup$ – OSte Dec 21 '17 at 18:36
  • $\begingroup$ Better if you provide your data as a MMA code. Thus we can copy/paste/edit directly for helping you... $\endgroup$ – José Antonio Díaz Navas Dec 21 '17 at 18:39
  • $\begingroup$ Thanks Jose. Now just need to find out how to edit... $\endgroup$ – OSte Dec 21 '17 at 18:47
  • 1
    $\begingroup$ Probably, see this post and answers therein. The thing is, Fourier doesn't spit out an omega-axis, so you've got to generate it yourself. (As a side-note, I would probably subtract off the DC term (i.e. the mean-value of your data) before transforming in order to get rid of the zero-frequency peak.) $\endgroup$ – march Dec 21 '17 at 18:49
  • 1
    $\begingroup$ Your spatial sampling step is dx=0.273598, so the frequency axis in your second plot should run from 0 to 0.5/dx (=1.83). That puts the peak at around 0.03 as expected. $\endgroup$ – Simon Woods Dec 21 '17 at 19:41
3
$\begingroup$

I see no problem with the data you provided. Don't forget to substract the mean if you don't want the continuous component in the Fourier transform. Using the data from andre's "answer":

fs = Length@xcord/xcord[[-1]];     (* sampling rate *)
ListLinePlot[Abs@Fourier[ycord - Mean@ycord], 
                 PlotRange -> {{0, .1}, Full}, DataRange -> {0, fs}]

enter image description here

$\endgroup$
  • 1
    $\begingroup$ Little supplement to the fine answer of @anderstood. In order to get the powerspectrum, one should calculate the square Abs[Fourier[ycord - Mean@ycord]]^2 $\endgroup$ – Akku14 Dec 22 '17 at 9:01
2
$\begingroup$

You can even get more information from your data if you do NonLinearModelFit

(nmf = NonlinearModelFit[Transpose[{xcord, ycord}], 
            a + b  Sin[c + d x], {a, b, c, {d, 2 Pi/30}}, x]) // Normal

(*    1.10541+ 0.491011 Sin[0.160477- 0.210734 x]    *)

nmf["EstimatedVariance"]

(*    0.000451949    *)

Plot[nmf // Normal, {x, 0, xcord[[-1]]}, 
   Epilog -> Point@Transpose[{xcord, ycord}], PlotRange -> All, 
   PlotStyle -> Red]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.