Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Look at this plot, it represents an underground interface between two formations, this interface should dip very gently left-downward, all the steps are artificial effects due to sampling. The natural slope of this curve is very important to me, for example, if a seismic ray happens to incident at the joint of step, then the refection path is totally wrong. I have tried methods of spline interpolation, moving average, etc, somehow I am not satisfactory with the results, some methods alter the general location of the curve. It might be better to let the end points of the curve be fixed. It might work if I resample the data, but it takes too much efforts and you may need to resample differently for different interface curves. Could someone show me how to efficiently get rid of these step artificials? Data is attached below (two interfaces, if you method works on both interfaces, then it works). Thanks a lot!

(Note: both the horizontal and vertical sampling interval is 20 feet, the general slope of this interface should be about 1 degree, but at the steps, the slope is about 45 degree!)

enter image description here

curve1={{62700,-2460},{62720,-2460},{62740,-2460},{62760,-2460},{62780,-2460},{62800,-2460},{62820,-2460},{62840,-2460},{62860,-2460},{62880,-2460},{62900,-2460},{62920,-2460},{62940,-2460},{62960,-2460},{62980,-2460},{63000,-2460},{63020,-2460},{63040,-2460},{63060,-2460},{63080,-2460},{63100,-2460},{63120,-2460},{63140,-2460},{63160,-2460},{63180,-2460},{63200,-2440},{63220,-2440},{63240,-2440},{63260,-2440},{63280,-2440},{63300,-2440},{63320,-2440},{63340,-2440},{63360,-2440},{63380,-2440},{63400,-2440},{63420,-2440},{63440,-2440},{63460,-2440},{63480,-2440},{63500,-2440},{63520,-2440},{63540,-2440},{63560,-2440},{63580,-2440},{63600,-2440},{63620,-2440},{63640,-2440},{63660,-2440},{63680,-2440},{63700,-2440},{63720,-2440},{63740,-2440},{63760,-2440},{63780,-2440},{63800,-2440},{63820,-2440},{63840,-2440},{63860,-2420},{63880,-2420},{63900,-2420},{63920,-2420},{63940,-2420},{63960,-2420},{63980,-2420},{64000,-2420},{64020,-2420},{64040,-2420},{64060,-2420},{64080,-2420},{64100,-2420},{64120,-2420},{64140,-2420},{64160,-2420},{64180,-2420},{64200,-2420},{64220,-2420},{64240,-2420},{64260,-2420},{64280,-2420},{64300,-2420},{64320,-2420},{64340,-2420},{64360,-2420},{64380,-2420},{64400,-2420},{64420,-2420},{64440,-2400},{64460,-2400},{64480,-2400},{64500,-2400},{64520,-2400},{64540,-2400},{64560,-2400},{64580,-2400},{64600,-2400},{64620,-2400},{64640,-2400},{64660,-2400},{64680,-2400},{64700,-2400},{64720,-2400},{64740,-2400},{64760,-2400},{64780,-2400},{64800,-2400},{64820,-2400},{64840,-2400},{64860,-2400},{64880,-2400},{64900,-2400},{64920,-2400},{64940,-2400},{64960,-2400},{64980,-2400},{65000,-2400},{65020,-2380},{65040,-2380},{65060,-2380},{65080,-2380},{65100,-2380},{65120,-2380},{65140,-2380},{65160,-2380},{65180,-2380},{65200,-2380},{65220,-2380},{65240,-2380},{65260,-2380},{65280,-2380},{65300,-2380},{65320,-2380},{65340,-2380},{65360,-2380},{65380,-2380},{65400,-2380},{65420,-2380},{65440,-2380},{65460,-2380},{65480,-2380},{65500,-2380},{65520,-2380},{65540,-2380},{65560,-2380},{65580,-2380},{65600,-2360},{65620,-2360},{65640,-2360},{65660,-2360},{65680,-2360},{65700,-2360},{65720,-2360},{65740,-2360},{65760,-2360},{65780,-2360},{65800,-2360},{65820,-2360},{65840,-2360},{65860,-2360},{65880,-2360},{65900,-2360},{65920,-2360},{65940,-2360},{65960,-2360},{65980,-2360},{66000,-2360},{66020,-2360},{66040,-2360},{66060,-2360},{66080,-2360},{66100,-2360},{66120,-2360},{66140,-2360},{66160,-2360},{66180,-2360},{66200,-2360},{66220,-2340},{66240,-2340},{66260,-2340},{66280,-2340},{66300,-2340},{66320,-2340},{66340,-2340},{66360,-2340},{66380,-2340},{66400,-2340},{66420,-2340},{66440,-2340},{66460,-2340},{66480,-2340},{66500,-2340},{66520,-2340},{66540,-2340},{66560,-2340},{66580,-2340},{66600,-2340},{66620,-2340},{66640,-2340},{66660,-2340},{66680,-2340},{66700,-2340},{66720,-2340},{66740,-2340},{66760,-2340},{66780,-2340},{66800,-2340},{66820,-2340},{66840,-2340},{66860,-2320},{66880,-2320},{66900,-2320},{66920,-2320},{66940,-2320},{66960,-2320},{66980,-2320},{67000,-2320},{67020,-2320},{67040,-2320},{67060,-2320},{67080,-2320},{67100,-2320},{67120,-2320},{67140,-2320},{67160,-2320},{67180,-2320},{67200,-2320},{67220,-2320},{67240,-2320},{67260,-2320},{67280,-2320},{67300,-2320},{67320,-2320},{67340,-2320},{67360,-2320},{67380,-2320},{67400,-2320},{67420,-2320},{67440,-2320},{67460,-2320},{67480,-2320},{67500,-2300},{67520,-2300},{67540,-2300},{67560,-2300},{67580,-2300},{67600,-2300},{67620,-2300},{67640,-2300},{67660,-2300},{67680,-2300},{67700,-2300},{67720,-2300},{67740,-2300},{67760,-2300},{67780,-2300},{67800,-2300},{67820,-2300},{67840,-2300},{67860,-2300},{67880,-2300},{67900,-2300},{67920,-2300},{67940,-2300},{67960,-2300},{67980,-2300},{68000,-2300},{68020,-2300},{68040,-2300},{68060,-2300},{68080,-2300},{68100,-2300},{68120,-2300},{68140,-2280},{68160,-2280},{68180,-2280},{68200,-2280},{68220,-2280},{68240,-2280},{68260,-2280},{68280,-2280},{68300,-2280},{68320,-2280},{68340,-2280},{68360,-2280},{68380,-2280},{68400,-2280},{68420,-2280},{68440,-2280},{68460,-2280},{68480,-2280},{68500,-2280},{68520,-2280},{68540,-2280},{68560,-2280},{68580,-2280},{68600,-2280},{68620,-2280},{68640,-2280},{68660,-2280},{68680,-2280},{68700,-2280},{68720,-2280},{68740,-2280},{68760,-2280},{68780,-2260},{68800,-2260},{68820,-2260},{68840,-2260},{68860,-2260},{68880,-2260},{68900,-2260},{68920,-2260},{68940,-2260},{68960,-2260},{68980,-2260},{69000,-2260},{69020,-2260},{69040,-2260},{69060,-2260},{69080,-2260},{69100,-2260},{69120,-2260},{69140,-2260},{69160,-2260},{69180,-2260},{69200,-2260},{69220,-2260},{69240,-2260},{69260,-2260},{69280,-2260},{69300,-2260},{69320,-2260},{69340,-2260},{69360,-2260},{69380,-2260},{69400,-2260},{69420,-2260},{69440,-2260},{69460,-2260},{69480,-2260},{69500,-2260},{69520,-2260},{69540,-2260},{69560,-2260},{69580,-2260},{69600,-2260},{69620,-2260},{69640,-2260},{69660,-2260},{69680,-2260},{69700,-2260},{69720,-2240},{69740,-2240},{69760,-2240},{69780,-2240},{69800,-2240},{69820,-2240},{69840,-2240},{69860,-2240},{69880,-2240},{69900,-2240},{69920,-2240},{69940,-2240},{69960,-2240},{69980,-2240},{70000,-2240},{70020,-2240},{70040,-2240},{70060,-2240},{70080,-2240},{70100,-2240},{70120,-2240},{70140,-2240},{70160,-2240},{70180,-2240},{70200,-2240},{70220,-2240},{70240,-2240},{70260,-2240},{70280,-2240},{70300,-2240},{70320,-2240},{70340,-2240},{70360,-2240},{70380,-2240},{70400,-2240},{70420,-2240},{70440,-2240},{70460,-2240},{70480,-2240},{70500,-2240},{70520,-2240},{70540,-2240},{70560,-2240},{70580,-2240},{70600,-2240},{70620,-2240},{70640,-2240},{70660,-2240},{70680,-2240},{70700,-2240},{70720,-2240},{70740,-2240},{70760,-2240},{70780,-2240},{70800,-2240},{70820,-2240},{70840,-2240},{70860,-2240},{70880,-2240},{70900,-2240},{70920,-2240},{70940,-2240},{70960,-2240},{70980,-2240},{71000,-2240},{71020,-2240},{71040,-2240},{71060,-2240},{71080,-2240},{71100,-2240},{71120,-2240},{71140,-2240},{71160,-2240},{71180,-2240},{71200,-2240},{71220,-2240},{71240,-2240},{71260,-2240},{71280,-2240},{71300,-2240},{71320,-2240},{71340,-2240},{71360,-2240},{71380,-2240},{71400,-2240},{71420,-2240},{71440,-2240},{71460,-2240},{71480,-2240},{71500,-2240},{71520,-2240},{71540,-2240},{71560,-2240},{71580,-2240},{71600,-2240},{71620,-2240},{71640,-2240},{71660,-2240},{71680,-2240},{71700,-2240},{71720,-2240},{71740,-2240},{71760,-2240},{71780,-2240},{71800,-2240},{71820,-2240},{71840,-2240},{71860,-2240},{71880,-2240},{71900,-2240},{71920,-2240},{71940,-2240},{71960,-2240},{71980,-2240},{72000,-2240},{72020,-2240},{72040,-2240},{72060,-2240},{72080,-2240},{72100,-2240},{72120,-2240},{72140,-2240},{72160,-2240},{72180,-2240},{72200,-2240},{72220,-2240},{72240,-2240},{72260,-2240},{72280,-2240},{72300,-2240},{72320,-2240},{72340,-2240}};

curve2= {{20,-27980},{80,-27980},{140,-27980},{200,-27980},{260,-27980},{320,-27980},{380,-27980},{440,-27980},{500,-27980},{560,-27980},{620,-27980},{680,-27980},{740,-27980},{800,-27980},{860,-27980},{920,-27980},{980,-27980},{1040,-27980},{1100,-27960},{1160,-27960},{1220,-27960},{1280,-27960},{1340,-27960},{1400,-27960},{1460,-27960},{1520,-27960},{1580,-27960},{1640,-27960},{1700,-27960},{1760,-27960},{1820,-27960},{1880,-27940},{1940,-27940},{2000,-27940},{2060,-27940},{2120,-27940},{2180,-27940},{2240,-27940},{2300,-27940},{2360,-27940},{2420,-27940},{2480,-27940},{2540,-27940},{2600,-27940},{2660,-27920},{2720,-27920},{2780,-27920},{2840,-27920},{2900,-27920},{2960,-27920},{3020,-27920},{3080,-27920},{3140,-27920},{3200,-27920},{3260,-27920},{3320,-27920},{3380,-27920},{3440,-27920},{3500,-27900},{3560,-27900},{3620,-27900},{3680,-27900},{3740,-27900},{3800,-27900},{3860,-27900},{3920,-27900},{3980,-27900},{4040,-27900},{4100,-27900},{4160,-27900},{4220,-27900},{4280,-27900},{4340,-27900},{4400,-27900},{4460,-27900},{4520,-27900},{4580,-27900},{4640,-27900},{4700,-27880},{4760,-27880},{4820,-27880},{4880,-27880},{4940,-27880},{5000,-27880},{5060,-27880},{5120,-27880},{5180,-27880},{5240,-27880},{5300,-27880},{5360,-27880},{5420,-27880},{5480,-27880},{5540,-27880},{5600,-27880},{5660,-27880},{5720,-27880},{5780,-27880},{5840,-27880},{5900,-27860},{5960,-27860},{6020,-27860},{6080,-27860},{6140,-27860},{6200,-27860},{6260,-27860},{6320,-27860},{6380,-27860},{6440,-27860},{6500,-27860},{6560,-27860},{6620,-27860},{6680,-27860},{6740,-27860},{6800,-27860},{6860,-27860},{6920,-27860},{6980,-27860},{7040,-27860},{7100,-27840},{7160,-27840},{7220,-27840},{7280,-27840},{7340,-27820},{7400,-27820},{7460,-27820},{7520,-27800},{7580,-27800},{7640,-27780},{7700,-27780},{7760,-27780},{7820,-27760},{7880,-27760},{7940,-27760},{8000,-27740},{8060,-27740},{8120,-27720},{8180,-27720},{8240,-27720},{8300,-27700},{8360,-27700},{8420,-27680},{8480,-27680},{8540,-27680},{8600,-27660},{8660,-27660},{8720,-27660},{8780,-27640},{8840,-27640},{8900,-27620},{8960,-27620},{9020,-27620},{9080,-27600},{9140,-27600},{9200,-27600},{9260,-27580},{9320,-27580},{9380,-27560},{9440,-27560},{9500,-27560},{9560,-27540},{9620,-27540},{9680,-27520},{9740,-27520},{9800,-27500},{9860,-27500},{9920,-27480},{9980,-27460},{10040,-27460},{10100,-27440},{10160,-27420},{10220,-27400},{10280,-27400},{10340,-27380},{10400,-27360},{10460,-27360},{10520,-27340},{10580,-27320},{10640,-27300},{10700,-27300},{10760,-27280},{10820,-27260},{10880,-27260},{10940,-27240},{11000,-27220},{11060,-27200},{11120,-27200},{11180,-27180},{11240,-27160},{11300,-27160},{11360,-27140},{11420,-27120},{11480,-27100},{11540,-27100},{11600,-27080},{11660,-27060},{11720,-27060},{11780,-27040},{11840,-27020},{11900,-27000},{11960,-27000},{12020,-26980},{12080,-26960},{12140,-26960},{12200,-26940},{12260,-26920},{12320,-26900},{12380,-26900},{12440,-26880},{12500,-26860},{12560,-26840},{12620,-26840},{12680,-26820},{12740,-26800},{12800,-26800},{12860,-26780},{12920,-26760},{12980,-26740},{13040,-26740},{13100,-26720},{13160,-26700},{13220,-26680},{13280,-26680},{13340,-26660},{13400,-26640},{13460,-26640},{13520,-26620},{13580,-26600},{13640,-26580},{13700,-26580},{13760,-26560},{13820,-26540},{13880,-26520},{13940,-26520},{14000,-26500},{14060,-26480},{14120,-26460},{14180,-26460},{14240,-26440},{14300,-26420},{14360,-26420},{14420,-26400},{14480,-26380},{14540,-26360},{14600,-26360},{14660,-26340},{14720,-26320},{14780,-26300},{14840,-26300},{14900,-26280},{14960,-26260},{15020,-26240},{15080,-26240},{15140,-26220},{15200,-26200},{15260,-26200},{15320,-26180},{15380,-26160},{15440,-26140},{15500,-26140},{15560,-26120},{15620,-26100},{15680,-26080},{15740,-26080},{15800,-26060},{15860,-26040},{15920,-26040},{15980,-26020},{16040,-26000},{16100,-25980},{16160,-25980},{16220,-25960},{16280,-25940},{16340,-25920},{16400,-25920},{16460,-25900},{16520,-25880},{16580,-25860},{16640,-25860},{16700,-25840},{16760,-25820},{16820,-25800},{16880,-25780},{16940,-25760},{17000,-25720},{17060,-25700},{17120,-25680},{17180,-25660},{17240,-25620},{17300,-25600},{17360,-25580},{17420,-25560},{17480,-25520},{17540,-25500},{17600,-25480},{17660,-25460},{17720,-25420},{17780,-25400},{17840,-25380},{17900,-25360},{17960,-25320},{18020,-25300},{18080,-25280},{18140,-25240},{18200,-25220},{18260,-25200},{18320,-25180},{18380,-25140},{18440,-25120},{18500,-25100},{18560,-25080},{18620,-25040},{18680,-25020},{18740,-25000},{18800,-24980},{18860,-24940},{18920,-24920},{18980,-24900},{19040,-24880},{19100,-24840},{19160,-24820},{19220,-24800},{19280,-24780},{19340,-24740},{19400,-24720},{19460,-24700},{19520,-24660},{19580,-24640},{19640,-24620},{19700,-24600},{19760,-24560},{19820,-24540},{19880,-24520},{19940,-24500},{20000,-24460},{20060,-24440},{20120,-24420},{20180,-24400},{20240,-24360},{20300,-24340},{20360,-24320},{20420,-24300},{20480,-24260},{20540,-24240},{20600,-24220},{20660,-24180},{20720,-24160},{20780,-24140},{20840,-24120},{20900,-24080},{20960,-24060},{21020,-24040},{21080,-24020},{21140,-23980},{21200,-23960},{21260,-23940},{21320,-23920},{21380,-23880},{21440,-23860},{21500,-23840},{21560,-23820},{21620,-23780},{21680,-23760},{21740,-23740},{21800,-23720},{21860,-23680},{21920,-23660},{21980,-23640},{22040,-23620},{22100,-23600},{22160,-23580},{22220,-23560},{22280,-23540},{22340,-23520},{22400,-23500},{22460,-23460},{22520,-23440},{22580,-23420},{22640,-23400},{22700,-23380},{22760,-23360},{22820,-23340},{22880,-23320},{22940,-23300},{23000,-23260},{23060,-23240},{23120,-23220},{23180,-23200},{23240,-23180},{23300,-23160},{23360,-23140},{23420,-23120},{23480,-23100},{23540,-23080},{23600,-23040},{23660,-23020},{23720,-23000},{23780,-22980},{23840,-22960},{23900,-22940},{23960,-22920},{24020,-22900},{24080,-22880},{24140,-22840},{24200,-22820},{24260,-22800},{24320,-22800},{24380,-22800},{24440,-22780},{24500,-22780},{24560,-22780},{24620,-22760},{24680,-22760},{24740,-22760},{24800,-22760},{24860,-22740},{24920,-22740},{24980,-22740},{25040,-22720},{25100,-22720},{25160,-22720},{25220,-22720},{25280,-22700},{25340,-22700},{25400,-22700},{25460,-22680},{25520,-22680},{25580,-22680},{25640,-22680},{25700,-22660},{25760,-22660},{25820,-22660},{25880,-22640},{25940,-22640},{26000,-22640},{26060,-22620},{26120,-22620},{26180,-22620},{26240,-22620},{26300,-22600},{26360,-22600},{26420,-22600},{26480,-22580},{26540,-22580},{26600,-22580},{26660,-22580},{26720,-22560},{26780,-22560},{26840,-22560},{26900,-22540},{26960,-22540},{27020,-22540},{27080,-22520},{27140,-22520},{27200,-22520},{27260,-22520},{27320,-22500},{27380,-22500},{27440,-22500},{27500,-22480},{27560,-22480},{27620,-22480},{27680,-22500},{27740,-22500},{27800,-22520},{27860,-22520},{27920,-22540},{27980,-22540},{28040,-22560},{28100,-22580},{28160,-22580},{28220,-22600},{28280,-22600},{28340,-22620},{28400,-22640},{28460,-22640},{28520,-22660},{28580,-22660},{28640,-22680},{28700,-22680},{28760,-22700},{28820,-22720},{28880,-22720},{28940,-22740},{29000,-22740},{29060,-22760},{29120,-22780},{29180,-22780},{29240,-22800},{29300,-22800},{29360,-22820},{29420,-22820},{29480,-22840},{29540,-22860},{29600,-22860},{29660,-22880},{29720,-22880},{29780,-22900},{29840,-22920},{29900,-22920},{29960,-22940},{30020,-22940},{30080,-22960},{30140,-22960},{30200,-22980},{30260,-23000},{30320,-23000},{30380,-23020},{30440,-23020},{30500,-23040},{30560,-23060},{30620,-23060},{30680,-23080},{30740,-23080},{30800,-23100},{30860,-23100},{30920,-23120},{30980,-23140},{31040,-23140},{31100,-23160},{31160,-23160},{31220,-23180},{31280,-23200},{31340,-23200},{31400,-23220},{31460,-23220},{31520,-23240},{31580,-23240},{31640,-23260},{31700,-23280},{31760,-23280},{31820,-23300},{31880,-23320},{31940,-23320},{32000,-23340},{32060,-23360},{32120,-23380},{32180,-23380},{32240,-23400},{32300,-23420},{32360,-23420},{32420,-23440},{32480,-23460},{32540,-23460},{32600,-23480},{32660,-23500},{32720,-23500},{32780,-23520},{32840,-23540},{32900,-23540},{32960,-23560},{33020,-23580},{33080,-23600},{33140,-23600},{33200,-23620},{33260,-23640},{33320,-23640},{33380,-23660},{33440,-23680},{33500,-23680},{33560,-23700},{33620,-23720},{33680,-23720},{33740,-23740},{33800,-23760},{33860,-23760},{33920,-23780},{33980,-23800},{34040,-23820},{34100,-23820},{34160,-23840},{34220,-23860},{34280,-23860},{34340,-23880},{34400,-23900},{34460,-23900},{34520,-23920},{34580,-23940},{34640,-23940},{34700,-23960},{34760,-23980},{34820,-23980},{34880,-24000},{34940,-24020},{35000,-24020},{35060,-24040},{35120,-24060},{35180,-24080},{35240,-24080},{35300,-24100},{35360,-24120},{35420,-24120},{35480,-24140},{35540,-24160},{35600,-24160},{35660,-24180},{35720,-24200},{35780,-24200},{35840,-24220},{35900,-24240},{35960,-24240},{36020,-24260},{36080,-24280},{36140,-24300},{36200,-24300},{36260,-24320},{36320,-24340},{36380,-24340},{36440,-24360},{36500,-24380},{36560,-24380},{36620,-24400},{36680,-24420},{36740,-24420},{36800,-24440},{36860,-24460},{36920,-24480},{36980,-24500},{37040,-24520},{37100,-24520},{37160,-24540},{37220,-24560},{37280,-24580},{37340,-24600},{37400,-24620},{37460,-24640},{37520,-24640},{37580,-24660},{37640,-24680},{37700,-24700},{37760,-24720},{37820,-24740},{37880,-24760},{37940,-24760},{38000,-24780},{38060,-24800},{38120,-24820},{38180,-24840},{38240,-24860},{38300,-24880},{38360,-24880},{38420,-24900},{38480,-24920},{38540,-24940},{38600,-24960},{38660,-24980},{38720,-25000},{38780,-25000},{38840,-25020},{38900,-25040},{38960,-25040},{39020,-25060},{39080,-25060},{39140,-25080},{39200,-25100},{39260,-25100},{39320,-25120},{39380,-25120},{39440,-25140},{39500,-25140},{39560,-25160},{39620,-25160},{39680,-25180},{39740,-25180},{39800,-25200},{39860,-25200},{39920,-25220},{39980,-25220},{40040,-25240},{40100,-25240},{40160,-25260},{40220,-25260},{40280,-25280},{40340,-25280},{40400,-25300},{40460,-25300},{40520,-25320},{40580,-25340},{40640,-25340},{40700,-25360},{40760,-25360},{40820,-25380},{40880,-25380},{40940,-25400},{41000,-25400},{41060,-25420},{41120,-25420},{41180,-25440},{41240,-25440},{41300,-25460},{41360,-25460},{41420,-25480},{41480,-25480},{41540,-25500},{41600,-25500},{41660,-25520},{41720,-25520},{41780,-25540},{41840,-25540},{41900,-25560},{41960,-25580},{42020,-25580},{42080,-25600},{42140,-25600},{42200,-25620},{42260,-25620},{42320,-25640},{42380,-25640},{42440,-25660},{42500,-25660},{42560,-25680},{42620,-25680},{42680,-25700},{42740,-25700},{42800,-25720},{42860,-25720},{42920,-25740},{42980,-25740},{43040,-25760},{43100,-25780},{43160,-25780},{43220,-25800},{43280,-25800},{43340,-25820},{43400,-25840},{43460,-25840},{43520,-25860},{43580,-25860},{43640,-25880},{43700,-25880},{43760,-25900},{43820,-25920},{43880,-25920},{43940,-25940},{44000,-25940},{44060,-25960},{44120,-25960},{44180,-25980},{44240,-26000},{44300,-26000},{44360,-26020},{44420,-26020},{44480,-26040},{44540,-26040},{44600,-26060},{44660,-26080},{44720,-26080},{44780,-26100},{44840,-26100},{44900,-26120},{44960,-26120},{45020,-26140},{45080,-26160},{45140,-26160},{45200,-26180},{45260,-26180},{45320,-26200},{45380,-26200},{45440,-26220},{45500,-26240},{45560,-26240},{45620,-26260},{45680,-26260},{45740,-26280},{45800,-26280},{45860,-26280},{45920,-26280},{45980,-26280},{46040,-26300},{46100,-26300},{46160,-26300},{46220,-26300},{46280,-26300},{46340,-26300},{46400,-26300},{46460,-26320},{46520,-26320},{46580,-26320},{46640,-26320},{46700,-26320},{46760,-26320},{46820,-26320},{46880,-26340},{46940,-26340},{47000,-26340},{47060,-26340},{47120,-26340},{47180,-26340},{47240,-26360},{47300,-26360},{47360,-26360},{47420,-26360},{47480,-26380},{47540,-26380},{47600,-26380},{47660,-26400},{47720,-26400},{47780,-26400},{47840,-26400},{47900,-26420},{47960,-26420},{48020,-26420},{48080,-26420},{48140,-26440},{48200,-26440},{48260,-26440},{48320,-26440},{48380,-26460},{48440,-26460},{48500,-26460},{48560,-26460},{48620,-26480},{48680,-26480},{48740,-26480},{48800,-26500},{48860,-26500},{48920,-26500},{48980,-26500},{49040,-26520},{49100,-26520},{49160,-26520},{49220,-26520},{49280,-26540},{49340,-26540},{49400,-26540},{49460,-26540},{49520,-26560},{49580,-26560},{49640,-26560},{49700,-26560},{49760,-26580},{49820,-26580},{49880,-26580},{49940,-26600},{50000,-26600},{50060,-26600},{50120,-26600},{50180,-26620},{50240,-26620},{50300,-26620},{50360,-26620},{50420,-26640},{50480,-26640},{50540,-26640},{50600,-26640},{50660,-26660},{50720,-26660},{50780,-26660},{50840,-26680},{50900,-26680},{50960,-26680},{51020,-26680},{51080,-26700},{51140,-26700},{51200,-26700},{51260,-26700},{51320,-26720},{51380,-26720},{51440,-26720},{51500,-26720},{51560,-26740},{51620,-26740},{51680,-26740},{51740,-26740},{51800,-26740},{51860,-26740},{51920,-26740},{51980,-26740},{52040,-26740},{52100,-26740},{52160,-26740},{52220,-26740},{52280,-26740},{52340,-26740},{52400,-26740},{52460,-26740},{52520,-26740},{52580,-26740},{52640,-26740},{52700,-26740},{52760,-26740},{52820,-26740},{52880,-26740},{52940,-26740},{53000,-26740},{53060,-26740},{53120,-26740},{53180,-26740},{53240,-26740},{53300,-26740},{53360,-26740},{53420,-26760},{53480,-26760},{53540,-26760},{53600,-26760},{53660,-26760},{53720,-26760},{53780,-26760},{53840,-26760},{53900,-26760},{53960,-26780},{54020,-26780},{54080,-26780},{54140,-26780},{54200,-26780},{54260,-26780},{54320,-26780},{54380,-26780},{54440,-26800},{54500,-26800},{54560,-26800},{54620,-26800},{54680,-26800},{54740,-26800},{54800,-26800},{54860,-26800},{54920,-26820},{54980,-26820},{55040,-26820},{55100,-26820},{55160,-26820},{55220,-26820},{55280,-26820},{55340,-26820},{55400,-26820},{55460,-26840},{55520,-26840},{55580,-26840},{55640,-26840},{55700,-26840},{55760,-26840},{55820,-26840},{55880,-26840},{55940,-26860},{56000,-26860},{56060,-26860},{56120,-26860},{56180,-26860},{56240,-26860},{56300,-26860},{56360,-26860},{56420,-26860},{56480,-26860},{56540,-26860},{56600,-26860},{56660,-26840},{56720,-26840},{56780,-26840},{56840,-26840},{56900,-26840},{56960,-26840},{57020,-26840},{57080,-26820},{57140,-26820},{57200,-26820},{57260,-26820},{57320,-26820},{57380,-26820},{57440,-26820},{57500,-26800},{57560,-26800},{57620,-26800},{57680,-26800},{57740,-26800},{57800,-26800},{57860,-26800},{57920,-26780},{57980,-26780},{58040,-26780},{58100,-26780},{58160,-26780},{58220,-26780},{58280,-26760},{58340,-26760},{58400,-26760},{58460,-26760},{58520,-26760},{58580,-26760},{58640,-26760},{58700,-26740},{58760,-26740},{58820,-26740},{58880,-26740},{58940,-26740},{59000,-26740},{59060,-26740},{59120,-26720},{59180,-26720},{59240,-26720},{59300,-26720},{59360,-26720},{59420,-26720},{59480,-26720},{59540,-26700},{59600,-26700},{59660,-26700},{59720,-26700},{59780,-26700},{59840,-26700},{59900,-26700},{59960,-26680},{60020,-26680},{60080,-26680},{60140,-26680},{60200,-26680},{60260,-26680},{60320,-26680},{60380,-26660},{60440,-26660},{60500,-26660},{60560,-26640},{60620,-26640},{60680,-26640},{60740,-26640},{60800,-26620},{60860,-26620},{60920,-26620},{60980,-26600},{61040,-26600},{61100,-26600},{61160,-26600},{61220,-26580},{61280,-26580},{61340,-26580},{61400,-26580},{61460,-26560},{61520,-26560},{61580,-26560},{61640,-26540},{61700,-26540},{61760,-26540},{61820,-26540},{61880,-26520},{61940,-26520},{62000,-26520},{62060,-26500},{62120,-26500},{62180,-26500},{62240,-26500},{62300,-26480},{62360,-26480},{62420,-26480},{62480,-26480},{62540,-26460},{62600,-26460},{62660,-26460},{62720,-26440},{62780,-26440},{62840,-26440},{62900,-26440},{62960,-26420},{63020,-26420},{63080,-26420},{63140,-26400},{63200,-26400},{63260,-26400},{63320,-26400},{63380,-26380},{63440,-26380},{63500,-26380},{63560,-26360},{63620,-26360},{63680,-26360},{63740,-26360},{63800,-26340},{63860,-26340},{63920,-26320},{63980,-26320},{64040,-26300},{64100,-26280},{64160,-26280},{64220,-26260},{64280,-26240},{64340,-26240},{64400,-26220},{64460,-26200},{64520,-26180},{64580,-26180},{64640,-26160},{64700,-26140},{64760,-26140},{64820,-26120},{64880,-26100},{64940,-26100},{65000,-26080},{65060,-26060},{65120,-26060},{65180,-26040},{65240,-26020},{65300,-26000},{65360,-26000},{65420,-25980},{65480,-25960},{65540,-25960},{65600,-25940},{65660,-25920},{65720,-25920},{65780,-25900},{65840,-25880},{65900,-25880},{65960,-25860},{66020,-25840},{66080,-25820},{66140,-25820},{66200,-25800},{66260,-25780},{66320,-25780},{66380,-25760},{66440,-25740},{66500,-25740},{66560,-25720},{66620,-25700},{66680,-25700},{66740,-25680},{66800,-25680},{66860,-25660},{66920,-25660},{66980,-25640},{67040,-25640},{67100,-25640},{67160,-25620},{67220,-25620},{67280,-25600},{67340,-25600},{67400,-25580},{67460,-25580},{67520,-25580},{67580,-25580},{67640,-25580},{67700,-25560},{67760,-25560},{67820,-25560},{67880,-25560},{67940,-25560},{68000,-25560},{68060,-25560},{68120,-25540},{68180,-25540},{68240,-25540},{68300,-25540},{68360,-25540},{68420,-25540},{68480,-25540},{68540,-25520},{68600,-25520},{68660,-25520},{68720,-25520},{68780,-25520},{68840,-25520},{68900,-25520},{68960,-25500},{69020,-25500},{69080,-25500},{69140,-25500},{69200,-25500},{69260,-25500},{69320,-25500},{69380,-25480},{69440,-25480},{69500,-25480},{69560,-25480},{69620,-25480},{69680,-25480},{69740,-25460},{69800,-25460},{69860,-25460},{69920,-25460},{69980,-25460},{70040,-25460},{70100,-25460},{70160,-25440},{70220,-25440},{70280,-25440},{70340,-25440},{70400,-25440},{70460,-25440},{70520,-25440},{70580,-25420},{70640,-25420},{70700,-25420},{70760,-25400},{70820,-25380},{70880,-25380},{70940,-25360},{71000,-25340},{71060,-25340},{71120,-25320},{71180,-25300},{71240,-25300},{71300,-25280},{71360,-25260},{71420,-25260},{71480,-25240},{71540,-25220},{71600,-25220},{71660,-25200},{71720,-25180},{71780,-25180},{71840,-25160},{71900,-25140},{71960,-25140},{72020,-25120},{72080,-25100},{72140,-25100},{72200,-25100},{72260,-25100},{72320,-25100}};
share|improve this question
    
Can you fit a line/polynomial curve to the data? –  s0rce Jul 3 '13 at 15:11
    
You can, but there are too many interfaces of unexpected shapes, you may have to fit each one individually, so I guess it might not be very efficient. –  yanfyon Jul 3 '13 at 15:15
    
Isn't this a domain specific problem though and not really about Mathematica? You need an algorithm/resampling/fitting approach that works and makes sense for your application... the use of Mathematica is rather accidental here. Perhaps Signal Processing or Physics might be better avenues? –  rm -rf Jul 3 '13 at 15:32
    
I am using Mathematica to do the programming, maybe Mathematica has some special and simple mathematical functions to tackle this problem? –  yanfyon Jul 3 '13 at 15:40
    
Have you tried things like Show[ListPlot@curve, ListPlot[Mean /@ GatherBy[curve, #[[2]] &], Joined -> True]]? –  belisarius Jul 3 '13 at 15:41

3 Answers 3

What about:

ListLinePlot[Mean /@ Split[curve2, Last[#1] === Last[#2] &]]

Works fine for both datasets.

share|improve this answer
    
Great!!!!!!!!!!!! Thanks a lot, shrx. To be perfect, in case the flat section is very long, that is, the interface is truly flat(like the last plateau shown on the plot), slight adaption might be needed. –  yanfyon Jul 3 '13 at 20:46

For example:

Show[ListPlot@curve, ListPlot[Mean /@ GatherBy[curve, Last], Joined -> True]]

Mathematica graphics

share|improve this answer
    
This is still not perfect, I tried it on other interfaces with undulations, the result is a mess. –  yanfyon Jul 3 '13 at 16:20
1  
@yanfyon Instead of making us blindly chase your "hidden goals", why don't you be upfront and also share a dataset with your undulations and what you consider to be a "good result"? If the goodness of the result depends on the output of another function, then please include that as well. Instead, being a blackbox and simply saying that the "result is a mess" is unhelpful for those that are trying to help you. –  rm -rf Jul 3 '13 at 16:26
    
Sorry, I add another interface with undulations, if the method works on both interfaces, then it works. Thanks a lot for all of your efforts. –  yanfyon Jul 3 '13 at 16:29
    
@yanfyon Your second curve shows completely different features. It's another kind of problem –  belisarius Jul 3 '13 at 16:39
    
Actually, if magnified and look in detail, the second curve has same kind of step artificials somewhere as the first curve. –  yanfyon Jul 3 '13 at 16:41

Personally I like the long flat plateau be partially kept because it might be true flatness, so I like this result better(blue curve is by shrx's way, red curve is my "improvement"):

enter image description here

Here is my code referring to shrx's answer: (I don't like the do loop, how can it be avoided?)

temp1 = Split[curve3, Last[#1] === Last[#2] &];
temp2 = {};
Do[ If[Length@temp1[[i]] > 50, 
  temp2 = Join[temp2, Partition[temp1[[i]], 30]], 
  temp2 = Join[temp2, {temp1[[i]]}]], {i, 1, Length@temp1}]
ListLinePlot[Mean /@ temp2, PlotStyle -> Red];
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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