frise package¶
Submodules¶
frise.ecriture_fichier module¶
This module provides functions for writing symptom data, symptom lists, and metadata to text files.
- Functions:
EcrireSymptome: Writes a single symptom to a file. EcrireListeSymptome: Writes a list of symptoms to a file. EcrireMetaData: Writes metadata to a file. format: Formats text data by replacing specified characters. ecrire_rapport: Writes a report with symptom details.
- frise.ecriture_fichier.EcrireListeSymptome(listeSymptome, nomfichier)¶
Writes a list of symptoms to a file.
- Parameters:
listeSymptome (list) – List of symptom objects to be written to the file.
nomfichier (str) – The path of the file to write to.
- Returns:
None
- frise.ecriture_fichier.EcrireMetaData(Meta, nomfichier)¶
Writes metadata to a file.
- Parameters:
Meta (
Matadata) – metadata information.nomfichier (str) – The path of the file to write to.
- Returns:
None
- frise.ecriture_fichier.EcrireSymptome(symptome, nomfichier)¶
Writes a single symptom to a file.
- Parameters:
symptome (
Symptome) – The symptom object to be written to the file.nomfichier (str) – The path of the file to write to.
- Returns:
None
- frise.ecriture_fichier.compute_duration(deb, fin)¶
Compute the duration between two time strings in seconds.
- Parameters:
deb (str) – Start time string in the format “hh:mm:ss”.
fin (str) – End time string in the format “hh:mm:ss”.
- Returns:
Total duration between the start and end time in seconds.
- Return type:
int
- frise.ecriture_fichier.ecrire_rapport(Symptom_list, filename)¶
Writes a report with symptom details to a file.
- Parameters:
Symptom_list (
listofSymptome) – List of symptom objects.filename (str) – The path of the file to write to.
- frise.ecriture_fichier.format(data, caracteres)¶
Formats text data by replacing specified characters.
- Parameters:
data (
listofstr) – List of text data to be formatted.caracteres (List) – List containing character replacement pairs.
- Returns:
Formatted text data.
- Return type:
listofstr
frise.fonctions_frise module¶
This module provides functions for visualizing a chronological timeline of symptoms.
- Functions:
chercherElt(list): Searches for a missing element in a list of integers. chevauchement(liste, symp, current_index, levels): Manages the visual overlapping of symptoms. on_text_click(event): Displays the annotation when the text is clicked. afficher_frise(liste): Displays the chronological timeline of symptoms.
- frise.fonctions_frise.afficher_frise(liste)¶
Displays the chronological timeline of symptoms.
- Parameters:
( (liste) – obj:list of :obj:list): List of symptoms where each element is a list [Name, start, end, Lateralization, seg corporel, orientation, additional attribute, Comment, tdeb_str, tfin_str].
- frise.fonctions_frise.chercherElt(list)¶
Searches for a missing element in a list of integers.
- Parameters:
list (list) – A list of integers.
- Returns:
The missing element in the list.
- Return type:
int
- frise.fonctions_frise.chevauchement(liste, symp, current_index, levels)¶
Manages the visual overlapping of symptoms.
- Parameters:
liste (list) – List of symptoms with start and end times.
symp (
Symptome) – Current symptom.current_index (int) – Index of the current symptom in the list.
levels (list) – List of levels.
- Returns:
The y-level where to display the rectangle.
- Return type:
int
- frise.fonctions_frise.on_text_click(event)¶
Displays the annotation when the text is clicked.
- Parameters:
event (matplotlib.backend_bases.MouseEvent) – The mouse event.
frise.save module¶
This file contains basic classes and functions for saving ‘.txt’ files and outputting timelines.
- Classes:
save: Class dedicated to saving files. MetaData_WD: Toplevel window for entering metadata.
- Functions:
None
- class frise.save.MetaData_WD(filename)¶
Bases:
CTkToplevelToplevel window for entering metadata.
- liste¶
List of symptoms to be saved.
- Type:
list
- filename¶
Path of the file to write to.
- Type:
string
- get_metadata(event)¶
Write a list of metadata in the form [real time, patient, practitioner].
- Parameters:
event (any) – Corresponds to writing in the text boxes.
- class frise.save.save(Liste_symptomes=[])¶
Bases:
objectClass dedicated to saving files.
- symptomes¶
List of symptoms to be saved
- Type:
list
- save()¶
Saves the symptoms to a file for reloading.
- Raises:
FileNotFoundError – Error message if failed to retrieve file path.
- set_symptomes(Liste_symptomes)¶
Updates the symptoms.
- Parameters:
Liste_symptomes (list) – List of symptoms
- write_report()¶
Writes a human-readable file.
- Raises:
FileNotFoundError – Error message if failed to retrieve file path.