how to drop certain data points from a list

wo = 2*Pi*50;
tau = 5*Pi;
tstart = 0;
tend = 1;
numpts = 256;
tstep = (tend - tstart)/(numpts - 1);
function =
N[Table[{t,
Exp[-(I wo + tau + 5*\[Pi]) (t)] +
Random[NormalDistribution[0, .1]] +
I Random[NormalDistribution[0, .1]]}, {t, tstart, tend, tstep}]];

ListPlot[Re[function], PlotRange -> All, Joined -> True]

I want to selectively drop certain time points from the function. For example 10 points from t between 0.10 and 0.15 and drop 40 points from t between 0.60 and 0.80.

one way might be

ListPlot[Re[function], PlotRange -> All] newData  = DeleteCases[function,{t_,_}/;(0.1<t<0.15||0.6<t<0.8)];
ListPlot[Re[newData],PlotRange->All,Joined->True] • How do I specify the number of points which I want to delete. Like not delete all the points but some – tabby_kaur May 20 '18 at 6:37

Update:

How do I specify the number of points which I want to delete. Like not delete all the points but some.

tests = {.10 <= # <= .15 & , .6 <= # <= .8 &};
numberofpointstobedropped = {10, 40};
deleted = Join @@ Table[RandomSample[Position[function, _?(i[][#[]] &), {1},
Heads -> False], UpTo[i[]]], {i, Transpose[{tests, numberofpointstobedropped}]}];
dta = SplitBy[Delete[function, deleted], Or @@ Through @ tests @ #[] &];
ListPlot[Re @ dta,  Joined -> True] Length /@ {function, Join @@ dta}

{256, 206}

testF = .10 <= # <= .15 || .6 <= # <= .8 &;
dt = Select[SplitBy[function, testF @ #[]&],   Not @ testF @ #[[1, 1]] &];

ListPlot[Re @ dt,  Joined -> True] Use the option PlotStyle->ColorData[97, "ColorList"][] to get all three pieces in the same color: • How have you defined the number of points to be deleted. – tabby_kaur May 20 '18 at 6:27
• @tabby_kaur, please see the update. – kglr May 20 '18 at 7:18