asap.em_montage_qc package
Submodules
asap.em_montage_qc.detect_montage_defects module
- class asap.em_montage_qc.detect_montage_defects.DetectMontageDefectsModule(schema_type=None, *args, **kwargs)[source]
Bases:
RenderModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
DetectMontageDefectsParameters
- default_output_schema
alias of
DetectMontageDefectsParametersOutput
- default_schema
alias of
DetectMontageDefectsParameters
- asap.em_montage_qc.detect_montage_defects.detect_disconnected_tiles(render, prestitched_stack, poststitched_stack, z, pre_tilespecs=None, post_tilespecs=None)[source]
- asap.em_montage_qc.detect_montage_defects.detect_distortion(render, poststitched_stack, zvalue, threshold_cutoff=[0.005, 0.005], pool_size=20)[source]
- asap.em_montage_qc.detect_montage_defects.detect_seams(render, stack, match_collection, match_owner, z, residual_threshold=8, distance=60, min_cluster_size=15, tspecs=None)[source]
- asap.em_montage_qc.detect_montage_defects.detect_stitching_gaps(render, prestitched_stack, poststitched_stack, z, pre_tilespecs=None, tilespecs=None)[source]
- asap.em_montage_qc.detect_montage_defects.detect_stitching_mistakes(render, prestitched_stack, poststitched_stack, match_collection, match_collection_owner, threshold_cutoff, residual_threshold, neighbor_distance, min_cluster_size, zvalues, pool_size=20)[source]
asap.em_montage_qc.plots module
asap.em_montage_qc.schemas module
- class asap.em_montage_qc.schemas.DetectDistortionParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
RenderParameters
,ZValueParameters
,ProcessPoolParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
pool_size
no description
1
int
minZ
no description
NA
int
maxZ
no description
NA
int
z
no description
NA
int
zValues
no description
NA
int
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
render
parameters to connect to render server
(REQUIRED)
dict
input_stacks
List of input stacks
None
str
threshold_cutoff
Threshold for MAD cutoff in x and y
[0.005, 0.005]
float
- input_stacks
- match_collections = argschema.fields.List(
argschema.fields.Str, required=True, description=’List of montage point match collections’)
- match_collection_owners = argschema.fields.List(
argschema.fields.Str, required=False, default=None, missing=None, description=’List of the match collection owners’)
- opts = <marshmallow.schema.SchemaOpts object>
- threshold_cutoff
- num_threads = argschema.fields.Int(
required=False, default=20, description=’Number of parallel threads’)
@post_load def add_match_collection_owner(self, data):
- if data[‘match_collection_owners’] is None:
data[‘match_collection_owners’] = [data[‘render’][‘owner’]] * len(data[‘match_collections’])
- class asap.em_montage_qc.schemas.DetectDistortionParametersOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
DefaultSchema
key
description
default
field_type
json_type
distorted_sections
List of sections that are distorted
(REQUIRED)
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.em_montage_qc.schemas.DetectMontageDefectsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
RenderParameters
,ZValueParameters
,ProcessPoolParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
pool_size
no description
1
int
minZ
no description
NA
int
maxZ
no description
NA
int
z
no description
NA
int
zValues
no description
NA
int
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
render
parameters to connect to render server
(REQUIRED)
dict
prestitched_stack
Pre stitched stack (raw stack)
(REQUIRED)
str
poststitched_stack
Stitched montage stack
(REQUIRED)
str
match_collection
Name of the montage point match collection
NA
str
match_collection_owner
Name of the match collection owner
None
str
residual_threshold
threshold value to filter residuals for detecting seams (default = 4)
4
int
neighbors_distance
distance in pixels to look for neighboring points in seam detection (default = 60)
80
int
min_cluster_size
minimum number of point matches required in each cluster for taking it into account for seam detection (default = 7)
12
int
threshold_cutoff
Threshold for MAD cutoff in x and y
[0.005, 0.005]
float
plot_sections
Do you want to plot the sections with defects (holes or gaps)?. Will plot Bokeh plots in a html file
True
bool
out_html_dir
Folder to save the Bokeh plot defaults to /tmp directory
None
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.em_montage_qc.schemas.DetectMontageDefectsParametersOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
DefaultSchema
key
description
default
field_type
json_type
output_html
Output html file with Bokeh plots showing holes and stitching gaps
None
str
qc_passed_sections
List of sections that passed QC
(REQUIRED)
int
hole_sections
List of z values which failed QC and has holes
(REQUIRED)
int
gap_sections
List of z values which have stitching gaps
(REQUIRED)
int
seam_sections
List of z values which have seams detected
(REQUIRED)
int
seam_centroids
An array of (x,y) positions of seams for each section with seams
(REQUIRED)
?
distorted_sections
List of sections that are distorted
(REQUIRED)
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.em_montage_qc.schemas.RoughQCOutputSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
DefaultSchema
key
description
default
field_type
json_type
iou_plot
Pdf/html file showing IOU plots
(REQUIRED)
str
distortion_plot
Pdf/html file with distortion plots
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.em_montage_qc.schemas.RoughQCSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
render
parameters to connect to render server
(REQUIRED)
dict
input_downsampled_stack
Pre rough aligned downsampled stack
(REQUIRED)
str
output_downsampled_stack
Rough aligned stack name
(REQUIRED)
str
minZ
min z
(REQUIRED)
int
maxZ
max z
(REQUIRED)
int
pool_size
Pool size
10
int
output_dir
temp filename to save fig
None
str
out_file_format
Do you want the output to be bokeh plots in html (option = ‘html’) or pdf files for plots (option = ‘pdf’, default)
pdf
str
- opts = <marshmallow.schema.SchemaOpts object>