slitflow.setreqs module

This module includes functions used in the set_reqs method of the Data class. The required data must be sorted to align the correspondence between the data.

fit_1to0(reqs)[source]

Keep reqs[0] data even that doesn’t contain in reqs[1].

This function can be used to render movies with trajectories that some frames doesn’t contain any trajectories.

Parameters:

reqs (list) – List of required data with any data type.

Returns:

List of selected required data

Return type:

list

copy_1to0(reqs)[source]

Sort reqs[1] according to the reqs[0] data structure.

This function can be used if reqs[0] is split into multiple files while reqs[1] is not. reqs[1] is selected to fit reqs[0] data.

Parameters:

reqs (list) – List of required data with any data type.

Returns:

List of selected required data

Return type:

list

and_2reqs(reqs)[source]

Drop elements that exist only in one required data.

Parameters:

reqs (list) – List of required data with any data type.

Returns:

List of selected required data

Return type:

list

set_cols(index)[source]

Return column names without _file and _split columns from index table.

Parameters:

index (pandas.DataFrame) – Index table.

Returns:

List of column names

Return type:

list of str

set_reqs_file_nos(reqs, split_depth)[source]

Get file numbers of required split data and save data.

Parameters:
  • reqs (list of Data) – List of split required data.

  • split_depth (int) – Split depth of result data.

Returns:

(reqs_file_nos, save_file_nos)

Return type:

tuple of list of int