Screening
Module with functions for generating and reading a screening pdf file.
make_screening_pdf(ds, plot_func, pdf_path='screening_pdf.pdf', pagesize=(900, 600))
Make a screening pdf where each page contains a plot, a check-box and a comment-box. Scaling the plot is still under development. Currently, the plot_func should produce a figure with figsize=(10., 5.8).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ds |
DataSet
|
DataSet object |
required |
plot_func |
Callable[[DataItem], None]
|
Function that takes a DataItem and generates a plot |
required |
pdf_path |
str
|
Path where pdf will be saved |
'screening_pdf.pdf'
|
pagesize |
Tuple[float, float]
|
Size of the pdf pages |
(900, 600)
|
Source code in paramaterial\screening.py
read_screening_pdf(ds, pdf_path)
Read the values from the checkbox and comment fields in the screening pdf and add them to the DataSet's info_table. The info_table will have two new columns: 'reject' and 'comment'. The 'reject' column will contain either 'True' or 'False'. The 'comment' column will contain the comment string entered into the comment field.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ds |
DataSet
|
DataSet object |
required |
pdf_path |
str
|
Path to screening pdf file |
required |
Source code in paramaterial\screening.py
remove_rejected_items(ds, reject_key='reject')
Remove DataItems from the DataSet that were marked as rejected in the screening pdf. DataItems will be removed if the value in the reject_key column of the ds.info_table is 'True'.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ds |
DataSet
|
DataSet object |
required |
reject_key |
str
|
Column name in the info_table that contains the reject values |
'reject'
|