auviewer.project module
Class and related functionality for projects.
- class auviewer.project.Project(projectModel, processNewFiles=True)[source]
Bases:
objectRepresents an auviewer project.
The project name should also be the directory name in the projects directory.
- createPatternSet(name, description=None, showByDefault=True)[source]
Create and return a new pattern set. :return: a new PatternSet instance
- Parameters:
name (str)
showByDefault (bool)
- Return type:
- detectPatterns(type, series, thresholdlow, thresholdhigh, duration, persistence, maxgap, expected_frequency=0, min_density=0, drop_values_below=None, drop_values_above=None, drop_values_between=None)[source]
Run pattern detection on all files, and return a DataFrame of results. This DataFrame, or a subset thereof, can be passed into PatternSet.addPatterns() if desired.
- getAnnotations(annotation_id=None, file_id=None, pattern_id=None, pattern_set_id=None, series=None, user_id=None)[source]
Returns a dataframe of annotations for this project, optionally filtered.
- Parameters:
annotation_id (int | List[int] | None)
file_id (int | List[int] | None)
pattern_id (int | List[int] | None)
pattern_set_id (int | List[int] | None)
series (AnyStr | List | None)
user_id (int | List[int] | None)
- Return type:
DataFrame
- getAnnotationsOutput(user_id)[source]
Returns a list of user’s annotations for all files in the project
- Parameters:
user_id (int)
- getPatternSet(id)[source]
Get project’s pattern set by ID. :return: the PatternSet instance belonging to the id, or None if not found
- Return type:
PatternSet | None
- getPatternSets()[source]
Get project’s pattern sets. :return: a dict of the project’s PatternSet instances, indexed by id
- Return type:
Dict[int, PatternSet]
- getPatterns(file_id=None, pattern_id=None, pattern_set_id=None, series=None, user_id=None)[source]
Returns a dataframe of patterns for this project, optionally filtered.
- Parameters:
file_id (int | List[int] | None)
pattern_id (int | List[int] | None)
pattern_set_id (int | List[int] | None)
series (AnyStr | List | None)
user_id (int | List[int] | None)
- Return type:
DataFrame
- getTotalPatternCount()[source]
Get total count of patterns in all the project’s pattern sets :return: number of patterns
- Return type:
int
- listFiles()[source]
Returns list of files for the project (ID, filename, file path, downsample path). :return: list of lists
- Return type:
List[List[str]]
- listPatternSets()[source]
Returns list of pattern sets (ID, names). :return: list of l:return:
- Return type:
List[List[str]]