Welcome to ASAP’s documentation!

README

Docs Code cov

ASAP-modules

ASAP is a set of modules to perform stitching and alignment of EM and Array tomography data. It is suitable for processing large-scale datasets and supports multiple computational environments.

Installation

Please refer the documentation Installation:Installation. on how to install and use ASAP modules

How to run

The order of processing is as follows;

  1. Lens distortion correction

  2. Mipmap generation

  3. Montaging and Montage QC

  4. Global 3D non-linear alignment

Other Modules

A few other modules are included in ASAP to do the following.

  1. Materialization - render intermediate/final aligned volume to disk for further processing

  2. Fusion - Fuse global 3D non-linear aligned chunks together to make a complete volume

  3. Point match filter - A module that performs point match filtering of an existing point match collection

  4. Point match optimization - Performs a parameter sweep from a given set of ranges on a random sample of tilepairs to identify the optimal set of parameters

  5. Registration - Register individual sections in an already aligned volume (useful in cases of aligning missing/reimaged sections)

Support

We are planning on occasional updating this tool with no fixed schedule. Community involvement is encouraged through both issues and pull requests. Please make pull requests against the dev branch, as we will test changes there before merging into master.

Acknowledgments

This project is supported by the Intelligence Advanced Research Projects Activity (IARPA) via Department of Interior / Interior Business Center (DoI/IBC) contract number D16PC00004. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright annotation theron.

Disclaimer: The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of IARPA, DoI/IBC, or the U.S. Government.

Installation

Prerequisites

ASAP requires Render web service (https://github.com/saalfeldlab/render) to be installed for storing and processing the data. Please refer to Render for details on its installation.

Installing ASAP-modules

ASAP can be installed using the following commands.

Clone this repository

# git clone this repository
git clone https://github.com/AllenInstitute/asap-modules .

Install from source

CD to the cloned directory and run setup.py

python setup.py install

Docker setup

You can also install asap-modules using the provided docker file

docker build -t asap-modules:latest --target asap-modules .

Running docker

The built docker image can then be run using the following command

docker run --rm asap-modules:latest

Running modules of ASAP

Once ASAP is installed using the above command, you can use all of its functionalities as follows;

python -m asap.<submodule>.<function_to_run> --input_json <input_json_file.json> --output_json <output_json_file.json>

For example, the montage qc module can be run using the following command.

python -m asap.em_montage_qc.detect_montage_defects --input_json <your_input_json_file_with_required_parameters> --output_json <output_json_file_with_full_path>

and here is an example input json file for the detect_montage_defects module

{
    "render":{
        "host": <render_host>,
        "port": <render_port>,
        "owner": <render_project_owner>,
        "project": <render_project_name>,
        "client_scripts": <path_to_render_client_scripts>
    },
    "prestitched_stack": <pre_montage_stack>,
    "poststitched_stack": <montaged_stack>,
    "match_collection_owner": <owner_of_point_match_collection>,
    "match_collection": <name_of_point_match_collection>,
    "out_html_dir": <path_to_directory_to_store_the_qc_plot_html_file>,
    "plot_sections": <True/False>,
    "minZ": <z_index_of_the_first_section_to_run_qc_for>,
    "maxZ": <z_index_of_the_last_section_to_run_qc_for>,
    "neighbors_distance": <qc_parameter>,
    "min_cluster_size": <qc_parameter>,
    "residual_threshold": <qc_parameter>,
    "pool_size": <pool_size_for_parallel_processing>
}

The list of parameters required for each module can be found out using the –help option.

# find the list of parameters for the solver module using its help option
python -m asap.solver.solve --help

Lens distortion correction

The lens distortion correction transforms can be computed using the following modules

Step 1 - Compute lens distortion correction

Compute lens distortion correction transformation

(Assumes that the images for computation are loaded into a render stack. )

python -m asap.mesh_lens_correction.do_mesh_lens_correction --input_json <input_parameter_json_file> --output_json <output_json_file>

An example input json file is provided in the do_mesh_lens_correcton.py file

Step 2 - Apply lens correction

Apply lens correction transformations to the input render stack (update the raw tilespecs)

python -m asap.lens_correction.apply_lens_correction --input_json <input_parameter_json_file> --output_json <output_json_file>

An example input json file is provided in the apply_lens_correction.py file

Generate MIPmaps

MIPmaps are essential for stitching and alignment and is used to generate point matches, used for visualization, etc.

MIPmaps can be generated for a dataset loaded into a render stack.

Step 1 - Generate MIPmaps

python -m asap.dataimport.create_mipmaps --input_json <input_parameter_json_file> --output_json <output_json_file>

Step 2 - Apply MIPmaps to Render stack

python -m asap.dataimport.apply_mipmaps_to_render --input_json <input_parameter_json_file> --output_json <output_json_file>

Example input parameter json files are included in the module’s script files.

2D Stitching

2D stitching of serial sections involves the following process

Step 1 - Create tilepairs

python -m asap.pointmatch.create_tilepairs --input_json <input_parameter_json_file> --output_json <output_json_file>

Step 2 - Generate point matches for the serial section

ASAP utilizes the SIFT point matching module in Render to compute the point matches. There also exists an opencv version of SIFT computation in ASAP.

Point matching implementation from Render to be run on Spark cluster

This requires Spark to be installed in the setup.

python -m asap.pointmatch.generate_point_matches_spark --input_json <input_parameter_json_file> --output_json <output_json_file>

Point matching implementation from Render to be run on PBS cluster

python -m asap.pointmatch.generate_point_matches_qsub --input_json <input_parameter_json_file> --output_json <output_json_file>

Point matching implementation using opencv

python -m asap.pointmatch.generate_point_matches_opencv --input_json <input_parameter_json_file> --output_json <output_json_file>

The point matches will be saved in a point match collection in the Render web service.

Step 3 - Solve for transformations

The bigfeta solver can be invoked from asap to solve for transformations using the following commmand

python -m asap.solver.solve --input_json <input_parameter_json_file> --output_json <output_json_file>

Step 4 - Montage QC

The solver writes the transformations in the tilespecs associated with the serial section in the render stack. Once this is done, the QC module can be run to gather statistics about the quality of the stitching and also visualization plots of the stitched section.

python -m asap.em_montage_qc.detect_montage_defects --input_json <input_parameter_json_file> --output_json <output_json_file>

The QC plots will be saved in the output directory specified in the input_parameter_json_file and the sections with issues will be found in the output_json_file.

Global 3D non-linear alignment

Global 3D non-linear alignment can be performed on a stack in chunks as well as the entire dataset (if all the serial sections are montaged and available). The following steps illustrate the global 3D non-linear alignment process.

Step 1 - Montage scapes generation

Montage scapes are downsampled versions of the serial sections and are used in the global 3D alignment process. Montage scapes can be generated as follows.

# Generate downsampled versions of montaged serial sections
python -m asap.materialize.render_downsample_sections --input_json <input_parameter_json_file> --output_json <output_json_file>
# Create a downsampled montage stack
python -m asap.dataimport.make_montage_scapes_stack --input_json <input_parameter_json_file> --output_json <output_json_file>

Step 2 - Generate tilepairs

3D tilepairs for the downsampled stack can be generated using the following command.

python -m asap.pointmatch.create_tilepairs --input_json <input_parameter_json_file> --output_json <output_json_file>

Step 3 - Generate point matches

3D point matches can be generated using the generated tile pairs. The following command can be used to generate point matches using a Spark cluster

python -m asap.pointmatch.generate_point_matches_using_spark --input_json <input_parameter_json_file> --output_json <output_json_file>

Step 4 - Solve for 3D non-linear transformations

This step in practice is done as a multi-step 3D alignment process, where a series of transformations (rigid, affine, non-linear) are computed and used as initialization for the computation of next higher order transformation.

A mesh based alignment can also be applied as a last step and is available in Bigfeta.

The command to run the solver is shown below.

python -m asap.solver.solve --input_json <input_parameter_json_file> --output_json <output_json_file>

NOTE: Each of the modules’ script include an example input json file for reference and the list of input and output parameters can also be listed using the –help option in each of the above commands.

asap-modules

asap package

Subpackages

asap.dataimport package
Submodules
asap.dataimport.apply_mipmaps_to_render module
class asap.dataimport.apply_mipmaps_to_render.AddMipMapsToStack(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.StackTransitionModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type AddMipMapsToStackParameters

default_output_schema

alias of asap.dataimport.schemas.AddMipMapsToStackOutput

default_schema

alias of asap.dataimport.schemas.AddMipMapsToStackParameters

run()[source]
asap.dataimport.apply_mipmaps_to_render.addMipMapsToRender(render, input_stack, mipmap_prefix, imgformat, levels, z)[source]
asap.dataimport.create_mipmaps module
exception asap.dataimport.create_mipmaps.CreateMipMapException[source]

Bases: asap.module.render_module.RenderModuleException

Exception raised when there is a problem creating a mipmap

asap.dataimport.create_mipmaps.create_mipmaps(inputImage, outputDirectory='.', *args, **kwargs)

legacy create_mipmaps function

asap.dataimport.create_mipmaps.create_mipmaps_legacy(inputImage, outputDirectory='.', *args, **kwargs)[source]

legacy create_mipmaps function

asap.dataimport.create_mipmaps.create_mipmaps_uri(inputImage, outputDirectory=None, method='block_reduce', mipmaplevels=[1, 2, 3], outputformat='tif', convertTo8bit=True, force_redo=True, **kwargs)[source]

function to create downsampled images from an input image

Parameters
  • inputImage (str) – path to input image

  • outputDirectory (str) – path to save output images (default to current directory)

  • mipmaplevels (list or tuple) – list or tuple of integers (default to (1,2,3))

  • outputformat (str) – string representation of extension of image format (default tif)

  • convertTo8bit (boolean) – whether to convert the image to 8 bit, dividing each value by 255

  • force_redo (boolean) – whether to recreate mip map images if they already exist

  • method (str) – string corresponding to downsampling method

  • block_func (str) – string corresponding to function used by block_reduce

  • ds_filter (str) – string corresponding to PIL downsample mode

Returns

list of output images created in order of levels

Return type

list

Raises

MipMapException – if an image cannot be created for some reason

asap.dataimport.create_mipmaps.mipmap_PIL(im, levels_file_map, ds_filter='NEAREST', force_redo=True, **kwargs)[source]
asap.dataimport.create_mipmaps.mipmap_block_reduce(im, levels_file_map, block_func='mean', force_redo=True, **kwargs)[source]
asap.dataimport.create_mipmaps.writeImage(img, outpath, force_redo)[source]
asap.dataimport.generate_EM_tilespecs_from_metafile module

create tilespecs from TEMCA metadata file

class asap.dataimport.generate_EM_tilespecs_from_metafile.GenerateEMTileSpecsModule(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.StackOutputModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type GenerateEMTileSpecsParameters

default_output_schema

alias of asap.dataimport.schemas.GenerateEMTileSpecsOutput

default_schema

alias of asap.dataimport.schemas.GenerateEMTileSpecsParameters

static image_coords_from_stage(stage_coords, resX, resY, rotation)[source]
run()[source]
static sectionId_from_z(z)[source]
tileId_from_basename(fname)[source]
ts_from_imgdata(imgdata, imgprefix, x, y, minint=0, maxint=255, maskUrl=None, width=3840, height=3840, z=None, sectionId=None, scopeId=None, cameraId=None, pixelsize=None)[source]
asap.dataimport.generate_mipmaps module
class asap.dataimport.generate_mipmaps.GenerateMipMaps(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.StackInputModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type GenerateMipMapsParameters

default_output_schema

alias of asap.dataimport.schemas.GenerateMipMapsOutput

default_schema

alias of asap.dataimport.schemas.GenerateMipMapsParameters

run()[source]
asap.dataimport.generate_mipmaps.create_mipmap_from_tuple(mipmap_tuple, levels=[1, 2, 3], imgformat='tif', convertTo8bit=True, force_redo=True, **kwargs)[source]
asap.dataimport.generate_mipmaps.create_mipmap_from_tuple_uri(mipmap_tuple, levels=[1, 2, 3], imgformat='tif', convertTo8bit=True, force_redo=True, **kwargs)[source]
asap.dataimport.generate_mipmaps.get_filepath_from_tilespec(ts)[source]
asap.dataimport.generate_mipmaps.make_tilespecs_and_cmds(render, inputStack, output_prefix, zvalues, levels, imgformat, convert_to_8bit, force_redo, pool_size, method)[source]
asap.dataimport.make_montage_scapes_stack module
class asap.dataimport.make_montage_scapes_stack.MakeMontageScapeSectionStack(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.StackOutputModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type MakeMontageScapeSectionStackParameters

default_output_schema

alias of asap.dataimport.schemas.MakeMontageScapeSectionStackOutput

default_schema

alias of asap.dataimport.schemas.MakeMontageScapeSectionStackParameters

run()[source]
asap.dataimport.make_montage_scapes_stack.create_montage_scape_tile_specs(render, input_stack, image_directory, scale, project, tagstr, imgformat, Z, apply_scale=False, uuid_prefix=True, uuid_prefix_length=10, **kwargs)[source]
asap.dataimport.schemas module
class asap.dataimport.schemas.AddMipMapsToStackOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

AddMipMapsToStackOutput

key

description

default

field_type

json_type

output_stack

no description

(REQUIRED)

String

str

missing_ts_zs

Z values for which apply mipmaps failed

[]

List

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.dataimport.schemas.AddMipMapsToStackParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.stack_schemas.StackTransitionParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

AddMipMapsToStackParameters

key

description

default

field_type

json_type

pool_size

no description

1

Integer

int

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

input_stack

no description

(REQUIRED)

String

str

output_stack

no description

(REQUIRED)

String

str

close_stack

no description

False

Boolean

bool

overwrite_zlayer

no description

False

Boolean

bool

output_stackVersion

no description

NA

RenderStackVersion

dict

mipmap_dir

directory to which the mipmaps will be stored

NA

InputDir

str

mipmap_prefix

uri prefix from which mipmap locations are built.

(REQUIRED)

String

str

levels

number of levels of mipmaps, default is 6

6

Integer

int

imgformat

mipmap image format, default is tiff

tiff

String

str

mipmap_directory_to_prefix(data)[source]
opts = <marshmallow.schema.SchemaOpts object>
class asap.dataimport.schemas.GenerateEMTileSpecsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

GenerateEMTileSpecsOutput

key

description

default

field_type

json_type

stack

stack to which generated tiles were added

(REQUIRED)

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.dataimport.schemas.GenerateEMTileSpecsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.stack_schemas.OutputStackParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

GenerateEMTileSpecsParameters

key

description

default

field_type

json_type

pool_size

no description

1

Integer

int

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

output_stack

no description

(REQUIRED)

String

str

close_stack

no description

False

Boolean

bool

overwrite_zlayer

no description

False

Boolean

bool

output_stackVersion

no description

NA

RenderStackVersion

dict

metafile

metadata file containing TEMCA acquisition data

NA

InputFile

str

metafile_uri

uri of metadata containing TEMCA acquisition data

(REQUIRED)

String

str

maskUrl

absolute path to image mask to apply

None

InputFile

str

maskUrl_uri

uri of image mask to apply

None

String

str

image_directory

directory used in determining absolute paths to images. Defaults to parent directory containing metafile if omitted.

NA

InputDir

str

image_prefix

prefix used in determining full uris of images in metadata. Defaults to using the / delimited prefix to the metadata_uri if omitted

NA

String

str

maximum_intensity

intensity value to interpret as white

255

Integer

int

minimum_intensity

intensity value to interpret as black

0

Integer

int

sectionId

sectionId to apply to tiles during ingest. If unspecified will default to a string representation of the float value of z_index.

NA

String

str

image_directory_to_prefix(data)[source]
maskUrl_to_uri(data)[source]
metafile_to_uri(data)[source]
opts = <marshmallow.schema.SchemaOpts object>
class asap.dataimport.schemas.GenerateMipMapsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

GenerateMipMapsOutput

key

description

default

field_type

json_type

levels

no description

(REQUIRED)

Integer

int

output_prefix

no description

(REQUIRED)

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.dataimport.schemas.GenerateMipMapsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.stack_schemas.InputStackParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

GenerateMipMapsParameters

key

description

default

field_type

json_type

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

input_stack

no description

(REQUIRED)

String

str

output_dir

directory to which the mipmaps will be stored

NA

String

str

output_prefix

uri prefix for generated mipmaps

(REQUIRED)

String

str

method

method to downsample mipmapLevels, ‘PIL’ for PIL Image (currently NEAREST) filtered resize, can be ‘block_reduce’ for skimage based area downsampling

block_reduce

String

str

convert_to_8bit

convert the data from 16 to 8 bit (default True)

True

Boolean

bool

pool_size

number of cores to be used

20

Integer

int

imgformat

image format for mipmaps (default tiff)

tiff

String

str

levels

number of levels of mipmaps, default is 6

6

Integer

int

force_redo

force re-generation of existing mipmaps

True

Boolean

bool

PIL_filter

filter to be used in PIL resize

NEAREST

String

str

block_func

function to represent blocks in area downsampling with block_reduce

mean

String

str

directory_to_prefix(data)[source]
opts = <marshmallow.schema.SchemaOpts object>
classmethod validationOptions(options)[source]
class asap.dataimport.schemas.MakeMontageScapeSectionStackOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

MakeMontageScapeSectionStackOutput

key

description

default

field_type

json_type

output_stack

Name of the downsampled sections stack

(REQUIRED)

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.dataimport.schemas.MakeMontageScapeSectionStackParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.stack_schemas.OutputStackParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

MakeMontageScapeSectionStackParameters

key

description

default

field_type

json_type

pool_size

no description

1

Integer

int

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

output_stack

no description

(REQUIRED)

String

str

close_stack

no description

False

Boolean

bool

overwrite_zlayer

no description

False

Boolean

bool

output_stackVersion

no description

NA

RenderStackVersion

dict

montage_stack

stack to make a downsample version of

(REQUIRED)

String

str

image_directory

directory that stores the montage scapes

(REQUIRED)

String

str

set_new_z

set to assign new z values starting from 0 (default - False)

False

Boolean

bool

new_z_start

new starting z index

0

Integer

int

remap_section_ids

change section ids to new z values. default = False

False

Boolean

bool

imgformat

image format of the montage scapes (default - tif)

tif

String

str

scale

scale of montage scapes

(REQUIRED)

Float

float

apply_scale

Do you want to scale the downsample to the size of section? Default = False

False

Boolean

bool

doFilter

whether to apply default filtering when generating missing downsamples

True

Boolean

bool

level

integer mipMapLevel used to generate missing downsamples

1

Integer

int

fillWithNoise

Whether to fill the background pixels with noise when generating missing downsamples

False

Boolean

bool

memGB_materialize

Java heap size in GB for materialization

12G

String

str

pool_size_materialize

number of processes to generate missing downsamples

1

Integer

int

filterListName

Apply specified filter list to all renderings

NA

String

str

uuid_prefix

Prepend uuid to generated tileIds to prevent collisions

True

Boolean

bool

uuid_length

length of uuid4 string used in uuid prefix

10

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
validate_data(data)[source]
Module contents
asap.em_montage_qc package
Submodules
asap.em_montage_qc.detect_montage_defects module
asap.em_montage_qc.plots module
asap.em_montage_qc.schemas module
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: asap.module.schemas.schemas.RenderParameters, asap.module.schemas.stack_schemas.ZValueParameters, asap.module.schemas.stack_schemas.ProcessPoolParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

DetectMontageDefectsParameters

key

description

default

field_type

json_type

pool_size

no description

1

Integer

int

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

prestitched_stack

Pre stitched stack (raw stack)

(REQUIRED)

String

str

poststitched_stack

Stitched montage stack

(REQUIRED)

String

str

match_collection

Name of the montage point match collection

NA

String

str

match_collection_owner

Name of the match collection owner

None

String

str

residual_threshold

threshold value to filter residuals for detecting seams (default = 4)

4

Integer

int

neighbors_distance

distance in pixels to look for neighboring points in seam detection (default = 60)

80

Integer

int

min_cluster_size

minimum number of point matches required in each cluster for taking it into account for seam detection (default = 7)

12

Integer

int

plot_sections

Do you want to plot the sections with defects (holes or gaps)?. Will plot Bokeh plots in a html file

True

Boolean

bool

out_html_dir

Folder to save the Bokeh plot defaults to /tmp directory

None

InputDir

str

add_match_collection_owner(data)[source]
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: argschema.schemas.DefaultSchema

DetectMontageDefectsParametersOutput

key

description

default

field_type

json_type

output_html

Output html file with Bokeh plots showing holes and stitching gaps

None

List

str

qc_passed_sections

List of sections that passed QC

(REQUIRED)

List

int

hole_sections

List of z values which failed QC and has holes

(REQUIRED)

List

int

gap_sections

List of z values which have stitching gaps

(REQUIRED)

List

int

seam_sections

List of z values which have seams detected

(REQUIRED)

List

int

seam_centroids

An array of (x,y) positions of seams for each section with seams

(REQUIRED)

NumpyArray

?

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: argschema.schemas.DefaultSchema

RoughQCOutputSchema

key

description

default

field_type

json_type

iou_plot

Pdf/html file showing IOU plots

(REQUIRED)

OutputFile

str

distortion_plot

Pdf/html file with distortion plots

(REQUIRED)

OutputFile

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: asap.module.schemas.schemas.RenderParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

RoughQCSchema

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

input_downsampled_stack

Pre rough aligned downsampled stack

(REQUIRED)

String

str

output_downsampled_stack

Rough aligned stack name

(REQUIRED)

String

str

minZ

min z

(REQUIRED)

Integer

int

maxZ

max z

(REQUIRED)

Integer

int

pool_size

Pool size

10

Integer

int

output_dir

temp filename to save fig

None

OutputDir

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

String

str

opts = <marshmallow.schema.SchemaOpts object>
Module contents
asap.intensity_correction package
Submodules
asap.intensity_correction.apply_multiplicative_correction module
class asap.intensity_correction.apply_multiplicative_correction.MultIntensityCorr(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.StackTransitionModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type MultIntensityCorrParams

default_schema

alias of asap.intensity_correction.schemas.MultIntensityCorrParams

run()[source]
asap.intensity_correction.apply_multiplicative_correction.getImage(ts, channel=None)[source]

Simple function to get the level 0 image of this tilespec as a numpy array

Parameters
  • ts (renderapi.tilespec.TileSpec) – tilespec to get images from (presently assumes this is a tiff image whose URL can be read with tifffile)

  • channel (str) – channel name to get image of, default=None which will default to the non channel image pyramid

Returns

2d numpy array of this image

Return type

numpy.array

asap.intensity_correction.apply_multiplicative_correction.intensity_corr(img, ff, clip, scale_factor, clip_min, clip_max)[source]

utility function to correct an image with a flatfield correction will take img and return img_out = img * max(ff) / (ff + .0001) converted back to the original type of img

Parameters
  • img (numpy.array) – N,M array to correct, could be any type

  • ff (numpy.array) – N,M array of flatfield correction, could be of any type

Returns

N,M numpy array of the same type as img but now corrected

Return type

numpy.array

asap.intensity_correction.apply_multiplicative_correction.process_tile(C, dirout, stackname, clip, scale_factor, clip_min, clip_max, input_ts, corr_dict=None)[source]

function to correct each tile in the input_ts with the matrix C, and potentially move the original tiles to a new location.abs

Parameters
  • C (numpy.array) – a 2d numpy array of uint16 or uint8 that represents the correction to apply

  • corr_dict (dict or None) – a dictionary with keys of strings of channel names and values of corrections (as with C). If None, C will be applied to each channel, if they exist.

  • dirout (str) – the path to the directory to save all corrected images

  • input_ts (renderapi.tilespec.TileSpec) – the tilespec with the tiles to be corrected

asap.intensity_correction.apply_multiplicative_correction.write_image(dirout, orig_imageurl, Res, stackname, z)[source]
asap.intensity_correction.calculate_multiplicative_correction module
class asap.intensity_correction.calculate_multiplicative_correction.MakeMedian(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.RenderModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type MakeMedianParams

default_schema

alias of asap.intensity_correction.schemas.MakeMedianParams

run()[source]
asap.intensity_correction.calculate_multiplicative_correction.getImageFromTilespecs(alltilespecs, index, channel=None)[source]
asap.intensity_correction.calculate_multiplicative_correction.make_median_image(alltilespecs, numtiles, outImage, pool_size, chan=None, gauss_size=10)[source]
asap.intensity_correction.calculate_multiplicative_correction.randomly_subsample_tilespecs(alltilespecs, numtiles)[source]
asap.intensity_correction.schemas module
class asap.intensity_correction.schemas.MakeMedianParams(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.stack_schemas.StackTransitionParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

MakeMedianParams

key

description

default

field_type

json_type

pool_size

no description

1

Integer

int

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

input_stack

no description

(REQUIRED)

String

str

output_stack

no description

(REQUIRED)

String

str

close_stack

no description

False

Boolean

bool

overwrite_zlayer

no description

False

Boolean

bool

output_stackVersion

no description

NA

RenderStackVersion

dict

file_prefix

File prefix for median image file that is saved

Median

String

str

output_directory

Output Directory for saving median image

(REQUIRED)

String

str

num_images

Number of images to randomly subsample to generate median

-1

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.intensity_correction.schemas.MultIntensityCorrParams(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.stack_schemas.StackTransitionParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

MultIntensityCorrParams

key

description

default

field_type

json_type

pool_size

no description

1

Integer

int

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

input_stack

no description

(REQUIRED)

String

str

output_stack

no description

(REQUIRED)

String

str

close_stack

no description

False

Boolean

bool

overwrite_zlayer

no description

False

Boolean

bool

output_stackVersion

no description

NA

RenderStackVersion

dict

correction_stack

Correction stack (usually median stack for AT data)

(REQUIRED)

String

str

output_directory

Directory for storing Images

(REQUIRED)

OutputDir

str

cycle_number

what cycleNumber to upload for output_stack on render

2

Integer

int

cycle_step_number

what cycleStepNumber to upload for output_stack on render

1

Integer

int

clip

whether to clip values

True

Boolean

bool

scale_factor

scaling value

1.0

Float

float

clip_min

Min Clip value

0

Integer

int

clip_max

Max Clip value

65535

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
Module contents
asap.lens_correction package
Submodules
asap.lens_correction.apply_lens_correction module
class asap.lens_correction.apply_lens_correction.ApplyLensCorrection(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.StackTransitionModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type ApplyLensCorrectionParameters

default_output_schema

alias of asap.lens_correction.schemas.ApplyLensCorrectionOutput

default_schema

alias of asap.lens_correction.schemas.ApplyLensCorrectionParameters

run()[source]
asap.lens_correction.lens_correction module
asap.lens_correction.schemas module
class asap.lens_correction.schemas.ApplyLensCorrectionOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

ApplyLensCorrectionOutput

key

description

default

field_type

json_type

stack

stack to which transformed tiles were written

(REQUIRED)

String

str

refId

unique identifier string used as reference ID

(REQUIRED)

String

str

missing_ts_zs

Z values for which apply mipmaps failed

[]

List

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.lens_correction.schemas.ApplyLensCorrectionParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.stack_schemas.StackTransitionParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

ApplyLensCorrectionParameters

key

description

default

field_type

json_type

pool_size

no description

1

Integer

int

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

input_stack

no description

(REQUIRED)

String

str

output_stack

no description

(REQUIRED)

String

str

close_stack

no description

False

Boolean

bool

overwrite_zlayer

no description

False

Boolean

bool

output_stackVersion

no description

NA

RenderStackVersion

dict

transform

no description

NA

TransformParameters

dict

refId

Reference ID to use when uploading transform to render database (Not Implemented)

(REQUIRED)

String

str

labels

labels for the lens correction transform

[‘lens’]

List

str

maskUrl

path to level 0 maskUrl to apply to stack

None

InputFile

str

maskUrl_uri

uri for level 0 mask image to apply

None

String

str

maskUrl_to_uri(data)[source]
opts = <marshmallow.schema.SchemaOpts object>
class asap.lens_correction.schemas.TransformParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

TransformParameters

key

description

default

field_type

json_type

type

Transform type as defined in Render Transform Spec. This module currently expects a ‘leaf’

(REQUIRED)

String

str

className

mpicbg-compatible className

(REQUIRED)

String

str

dataString

mpicbg-compatible dataString

(REQUIRED)

String

str

metaData

in this schema, otherwise will be stripped

NA

Dict

?

opts = <marshmallow.schema.SchemaOpts object>
Module contents
asap.materialize package
Submodules
asap.materialize.materialize_sections module

Materialize Render sections using BetterBox client

exception asap.materialize.materialize_sections.MaterializeSectionsError[source]

Bases: asap.module.render_module.RenderModuleException

class asap.materialize.materialize_sections.MaterializeSectionsModule(input_data=None, schema_type=None, output_schema_type=None, args=None, logger_name='argschema.argschema_parser')[source]

Bases: asap.module.render_module.SparkModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type MaterializeSectionsParameters

default_output_schema

alias of asap.materialize.schemas.MaterializeSectionsOutput

default_schema

alias of asap.materialize.schemas.MaterializeSectionsParameters

classmethod get_args(**kwargs)[source]

override to append to spark call

classmethod get_materialize_options(baseDataUrl=None, owner=None, project=None, stack=None, rootDirectory=None, width=None, height=None, maxLevel=None, fmt=None, maxOverviewWidthAndHeight=None, skipInterpolation=None, binaryMask=None, label=None, createIGrid=None, forceGeneration=None, renderGroup=None, numberOfRenderGroups=None, cleanUpPriorRun=None, filterListName=None, explainPlan=None, maxImageCacheGb=None, zValues=None, **kwargs)[source]
run()[source]
asap.materialize.render_downsample_sections module
class asap.materialize.render_downsample_sections.RenderSectionAtScale(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.RenderModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type RenderSectionAtScaleParameters

default_output_schema

alias of asap.materialize.schemas.RenderSectionAtScaleOutput

default_schema

alias of asap.materialize.schemas.RenderSectionAtScaleParameters

classmethod downsample_specific_mipmapLevel(zvalues, input_stack=None, level=1, pool_size=1, image_directory=None, scale=None, imgformat=None, doFilter=None, fillWithNoise=None, filterListName=None, render=None, do_mp=True, bounds=None, **kwargs)[source]
run()[source]
class asap.materialize.render_downsample_sections.WithThreadPool(*args, **kwargs)[source]

Bases: multiprocessing.pool.ThreadPool

asap.materialize.render_downsample_sections.check_stack_for_mipmaps(render, input_stack, zvalues)[source]
asap.materialize.render_downsample_sections.create_tilespecs_without_mipmaps(render, montage_stack, level, z)[source]

return tilespecs missing mipmaplevels above the specified level

asap.materialize.schemas module
class asap.materialize.schemas.Bounds(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

Bounds

key

description

default

field_type

json_type

minX

minX of bounds

None

Integer

int

maxX

maxX of bounds

None

Integer

int

minY

minY of bounds

None

Integer

int

maxY

maxY of bounds

None

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.materialize.schemas.DeleteMaterializedSectionsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

opts = <marshmallow.schema.SchemaOpts object>
class asap.materialize.schemas.DeleteMaterializedSectionsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.ArgSchema

This schema is designed to be a schema_type for an ArgSchemaParser object

DeleteMaterializedSectionsParameters

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

minZ

no description

(REQUIRED)

Integer

int

maxZ

no description

(REQUIRED)

Integer

int

basedir

base directory for materialization

(REQUIRED)

InputDir

str

pool_size

size of pool to use to delete files

NA

Integer

int

tilesource

no description

5

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.materialize.schemas.MaterializeSectionsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

MaterializeSectionsOutput

key

description

default

field_type

json_type

zValues

no description

(REQUIRED)

List

int

rootDirectory

no description

(REQUIRED)

InputDir

str

materializedDirectory

no description

(REQUIRED)

InputDir

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.materialize.schemas.MaterializeSectionsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.ArgSchema, asap.module.schemas.renderclient_schemas.MaterializedBoxParameters, asap.module.schemas.renderclient_schemas.ZRangeParameters, asap.module.schemas.renderclient_schemas.RenderParametersRenderWebServiceParameters, asap.module.schemas.spark_schemas.SparkParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

MaterializeSectionsParameters

key

description

default

field_type

json_type

jarfile

spark jar to call java spark command

(REQUIRED)

String

str

className

spark class to call

(REQUIRED)

String

str

driverMemory

spark driver memory (important for local spark)

6g

String

str

memory

Memory required for spark job

NA

String

str

sparkhome

Spark home directory containing bin/spark_submit

(REQUIRED)

InputDir

str

spark_files

list of spark files to add to the spark submit command

NA

List

str

spark_conf

dictionary of key value pairs to add to spark_submit as –conf key=value

NA

Dict

?

masterUrl

spark master url. For local execution local[num_procs,num_retries]

(REQUIRED)

String

str

baseDataUrl

api endpoint url e.g. http://<host>[:port]/render-ws/v1

NA

String

str

owner

owner of target collection

NA

String

str

project

project fo target collection

NA

String

str

render

no description

NA

RenderClientParameters

dict

minZ

minimum Z integer

NA

Integer

int

maxZ

maximum Z integer

NA

Integer

int

stack

stack fromw which boxes will be materialized

(REQUIRED)

String

str

rootDirectory

directory in which materialization directory structure will be created (structure is <rootDirectory>/<project>/<stack>/<width>x<height>/<mipMapLevel>/<z>/<row>/<col>.<fmt>)

(REQUIRED)

OutputDir

str

width

width of flat rectangular tiles to generate

(REQUIRED)

Integer

int

height

height of flat rectangular tiles to generate

(REQUIRED)

Integer

int

maxLevel

maximum mipMapLevel to generate.

0

Integer

int

fmt

image format to generate mipmaps – PNG if not specified

NA

String

str

maxOverviewWidthAndHeight

maximum pixel size for width or height of overview image. If excluded or 0, no overview generated.

NA

Integer

int

skipInterpolation

whether to skip interpolation (e.g. DMG data)

NA

Boolean

bool

binaryMask

whether to use binary mask (e.g. DMG data)

NA

Boolean

bool

label

whether to generate single color tile labels rather than actual images

NA

Boolean

bool

createIGrid

whther to create an IGrid file

NA

Boolean

bool

forceGeneration

whether to regenerate existing tiles

NA

Boolean

bool

renderGroup

index (1-n) identifying coarse portion of layer to render

NA

Integer

int

numberOfRenderGroups

used in conjunction with renderGroup, total number of groups being used

NA

Integer

int

filterListName

Apply specified filter list to all renderings

NA

String

str

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

cleanUpPriorRun

whether to regenerate most recently generated boxes of an identical plan. Useful for rerunning failed jobs.

NA

Boolean

bool

explainPlan

whether to perform a dry run, logging as partition stages are run but skipping materialization

NA

Boolean

bool

maxImageCacheGb

maximum image cache in GB of tilespec level 0 data to cache per core. Larger values may degrade performance due to JVM garbage collection.

2.0

Float

float

zValues

z indices to materialize

NA

List

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.materialize.schemas.RenderSectionAtScaleOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

RenderSectionAtScaleOutput

key

description

default

field_type

json_type

image_directory

Directory in which the downsampled section images are saved

(REQUIRED)

InputDir

str

temp_stack

The temp stack that was used to generate the downsampled sections

(REQUIRED)

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.materialize.schemas.RenderSectionAtScaleParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.schemas.RenderParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

RenderSectionAtScaleParameters

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

input_stack

Input stack to make the downsample version of

(REQUIRED)

String

str

image_directory

Directory to save the downsampled sections

(REQUIRED)

OutputDir

str

imgformat

Image format (default - png)

png

String

str

doFilter

Apply filtering before rendering

True

Boolean

bool

fillWithNoise

Fill image with noise (default - False)

False

Boolean

bool

scale

scale of the downsampled sections

(REQUIRED)

Float

float

minZ

min Z to create the downsample section from

-1

Integer

int

maxZ

max Z to create the downsample section from

-1

Integer

int

filterListName

Apply specified filter list to all renderings

NA

String

str

bounds

no description

None

Bounds

dict

use_stack_bounds

Do you want to use stack bounds while downsampling?. Default=False

False

Boolean

bool

pool_size

number of parallel threads to use

20

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
validate_data(data)[source]
class asap.materialize.schemas.ValidateMaterializationOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

ValidateMaterializationOutput

key

description

default

field_type

json_type

basedir

no description

(REQUIRED)

String

str

failures

no description

(REQUIRED)

List

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.materialize.schemas.ValidateMaterializationParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.ArgSchema

This schema is designed to be a schema_type for an ArgSchemaParser object

ValidateMaterializationParameters

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

minRow

minimum row to attempt to validate tiles. Will attempt to use stack bounds if None

NA

Integer

int

maxRow

no description

NA

Integer

int

minCol

no description

NA

Integer

int

maxCol

no description

NA

Integer

int

minZ

no description

(REQUIRED)

Integer

int

maxZ

no description

(REQUIRED)

Integer

int

ext

no description

png

String

str

basedir

base directory for materialization

(REQUIRED)

InputDir

str

pool_size

size of pool to use to investigate image validity

NA

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
Module contents
asap.module package
Subpackages
asap.module.schemas package
Submodules
asap.module.schemas.renderclient_schemas module
class asap.module.schemas.renderclient_schemas.FeatureExtractionParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

FeatureExtractionParameters

key

description

default

field_type

json_type

SIFTfdSize

SIFT feature descriptor size – samples per row and column. 8 if excluded or None

NA

Integer

int

SIFTminScale

SIFT minimum scale – minSize * minScale < size < maxSize * maxScale. 0.5 if excluded or None

NA

Float

float

SIFTmaxScale

SIFT maximum scale – minSize * minScale < size < maxSize * maxScale. 0.85 if excluded or None

NA

Float

float

SIFTsteps

SIFT steps per scale octave. 3 if excluded or None

NA

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.renderclient_schemas.FeatureRenderClipParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

FeatureRenderClipParameters

key

description

default

field_type

json_type

clipWidth

Full scale pixels to include in clipped rendering of LEFT/RIGHT oriented tile pairs. Will not LEFT/RIGHT clip if excluded or None.

NA

Integer

int

clipHeight

Full scale pixels to include in clipped rendering of TOP/BOTTOM oriented tile pairs. Will not TOP/BOTTOM clip if excluded or None.

NA

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.renderclient_schemas.FeatureRenderParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

FeatureRenderParameters

key

description

default

field_type

json_type

renderScale

Scale at which image tiles will be rendered. 1.0 (full scale) if excluded or None

NA

Float

float

renderWithFilter

Render tiles using default filtering (0 and 255 pixel values replaced with integer in U(64, 191), followed by default NormalizeLocalContrast). True if excluded or None

NA

Boolean

bool

renderWithoutMask

Render tiles without mipMapLevel masks. True if excluded or None

NA

Boolean

bool

renderFullScaleWidth

Full scale width for all rendered tiles

NA

Integer

int

renderFullScaleHeight

Full scale height for all rendered tiles

NA

Integer

int

fillWithNoise

Fill each canvas image with noise prior to rendering. True if excluded or None

NA

Boolean

bool

renderFilterListName

Apply specified filter list to all renderings

NA

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.renderclient_schemas.FeatureStorageParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

FeatureStorageParameters

key

description

default

field_type

json_type

rootFeatureDirectory

Root directory for saved feature lists. Features extracted from dynamically rendered canvases if excluded or None.

NA

String

str

requireStoredFeatures

Whether to throw an exception in case features stored in rootFeatureDirectory cannot be found. Missing features are extracted from dynamically rendered canvases if excluded or None

NA

Boolean

bool

maxFeatureCacheGb

Maximum size of feature cache, in GB. 2GB if excluded or None

NA

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.renderclient_schemas.MatchDerivationParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

MatchDerivationParameters

key

description

default

field_type

json_type

matchRod

Ratio of first to second nearest neighbors used as a cutoff in matching features. 0.92 if excluded or None

NA

Float

float

matchModelType

Model to match for RANSAC filtering. ‘AFFINE’ if excluded or None

NA

String

str

matchIterations

RANSAC filter iterations. 1000 if excluded or None

NA

Integer

int

matchMaxEpsilon

no description

NA

Float

float

matchMinInlierRatio

Minimal ratio of inliers to candidates for successful RANSAC filtering. 0.0 if excluded or None

NA

Float

float

matchMinNumInliers

Minimum absolute number of inliers for successful RANSAC filtering. 4 if excluded or None

NA

Integer

int

matchMaxNumInliers

Maximum absolute number of inliers allowed after RANSAC filtering. unlimited if excluded or None

NA

Integer

int

matchMaxTrust

Maximum trust for filtering such that candidates with cost larger than matchMaxTrust * median cost are rejected. 3.0 if excluded or None

NA

Float

float

matchFilter

whether to match one set of matches, or multiple sets. And, whether to keep them separate, or aggregate them. SINGLE_SET if excluded or None.

NA

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.renderclient_schemas.MatchWebServiceParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.renderclient_schemas.WebServiceParameters

MatchWebServiceParameters

key

description

default

field_type

json_type

baseDataUrl

api endpoint url e.g. http://<host>[:port]/render-ws/v1

NA

String

str

owner

owner of match collection

NA

String

str

collection

match collection name

NA

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.renderclient_schemas.MaterializedBoxParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

MaterializedBoxParameters

key

description

default

field_type

json_type

stack

stack fromw which boxes will be materialized

(REQUIRED)

String

str

rootDirectory

directory in which materialization directory structure will be created (structure is <rootDirectory>/<project>/<stack>/<width>x<height>/<mipMapLevel>/<z>/<row>/<col>.<fmt>)

(REQUIRED)

OutputDir

str

width

width of flat rectangular tiles to generate

(REQUIRED)

Integer

int

height

height of flat rectangular tiles to generate

(REQUIRED)

Integer

int

maxLevel

maximum mipMapLevel to generate.

0

Integer

int

fmt

image format to generate mipmaps – PNG if not specified

NA

String

str

maxOverviewWidthAndHeight

maximum pixel size for width or height of overview image. If excluded or 0, no overview generated.

NA

Integer

int

skipInterpolation

whether to skip interpolation (e.g. DMG data)

NA

Boolean

bool

binaryMask

whether to use binary mask (e.g. DMG data)

NA

Boolean

bool

label

whether to generate single color tile labels rather than actual images

NA

Boolean

bool

createIGrid

whther to create an IGrid file

NA

Boolean

bool

forceGeneration

whether to regenerate existing tiles

NA

Boolean

bool

renderGroup

index (1-n) identifying coarse portion of layer to render

NA

Integer

int

numberOfRenderGroups

used in conjunction with renderGroup, total number of groups being used

NA

Integer

int

filterListName

Apply specified filter list to all renderings

NA

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.renderclient_schemas.RenderParametersMatchWebServiceParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.renderclient_schemas.MatchWebServiceParameters

RenderParametersMatchWebServiceParameters

key

description

default

field_type

json_type

baseDataUrl

api endpoint url e.g. http://<host>[:port]/render-ws/v1

NA

String

str

owner

owner of match collection

NA

String

str

collection

match collection name

NA

String

str

render

no description

NA

RenderClientParameters

dict

opts = <marshmallow.schema.SchemaOpts object>
validate_options(data)[source]
class asap.module.schemas.renderclient_schemas.RenderParametersRenderWebServiceParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.renderclient_schemas.RenderWebServiceParameters

RenderParametersRenderWebServiceParameters

key

description

default

field_type

json_type

baseDataUrl

api endpoint url e.g. http://<host>[:port]/render-ws/v1

NA

String

str

owner

owner of target collection

NA

String

str

project

project fo target collection

NA

String

str

render

no description

NA

RenderClientParameters

dict

opts = <marshmallow.schema.SchemaOpts object>
validate_options(data)[source]
class asap.module.schemas.renderclient_schemas.RenderWebServiceParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.renderclient_schemas.WebServiceParameters

RenderWebServiceParameters

key

description

default

field_type

json_type

baseDataUrl

api endpoint url e.g. http://<host>[:port]/render-ws/v1

NA

String

str

owner

owner of target collection

NA

String

str

project

project fo target collection

NA

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.renderclient_schemas.WebServiceParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

WebServiceParameters

key

description

default

field_type

json_type

baseDataUrl

api endpoint url e.g. http://<host>[:port]/render-ws/v1

NA

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.renderclient_schemas.ZRangeParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

ZRangeParameters

key

description

default

field_type

json_type

minZ

minimum Z integer

NA

Integer

int

maxZ

maximum Z integer

NA

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
asap.module.schemas.schemas module
class asap.module.schemas.schemas.RenderClientParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

RenderClientParameters

key

description

default

field_type

json_type

host

render host

(REQUIRED)

String

str

port

render post integer

(REQUIRED)

Integer

int

owner

render default owner

(REQUIRED)

String

str

project

render default project

(REQUIRED)

String

str

client_scripts

path to render client scripts

(REQUIRED)

String

str

memGB

string describing java heap memory (default 5G)

5G

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.schemas.RenderParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.ArgSchema

This schema is designed to be a schema_type for an ArgSchemaParser object

RenderParameters

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.schemas.TemplateOutputParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

TemplateOutputParameters

key

description

default

field_type

json_type

output_value

an output of the module

(REQUIRED)

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.schemas.TemplateParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.schemas.RenderParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

TemplateParameters

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

example

an example

(REQUIRED)

String

str

default_val

an example with a default

a default value

String

str

opts = <marshmallow.schema.SchemaOpts object>
asap.module.schemas.spark_schemas module
class asap.module.schemas.spark_schemas.SparkOptions(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

SparkOptions

key

description

default

field_type

json_type

jarfile

spark jar to call java spark command

(REQUIRED)

String

str

className

spark class to call

(REQUIRED)

String

str

driverMemory

spark driver memory (important for local spark)

6g

String

str

memory

Memory required for spark job

NA

String

str

sparkhome

Spark home directory containing bin/spark_submit

(REQUIRED)

InputDir

str

spark_files

list of spark files to add to the spark submit command

NA

List

str

spark_conf

dictionary of key value pairs to add to spark_submit as –conf key=value

NA

Dict

?

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.spark_schemas.SparkParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.spark_schemas.SparkOptions

SparkParameters

key

description

default

field_type

json_type

jarfile

spark jar to call java spark command

(REQUIRED)

String

str

className

spark class to call

(REQUIRED)

String

str

driverMemory

spark driver memory (important for local spark)

6g

String

str

memory

Memory required for spark job

NA

String

str

sparkhome

Spark home directory containing bin/spark_submit

(REQUIRED)

InputDir

str

spark_files

list of spark files to add to the spark submit command

NA

List

str

spark_conf

dictionary of key value pairs to add to spark_submit as –conf key=value

NA

Dict

?

masterUrl

spark master url. For local execution local[num_procs,num_retries]

(REQUIRED)

String

str

opts = <marshmallow.schema.SchemaOpts object>
asap.module.schemas.stack_schemas module
class asap.module.schemas.stack_schemas.InputStackParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.schemas.RenderParameters, asap.module.schemas.stack_schemas.ZValueParameters, asap.module.schemas.stack_schemas.OverridableParameterSchema

template schema for schemas which take input from a stack

This schema is designed to be a schema_type for an ArgSchemaParser object

InputStackParameters

key

description

default

field_type

json_type

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

input_stack

no description

(REQUIRED)

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.stack_schemas.OutputStackParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.schemas.RenderParameters, asap.module.schemas.stack_schemas.ZValueParameters, asap.module.schemas.stack_schemas.ProcessPoolParameters, asap.module.schemas.stack_schemas.OverridableParameterSchema

template schema for writing tilespecs to an output stack

This schema is designed to be a schema_type for an ArgSchemaParser object

OutputStackParameters

key

description

default

field_type

json_type

pool_size

no description

1

Integer

int

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

output_stack

no description

(REQUIRED)

String

str

close_stack

no description

False

Boolean

bool

overwrite_zlayer

no description

False

Boolean

bool

output_stackVersion

no description

NA

RenderStackVersion

dict

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.stack_schemas.OverridableParameterSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

static fix_badkey(data, badkey, goodkey)[source]
opts = <marshmallow.schema.SchemaOpts object>
override_input(data)[source]
class asap.module.schemas.stack_schemas.ProcessPoolParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

ProcessPoolParameters

key

description

default

field_type

json_type

pool_size

no description

1

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.stack_schemas.RenderCycle(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

RenderCycle

key

description

default

field_type

json_type

number

no description

NA

Integer

int

stepNumber

no description

NA

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.stack_schemas.RenderMipMapPathBuilder(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

RenderMipMapPathBuilder

key

description

default

field_type

json_type

rootPath

no description

NA

String

str

numberOfLevels

no description

NA

Integer

int

extension

no description

NA

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.stack_schemas.RenderStackVersion(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

RenderStackVersion

key

description

default

field_type

json_type

createTimestamp

no description

NA

String

str

versionNotes

no description

NA

String

str

cycleNumber

no description

NA

Integer

int

cycleStepNumber

no description

NA

Integer

int

stackResolutionX

no description

NA

Float

float

stackResolutionY

no description

NA

Float

float

stackResolutionZ

no description

NA

Float

float

materializedBoxRootPath

no description

NA

String

str

mipmapPathBuilder

no description

NA

RenderMipMapPathBuilder

dict

cycle

no description

NA

RenderCycle

dict

stackResolutionValues

no description

NA

List

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.stack_schemas.StackTransitionParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.stack_schemas.OutputStackParameters, asap.module.schemas.stack_schemas.InputStackParameters

template schema for schemas which take input from one stack, perform (mostly render-python based) operations on tiles from that stack, and output tiles to another stack.

This schema is designed to be a schema_type for an ArgSchemaParser object

StackTransitionParameters

key

description

default

field_type

json_type

pool_size

no description

1

Integer

int

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

input_stack

no description

(REQUIRED)

String

str

output_stack

no description

(REQUIRED)

String

str

close_stack

no description

False

Boolean

bool

overwrite_zlayer

no description

False

Boolean

bool

output_stackVersion

no description

NA

RenderStackVersion

dict

opts = <marshmallow.schema.SchemaOpts object>
class asap.module.schemas.stack_schemas.ZValueParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.stack_schemas.OverridableParameterSchema

template schema which interprets z values on which to act assumes a hierarchy such that minZ, maxZ are superceded by z which is superceded by zValues.

ZValueParameters

key

description

default

field_type

json_type

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

generate_zValues(data)[source]
opts = <marshmallow.schema.SchemaOpts object>
Module contents
Submodules
asap.module.render_module module
class asap.module.render_module.RenderModule(schema_type=None, *args, **kwargs)[source]

Bases: argschema.argschema_parser.ArgSchemaParser

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type RenderParameters

default_schema

alias of asap.module.schemas.schemas.RenderParameters

exception asap.module.render_module.RenderModuleException[source]

Bases: Exception

Base Exception class for render module

class asap.module.render_module.SparkModule(input_data=None, schema_type=None, output_schema_type=None, args=None, logger_name='argschema.argschema_parser')[source]

Bases: argschema.argschema_parser.ArgSchemaParser

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type SparkParameters

default_schema

alias of asap.module.schemas.spark_schemas.SparkParameters

classmethod get_args(**kwargs)[source]

override to append to spark call

static get_cmd_opt(v, flag=None)[source]
static get_flag_cmd(v, flag=None)[source]
classmethod get_spark_call(masterUrl=None, jarfile=None, className=None, driverMemory=None, memory=None, sparkhome=None, spark_files=None, spark_conf=None, **kwargs)[source]
classmethod get_spark_command(**kwargs)[source]
run_spark_command(**kwargs)[source]
static sanitize_cmd(cmd)[source]
exception asap.module.render_module.SparkModuleError[source]

Bases: asap.module.render_module.RenderModuleException

error thrown by asap spark modules

class asap.module.render_module.StackInputModule(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.RenderModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type InputStackParameters

default_schema

alias of asap.module.schemas.stack_schemas.InputStackParameters

get_inputstack_zs(input_stack=None, render=None, **kwargs)[source]
get_overlapping_inputstack_zvalues(input_stack=None, zValues=None, render=None, **kwargs)[source]
class asap.module.render_module.StackOutputModule(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.RenderModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type OutputStackParameters

default_schema

alias of asap.module.schemas.stack_schemas.OutputStackParameters

delete_zValues(zValues=None, output_stack=None, render=None)[source]
output_tilespecs_to_stack(tilespecs, output_stack=None, sharedTransforms=None, close_stack=None, overwrite_zlayer=None, render=None, pool_size=None, **kwargs)[source]
validate_tilespecs(input_stack, output_stack, z, render=None)[source]
class asap.module.render_module.StackTransitionModule(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.StackOutputModule, asap.module.render_module.StackInputModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type OutputStackParameters

asap.module.template_module module
class asap.module.template_module.TemplateModule(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.RenderModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type TemplateParameters

default_output_schema

alias of asap.module.schemas.schemas.TemplateOutputParameters

default_schema

alias of asap.module.schemas.schemas.TemplateParameters

run()[source]
Module contents
asap.montage package
Submodules
asap.montage.run_montage_job_for_section module
asap.montage.schemas module
Module contents
asap.point_match_optimization package
Submodules
asap.point_match_optimization.point_match_optimization module
asap.point_match_optimization.schemas module
class asap.point_match_optimization.schemas.PointMatchOptimizationParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.schemas.RenderParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

PointMatchOptimizationParameters

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

stack

Name of the stack containing the tile pair

(REQUIRED)

String

str

tile_stack

Name of the stack that will hold these two tiles

None

String

str

tileId1

tileId of the first tile in the tile pair

(REQUIRED)

String

str

tileId2

tileId of the second tile in the tile pair

(REQUIRED)

String

str

pool_size

Pool size for parallel processing

10

Integer

int

SIFT_options

no description

(REQUIRED)

SIFT_options

dict

outputDirectory

Parent directory in which subdirectories will be created to store images and point-match results from SIFT

(REQUIRED)

OutputDir

str

url_options

no description

(REQUIRED)

url_options

dict

opts = <marshmallow.schema.SchemaOpts object>
class asap.point_match_optimization.schemas.PointMatchOptimizationParametersOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

PointMatchOptimizationParametersOutput

key

description

default

field_type

json_type

output_html

Output html file that shows all the tilepair plot and results

(REQUIRED)

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.point_match_optimization.schemas.PtMatchOptimizationParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.schemas.RenderParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

PtMatchOptimizationParameters

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

stack

Name of the stack containing the tile pair (not the base stack)

(REQUIRED)

String

str

tile_stack

Name of the stack that will hold these two tiles

None

String

str

tilepair_file

Tile pair file

(REQUIRED)

InputFile

str

no_tilepairs_to_test

Number of tilepairs to be tested for optimization - default = 10

10

Integer

int

filter_tilepairs

Do you want filter the tilpair file for pairs that overlap? - default = False

False

Boolean

bool

max_tilepairs_with_matches

How many tilepairs with matches required for selection of optimized parameter set

0

Integer

int

numberOfThreads

Number of threads to run point matching job

5

Integer

int

SIFT_options

no description

(REQUIRED)

SIFT_options

dict

outputDirectory

Parent directory in which subdirectories will be created to store images and point-match results from SIFT

(REQUIRED)

OutputDir

str

url_options

no description

(REQUIRED)

url_options

dict

pool_size

Pool size for parallel processing

10

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
validate_data(data)[source]
class asap.point_match_optimization.schemas.PtMatchOptimizationParametersOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

PtMatchOptimizationParametersOutput

key

description

default

field_type

json_type

output_html

Output html file that shows all the tilepair plot and results

(REQUIRED)

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.point_match_optimization.schemas.SIFT_options(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

SIFT_options

key

description

default

field_type

json_type

SIFTfdSize

SIFT feature descriptor size: how many samples per row and column

[8]

List

int

SIFTmaxScale

SIFT maximum scale: minSize * minScale < size < maxSize * maxScale

[0.85]

List

float

SIFTminScale

SIFT minimum scale: minSize * minScale < size < maxSize * maxScale

[0.5]

List

float

SIFTsteps

SIFT steps per scale octave

[3]

List

int

matchIterations

Match filter iterations

[1000]

List

int

matchMaxEpsilon

Minimal allowed transfer error for match filtering

[20.0]

List

float

matchMaxNumInliers

Maximum number of inliers for match filtering

[500]

List

int

matchMaxTrust

Reject match candidates with a cost larger than maxTrust * median cost

[3.0]

List

float

matchMinInlierRatio

Minimal ratio of inliers to candidates for match filtering

[0.0]

List

float

matchMinNumInliers

Minimal absolute number of inliers for match filtering

[10]

List

int

matchModelType

Type of model for match filtering Possible Values: [TRANSLATION, RIGID, SIMILARITY, AFFINE]

[‘AFFINE’]

List

str

matchRod

Ratio of distances for matches

[0.92]

List

float

renderScale

Render canvases at this scale

[0.35]

List

float

opts = <marshmallow.schema.SchemaOpts object>
class asap.point_match_optimization.schemas.url_options(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

url_options

key

description

default

field_type

json_type

normalizeForMatching

normalize for matching

True

Boolean

bool

renderWithFilter

Render with Filter

True

Boolean

bool

renderWithoutMask

Render without mask

False

Boolean

bool

excludeAllTransforms

Exclude all transforms

False

Boolean

bool

excludeFirstTransformAndAllAfter

Exclude first transfrom and all after

False

Boolean

bool

excludeTransformsAfterLast

Exclude transforms after last

False

Boolean

bool

opts = <marshmallow.schema.SchemaOpts object>
Module contents
asap.pointmatch package
Submodules
asap.pointmatch.create_tilepairs module
class asap.pointmatch.create_tilepairs.TilePairClientModule(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.RenderModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type TilePairClientParameters

client_class = 'org.janelia.render.client.TilePairClient'
client_script_name = 'run_ws_client.sh'
default_output_schema

alias of asap.pointmatch.schemas.TilePairClientOutputParameters

default_schema

alias of asap.pointmatch.schemas.TilePairClientParameters

run()[source]
asap.pointmatch.generate_point_matches_qsub module
class asap.pointmatch.generate_point_matches_qsub.PointMatchClientModuleQsub(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.RenderModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type RenderParameters

run()[source]
asap.pointmatch.generate_point_matches_spark module
class asap.pointmatch.generate_point_matches_spark.PointMatchClientModuleSpark(input_data=None, schema_type=None, output_schema_type=None, args=None, logger_name='argschema.argschema_parser')[source]

Bases: asap.module.render_module.SparkModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type PointMatchClientParametersSpark

default_output_schema

alias of asap.pointmatch.schemas.PointMatchClientOutputSchema

default_schema

alias of asap.pointmatch.schemas.PointMatchClientParametersSpark

classmethod get_args(**kwargs)[source]

override to append to spark call

classmethod get_pointmatch_args(baseDataUrl=None, owner=None, collection=None, pairJson=None, SIFTfdSize=None, SIFTminScale=None, SIFTmaxScale=None, SIFTsteps=None, matchRod=None, matchModelType=None, matchIterations=None, matchMaxEpsilon=None, matchMinInlierRatio=None, matchMinNumInliers=None, matchMaxNumInliers=None, matchMaxTrust=None, maxFeatureCacheGb=None, clipWidth=None, clipHeight=None, renderScale=None, renderWithFilter=None, renderWithoutMask=None, renderFullScaleWidth=None, renderFullScaleHeight=None, fillWithNoise=None, rootFeatureDirectory=None, renderFilterListName=None, requireStoredFeatures=None, matchFilter=None, **kwargs)[source]
run()[source]
asap.pointmatch.generate_point_matches_spark.add_arg(l, argname, args)[source]
asap.pointmatch.generate_point_matches_spark.form_sift_params_list(args)[source]
asap.pointmatch.generate_point_matches_spark.get_host_port_dict_from_url(url)[source]
asap.pointmatch.schemas module
class asap.pointmatch.schemas.CollectionId(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: marshmallow.schema.Schema

CollectionId

key

description

default

field_type

json_type

owner

owner of collection

(REQUIRED)

String

str

name

name of collection

(REQUIRED)

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.pointmatch.schemas.PointMatchClientOutputSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: marshmallow.schema.Schema

PointMatchClientOutputSchema

key

description

default

field_type

json_type

collectionId

collection identifying details

(REQUIRED)

CollectionId

dict

pairCount

number of tile pairs in collection

(REQUIRED)

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.pointmatch.schemas.PointMatchClientParametersQsub(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.schemas.RenderParameters, asap.pointmatch.schemas.SIFTPointMatchParameters, asap.module.schemas.spark_schemas.SparkOptions

This schema is designed to be a schema_type for an ArgSchemaParser object

PointMatchClientParametersQsub

key

description

default

field_type

json_type

jarfile

spark jar to call java spark command

(REQUIRED)

String

str

className

spark class to call

(REQUIRED)

String

str

driverMemory

spark driver memory (important for local spark)

6g

String

str

memory

Memory required for spark job

NA

String

str

sparkhome

Path to the spark home directory

/allen/aibs/pipeline/image_processing/volume_assembly/utils/spark

InputDir

str

spark_files

list of spark files to add to the spark submit command

NA

List

str

spark_conf

dictionary of key value pairs to add to spark_submit as –conf key=value

NA

Dict

?

baseDataUrl

api endpoint url e.g. http://<host>[:port]/render-ws/v1

NA

String

str

owner

owner of match collection

NA

String

str

collection

match collection name

NA

String

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

matchRod

Ratio of first to second nearest neighbors used as a cutoff in matching features. 0.92 if excluded or None

NA

Float

float

matchModelType

Model to match for RANSAC filtering. ‘AFFINE’ if excluded or None

NA

String

str

matchIterations

RANSAC filter iterations. 1000 if excluded or None

NA

Integer

int

matchMaxEpsilon

no description

NA

Float

float

matchMinInlierRatio

Minimal ratio of inliers to candidates for successful RANSAC filtering. 0.0 if excluded or None

NA

Float

float

matchMinNumInliers

Minimum absolute number of inliers for successful RANSAC filtering. 4 if excluded or None

NA

Integer

int

matchMaxNumInliers

Maximum absolute number of inliers allowed after RANSAC filtering. unlimited if excluded or None

NA

Integer

int

matchMaxTrust

Maximum trust for filtering such that candidates with cost larger than matchMaxTrust * median cost are rejected. 3.0 if excluded or None

NA

Float

float

matchFilter

whether to match one set of matches, or multiple sets. And, whether to keep them separate, or aggregate them. SINGLE_SET if excluded or None.

NA

String

str

rootFeatureDirectory

Root directory for saved feature lists. Features extracted from dynamically rendered canvases if excluded or None.

NA

String

str

requireStoredFeatures

Whether to throw an exception in case features stored in rootFeatureDirectory cannot be found. Missing features are extracted from dynamically rendered canvases if excluded or None

NA

Boolean

bool

maxFeatureCacheGb

Maximum size of feature cache, in GB. 2GB if excluded or None

NA

Integer

int

clipWidth

Full scale pixels to include in clipped rendering of LEFT/RIGHT oriented tile pairs. Will not LEFT/RIGHT clip if excluded or None.

NA

Integer

int

clipHeight

Full scale pixels to include in clipped rendering of TOP/BOTTOM oriented tile pairs. Will not TOP/BOTTOM clip if excluded or None.

NA

Integer

int

renderScale

Scale at which image tiles will be rendered. 1.0 (full scale) if excluded or None

NA

Float

float

renderWithFilter

Render tiles using default filtering (0 and 255 pixel values replaced with integer in U(64, 191), followed by default NormalizeLocalContrast). True if excluded or None

NA

Boolean

bool

renderWithoutMask

Render tiles without mipMapLevel masks. True if excluded or None

NA

Boolean

bool

renderFullScaleWidth

Full scale width for all rendered tiles

NA

Integer

int

renderFullScaleHeight

Full scale height for all rendered tiles

NA

Integer

int

fillWithNoise

Fill each canvas image with noise prior to rendering. True if excluded or None

NA

Boolean

bool

renderFilterListName

Apply specified filter list to all renderings

NA

String

str

SIFTfdSize

SIFT feature descriptor size – samples per row and column. 8 if excluded or None

NA

Integer

int

SIFTminScale

SIFT minimum scale – minSize * minScale < size < maxSize * maxScale. 0.5 if excluded or None

NA

Float

float

SIFTmaxScale

SIFT maximum scale – minSize * minScale < size < maxSize * maxScale. 0.85 if excluded or None

NA

Float

float

SIFTsteps

SIFT steps per scale octave. 3 if excluded or None

NA

Integer

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

pairJson

JSON file where tile pairs are stored (.json, .gz, .zip)

(REQUIRED)

InputFile

str

pbs_template

pbs template to wrap spark job

(REQUIRED)

InputFile

str

no_nodes

Number of nodes to run the pbs job

30

Integer

int

ppn

Number of processors per node (default = 30)

30

Integer

int

queue_name

Name of the queue to submit the job

connectome

String

str

logdir

location to set logging for qsub command

(REQUIRED)

OutputDir

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.pointmatch.schemas.PointMatchClientParametersSpark(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.spark_schemas.SparkParameters, asap.pointmatch.schemas.SIFTPointMatchParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

PointMatchClientParametersSpark

key

description

default

field_type

json_type

baseDataUrl

api endpoint url e.g. http://<host>[:port]/render-ws/v1

NA

String

str

owner

owner of match collection

NA

String

str

collection

match collection name

NA

String

str

render

no description

NA

RenderClientParameters

dict

matchRod

Ratio of first to second nearest neighbors used as a cutoff in matching features. 0.92 if excluded or None

NA

Float

float

matchModelType

Model to match for RANSAC filtering. ‘AFFINE’ if excluded or None

NA

String

str

matchIterations

RANSAC filter iterations. 1000 if excluded or None

NA

Integer

int

matchMaxEpsilon

no description

NA

Float

float

matchMinInlierRatio

Minimal ratio of inliers to candidates for successful RANSAC filtering. 0.0 if excluded or None

NA

Float

float

matchMinNumInliers

Minimum absolute number of inliers for successful RANSAC filtering. 4 if excluded or None

NA

Integer

int

matchMaxNumInliers

Maximum absolute number of inliers allowed after RANSAC filtering. unlimited if excluded or None

NA

Integer

int

matchMaxTrust

Maximum trust for filtering such that candidates with cost larger than matchMaxTrust * median cost are rejected. 3.0 if excluded or None

NA

Float

float

matchFilter

whether to match one set of matches, or multiple sets. And, whether to keep them separate, or aggregate them. SINGLE_SET if excluded or None.

NA

String

str

rootFeatureDirectory

Root directory for saved feature lists. Features extracted from dynamically rendered canvases if excluded or None.

NA

String

str

requireStoredFeatures

Whether to throw an exception in case features stored in rootFeatureDirectory cannot be found. Missing features are extracted from dynamically rendered canvases if excluded or None

NA

Boolean

bool

maxFeatureCacheGb

Maximum size of feature cache, in GB. 2GB if excluded or None

NA

Integer

int

clipWidth

Full scale pixels to include in clipped rendering of LEFT/RIGHT oriented tile pairs. Will not LEFT/RIGHT clip if excluded or None.

NA

Integer

int

clipHeight

Full scale pixels to include in clipped rendering of TOP/BOTTOM oriented tile pairs. Will not TOP/BOTTOM clip if excluded or None.

NA

Integer

int

renderScale

Scale at which image tiles will be rendered. 1.0 (full scale) if excluded or None

NA

Float

float

renderWithFilter

Render tiles using default filtering (0 and 255 pixel values replaced with integer in U(64, 191), followed by default NormalizeLocalContrast). True if excluded or None

NA

Boolean

bool

renderWithoutMask

Render tiles without mipMapLevel masks. True if excluded or None

NA

Boolean

bool

renderFullScaleWidth

Full scale width for all rendered tiles

NA

Integer

int

renderFullScaleHeight

Full scale height for all rendered tiles

NA

Integer

int

fillWithNoise

Fill each canvas image with noise prior to rendering. True if excluded or None

NA

Boolean

bool

renderFilterListName

Apply specified filter list to all renderings

NA

String

str

SIFTfdSize

SIFT feature descriptor size – samples per row and column. 8 if excluded or None

NA

Integer

int

SIFTminScale

SIFT minimum scale – minSize * minScale < size < maxSize * maxScale. 0.5 if excluded or None

NA

Float

float

SIFTmaxScale

SIFT maximum scale – minSize * minScale < size < maxSize * maxScale. 0.85 if excluded or None

NA

Float

float

SIFTsteps

SIFT steps per scale octave. 3 if excluded or None

NA

Integer

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

pairJson

JSON file where tile pairs are stored (.json, .gz, .zip)

(REQUIRED)

InputFile

str

jarfile

spark jar to call java spark command

(REQUIRED)

String

str

className

spark class to call

(REQUIRED)

String

str

driverMemory

spark driver memory (important for local spark)

6g

String

str

memory

Memory required for spark job

NA

String

str

sparkhome

Spark home directory containing bin/spark_submit

(REQUIRED)

InputDir

str

spark_files

list of spark files to add to the spark submit command

NA

List

str

spark_conf

dictionary of key value pairs to add to spark_submit as –conf key=value

NA

Dict

?

masterUrl

spark master url. For local execution local[num_procs,num_retries]

(REQUIRED)

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.pointmatch.schemas.PointMatchOpenCVParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.schemas.RenderParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

PointMatchOpenCVParameters

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

ndiv

one tile per tile pair subdivided into ndiv x ndiv for easier homography finding

8

Integer

int

matchMax

per tile pair limit, randomly chosen after SIFT and RANSAC

1000

Integer

int

downsample_scale

passed to cv2.resize(fx=, fy=)

0.3

Float

float

SIFT_nfeature

passed to cv2.xfeatures2d.SIFT_create(nfeatures=)

20000

Integer

int

SIFT_noctave

passed to cv2.xfeatures2d.SIFT_create(nOctaveLayers=)

3

Integer

int

SIFT_sigma

passed to cv2.xfeatures2d.SIFT_create(sigma=)

1.5

Float

float

RANSAC_outlier

passed to cv2.findHomography(src, dst, cv2.RANSAC, outlier)

5.0

Float

float

FLANN_ntree

passed to cv2.FlannBasedMatcher()

5

Integer

int

FLANN_ncheck

passed to cv2.FlannBasedMatcher()

50

Integer

int

ratio_of_dist

ratio in Lowe’s ratio test

0.7

Float

float

CLAHE_grid

tileGridSize for cv2 CLAHE

None

Integer

int

CLAHE_clip

clipLimit for cv2 CLAHE

None

Float

float

pairJson

full path of tilepair json

NA

String

str

input_stack

Name of raw input lens data stack

NA

String

str

match_collection

name of point match collection

NA

String

str

ncpus

number of CPUs to use

-1

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.pointmatch.schemas.SIFTPointMatchParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.ArgSchema, asap.module.schemas.renderclient_schemas.FeatureExtractionParameters, asap.module.schemas.renderclient_schemas.FeatureRenderParameters, asap.module.schemas.renderclient_schemas.FeatureRenderClipParameters, asap.module.schemas.renderclient_schemas.FeatureStorageParameters, asap.module.schemas.renderclient_schemas.MatchDerivationParameters, asap.module.schemas.renderclient_schemas.RenderParametersMatchWebServiceParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

SIFTPointMatchParameters

key

description

default

field_type

json_type

baseDataUrl

api endpoint url e.g. http://<host>[:port]/render-ws/v1

NA

String

str

owner

owner of match collection

NA

String

str

collection

match collection name

NA

String

str

render

no description

NA

RenderClientParameters

dict

matchRod

Ratio of first to second nearest neighbors used as a cutoff in matching features. 0.92 if excluded or None

NA

Float

float

matchModelType

Model to match for RANSAC filtering. ‘AFFINE’ if excluded or None

NA

String

str

matchIterations

RANSAC filter iterations. 1000 if excluded or None

NA

Integer

int

matchMaxEpsilon

no description

NA

Float

float

matchMinInlierRatio

Minimal ratio of inliers to candidates for successful RANSAC filtering. 0.0 if excluded or None

NA

Float

float

matchMinNumInliers

Minimum absolute number of inliers for successful RANSAC filtering. 4 if excluded or None

NA

Integer

int

matchMaxNumInliers

Maximum absolute number of inliers allowed after RANSAC filtering. unlimited if excluded or None

NA

Integer

int

matchMaxTrust

Maximum trust for filtering such that candidates with cost larger than matchMaxTrust * median cost are rejected. 3.0 if excluded or None

NA

Float

float

matchFilter

whether to match one set of matches, or multiple sets. And, whether to keep them separate, or aggregate them. SINGLE_SET if excluded or None.

NA

String

str

rootFeatureDirectory

Root directory for saved feature lists. Features extracted from dynamically rendered canvases if excluded or None.

NA

String

str

requireStoredFeatures

Whether to throw an exception in case features stored in rootFeatureDirectory cannot be found. Missing features are extracted from dynamically rendered canvases if excluded or None

NA

Boolean

bool

maxFeatureCacheGb

Maximum size of feature cache, in GB. 2GB if excluded or None

NA

Integer

int

clipWidth

Full scale pixels to include in clipped rendering of LEFT/RIGHT oriented tile pairs. Will not LEFT/RIGHT clip if excluded or None.

NA

Integer

int

clipHeight

Full scale pixels to include in clipped rendering of TOP/BOTTOM oriented tile pairs. Will not TOP/BOTTOM clip if excluded or None.

NA

Integer

int

renderScale

Scale at which image tiles will be rendered. 1.0 (full scale) if excluded or None

NA

Float

float

renderWithFilter

Render tiles using default filtering (0 and 255 pixel values replaced with integer in U(64, 191), followed by default NormalizeLocalContrast). True if excluded or None

NA

Boolean

bool

renderWithoutMask

Render tiles without mipMapLevel masks. True if excluded or None

NA

Boolean

bool

renderFullScaleWidth

Full scale width for all rendered tiles

NA

Integer

int

renderFullScaleHeight

Full scale height for all rendered tiles

NA

Integer

int

fillWithNoise

Fill each canvas image with noise prior to rendering. True if excluded or None

NA

Boolean

bool

renderFilterListName

Apply specified filter list to all renderings

NA

String

str

SIFTfdSize

SIFT feature descriptor size – samples per row and column. 8 if excluded or None

NA

Integer

int

SIFTminScale

SIFT minimum scale – minSize * minScale < size < maxSize * maxScale. 0.5 if excluded or None

NA

Float

float

SIFTmaxScale

SIFT maximum scale – minSize * minScale < size < maxSize * maxScale. 0.85 if excluded or None

NA

Float

float

SIFTsteps

SIFT steps per scale octave. 3 if excluded or None

NA

Integer

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

pairJson

JSON file where tile pairs are stored (.json, .gz, .zip)

(REQUIRED)

InputFile

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.pointmatch.schemas.SwapPointMatches(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.schemas.RenderParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

SwapPointMatches

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

match_owner

Match collection owner name

(REQUIRED)

String

str

source_collection

Source point match collection

(REQUIRED)

String

str

target_collection

Target point match collection

(REQUIRED)

String

str

zValues

List of integer group ids

(REQUIRED)

List

int

pool_size

Pool size

5

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.pointmatch.schemas.SwapPointMatchesOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

SwapPointMatchesOutput

key

description

default

field_type

json_type

source_collection

Source point match collection

(REQUIRED)

String

str

target_collection

Target point match collection

(REQUIRED)

String

str

swapped_zs

List of group ids that got swapped

(REQUIRED)

List

int

nonswapped_zs

List of group ids that did not get swapped

(REQUIRED)

List

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.pointmatch.schemas.TilePairClientOutputParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

TilePairClientOutputParameters

key

description

default

field_type

json_type

tile_pair_file

location of json file with tile pair inputs

(REQUIRED)

InputFile

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.pointmatch.schemas.TilePairClientParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.schemas.RenderParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

TilePairClientParameters

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

stack

input stack to which tilepairs need to be generated

(REQUIRED)

String

str

baseStack

Base stack

None

String

str

minZ

z min for generating tilepairs

None

Integer

int

maxZ

z max for generating tilepairs

None

Integer

int

xyNeighborFactor

Multiply this by max(width, height) of each tile to determine radius for locating neighbor tiles

0.9

Float

float

zNeighborDistance

Look for neighbor tiles with z values less than or equal to this distance from the current tile’s z value

2

Integer

int

excludeCornerNeighbors

Exclude neighbor tiles whose center x and y is outside the source tile’s x and y range respectively

True

Boolean

bool

excludeSameLayerNeighbors

Exclude neighbor tiles in the same layer (z) as the source tile

False

Boolean

bool

excludeCompletelyObscuredTiles

Exclude tiles that are completely obscured by reacquired tiles

True

Boolean

bool

output_dir

Output directory path to save the tilepair json file

(REQUIRED)

OutputDir

str

memGB

Memory for the java client to run

6G

String

str

opts = <marshmallow.schema.SchemaOpts object>
validate_data(data)[source]
Module contents
asap.residuals package
Submodules
asap.residuals.compute_residuals module
asap.residuals.compute_residuals.compute_mean_tile_residuals(residuals)[source]
asap.residuals.compute_residuals.compute_residuals_within_group(render, stack, matchCollectionOwner, matchCollection, z, min_points=1, tilespecs=None)[source]
asap.residuals.compute_residuals.get_tile_centers(tilespecs)[source]
Module contents
asap.rough_align package
Submodules
asap.rough_align.apply_rough_alignment_to_montages module
exception asap.rough_align.apply_rough_alignment_to_montages.ApplyRoughAlignmentException[source]

Bases: asap.module.render_module.RenderModuleException

Something is wrong in ApplyRough….

class asap.rough_align.apply_rough_alignment_to_montages.ApplyRoughAlignmentTransform(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.RenderModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type ApplyRoughAlignmentTransformParameters

default_output_schema

alias of asap.rough_align.schemas.ApplyRoughAlignmentOutputParameters

default_schema

alias of asap.rough_align.schemas.ApplyRoughAlignmentTransformParameters

run()[source]
asap.rough_align.apply_rough_alignment_to_montages.add_masks_to_lowres(render, stack, z, mask_map)[source]
asap.rough_align.apply_rough_alignment_to_montages.apply_rough_alignment(render, input_stack, prealigned_stack, lowres_stack, output_stack, output_dir, scale, mask_input_dir, update_lowres_with_masks, read_masks_from_lowres_stack, filter_montage_output_with_masks, mask_exts, Z, apply_scale=False, consolidateTransforms=True, remap_section_ids=False)[source]
asap.rough_align.apply_rough_alignment_to_montages.filter_highres_with_masks(resolved_highres, tspec_lowres, mask_map)[source]
function to return a filtered list of tilespecs from a

ResolvedTiles object, based on a lowres mask

Parameters
  • resolved_highres (renderapi.resolvedtiles.ResolvedTiles object) – tilespecs and transforms from a single section

  • tspec_lowres (renderapi.tilespec.TileSpec object) – tilespec from a downsampled stack

  • mask_map (dict) – keys should match lowres tileids, values are mask file URI

Returns

new_highres – which highres specs are fully contained within the boundary of mask=255

Return type

List of renderapi.tilespec.TileSpec objects

asap.rough_align.apply_rough_alignment_to_montages.get_mask_paths(mask_input_dir, tilespecs, read_masks_from_lowres_stack, exts=['png', 'tif'])[source]
asap.rough_align.do_rough_alignment module
asap.rough_align.schemas module
class asap.rough_align.schemas.ApplyRoughAlignmentOutputParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

ApplyRoughAlignmentOutputParameters

key

description

default

field_type

json_type

zs

list of z values that were applied to

NA

NumpyArray

?

output_stack

stack where applied transforms were set

NA

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.rough_align.schemas.ApplyRoughAlignmentTransformParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.schemas.RenderParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

ApplyRoughAlignmentTransformParameters

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

montage_stack

stack to make a downsample version of

(REQUIRED)

String

str

prealigned_stack

stack with dropped tiles corrected for stitching errors

None

String

str

lowres_stack

montage scape stack with rough aligned transform

(REQUIRED)

String

str

output_stack

output high resolution rough aligned stack

(REQUIRED)

String

str

tilespec_directory

path to save section images

(REQUIRED)

String

str

map_z

map the montage Z indices to the rough alignment indices (default - False)

False

Boolean

bool

remap_section_ids

map section ids as well with the new z mapping. Default = False

False

Boolean

bool

consolidate_transforms

should the transforms be consolidated? (default - True)

True

Boolean

bool

scale

scale of montage scapes

(REQUIRED)

Float

float

apply_scale

do you want to apply scale

False

Boolean

bool

pool_size

pool size for parallel processing

10

Integer

int

new_z

List of new z values to be mapped to

None

List

int

old_z

List of z values to apply rough alignment to

(REQUIRED)

List

int

mask_input_dir

directory containing mask files. basenames of masks that match tileIds in the rough stack will be handled.

None

InputDir

str

read_masks_from_lowres_stack

masks will be taken from lowres tilespecs. any mask_input_dir ignored.

False

Boolean

bool

update_lowres_with_masks

should the masks be added to the rough stack?

False

Boolean

bool

filter_montage_output_with_masks

should the tiles written be filtered by the masks?

False

Boolean

bool

mask_exts

what kind of mask files to recognize

[‘png’, ‘tif’]

List

str

close_stack

whether to set output stack to COMPLETE

True

Boolean

bool

opts = <marshmallow.schema.SchemaOpts object>
validate_data(data)[source]
class asap.rough_align.schemas.DownsampleMaskHandlerSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.schemas.RenderParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

DownsampleMaskHandlerSchema

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

stack

stack that is read and modified with masks

(REQUIRED)

String

str

close_stack

set COMPLETE or not

True

Boolean

bool

mask_dir

directory containing masks, named <z>_*.png where<z> is a z value in input_stack and may be specifiedin z_apply

None

InputDir

str

collection

name of collection to be filtered by mask, or resetcan be None for no operation

None

String

str

zMask

z values for which the masks will be set

None

List

int

zReset

z values for which the masks will be reset

None

List

int

mask_exts

what kind of mask files to recognize

[‘png’, ‘tif’]

List

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.rough_align.schemas.LowresStackParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

LowresStackParameters

key

description

default

field_type

json_type

stack

Input downsample images section stack

(REQUIRED)

String

str

owner

Owner of the input lowres stack

None

String

str

project

Project of the input lowres stack

None

String

str

service_host

Service host for the input stack Render service

None

String

str

baseURL

Base URL of the Render service for the source stack

None

String

str

renderbinPath

Client scripts location

None

String

str

verbose

Want the output to be verbose?

0

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.rough_align.schemas.MakeAnchorStackSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.stack_schemas.StackTransitionParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

MakeAnchorStackSchema

key

description

default

field_type

json_type

pool_size

no description

1

Integer

int

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

not used in this module, keeps parents happy

[1000]

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

input_stack

no description

(REQUIRED)

String

str

output_stack

no description

(REQUIRED)

String

str

close_stack

no description

False

Boolean

bool

overwrite_zlayer

no description

False

Boolean

bool

output_stackVersion

no description

NA

RenderStackVersion

dict

transform_xml

xml transforms from trakemimages from which these are madeare assumed to be named <z>_*.png

NA

InputFile

str

transform_json

Human generated list of transforms.or, json scraped from xmlKeys are of form <z>_*.png where z matches a tilespec in input_stack and values are AffineModel transform jsonswill override xml input.

None

InputFile

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.rough_align.schemas.OutputLowresStackParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

OutputLowresStackParameters

key

description

default

field_type

json_type

stack

Input downsample images section stack

(REQUIRED)

String

str

owner

Owner of the input lowres stack

None

String

str

project

Project of the input lowres stack

None

String

str

service_host

Service host for the input stack Render service

None

String

str

baseURL

Base URL of the Render service for the source stack

None

String

str

renderbinPath

Client scripts location

None

String

str

verbose

Want the output to be verbose?

0

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.rough_align.schemas.PairwiseRigidOutputSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

PairwiseRigidOutputSchema

key

description

default

field_type

json_type

minZ

minimum z value in output stack

(REQUIRED)

Integer

int

maxZ

minimum z value in output stack

(REQUIRED)

Integer

int

output_stack

name of output stack

(REQUIRED)

String

str

missing

list of z values missing in z range of output stack

(REQUIRED)

List

int

masked

list of z values masked in z range of output stack

(REQUIRED)

List

int

residuals

pairwise residuals in output stack

(REQUIRED)

List

?

opts = <marshmallow.schema.SchemaOpts object>
class asap.rough_align.schemas.PairwiseRigidSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.stack_schemas.StackTransitionParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

PairwiseRigidSchema

key

description

default

field_type

json_type

pool_size

no description

1

Integer

int

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

input_stack

no description

(REQUIRED)

String

str

output_stack

no description

(REQUIRED)

String

str

close_stack

no description

False

Boolean

bool

overwrite_zlayer

no description

False

Boolean

bool

output_stackVersion

no description

NA

RenderStackVersion

dict

match_collection

Point match collection name

(REQUIRED)

String

str

gap_file

json file {k: v} where int(k) is a z value to skipentries in here that are not already missing willbe omitted from the output stacki.e. this is a place one can skip sections

None

InputFile

str

translate_to_positive

translate output stack to positive space

True

Boolean

bool

translation_buffer

minimum (x, y) of output stack if translate_to_positive=True

[0, 0]

List

float

anchor_stack

fix transforms using tiles in this stack

None

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.rough_align.schemas.PointMatchCollectionParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

PointMatchCollectionParameters

key

description

default

field_type

json_type

owner

Point match collection owner (defaults to render owner

None

String

str

match_collection

Point match collection name

(REQUIRED)

String

str

server

baseURL of the Render service holding the point match collection

None

String

str

verbose

Verbose output flag

0

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
Module contents
asap.stack package
Submodules
asap.stack.consolidate_transforms module
class asap.stack.consolidate_transforms.ConsolidateTransforms(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.RenderModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type ConsolidateTransformsParameters

default_output_schema

alias of asap.stack.schemas.ConsolidateTransformsOutputParameters

default_schema

alias of asap.stack.schemas.ConsolidateTransformsParameters

run()[source]
asap.stack.consolidate_transforms.consolidate_transforms(tforms, ref_tforms=[], logger=<RootLogger root (WARNING)>, makePolyDegree=0, keep_ref_tforms=False)[source]
asap.stack.consolidate_transforms.dereference_tforms(tforms, ref_tforms)[source]
asap.stack.consolidate_transforms.flatten_and_dereference_tforms(tforms, ref_tforms)[source]
asap.stack.consolidate_transforms.flatten_tforms(tforms)[source]
asap.stack.consolidate_transforms.process_z(render, stack, outstack, transform_slice, z)[source]
asap.stack.redirect_mipmaps module

change storage directory of imageUrl in a given mipMapLevel

class asap.stack.redirect_mipmaps.RedirectMipMapsModule(schema_type=None, *args, **kwargs)[source]

Bases: asap.module.render_module.StackTransitionModule

Note

This class takes a ArgSchema as an input to parse inputs , with a default schema of type RedirectMipMapsParameters

default_output_schema

alias of asap.stack.schemas.RedirectMipMapsOutput

default_schema

alias of asap.stack.schemas.RedirectMipMapsParameters

static get_replacement_ImagePyramid(ip, mml_d_map)[source]
run()[source]
asap.stack.schemas module
class asap.stack.schemas.ConsolidateTransformsOutputParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

ConsolidateTransformsOutputParameters

key

description

default

field_type

json_type

output_stack

name of output stack

(REQUIRED)

String

str

numZ

Number of z values processed

(REQUIRED)

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.stack.schemas.ConsolidateTransformsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.schemas.RenderParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

ConsolidateTransformsParameters

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

stack

stack to consolidate

(REQUIRED)

String

str

postfix

postfix to add to stack name on saving if no output defined (default _CONS)

_CONS

String

str

transforms_slice

a string representing a slice describing the set of transforms to be consolidated (i.e. 1:)

slice(None, None, None)

Slice

str

output_stack

name of output stack (default to adding postfix to input)

NA

String

str

pool_size

name of output stack (default to adding postfix to input)

10

Integer

int

minZ

minimum z to consolidate in read in from stack and write to output_stack. Default to minimum z in stack

NA

Float

float

maxZ

maximum z to consolidate in read in from stack and write to output_stack. Default to maximum z in stack

NA

Float

float

overwrite_zlayer

whether to remove the existing layer from the target stack before uploading.

False

Boolean

bool

close_stack

no description

False

Boolean

bool

opts = <marshmallow.schema.SchemaOpts object>
class asap.stack.schemas.MipMapDirectories(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

MipMapDirectories

key

description

default

field_type

json_type

level

mipMapLevel for which parent directory will be changed

(REQUIRED)

Integer

int

directory

directory where relocated mipmaps are found.

(REQUIRED)

InputDir

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.stack.schemas.RedirectMipMapsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

RedirectMipMapsOutput

key

description

default

field_type

json_type

zValues

no description

(REQUIRED)

List

int

output_stack

no description

(REQUIRED)

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.stack.schemas.RedirectMipMapsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.stack_schemas.StackTransitionParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

RedirectMipMapsParameters

key

description

default

field_type

json_type

pool_size

no description

1

Integer

int

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

input_stack

no description

(REQUIRED)

String

str

output_stack

no description

(REQUIRED)

String

str

close_stack

no description

False

Boolean

bool

overwrite_zlayer

no description

False

Boolean

bool

output_stackVersion

no description

NA

RenderStackVersion

dict

new_mipmap_directories

no description

(REQUIRED)

MipMapDirectories

list

opts = <marshmallow.schema.SchemaOpts object>
class asap.stack.schemas.RemapZsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

RemapZsOutput

key

description

default

field_type

json_type

zValues

no description

(REQUIRED)

List

int

output_stack

no description

(REQUIRED)

String

str

opts = <marshmallow.schema.SchemaOpts object>
class asap.stack.schemas.RemapZsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.stack_schemas.StackTransitionParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

RemapZsParameters

key

description

default

field_type

json_type

pool_size

no description

1

Integer

int

minZ

no description

NA

Integer

int

maxZ

no description

NA

Integer

int

z

no description

NA

Integer

int

zValues

no description

NA

List

int

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

input_stack

no description

(REQUIRED)

String

str

output_stack

no description

(REQUIRED)

String

str

close_stack

no description

False

Boolean

bool

overwrite_zlayer

no description

False

Boolean

bool

output_stackVersion

no description

NA

RenderStackVersion

dict

remap_sectionId

no description

NA

Boolean

bool

new_zValues

no description

(REQUIRED)

List

int

opts = <marshmallow.schema.SchemaOpts object>
class asap.stack.schemas.SwapZsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: argschema.schemas.DefaultSchema

SwapZsOutput

key

description

default

field_type

json_type

source_stacks

List of source stacks that have been successfully swapped

(REQUIRED)

List

str

target_stacks

List of target stacks that have been successfully swapped

(REQUIRED)

List

str

swapped_zvalues

no description

NA

List

?

opts = <marshmallow.schema.SchemaOpts object>
class asap.stack.schemas.SwapZsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: asap.module.schemas.schemas.RenderParameters

This schema is designed to be a schema_type for an ArgSchemaParser object

SwapZsParameters

key

description

default

field_type

json_type

input_json

file path of input json file

NA

InputFile

str

output_json

file path to output json file

NA

OutputFile

str

log_level

set the logging level of the module

ERROR

LogLevel

str

render

parameters to connect to render server

(REQUIRED)

RenderClientParameters

dict

source_stack

List of source stacks

(REQUIRED)

List

str

target_stack

List of target stacks

(REQUIRED)

List

str

complete_source_stack

set source stack state to complete after copying Default=False

False

Boolean

bool

complete_target_stack

set target stack state to complete after copying Default=False

False

Boolean

bool

zValues

no description

NA

List

?

delete_source_stack

Do you want to delete source stack after copying its contents?. Default=False

False

Boolean

bool

pool_size

Pool size

5

Integer

int

opts = <marshmallow.schema.SchemaOpts object>
Module contents

Module contents

Indices and tables