PYME.recipes.output module

class PYME.recipes.output.CSVOutput(parent=None, **kwargs)

Bases: PYME.recipes.base.OutputModule

Save tabular data as csv.

Parameters:

inputName : basestring

the name (in the recipe namespace) of the table to save.

filePattern : basestring

a pattern through which the output filename is generated by variable substitution (using str.format)

scheme : enum

The storage method, one of ‘File’, ‘pyme-cluster://’ or ‘pyme-cluster:// - aggregate`. File is the default and saves to a file on disk.

Notes

When using File or pyme-cluster:// schemes, we convert the data to a pandas DataFrame and uses the to_csv method to save. When using pyme-cluster:// - aggregate we convert to a recarray and use PYME.IO.clusterResults.fileResults.

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

save(namespace[, context]) Save recipes output(s) to CSV
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
save(namespace, context={})

Save recipes output(s) to CSV

Parameters:

namespace : dict

The recipe namespace

context : dict

Information about the source file to allow pattern substitution to generate the output name. At least ‘basedir’ (which is the fully resolved directory name in which the input file resides) and ‘filestub’ (which is the filename without any extension) should be resolved.

class PYME.recipes.output.HDFOutput(parent=None, **kwargs)

Bases: PYME.recipes.base.OutputModule

Save tabular data as a table in HDF5.

Parameters:

inputVariables : dict

a dictionary mapping parameter names to table names

filePattern : basestring

a pattern through which the output filename is generated by variable substitution (using str.format)

scheme : enum

The storage method, one of ‘File’, ‘pyme-cluster://’ or ‘pyme-cluster:// - aggregate`. File is the default and saves to a file on disk.

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

save(namespace[, context]) Save recipes output(s) to HDF5
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
default_view
inputs
save(namespace, context={})

Save recipes output(s) to HDF5

Parameters:

namespace : dict

The recipe namespace

context : dict

Information about the source file to allow pattern substitution to generate the output name. At least ‘basedir’ (which is the fully resolved directory name in which the input file resides) and ‘filestub’ (which is the filename without any extension) should be resolved.

class PYME.recipes.output.ImageOutput(parent=None, **kwargs)

Bases: PYME.recipes.base.OutputModule

Save an image with a file type determined by extension.

Parameters:

inputName : basestring

the name (in the recipe namespace) of the image to save.

filePattern : basestring

a pattern through which the output filename is generated by variable substitution (using str.format)

scheme : enum

The storage method, one of ‘File’, ‘pyme-cluster://’ or ‘pyme-cluster:// - aggregate`. File is the default and saves to a file on disk.

Notes

This is a very thin wrapper which simply calls the .save() method on the PYME.IO.image.ImageStack object.

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

generate(namespace[, recipe_context])
save(namespace[, context]) Save recipes output(s) to CSV
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
generate(namespace, recipe_context={})
save(namespace, context={})

Save recipes output(s) to CSV

Parameters:

namespace : dict

The recipe namespace

context : dict

Information about the source file to allow pattern substitution to generate the output name. At least ‘basedir’ (which is the fully resolved directory name in which the input file resides) and ‘filestub’ (which is the filename without any extension) should be resolved.

class PYME.recipes.output.ReportForEachOutput(parent=None, **kwargs)

Bases: PYME.recipes.base.OutputModule

Save an html report for each item in a sequence.

Parameters:

inputName : basestring

the name (in the recipe namespace) of the image to save.

filePattern : basestring

a pattern through which the output filename is generated by variable substitution (using str.format)

scheme : enum

The storage method, one of ‘File’, ‘pyme-cluster://’ or ‘pyme-cluster:// - aggregate`. File is the default and saves to a file on disk.

template : basestring

The path / uri to the html template to use.

Notes

This is a very thin wrapper which simply calls the .save() method on the PYME.IO.image.ImageStack object.

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

save(namespace[, context]) Save recipes output(s) to CSV
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
save(namespace, context={})

Save recipes output(s) to CSV

Parameters:

namespace : dict

The recipe namespace

context : dict

Information about the source file to allow pattern substitution to generate the output name. At least ‘basedir’ (which is the fully resolved directory name in which the input file resides) and ‘filestub’ (which is the filename without any extension) should be resolved.

class PYME.recipes.output.ReportOutput(parent=None, **kwargs)

Bases: PYME.recipes.base.OutputModule

Save an html report.

Parameters:

inputName : basestring

the name (in the recipe namespace) of the image to save.

filePattern : basestring

a pattern through which the output filename is generated by variable substitution (using str.format)

scheme : enum

The storage method, one of ‘File’, ‘pyme-cluster://’ or ‘pyme-cluster:// - aggregate`. File is the default and saves to a file on disk.

template : basestring

The path / uri to the html template to use.

Notes

This is a very thin wrapper which simply calls the .save() method on the PYME.IO.image.ImageStack object.

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

generate(namespace[, recipe_context])
save(namespace[, context]) Save recipes output(s) to CSV
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
generate(namespace, recipe_context={})
save(namespace, context={})

Save recipes output(s) to CSV

Parameters:

namespace : dict

The recipe namespace

context : dict

Information about the source file to allow pattern substitution to generate the output name. At least ‘basedir’ (which is the fully resolved directory name in which the input file resides) and ‘filestub’ (which is the filename without any extension) should be resolved.

class PYME.recipes.output.UnifiedLoader

Bases: jinja2.loaders.BaseLoader

Methods

get_source(environment, template)
get_source(environment, template)
class PYME.recipes.output.XLSOutput(parent=None, **kwargs)

Bases: PYME.recipes.base.OutputModule

Save tabular data as xlsx.

Parameters:

inputName : basestring

the name (in the recipe namespace) of the table to save.

filePattern : basestring

a pattern through which the output filename is generated by variable substitution (using str.format)

scheme : enum

The storage method, one of ‘File’, ‘pyme-cluster://’ or ‘pyme-cluster:// - aggregate`. File is the default and saves to a file on disk.

Notes

This casts the data to a pandas DataFrame and uses the to_excel method to save

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

save(namespace[, context]) Save recipes output(s) to CSV
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
save(namespace, context={})

Save recipes output(s) to CSV

Parameters:

namespace : dict

The recipe namespace

context : dict

Information about the source file to allow pattern substitution to generate the output name. At least ‘basedir’ (which is the fully resolved directory name in which the input file resides) and ‘filestub’ (which is the filename without any extension) should be resolved.

PYME.recipes.output.round_sf(num, sf=3)