Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions PYME/LMVis/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ def Generate(self, settings):
mdh['Origin.z'] = oz + imb.z0

colours = settings['colours']
if ((len(colours) == 1) and (colours[0] == 'all')):
# for recipe usage, if provided with 'all', replace colour list with a list of all available channels
colours = self.colourFilter.getColourChans()

oldC = self.colourFilter.currentColour

ims = []
Expand Down
16 changes: 8 additions & 8 deletions PYME/recipes/localisations.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .base import register_module, ModuleBase, Filter
from .traits import Input, Output, Float, Enum, CStr, Bool, Int, List, DictStrStr, DictStrFloat, DictStrList, ListFloat, ListStr
from .traits import Input, Output, Float, Enum, CStr, Str, Bool, Int, List, DictStrStr, DictStrFloat, DictStrList, ListFloat, ListStr

import numpy as np
from PYME.IO import tabular
Expand Down Expand Up @@ -59,13 +59,13 @@ class DensityMapping(ModuleBase):
jitterScaleZ = Float(1.0)
MCProbability = Float(1.0)
numSamples = Int(10)
colours = ListStr(['none',])
colours = List(Str, ['all',])
zBoundsMode = Enum(['manual', 'min-max'])
zBounds = ListFloat([-500, 500])
zBounds = List(Float, [-500, 500])
zSliceThickness = Float(50.0)
softRender = Bool(True)
xyBoundsMode = Enum(['estimate', 'inherit', 'metadata', 'manual'])
manualXYBounds = ListFloat([0,0,5e3, 5e3])
manualXYBounds = List(Float, [0,0,5e3, 5e3])


def execute(self, namespace):
Expand Down Expand Up @@ -106,10 +106,10 @@ def execute(self, namespace):
namespace[self.outputImage] = out

def _view_items(self, params=None):
from traitsui.api import Group, Item
from traitsui.api import Group, Item, CSVListEditor
return [Item('renderingModule'),
Item('pixelSize'),
#Item('colours', style='text'),#editor=CSVListEditor()),
Item('colours', style='text',editor=CSVListEditor(auto_set=False, enter_set=True)),
#Item('softRender'),
Group(
Item('jitterVariable'),
Expand All @@ -122,11 +122,11 @@ def _view_items(self, params=None):
Group(
Item('zSliceThickness'),
Item('zBoundsMode'),
#Item('zBounds', visible_when='zBoundsMode=="manual"'),
Item('zBounds', visible_when='zBoundsMode=="manual"',editor=CSVListEditor(auto_set=False, enter_set=True)),
label='3D', visible_when='"3D" in renderingModule'),
Group(
Item('xyBoundsMode'),
#Item('manualXYBounds', visible_when='xyBoundsMode=="manual"'),
Item('manualXYBounds', visible_when='xyBoundsMode=="manual"',editor=CSVListEditor(auto_set=False, enter_set=True)),
label='Output Image Size',
),
]
Expand Down
14 changes: 8 additions & 6 deletions docs/cluster/clusterFilesystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ a given directory on their host, it is possible to access the cluster data from
programming languages using standard HTTP requests. When accessing the data in this way,
determining what files are in a given directory (the union of the directory listings of
all the individual servers), and conversely which server to query for a particular file
must be performed by the end user, as is any caching of this directory information. Files
may be added to the cluster using an HTTP `PUT` to one of the servers (deciding which is
again on the implementer). The HTTP servers which make up the cluster can be discovered
must be performed by the implementation. Files
may be added to the cluster using an HTTP `PUT` to one of the servers (load distribution - ie
deciding which server to put to - is left to the implementer). The HTTP servers which make up the cluster can be discovered
using the mDNS protocol and querying/browsing for the `_pyme-http._tcp.local.` service type.

The following is a brief outline of accessing the cluster using command
Expand Down Expand Up @@ -243,10 +243,12 @@ line tools (note - you'll need to use an mDNS library and programatic HTTP fetch
# ensure that data is approximately evenly distributed across nodes
>> curl -T /path/to/file.png http://0.0.0.0:55003/somefolder/newfile.png

The above is mainly shown to reinforce the fact that the protocol is just HTTP.
The command line example above is certainly not the easiest way to implement a client. It is
mainly shown to reinforce the fact that the protocol is just HTTP and is language agnostic.
In practice, you would probably want to reimplement clusterIO in your language of
choice. If performance is important, this reimplementation should includes
caching on directory lookups and local pass-though/bypass.
choice. If performance is important, this reimplementation should include
caching on directory lookups and a "bypass" mechanism to access data stored on the local node
without making a HTTP request.


Read-only access using UnionFS
Expand Down