GenerateDatasetReport package
Subpackages
Submodules
LOGS_solutions.GenerateDatasetReport.DatasetReportGenerator module
- class LOGS_solutions.GenerateDatasetReport.DatasetReportGenerator.DatasetReportGenerator(logs, dataset_id, target_path, param_category=None, excluded_tracks=[], separate_complex_plots=True)[source]
Bases:
object
Generates a Report of one datasets.
- generate_qr_code()[source]
Generates a QR code for the dataset. Used in the HTML report.
- Parameters:
dataset_id – The ID of the dataset for which the QR code should be generated.
- Return type:
Path
- get_base_url(api_url)[source]
Returns the URL of the dataset. :param api_url: The API-URL of the dataset.
- Return type:
str
- Returns:
The URL of the dataset.
- get_graph(dataset)[source]
Generates a list of images using matplotlib and a dictionary containing the counts of the tracks and their types. Images are returned in a form suitable for websites or other text-based environments (Base64-encoded).
- Parameters:
dataset (
Dataset
) – dataset of the trackprefix – first part of the file name
- Return type:
Tuple
[List
,Dict
[str
,int
]]- Returns:
Tuple with the list of images and a dictionary with the number of track types
- plot_image(track)[source]
Generates the image of one image track.
- Parameters:
track (
TrackImage
) – Image track- Return type:
Figure
- Returns:
The figure of the image.
- plot_matrix_real(track)[source]
Generates a Heatmap of one matrix track.
- Parameters:
track (
TrackMatrix
) – TrackMatrix track- Return type:
Figure
- Returns:
The figure of the heatmap.
- plot_table(track)[source]
Generates a table of one table track.
- Parameters:
track (
TrackTable
) – table track- Return type:
Figure
- Returns:
The figure of the table.
- plot_xy_complex(formatter_axis, track, sep_part=None)[source]
Generates a 1D plot of one XY_complex track.
- Parameters:
formatter_axis (
ScalarFormatter
) – ScalarFormatter of matplotlib for controlling the scaling and display of numerical values on the axes of a plot.track (
TrackXYComplex
) – XY_real tracksep_part (
Optional
[int
]) – 0 for real part, 1 for imaginary part, None for both parts
- Return type:
Figure
- Returns:
The figure of the plot.
- plot_xy_real(formatter_axis, track)[source]
Generates a 1D plot of one XY_real track.
- Parameters:
formatter_axis (
ScalarFormatter
) – ScalarFormatter of matplotlib for controlling the scaling and display of numerical values on the axes of a plot.track (
TrackXY
) – XY_real trackinvert_axes – If True, the axes will be inverted (both will be descending)
- Return type:
Figure
- Returns:
The figure of the plot.
- read_parameter_list(param_list, round_num=0, param_prev=None)[source]
Reads the parameter list and returns a dictionary with the parameters.
- Parameters:
param_list (
ParameterList
) – The parameter list to read.round_num (
int
) – The current round number, used for recursive calls.
- Return type:
Dict
[str
,Any
]- Returns:
A dictionary with the parameters.