map2loop.sorter.SorterAgeBased#
- class map2loop.sorter.SorterAgeBased#
Bases:
Sorter
Sorter class which returns a sorted list of units based on the min and max ages of the units
Initialiser for age based sorter
- __init__()#
Initialiser for age based sorter
Methods
__init__
()Initialiser for age based sorter
sort
(units, unit_relationships, ...)Execute sorter method takes unit data, relationships and a hint and returns the sorted unit names based on this algorithm.
type
()Getter for subclass type label
- sort(units: DataFrame, unit_relationships: DataFrame, stratigraphic_order_hint: list, contacts: DataFrame, map_data: MapData) list #
Execute sorter method takes unit data, relationships and a hint and returns the sorted unit names based on this algorithm.
- Parameters:
units (pandas.DataFrame) – the data frame to sort
units_relationships (pandas.DataFrame) – the relationships between units
stratigraphic_order_hint (list) – a list of unit names to use as a hint to sorting the units
contacts (pandas.DataFrame) – unit contacts with length of the contacts in metres
map_data (map2loop.MapData) – a catchall so that access to all map data is available
- Returns:
list – the sorted unit names
- type()#
Getter for subclass type label
- Returns:
str – Name of subclass