當前位置: 首頁>>代碼示例>>Python>>正文


Python Params.channel_type方法代碼示例

本文整理匯總了Python中params.Params.channel_type方法的典型用法代碼示例。如果您正苦於以下問題:Python Params.channel_type方法的具體用法?Python Params.channel_type怎麽用?Python Params.channel_type使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在params.Params的用法示例。


在下文中一共展示了Params.channel_type方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: Params

# 需要導入模塊: from params import Params [as 別名]
# 或者: from params.Params import channel_type [as 別名]
import makeunitdb
from ocptype import ANNOTATION, UINT32
from params import Params
from ramon import H5AnnotationFile, setField, getField, queryField, makeAnno, createSpecificSynapse
from postmethods import putAnnotation, getAnnotation, getURL, postURL
import kvengine_to_test
import site_to_test
#from ocpgraph import genGraphRAMON
SITE_HOST = site_to_test.site

p = Params()
p.token = 'unittest'
p.resolution = 0
p.channels = ['ANNO1']
p.channel_type = ANNOTATION
p.datatype = UINT32

class Test_GraphGen:

  def setup_class(self):
    """Create the unittest database"""
    makeunitdb.createTestDB(p.token, channel_list=p.channels, public=True, readonly=0)

    cutout1 = "0/2,5/1,3/0,2"
    cutout2 = "0/1,3/4,6/2,5"
    cutout3 = "0/4,6/2,5/5,7"
    cutout4 = "0/6,8/5,9/2,4"

    syn_segments1 = [[7, 3], ]
    syn_segments2 = [[7, 4], ]
開發者ID:j6k4m8,項目名稱:ndstore,代碼行數:32,代碼來源:test_graphgen.py

示例2: Params

# 需要導入模塊: from params import Params [as 別名]
# 或者: from params.Params import channel_type [as 別名]
import blosc
import time

sys.path += [os.path.abspath('../django/')]
import OCP.settings
os.environ['DJANGO_SETTINGS_MODULE'] = 'ocpblaze.settings'

from ocplib import MortonXYZ
from params import Params

p = Params()
p.token = "blaze"
p.resolution = 0
p.channels = ['image']
p.window = [0,0]
p.channel_type = "image"
p.datatype = "uint32"
SIZE = 1024
ZSIZE = 16

def generateURL(zidx):
  """Run the Benchmark."""

  i = zidx
  [x,y,z] = MortonXYZ(i)
  p.args = (x*SIZE, (x+1)*SIZE, y*SIZE, (y+1)*SIZE, z*ZSIZE, (z+1)*ZSIZE)
  image_data = np.ones([1,ZSIZE,SIZE,SIZE], dtype=np.uint32) * random.randint(0,255)
  return postBlosc(p, image_data)

def generateURL2(zidx):
  [x,y,z] = MortonXYZ(zidx)
開發者ID:j6k4m8,項目名稱:ndstore,代碼行數:33,代碼來源:benchmark.py

示例3: Params

# 需要導入模塊: from params import Params [as 別名]
# 或者: from params.Params import channel_type [as 別名]
os.environ['DJANGO_SETTINGS_MODULE'] = 'OCP.settings'

from ocptype import IMAGE, UINT8
from params import Params
from jsonproj import createJson
from postmethods import getURL, postURL, postNPZ, getNPZ
import makeunitdb
import site_to_test

SITE_HOST = site_to_test.site

p = Params()
p.token = 'unittest'
p.resolution = 0
p.channels = ['CHAN1', 'CHAN2']
p.channel_type = IMAGE
p.datatype = UINT8
p.dataset = 'unittest_ds'

class Test_Project_Json():

  def setup_class(self):
    """Setup Parameters"""
    pass

  def teardown_class(self):
    """Teardown Parameters"""
    #makeunitdb.deleteTestDB('unittest')
    #makeunitdb.deleteTestDB('unittest2')
    # calling a different fucntion for project list as django1.9 introduced new weirdness
    makeunitdb.deleteTestDBList(['unittest','unittest2'])
開發者ID:nagyistge,項目名稱:ndstore,代碼行數:33,代碼來源:test_json.py

示例4: Params

# 需要導入模塊: from params import Params [as 別名]
# 或者: from params.Params import channel_type [as 別名]
import makeunitdb
from ndlib.ndtype import *
from params import Params
from postmethods import *
from test_settings import *

# Test_Blosc
# 1 - test_get_blosc
# 2 - test_post_blosc

p = Params()
p.token = 'unittest'
p.resolution = 0
p.channels = ['IMAGE1', 'IMAGE2']
p.window = [0,500]
p.channel_type = TIMESERIES
p.datatype = UINT8
p.voxel = [4.0,4.0,3.0]

class Test_Blosc:

  def setup_class(self):

    makeunitdb.createTestDB(p.token, channel_list=p.channels, channel_type=p.channel_type, channel_datatype=p.datatype)

  def teardown_class(self):
    makeunitdb.deleteTestDB(p.token)


  def test_get_blosc (self):
    """Test the xy slice cutout"""
開發者ID:neurodata,項目名稱:ndstore,代碼行數:33,代碼來源:test_blosc.py


注:本文中的params.Params.channel_type方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。