Module azcam.tools.testers.defects
Classes
class Defects
-
Find and quantify image azcam.db.tools["defects"].
Args
tool_id
- name used to reference the tool (controller, display, …)
description
- description of this tool
Ancestors
Instance variables
var data_file
-
Inherited from:
Tester
.data_file
output data file
var description
-
Inherited from:
Tester
.description
descriptive tool name
var enabled
-
Inherited from:
Tester
.enabled
1 when tool is enabled
var initialized
-
Inherited from:
Tester
.initialized
1 when tool has been initialized
var is_reset
-
Inherited from:
Tester
.is_reset
1 when tool has been reset
var report_file
-
Inherited from:
Tester
.report_file
output report file
var tool_id
-
Inherited from:
Tester
.tool_id
name used to reference the tool ("controller", "display", …)
var verbosity
-
Inherited from:
Tester
.verbosity
verbosity for debug, >0 is more verbose
Methods
def acquire(self)
-
Inherited from:
Tester
.acquire
Acquire data.
def analyze(self)
-
Find dark defects in a flat/superflat image.
def analyze_bright_defects(self)
-
Find bright defects in dark signal image.
def analyze_dark_defects(self)
-
Find dark defects in a flat/superflat image.
def copy_data_files(self, folder='')
-
Copy data files to proper report folder.
def find_section(self, x_coord, y_coord, num_sections_vertical, num_sections_horizontal, vertical_pixels, horizontal_pixels)
-
Find the section the group of bad pixels resides in based off a coordinate in the group. Can be used for any number of horizontal and vertical sections.
def get_defect_coords(self, mask_in)
-
Get the coordinates [col,row] of defects, not including edge mask.
def initialize(self) ‑> None
-
Inherited from:
Tester
.initialize
Initialize the tool.
def make_bright_defects_report(self)
-
Write bright defects report file.
def make_dark_defects_report(self)
-
Write dark defects report file.
def make_defects_mask(self)
-
Create a single mask from Edge Mask, Bright mask, and Dark mask. Execute AFTER dark and bright defects are found.
def make_edge_mask(self, ImageBuffer, edge_size=-1)
-
Creates a mask the size of ImageBuffer which has its edges masked to 0. The mask is a numpy array filled with bools. Inp: edge_size (or self.edge_size) is the integer number of pixels closest to edge to mask. Out: .edge_mask is the numpy array.
def make_mdfile(self, md_file, lines=[])
-
Inherited from:
Tester
.make_mdfile
Create a markdown file from lines.
def make_rstfile(self, rst_file, lines=[])
-
Inherited from:
Tester
.make_rstfile
Create an RST file from lines.
def md2pdf(self, filename, options=[], create_html=False)
-
Create a PDF from a markdown file. Filename extension is optional. Optionally also create an html file.
def merge_pdf(self, input_files=[], output_file='combined.pdf')
-
Inherited from:
Tester
.merge_pdf
Merge multiple PDF files into one.
def parse_files(self)
-
Inherited from:
Tester
.parse_files
Parse image set to create file information dict.
def plot_defects_mask(self)
-
Plot the defective pixel mask.
def read_datafile(self, filename='default')
-
Inherited from:
Tester
.read_datafile
Read data file and set tool as valid.
def read_defects_mask(self, filename='')
-
Read a defects mask (FITS format).
def report(self)
-
Write defects report file for Bright and Dark. Run only after all analysis has been completed.
def reset(self) ‑> None
-
Reset the tool.
def rst2pdf(self, filename, options=[])
-
Inherited from:
Tester
.rst2pdf
Create a PDF from an RST file. Filename extension is optional. Also create an html file (currently required).
def write_datafile(self)
-
Inherited from:
Tester
.write_datafile
Write data file as a json dump …
def write_report(self, report_file, lines=[])
-
Inherited from:
Tester
.write_report
Create report file.