Here is a script that uses the Summary Platform to find the unique combinations of Col, Row, ID and Scan Number. It also uses a little trick to find the Maximum deviation from zero value for the OffssetX column. However, it is not finding a consistent number of rows for the unique combinations.
txnelson_0-1690138874973.png
Names Default To Here( 1 );
dt = Data Table( "raw data-start" );
Data Table( "raw data-start" ) << Summary(
Group( :Col, :Row, :ID, :Scan Number ),
Min( :OffsetX ),
Max( Transform Column( "Abs OffsetX", Formula( Abs( :OffsetX ) ) ) ),
Freq( "None" ),
Weight( "None" ),
Link to Original Data Table( 0 ),
statistics column name format( "column" )
);
For Each Row(
If( :OffsetX > 0 & Abs( :OffsetX ) < :Abs OffsetX,
:OffsetX = :Abs OffsetX
)
);
// dt << delete columns( :Abs OffsetX );
Jim