PYME.LMVis.pipeline module

class PYME.LMVis.pipeline.Pipeline(filename=None, visFr=None, execute_on_invalidation=True)

Bases: object

ClearGenerated()
CloseFiles()
GenQuads(max_leaf_size=10)
OpenChannel(filename='', ds=None, channel_name='', **kwargs)

Open a file - accepts optional keyword arguments for use with files saved as .txt and .mat. These are:

FieldNames: a list of names for the fields in the text file or

matlab variable.

VarName: the name of the variable in the .mat file which

contains the data.

SkipRows: Number of header rows to skip for txt file data

PixelSize: Pixel size if not in nm

OpenFile(filename='', ds=None, clobber_recipe=True, **kwargs)

Open a file - accepts optional keyword arguments for use with files saved as .txt and .mat. These are:

FieldNames: a list of names for the fields in the text file or

matlab variable.

VarName: the name of the variable in the .mat file which

contains the data.

SkipRows: Number of header rows to skip for txt file data

PixelSize: Pixel size if not in nm

Rebuild(**kwargs)

Rebuild the pipeline. Called when the selected data source is changed/modified and/or the filter is changed.

addColumn(name, values, default=0)

Adds a column to the currently selected data source. Attempts to guess whether the size matches the input or the output, and adds padding values appropriately if it matches the output.

Parameters
namestr

The column name

valuesarray like

The values

defaultfloat

The default value to pad with if we’ve given an output-sized array

addDataSource(dskey, ds, add_missing_vars=True)

Add a new data source

Parameters
dskeystr

The name of the new data source

dsan tabular.inputFilter derived class

The new data source

property chromaticShifts
property colour_mapper

Search for a colour mapper rather than use a hard coded reference - allows loading of saved pipelines with colour mapping

property dataSources
property dtypes
property fluorSpecies
property fluorSpeciesDyes
getBlobs()
getEdb()
getNeighbourDists(forceRetriang=False)
getTriangles(recalc=False)
get_layer_data(dsname)

Returns layer data for a given name. The principle difference to just accessing self.dataSources directly is that we do some magic relating to allow colour channels to be accessed with the dot notation e.g. dsname.colour_channel

keys()
property layer_data_source_names

Return a list of names of datasources we can use with dotted channel selection

There is a little bit of magic here as we augment the names with dotted names for colour channel selection

property layer_datasources
measureObjects()
new_ds_name(stub, return_count=False)

Generate a name for a new, unused, pipeline step output based on a stub

FIXME - should this be in ModuleCollection instead? FIXME - should this use recipe.outputs as well?

Parameters
stub - string to start the name with
Returns
property output
save_hdf(filename)
save_txt(outFile, keys=None)
selectDataSource(dskey)

Set the currently selected data source

Parameters
dskeystring

The data source name

property selectedDataSource

The currently selected data source (an instance of tabular.inputFilter derived class)

toDataFrame(keys=None)
to_recarray(keys=None)