trace – Automatically delete some particular members from a list

Suppose we have a function $ f (x) $. We are going to make a list of the form: $ { {x_1, f (x_1) }, {x_2, f (x_2) }, …, {x_n, f (x_n) } } $.

Due to the singularities, there may be some points for which $ f (x) $ It becomes complex, undefined, or by two nearby. $ x_i $s the value of $ f (x_i) $ is much smaller or much larger than $ f (x_ {i + 1}) $ Y $ f (x_ {i-1}) $ (For example, yes $ x_i-x_ {i-1} = 0.01 $ $ f (x_ {i}) = n f (x_ {i-1}) $ where $ n = 0.1 $ or $ 10 $. But I know that $ f (x_i) approx frac {f (x_ {i + 1}) – f (x_ {i-1})} {2} $ or a value not too far from this value. I need a code that eliminates all the members of the list for which $ f (x) $ it becomes complex, undefined, $ f (x_i) ll frac {f (x_ {i + 1}) – f (x_ {i-1})} {2} $ or $ f (x_i) gg frac {f (x_ {i + 1}) – f (x_ {i-1})} {2} $.

In particular, I have the following problem (I used a special package that directly recognizes * as the complex conjugate). First we give an initial value for $ G $, but at the end of the code a new $ G $ It is defined, and thus, for later times. $ t $ a new $ G $ It will be used. Instead of "for loop", I used "Table". To avoid the accumulation of errors, I used "Chop" after each definition. In spite of that, the exit is not acceptable. If I can eliminate the points mentioned above, I think I can get an acceptable graph.

Necessarily["Quantum`Notation`"];

[CapitalGamma] = 0.3;
n = 30; m = 5; G = 0.28;
points = table[[CapitalDelta] = G - [CapitalGamma]; [Omega] =
Sqrt[-4+G^2+2G[-4+G^2+2G[-4+G^2+2G[-4+G^2+2G[CapitalGamma] + [CapitalGamma]^ 2];
r11 = ((E ^ (
t [CapitalDelta])) ([Omega] Pound

The
t [Omega]]+ (G + [CapitalGamma]) Sinh

The
t [Omega]])) / [Omega] // Chop;
u11 = ((E ^ (
t [CapitalDelta])) (SuperStar[[[[[Omega]]Pound[tSuperStar[[tSuperStar[[tSuperStar[[tSuperStar[[Omega]]]+ (G + [CapitalGamma]) Sinh

The
t SuperStar[[[[[Omega]]]))/Superstar[[[[[Omega]]// Chop;
r12 = - ((2 I (E ^ (t [CapitalDelta])) Sinh[t[t[t[t[Omega]]) / [Omega]) //
Chop;
u12 = (2 I (E ^ (t [CapitalDelta])) Sinh[tSuperStar[[tSuperStar[[tSuperStar[[tSuperStar[[Omega]]]) /
Superstar[[[[[Omega]]// Chop;
r21 = - ((2 I (E ^ (t [CapitalDelta])) Sinh[t[t[t[t[Omega]]) / [Omega]) //
Chop;
u21 = (2 I (E ^ (t [CapitalDelta])) Sinh[tSuperStar[[tSuperStar[[tSuperStar[[tSuperStar[[Omega]]]) /
Superstar[[[[[Omega]]// Chop;
r22 = ((E ^ (
t [CapitalDelta])) ([Omega] Pound

The
t [Omega]]+ (-G - [CapitalGamma]) Sinh

The
t [Omega]])) / [Omega] // Chop;
u22 = ((E ^ (
t [CapitalDelta])) (SuperStar[[[[[Omega]]Pound[tSuperStar[[tSuperStar[[tSuperStar[[tSuperStar[[Omega]]]+ (-G - [CapitalGamma]) Sinh

The
t SuperStar[[[[[Omega]]]))/Superstar[[[[[Omega]]// Chop;
s11 = ((
E ^ (t ([CapitalDelta] - [Omega]) -
you ([CapitalDelta] - [Omega])) (-G - [CapitalGamma] + 
[Omega])) / (two [Omega]) + (
E ^ (t ([CapitalDelta] + [Omega]) -
you ([CapitalDelta] + [Omega])) (G + [CapitalGamma] + 
[Omega])) / (two [Omega])) // Chop ;
v11 = ((
E ^ (t ([CapitalDelta] - SuperStar[[[[[Omega]]) -
you ([CapitalDelta] -
Superstar[[[[[Omega]])) (-G - [CapitalGamma] +
Superstar[[[[[Omega]])) / (2 SuperStar)[[[[[Omega]]) + (
E ^ (t ([CapitalDelta] + SuperStar[[[[[Omega]]) -
you ([CapitalDelta] +
Superstar[[[[[Omega]])) (G + [CapitalGamma] +
Superstar[[[[[Omega]])) / (2 SuperStar)[[[[[Omega]])) // Chop;
s12 = ((
I (E ^ (t ([CapitalDelta] - [Omega]) -
you ([CapitalDelta] - [Omega])))) / [Omega] -
I (e ^ (
t ([CapitalDelta] + [Omega]) -
you ([CapitalDelta] + [Omega])))) / [Omega]) // Chop;
v12 = - ((
I (E ^ (t ([CapitalDelta] - SuperStar[[[[[Omega]]) -
you ([CapitalDelta] - SuperStar[[[[[Omega]])))) /
Superstar[[[[[Omega]]-
I (E ^ (t ([CapitalDelta] + SuperStar[[[[[Omega]]) -
you ([CapitalDelta] + SuperStar[[[[[Omega]])))) /
Superstar[[[[[Omega]]) // Chop;
s21 = ((
I E ^ (t ([CapitalDelta] - [Omega]) -
you ([CapitalDelta] - [Omega]))) / [Omega] -
I E ^ (t ([CapitalDelta] + [Omega]) -
you ([CapitalDelta] + [Omega]))) / [Omega]) // Chop;
v21 = - ((
I E ^ (t ([CapitalDelta] - SuperStar[[[[[Omega]]) -
you ([CapitalDelta] - SuperStar[[[[[Omega]]))) /
Superstar[[[[[Omega]]-
I E ^ (t ([CapitalDelta] + SuperStar[[[[[Omega]]) -
you ([CapitalDelta] + SuperStar[[[[[Omega]]))) /
Superstar[[[[[Omega]]) // Chop;
s22 = ((
E ^ (t ([CapitalDelta] + [Omega]) -
you ([CapitalDelta] + [Omega])) (-G - [CapitalGamma] + 
[Omega])) / (two [Omega]) + (
E ^ (t ([CapitalDelta] - [Omega]) -
you ([CapitalDelta] - [Omega])) (G + [CapitalGamma] + 
[Omega])) / (two [Omega])) // Chop ;
v22 = ((
E ^ (t ([CapitalDelta] + SuperStar[[[[[Omega]]) -
you ([CapitalDelta] +
Superstar[[[[[Omega]])) (-G - [CapitalGamma] +
Superstar[[[[[Omega]])) / (2 SuperStar)[[[[[Omega]]) + (
E ^ (t ([CapitalDelta] - SuperStar[[[[[Omega]]) -
you ([CapitalDelta] -
Superstar[[[[[Omega]])) (G + [CapitalGamma] +
Superstar[[[[[Omega]])) / (2 SuperStar)[[[[[Omega]])) // Chop;
A = (r21 u11 n + r22 u12 m +
To integrate[s21 v11, {u, 0, t}] ) (r11 u21 n + r12 u22 m +
To integrate[s11 v21 , {u, 0, t}]) // Chop;
Ia = r11 u11 n + r12 u12 m + Integrate[s11 v11 , {u, 0, t}] // Chop;
Ib = r21 u21 n + r22 u22 m + Integrate[s21 v21, {u, 0, t}] // Chop;
g2 = A / (Ia Ib) // Chop;

G = 2 / (1 + Ia / 5) // Chop;
{{t, g2}, {t, G}}, {t, 0, 10, .02}];
g2points = Map[First, points];
gpoints = Map[Last, points];

ListLinePlot [ g2points, GridLines -> None, 
PlotStyle -> {Red, Thickness[.007]}
FrameLabel -> {Style["Jt", FontSlant -> Italic],
"!  ( * SubscriptBox[(A), (a, b)]) "},
FrameTicksStyle -> {Directive[Black, 14]directive[Black, 14]}
LabelStyle -> {Bold, Directive[Black, 20]}, Marco -> True,
PlotRange -> {{0, 10}, {0, 1}}]