I have an array of 101 matrices. Each matrix contains information like id, position (x,y,z), time etc about a collection of particles, looks like this
{{{9.*10^7, 1.13076*10^6, 0.56, 0.56, 1.05, 1.31518, 25.}, {3.33657*10^8,
1.23356*10^6, 0.91, 0.79, 3.98, 4.15844, 25.}, {2.21834*10^8,
2.42599*10^6, 0.08, 1.85, 2.56, 3.15951, 25.}, {1.02159*10^8,
1.33635*10^6, 0.19, 3.05, 1.27, 3.30931, 25.}, {1.11154*10^8,
1.08964*10^6, 0.24, 3., 1.37, 3.30674, 25.}, {2.49596*10^8,
1.0074*10^6, 0.17, 3.6, 2.94, 4.65108, 25.}, {1.33363*10^8,
1.15132*10^6, 1.38, 0.46, 1.57, 2.1403, 25.}, {1.60336*10^8,
2.15872*10^6, 1.75, 0.29, 1.9, 2.59935, 25.}, {1.63155*10^8,
1.02796*10^6, 1.73, 0.31, 1.91, 2.59559, 25.}, {5.755*10^7,
1.43915*10^6, 1.59, 1.51, 0.7, 2.30178, 25.}, {4.03166*10^8,
1.04852*10^6, 1.3, 3.73, 4.8, 6.21634, 25.}, {1.0938*10^8,
1.02796*10^6, 2.92, 2.19, 1.26, 3.86136, 25.}, {1.41208*10^8,
1.06908*10^6, 4.3, 0.22, 1.68, 4.62177, 25.}, {2.33642*10^8,
1.04852*10^6, 4.97, 1.82, 2.7, 5.94166, 25.}, {2.35328*10^8,
1.45971*10^6, 4.98, 1.81, 2.72, 5.95608, 25.}, {1.38724*10^8,
1.23356*10^6, 0.07, 3.05, 1.65, 3.46841, 25.}, {1.35352*10^8,
2.48767*10^6, 0.05, 3.08, 1.63, 3.48508, 25.}, {2.78341*10^8,
2.56991*10^6, 0.01, 4.15, 3.3, 5.30213, 25.}}, {{8.61278*10^7,
1.13076*10^6, 0.56, 0.56, 1.05, 1.31518, 25.1}, {3.33657*10^8,
1.23356*10^6, 0.91, 0.79, 3.97, 4.14887, 25.1}, {2.21834*10^8,
2.38487*10^6, 0.08, 1.85, 2.56, 3.15951, 25.1}, {1.02159*10^8,
1.33635*10^6, 0.19, 3.05, 1.27, 3.30931, 25.1}, {1.33363*10^8,
1.15132*10^6, 1.38, 0.46, 1.57, 2.1403, 25.1}, {1.60336*10^8,
1.93257*10^6, 1.75, 0.29, 1.9, 2.59935, 25.1}, {5.755*10^7,
1.41859*10^6, 1.59, 1.51, 0.7, 2.30178, 25.1}, {4.03166*10^8,
1.04852*10^6, 1.3, 3.73, 4.8, 6.21634, 25.1}, {1.0938*10^8,
1.0074*10^6, 2.92, 2.19, 1.26, 3.86136, 25.1}, {1.41208*10^8,
1.06908*10^6, 4.3, 0.22, 1.68, 4.62177, 25.1}, {2.33642*10^8,
1.04852*10^6, 4.97, 1.82, 2.7, 5.94166, 25.1}, {2.35328*10^8,
1.31579*10^6, 4.98, 1.81, 2.72, 5.95608, 25.1}, {1.38724*10^8,
1.23356*10^6, 0.07, 3.05, 1.65, 3.46841, 25.1}, {1.35352*10^8,
2.40543*10^6, 0.05, 3.08, 1.63, 3.48508, 25.1}, {2.78341*10^8,
2.52879*10^6, 0.01, 4.15, 3.3, 5.30213, 25.1}}, {{8.61278*10^7,
1.1102*10^6, 0.56, 0.56, 1.05, 1.31518, 25.2}, {3.33657*10^8,
1.23356*10^6, 0.91, 0.79, 3.97, 4.14887, 25.2}, {2.21834*10^8,
2.36431*10^6, 0.08, 1.85, 2.56, 3.15951, 25.2}, {1.02159*10^8,
1.31579*10^6, 0.19, 3.05, 1.27, 3.30931, 25.2}, {1.33363*10^8,
1.15132*10^6, 1.38, 0.46, 1.57, 2.1403, 25.2}, {1.60336*10^8,
1.93257*10^6, 1.75, 0.29, 1.9, 2.59935, 25.2}, {5.755*10^7,
1.41859*10^6, 1.59, 1.51, 0.7, 2.30178, 25.2}, {4.03166*10^8,
1.0074*10^6, 1.31, 3.73, 4.8, 6.21844, 25.2}, {1.41208*10^8,
1.06908*10^6, 4.3, 0.22, 1.68, 4.62177, 25.2}, {2.33642*10^8,
1.04852*10^6, 4.97, 1.82, 2.7, 5.94166, 25.2}, {2.35328*10^8,
1.29523*10^6, 4.98, 1.81, 2.72, 5.95608, 25.2}, {1.38724*10^8,
1.213*10^6, 0.07, 3.05, 1.65, 3.46841, 25.2}, {1.35352*10^8,
2.34376*10^6, 0.05, 3.08, 1.63, 3.48508, 25.2}, {2.78341*10^8,
2.50823*10^6, 0.01, 4.15, 3.3, 5.30213, 25.2}}, {{8.61278*10^7,
1.1102*10^6, 0.56, 0.56, 1.05, 1.31518, 25.3}, {3.33657*10^8,
1.13076*10^6, 0.91, 0.79, 3.97, 4.14887, 25.3}, {2.21834*10^8,
2.30264*10^6, 0.08, 1.85, 2.56, 3.15951, 25.3}, {1.02159*10^8,
1.31579*10^6, 0.19, 3.05, 1.27, 3.30931, 25.3}, {1.33363*10^8,
1.15132*10^6, 1.38, 0.46, 1.57, 2.1403, 25.3}, {1.60336*10^8,
1.89145*10^6, 1.75, 0.29, 1.9, 2.59935, 25.3}, {5.755*10^7,
1.41859*10^6, 1.59, 1.51, 0.7, 2.30178, 25.3}, {1.41208*10^8,
1.06908*10^6, 4.3, 0.22, 1.68, 4.62177, 25.3}, {2.33642*10^8,
1.04852*10^6, 4.97, 1.82, 2.7, 5.94166, 25.3}, {2.35328*10^8,
1.29523*10^6, 4.98, 1.81, 2.72, 5.95608, 25.3}, {1.38724*10^8,
1.19244*10^6, 0.07, 3.05, 1.65, 3.46841, 25.3}, {1.35352*10^8,
2.3232*10^6, 0.05, 3.08, 1.63, 3.48508, 25.3}, {2.78341*10^8,
2.46711*10^6, 0.01, 4.15, 3.3, 5.30213, 25.3}}, {{8.61278*10^7,
1.1102*10^6, 0.56, 0.56, 1.05, 1.31518, 25.4}, {2.21834*10^8,
2.15872*10^6, 0.08, 1.85, 2.56, 3.15951, 25.4}, {1.02159*10^8,
1.31579*10^6, 0.18, 3.05, 1.27, 3.30875, 25.4}, {1.33363*10^8,
1.15132*10^6, 1.38, 0.46, 1.57, 2.1403, 25.4}, {1.60336*10^8,
1.89145*10^6, 1.75, 0.29, 1.9, 2.59935, 25.4}, {5.755*10^7,
1.37747*10^6, 1.59, 1.51, 0.7, 2.30178, 25.4}, {1.41208*10^8,
1.06908*10^6, 4.3, 0.22, 1.68, 4.62177, 25.4}, {2.35328*10^8,
1.29523*10^6, 4.98, 1.81, 2.72, 5.95608, 25.4}, {1.38724*10^8,
1.15132*10^6, 0.07, 3.05, 1.65, 3.46841, 25.4}, {1.35352*10^8,
2.26152*10^6, 0.05, 3.08, 1.63, 3.48508, 25.4}, {2.78341*10^8,
2.38487*10^6, 0.01, 4.15, 3.3, 5.30213, 25.4}}, {{8.61278*10^7,
1.08964*10^6, 0.56, 0.56, 1.05, 1.31518, 25.5}, {2.21834*10^8,
2.13816*10^6, 0.08, 1.85, 2.56, 3.15951, 25.5}, {1.02159*10^8,
1.27467*10^6, 0.18, 3.05, 1.27, 3.30875, 25.5}, {1.33363*10^8,
1.15132*10^6, 1.38, 0.46, 1.57, 2.1403, 25.5}, {1.60336*10^8,
1.85033*10^6, 1.75, 0.29, 1.9, 2.59935, 25.5}, {5.755*10^7,
1.25411*10^6, 1.59, 1.51, 0.7, 2.30178, 25.5}, {1.41208*10^8,
1.02796*10^6, 4.3, 0.22, 1.68, 4.62177, 25.5}, {2.35328*10^8,
1.29523*10^6, 4.98, 1.81, 2.72, 5.95608, 25.5}, {1.38724*10^8,
1.13076*10^6, 0.07, 3.05, 1.65, 3.46841, 25.5}, {1.35352*10^8,
2.2204*10^6, 0.05, 3.08, 1.63, 3.48508, 25.5}, {2.78341*10^8,
2.36431*10^6, 0.01, 4.15, 3.3, 5.30213, 25.5}}, {{8.61278*10^7,
1.08964*10^6, 0.56, 0.56, 1.05, 1.31518, 25.6}, {2.21834*10^8,
2.09704*10^6, 0.08, 1.85, 2.56, 3.15951, 25.6}, {1.02159*10^8,
1.23356*10^6, 0.18, 3.05, 1.27, 3.30875, 25.6}, {1.33363*10^8,
1.15132*10^6, 1.38, 0.46, 1.57, 2.1403, 25.6}, {1.60336*10^8,
1.37747*10^6, 1.75, 0.28, 1.9, 2.59825, 25.6}, {5.755*10^7,
1.19244*10^6, 1.59, 1.52, 0.7, 2.30835, 25.6}, {1.41208*10^8,
1.02796*10^6, 4.3, 0.22, 1.68, 4.62177, 25.6}, {2.35328*10^8,
1.25411*10^6, 4.98, 1.81, 2.72, 5.95608, 25.6}, {1.38724*10^8,
1.13076*10^6, 0.07, 3.05, 1.65, 3.46841, 25.6}, {1.35352*10^8,
2.1176*10^6, 0.05, 3.08, 1.63, 3.48508, 25.6}, {2.78341*10^8,
2.28208*10^6, 0.01, 4.15, 3.3, 5.30213, 25.6}}, {{8.61278*10^7,
1.08964*10^6, 0.56, 0.56, 1.05, 1.31518, 25.7}, {2.21834*10^8,
2.01481*10^6, 0.08, 1.85, 2.56, 3.15951, 25.7}, {1.02159*10^8,
1.213*10^6, 0.18, 3.05, 1.27, 3.30875, 25.7}, {1.33363*10^8,
1.15132*10^6, 1.38, 0.46, 1.57, 2.1403, 25.7}, {1.60336*10^8,
1.33635*10^6, 1.75, 0.28, 1.9, 2.59825, 25.7}, {5.755*10^7,
1.15132*10^6, 1.59, 1.52, 0.7, 2.30835, 25.7}, {1.41208*10^8,
1.0074*10^6, 4.3, 0.22, 1.68, 4.62177, 25.7}, {2.35328*10^8,
1.213*10^6, 4.98, 1.81, 2.72, 5.95608, 25.7}, {1.38724*10^8,
1.06908*10^6, 0.07, 3.05, 1.65, 3.46841, 25.7}, {1.35352*10^8,
2.09704*10^6, 0.05, 3.08, 1.63, 3.48508, 25.7}, {2.78341*10^8,
2.26152*10^6, 0.01, 4.15, 3.3, 5.30213, 25.7}}, {{8.61278*10^7,
1.08964*10^6, 0.55, 0.56, 1.05, 1.31095, 25.8}, {2.21834*10^8,
1.99425*10^6, 0.08, 1.85, 2.56, 3.15951, 25.8}, {1.02159*10^8,
1.19244*10^6, 0.18, 3.05, 1.27, 3.30875, 25.8}, {1.33363*10^8,
1.13076*10^6, 1.38, 0.46, 1.57, 2.1403, 25.8}, {1.60336*10^8,
1.33635*10^6, 1.75, 0.28, 1.9, 2.59825, 25.8}, {5.755*10^7,
1.15132*10^6, 1.59, 1.52, 0.7, 2.30835, 25.8}, {1.41208*10^8,
1.0074*10^6, 4.29, 0.22, 1.68, 4.61247, 25.8}, {2.35328*10^8,
1.19244*10^6, 4.98, 1.81, 2.72, 5.95608, 25.8}, {1.38724*10^8,
1.06908*10^6, 0.07, 3.05, 1.65, 3.46841, 25.8}, {1.35352*10^8,
1.99425*10^6, 0.05, 3.08, 1.63, 3.48508, 25.8}, {2.78341*10^8,
2.19984*10^6, 0.01, 4.15, 3.3, 5.30213, 25.8}}, {{8.61278*10^7,
1.08964*10^6, 0.55, 0.56, 1.05, 1.31095, 25.9}, {2.21834*10^8,
1.97369*10^6, 0.08, 1.85, 2.56, 3.15951, 25.9}, {1.02159*10^8,
1.15132*10^6, 0.18, 3.05, 1.27, 3.30875, 25.9}, {1.33363*10^8,
1.13076*10^6, 1.38, 0.46, 1.57, 2.1403, 25.9}, {1.60336*10^8,
1.33635*10^6, 1.75, 0.28, 1.9, 2.59825, 25.9}, {5.755*10^7,
1.06908*10^6, 1.59, 1.52, 0.7, 2.30835, 25.9}, {1.41208*10^8,
1.0074*10^6, 4.29, 0.22, 1.68, 4.61247, 25.9}, {2.35328*10^8,
1.15132*10^6, 4.98, 1.81, 2.72, 5.95608, 25.9}, {1.38724*10^8,
1.0074*10^6, 0.07, 3.05, 1.65, 3.46841, 25.9}, {1.35352*10^8,
1.91201*10^6, 0.05, 3.08, 1.63, 3.48508, 25.9}, {2.78341*10^8,
2.1176*10^6, 0.01, 4.15, 3.3, 5.30213, 25.9}}, {{8.61278*10^7,
1.06908*10^6, 0.55, 0.56, 1.05, 1.31095, 26.}, {2.21834*10^8,
1.97369*10^6, 0.08, 1.85, 2.56, 3.15951, 26.}, {1.02159*10^8,
1.08964*10^6, 0.18, 3.05, 1.27, 3.30875, 26.}, {1.33363*10^8,
1.13076*10^6, 1.38, 0.46, 1.57, 2.1403, 26.}, {1.60336*10^8,
1.33635*10^6, 1.75, 0.28, 1.9, 2.59825, 26.}, {2.35328*10^8,
1.15132*10^6, 4.98, 1.81, 2.72, 5.95608, 26.}, {1.35352*10^8,
1.80921*10^6, 0.05, 3.08, 1.63, 3.48508, 26.}, {2.78341*10^8,
2.07648*10^6, 0.01, 4.15, 3.3, 5.30213, 26.}}, {{8.61278*10^7,
1.0074*10^6, 0.55, 0.56, 1.05, 1.31095, 26.1}, {2.21834*10^8,
1.97369*10^6, 0.08, 1.85, 2.56, 3.15951, 26.1}, {1.02159*10^8,
1.0074*10^6, 0.18, 3.05, 1.27, 3.30875, 26.1}, {1.33363*10^8,
1.08964*10^6, 1.38, 0.46, 1.57, 2.1403, 26.1}, {1.60336*10^8,
1.31579*10^6, 1.75, 0.28, 1.9, 2.59825, 26.1}, {2.35328*10^8,
1.15132*10^6, 4.98, 1.81, 2.72, 5.95608, 26.1}, {1.35352*10^8,
1.74754*10^6, 0.05, 3.08, 1.63, 3.48508, 26.1}, {2.78341*10^8,
2.07648*10^6, 0.01, 4.15, 3.3, 5.30213, 26.1}}, {{2.21834*10^8,
1.97369*10^6, 0.08, 1.85, 2.56, 3.15951, 26.2}, {1.33363*10^8,
1.06908*10^6, 1.38, 0.46, 1.57, 2.1403, 26.2}, {1.60336*10^8,
1.08964*10^6, 1.75, 0.28, 1.9, 2.59825, 26.2}, {2.35328*10^8,
1.15132*10^6, 4.98, 1.81, 2.72, 5.95608, 26.2}, {1.35352*10^8,
1.72698*10^6, 0.05, 3.08, 1.63, 3.48508, 26.2}, {2.78341*10^8,
2.07648*10^6, 0.01, 4.15, 3.3, 5.30213, 26.2}}, {{2.21834*10^8,
1.89145*10^6, 0.08, 1.85, 2.56, 3.15951, 26.3}, {1.33363*10^8,
1.06908*10^6, 1.38, 0.46, 1.57, 2.1403, 26.3}, {1.60336*10^8,
1.08964*10^6, 1.75, 0.28, 1.9, 2.59825, 26.3}, {2.35328*10^8,
1.15132*10^6, 4.98, 1.81, 2.72, 5.95608, 26.3}, {1.35352*10^8,
1.72698*10^6, 0.05, 3.08, 1.63, 3.48508, 26.3}, {2.78341*10^8,
2.07648*10^6, 0.01, 4.15, 3.3, 5.30213, 26.3}}, {{2.21834*10^8,
1.87089*10^6, 0.08, 1.85, 2.56, 3.15951, 26.4}, {1.33363*10^8,
1.04852*10^6, 1.38, 0.46, 1.57, 2.1403, 26.4}, {2.35328*10^8,
1.15132*10^6, 4.98, 1.81, 2.72, 5.95608, 26.4}, {1.35352*10^8,
1.62418*10^6, 0.05, 3.08, 1.63, 3.48508, 26.4}, {2.78341*10^8,
1.95313*10^6, 0.01, 4.15, 3.3, 5.30213, 26.4}}, {{2.21834*10^8,
1.87089*10^6, 0.08, 1.85, 2.56, 3.15951, 26.5}, {1.33363*10^8,
1.02796*10^6, 1.38, 0.46, 1.57, 2.1403, 26.5}, {2.35328*10^8,
1.15132*10^6, 4.98, 1.81, 2.72, 5.95608, 26.5}, {1.35352*10^8,
1.58306*10^6, 0.05, 3.08, 1.63, 3.48508, 26.5}, {2.78341*10^8,
1.93257*10^6, 0.01, 4.15, 3.3, 5.30213, 26.5}}, {{2.21834*10^8,
1.87089*10^6, 0.08, 1.85, 2.57, 3.16762, 26.6}, {1.33363*10^8,
1.02796*10^6, 1.38, 0.46, 1.57, 2.1403, 26.6}, {2.35328*10^8,
1.06908*10^6, 4.98, 1.81, 2.72, 5.95608, 26.6}, {1.35352*10^8,
1.58306*10^6, 0.05, 3.08, 1.63, 3.48508, 26.6}, {2.78341*10^8,
1.89145*10^6, 0.01, 4.15, 3.3, 5.30213, 26.6}}, {{2.21834*10^8,
1.87089*10^6, 0.08, 1.85, 2.57, 3.16762, 26.7}, {1.33363*10^8,
1.02796*10^6, 1.38, 0.46, 1.57, 2.1403, 26.7}, {2.35328*10^8,
1.06908*10^6, 4.98, 1.81, 2.72, 5.95608, 26.7}, {1.35352*10^8,
1.5625*10^6, 0.05, 3.08, 1.63, 3.48508, 26.7}, {2.78341*10^8,
1.89145*10^6, 0.01, 4.15, 3.3, 5.30213, 26.7}}, {{2.21834*10^8,
1.87089*10^6, 0.08, 1.85, 2.57, 3.16762, 26.8}, {1.33363*10^8,
1.02796*10^6, 1.38, 0.46, 1.57, 2.1403, 26.8}, {2.35328*10^8,
1.04852*10^6, 4.98, 1.81, 2.72, 5.95608, 26.8}, {1.35352*10^8,
1.5625*10^6, 0.05, 3.08, 1.63, 3.48508, 26.8}, {2.78341*10^8,
1.89145*10^6, 0.01, 4.14, 3.3, 5.29431, 26.8}}, {{2.21834*10^8,
1.87089*10^6, 0.08, 1.85, 2.57, 3.16762, 26.9}, {2.35328*10^8,
1.02796*10^6, 4.98, 1.81, 2.72, 5.95608, 26.9}, {1.35352*10^8,
1.25411*10^6, 0.05, 3.08, 1.63, 3.48508, 26.9}, {2.78341*10^8,
1.58306*10^6, 0.01, 4.15, 3.3, 5.30213, 26.9}}, {{2.21834*10^8,
1.87089*10^6, 0.08, 1.85, 2.57, 3.16762, 27.}, {1.35352*10^8,
1.17188*10^6, 0.05, 3.08, 1.63, 3.48508, 27.}, {2.78341*10^8,
1.58306*10^6, 0.01, 4.15, 3.3, 5.30213, 27.}}, {{2.21834*10^8,
1.87089*10^6, 0.08, 1.85, 2.57, 3.16762, 27.1}, {1.35352*10^8,
1.17188*10^6, 0.05, 3.08, 1.63, 3.48508, 27.1}, {2.78341*10^8,
1.43915*10^6, 0.01, 4.15, 3.3, 5.30213, 27.1}}, {{2.21834*10^8,
1.85033*10^6, 0.08, 1.85, 2.57, 3.16762, 27.2}, {1.35352*10^8,
1.17188*10^6, 0.05, 3.08, 1.63, 3.48508, 27.2}, {2.78341*10^8,
1.35691*10^6, 0.01, 4.15, 3.3, 5.30213, 27.2}}, {{2.21834*10^8,
1.82977*10^6, 0.08, 1.85, 2.57, 3.16762, 27.3}, {1.35352*10^8,
1.17188*10^6, 0.05, 3.08, 1.63, 3.48508, 27.3}, {2.78341*10^8,
1.33635*10^6, 0.01, 4.15, 3.3, 5.30213, 27.3}}, {{2.21834*10^8,
1.78866*10^6, 0.08, 1.85, 2.57, 3.16762, 27.4}, {1.35352*10^8,
1.15132*10^6, 0.04, 3.08, 1.63, 3.48495, 27.4}, {2.78341*10^8,
1.25411*10^6, 0.01, 4.15, 3.3, 5.30213, 27.4}}, {{2.21834*10^8,
1.60362*10^6, 0.08, 1.85, 2.57, 3.16762, 27.5}, {1.35352*10^8,
1.1102*10^6, 0.04, 3.08, 1.63, 3.48495, 27.5}, {2.78341*10^8,
1.25411*10^6, 0.01, 4.15, 3.3, 5.30213, 27.5}}, {{2.21834*10^8,
1.5625*10^6, 0.08, 1.85, 2.57, 3.16762, 27.6}, {1.35352*10^8,
1.06908*10^6, 0.04, 3.08, 1.63, 3.48495, 27.6}, {2.78341*10^8,
1.23356*10^6, 0.01, 4.15, 3.3, 5.30213, 27.6}}, {{2.21834*10^8,
1.52139*10^6, 0.08, 1.85, 2.57, 3.16762, 27.7}, {1.35352*10^8,
1.04852*10^6, 0.04, 3.08, 1.63, 3.48495, 27.7}, {2.78341*10^8,
1.15132*10^6, 0.01, 4.15, 3.3, 5.30213, 27.7}}, {{2.78341*10^8,
1.15132*10^6, 0.01, 4.15, 3.3, 5.30213, 27.8}}, {{2.78341*10^8,
1.15132*10^6, 0.01, 4.15, 3.3, 5.30213, 27.9}}, {{2.78341*10^8,
1.15132*10^6, 0.01, 4.15, 3.3, 5.30213, 28.}}, {{2.78341*10^8,
1.13076*10^6, 0.01, 4.15, 3.3, 5.30213, 28.1}}, {{2.78341*10^8,
1.08964*10^6, 0.01, 4.15, 3.3, 5.30213, 28.2}}}
The first column is the ID, 2nd its mass, 3,4,5th are its x,y,z coordinates and the last column is its time.
Each matrix is a snapshot of the system of particles at different time. I am trying to sort those particles whose inter-particle distance is never less than say 0.01 (in units of this output). With the help of this forum Modifying a list of matrices with conditional statement I was able to sort particles based on their interparticle distance being greater than 0.01 at each time, independent of their proximity during other time.
However, now I want to refine this further. I want to run a similar conditional sort to pick particles which "never" came closer to any other particle by more than a distance of 0.01. For this I would like to start at the earliest time and identify each particle with its halo id (1st column) which were at least at a distance of 0.01 from all other particle, if they were less than 0.01 apart, I ignore those particles from further sorting. This way I will make sure that at the end of sorting, I have only those particles at each time which never came closer to any other particle in its history.
How should I go about this?
EDIT: I should note that the particles can merge to form another particle. So let's say at time t1, there are two particles A and B, 0.01 apart, at t2, a third particle closes in on B. At t3, the third particle merges with B and retains the particle ID B. And let's also assume that A and B are still more than 0.01 apart. Now based on my previous sorting code, I would get 2 particles to be at least 0.01 apart, however in the new code, I want to exclude B as it did come in close proximity to another particle in its history.
{x,y,z}
as ID, time, etc. are irrelevant. (You could help us by posting just such minimal data.) $\endgroup$In[11]:= Length /@ data Out[11]= {18, 15, 14, 13, 11, 11, 11, 11, 11, 11, 8, 8, 6, 6, 5, 5, \ 5, 5, 5, 4, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1}
. But once the data is in a Dataset you can manage to calculate with this data quite easy. $\endgroup$