Debug Node streaming

This commit is contained in:
Florent Guiotte 2018-04-13 11:27:31 +02:00
parent d8f0fe3c19
commit f024ea8c45
4 changed files with 41 additions and 5 deletions

View File

@ -25,9 +25,9 @@
"outputs": [],
"source": [
"load = ld2dap.LoadTIFF('../Data/test.tiff')\n",
"trsh = ld2dap.Treshold(1e3)\n",
"trsh = ld2dap.Treshold(1e4)\n",
"disp = ld2dap.ShowFig(fname=None)\n",
"out = ld2dap.Output()"
"out = ld2dap.RawOutput()"
]
},
{
@ -56,7 +56,17 @@
"metadata": {},
"outputs": [],
"source": [
"out.data, out.metadata"
"out.data.shape"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"for i, m in enumerate(out.metadata):\n",
" print('{}: {}'.format(i, m))"
]
},
{

21
ld2dap/RawOutput.py Normal file
View File

@ -0,0 +1,21 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# \file RawOutput.py
# \brief TODO
# \author Florent Guiotte <florent.guiotte@gmail.com>
# \version 0.1
# \date 13 avril 2018
#
# TODO details
from ld2dap.core import Output
class RawOutput(Output):
def __init__(self):
super().__init__(self.__class__.__name__)
self.data = None
self.metadata = None
def _process(self, data, metadata):
self.data = data
self.metadata = metadata

View File

@ -13,3 +13,4 @@ from .Treshold import Treshold
from .LoadTIFF import LoadTIFF
from .SaveFig import SaveFig
from .ShowFig import ShowFig
from .RawOutput import RawOutput

View File

@ -11,8 +11,8 @@
class Stack(object):
def __init__(self, begin=0, size=1, desc=None, symb=None) :
self.begin = begin
self.end = begin + size
self.begin = begin
self.end = begin + size
self.desc = list()
self.symb = list()
@ -23,3 +23,7 @@ class Stack(object):
if symb is not None:
for i in range(size):
self.symb.append(symb.copy() if isinstance(symb, list) else [symb])
def __str__(self):
return ("Stack: begin: {}, end: {}, desc: {}, symb: {}".format(
self.begin, self.end, self.desc, self.symb))