class SNPRotation(EnumSpec, PacuAttr): component = 'x-svc-comp-input-select' description = EmberAttr('') placeholder = EmberAttr('0 for vertical, 90 for horizontal') title = EmberAttr('Rotation') # tooltip = EmberAttr('') items = EmberAttr(rotations)
class ExpBy(EnumSpec, PacuAttr): component = 'x-svc-comp-input-select' description = EmberAttr('string') placeholder = EmberAttr('') title = EmberAttr('Experimenter') items = EmberAttr(people) tooltip = EmberAttr('Who is arranging this session?')
class ExpOn(EnumSpec, PacuAttr): component = 'x-svc-comp-input-select' description = EmberAttr('string') placeholder = EmberAttr('select...') title = EmberAttr('Gear') items = EmberAttr(gears) tooltip = EmberAttr('')
class Unit(EnumSpec, PacuAttr): component = 'x-svc-comp-input-select' description = EmberAttr('description for unit') placeholder = EmberAttr('choose 1') title = EmberAttr('Width Unit') items = EmberAttr((deg, cm)) tooltip = EmberAttr('tooltip for unit')
class ExampleFieldSelect(EnumSpec, PacuAttr): component = 'x-svc-comp-input-select' description = EmberAttr('A short description') placeholder = EmberAttr('Prompt message...') title = EmberAttr('Select') items = EmberAttr((i1, i2)) tooltip = EmberAttr('More tips for this field, regarding the value.')
class SNPImageMag(PacuAttr, PositiveIntSpec): component = 'x-svc-comp-input-text' description = EmberAttr('Image magnification factor') placeholder = EmberAttr('integer') title = EmberAttr('ImageMag') tooltip = EmberAttr( 'This number determines size of movie. (Dimension of monitor pixels divided by this number.)' )
class SNPViewPortOverride(PacuAttr, PositiveFloatListSpec): component = 'x-svc-comp-input-array' description = EmberAttr('Two numbers') placeholder = EmberAttr('0, 0') title = EmberAttr('View Port Override') tooltip = EmberAttr( 'When you run a warped stimulus with too SHORT distance like 10 cm, ' 'visuals could be rendered off screen. This parameter overrides ' 'the extent of view port. Setting `0, 0` skips override.' 'By default, view port is set the same dimension of monitor.')
class PacuAttr(IncrementalHash): embers = EmberAttr.descriptor_set() component = 'x-svc-comp-input-text' def get_ember_meta(self, inst, type): val = self.__get__(inst, type) # triggers __key__ set return dict(key=self.__key__, val=val, component=self.component, attrs=OrderedDict(self.embers.items())) def __set__(self, inst, value): try: super(PacuAttr, self).__set__(inst, value) except Exception as e: msg = ('Unable to set an attribute ' '`{title}` of `{owner}`.({reason!s})').format( title=self.title, owner=type(inst).__name__, reason=e) raise Exception(msg)
class OpacityPeriod(PacuAttr, PositiveIntSpec): component = 'x-svc-comp-input-text' description = EmberAttr('second') # placeholder = EmberAttr('') title = EmberAttr('Opacity Period')
class Gamma(PacuAttr, PositiveFloatSpec): component = 'x-svc-comp-input-text' title = EmberAttr('Gamma') description = EmberAttr('description for gamma') placeholder = EmberAttr('A placeholder when there is no input') tooltip = EmberAttr('Tips for example or extra information')
class Repetition(PacuAttr, PositiveIntSpec): component = 'x-svc-comp-input-text' description = EmberAttr('number') placeholder = EmberAttr('place for repetition') title = EmberAttr('Repetition') tooltip = EmberAttr('tooltip for repetition')
class Pin(PacuAttr, ZPositiveIntSpec): component = 'x-svc-comp-input-text' description = EmberAttr('Signal will emit on this pin number.') placeholder = EmberAttr('ex) 0') title = EmberAttr('Pin Number') tooltip = EmberAttr('tooltiptime')
class SFrequencies(PacuAttr, PositiveFloatListSpec): component = 'x-svc-comp-input-array' description = EmberAttr('floating numbers') placeholder = EmberAttr('place for sfreq') title = EmberAttr('Spatial Frequencies') tooltip = EmberAttr('tooltip for sfreq')
class Check(PacuAttr, BoolSpec): component = 'x-svc-comp-input-check' description = EmberAttr('boolean') title = EmberAttr('') tooltip = EmberAttr('')
class TFrequency(PacuAttr, ZPositiveFloatSpec): component = 'x-svc-comp-input-array' description = EmberAttr('description for tfreq') placeholder = EmberAttr('place for tfreq') title = EmberAttr('Temporal Frequency')
class SNPImgSize(PacuAttr, PositiveIntSpec): component = 'x-svc-comp-input-text' description = EmberAttr('') placeholder = EmberAttr('') title = EmberAttr('Image(Texture) Size') tip = EmberAttr('')
class WaitTime(PacuAttr, ZPositiveIntSpec): component = 'x-svc-comp-input-text' description = EmberAttr('After synchronization') placeholder = EmberAttr('ex) 0') title = EmberAttr('Wait Time') tooltip = EmberAttr('tooltip for wait time')
class SNPDim(PacuAttr, PositiveFloatSpec): component = 'x-svc-comp-input-text' description = EmberAttr('Image size') placeholder = EmberAttr('pixel') title = EmberAttr('Dim') tip = EmberAttr('in degree')
class Width(PacuAttr, ZPositiveIntSpec): component = 'x-svc-comp-input-text' description = EmberAttr('degree') placeholder = EmberAttr('width of stimulus') title = EmberAttr('Width') tooltip = EmberAttr('0 for bypass')
class Port(PacuAttr, PositiveIntSpec): component = 'x-svc-comp-input-text' description = EmberAttr('port number') placeholder = EmberAttr('port number') title = EmberAttr('Port') tooltip = EmberAttr('1-65535')
class SNPFilter(EnumSpec, PacuAttr): component = 'x-svc-comp-input-select' description = EmberAttr('') placeholder = EmberAttr('Square for debug purpose') title = EmberAttr('Filter') items = EmberAttr(rotations)
class Dist(PacuAttr, PositiveFloatSpec): component = 'x-svc-comp-input-text' description = EmberAttr('description for dist') placeholder = EmberAttr('place for dist') title = EmberAttr('Distance') tooltip = EmberAttr('tooltip for dist')
class Orientations(PacuAttr, PositiveFloatListSpec): component = 'x-svc-comp-input-array' description = EmberAttr('floating numbers') placeholder = EmberAttr('place for orientations') title = EmberAttr('Orientations') tooltip = EmberAttr('tooltip for orientations')
class PositionTuple(PacuAttr, FloatListSpec): component = 'x-svc-comp-input-array' description = EmberAttr('2 floats in deg') placeholder = EmberAttr('') title = EmberAttr('Position') tooltip = EmberAttr('')
class SquareFactor(PacuAttr, PositiveIntSpec): component = 'x-svc-comp-input-text' description = EmberAttr('number') placeholder = EmberAttr('') title = EmberAttr('Square Factor') tooltip = EmberAttr('NxN number of squares will be rendered.')
class Timeout(PacuAttr, PositiveIntSpec): component = 'x-svc-comp-input-text' description = EmberAttr('how long?') placeholder = EmberAttr('timeout') title = EmberAttr('Timeout') tooltip = EmberAttr('second..')
class Randomize(PacuAttr, BoolSpec): component = 'x-svc-comp-input-check' description = EmberAttr('boolean') title = EmberAttr('Randomize')
class SNPMaxSFrequency(PacuAttr, PositiveFloatSpec): component = 'x-svc-comp-input-text' description = EmberAttr('') placeholder = EmberAttr('') title = EmberAttr('Max SFrequency') tip = EmberAttr('')
class Flicker(PacuAttr, BoolSpec): component = 'x-svc-comp-input-check' description = EmberAttr('boolean') title = EmberAttr('Flicker') tooltip = EmberAttr('Check if you want to show full field flicker.')
class SNPContrPeriod(PacuAttr, PositiveIntSpec): component = 'x-svc-comp-input-text' description = EmberAttr('contrast period') placeholder = EmberAttr('') title = EmberAttr('Contrast Period') tip = EmberAttr('')