26 #ifndef STIMULUSGROUP_H_ 28 #define STIMULUSGROUP_H_ 35 #include <boost/random/mersenne_twister.hpp> 36 #include <boost/random/uniform_01.hpp> 37 #include <boost/random/uniform_real.hpp> 38 #include <boost/random/uniform_int.hpp> 39 #include <boost/random/exponential_distribution.hpp> 40 #include <boost/random/normal_distribution.hpp> 41 #include <boost/random/variate_generator.hpp> 43 #define SOFTSTARTTIME 0.1 56 std::fstream tiserfile;
207 void seed(
int rndseed );
unsigned int get_stim_count()
Returns number of stimuli shown.
Definition: StimulusGroup.cpp:623
void set_stimulation_mode(StimulusGroupModeType mode)
Sets the stimulation mode. Can be any of StimulusGroupModeType (MANUAL,RANDOM,SEQUENTIAL,SEQUENTIAL_REV).
Definition: StimulusGroup.cpp:563
void write_stimulus_file(AurynDouble time)
Definition: StimulusGroup.cpp:162
virtual void load_patterns(string filename)
Loads stimulus patterns from a designated pat file given.
Definition: StimulusGroup.cpp:378
NeuronID bgx
Definition: StimulusGroup.h:80
int cur_stim_index
Current stimulus index.
Definition: StimulusGroup.h:133
AurynTime next_action_time
next stimulus time requiring change in rates
Definition: StimulusGroup.h:95
Definition: auryn_definitions.h:148
void set_mean_on_period(AurynFloat period)
Set mean on period.
Definition: StimulusGroup.cpp:156
std::vector< double > get_distribution()
Getter for pattern probability distribution.
Definition: StimulusGroup.cpp:518
void set_baserate(AurynFloat baserate)
Sets the baserate that is the rate at 1 activity.
Definition: StimulusGroup.cpp:138
AurynFloat * activity
Definition: StimulusGroup.h:67
static boost::mt19937 order_gen
Definition: StimulusGroup.h:89
void seed(int rndseed)
Seeds the random number generator for all stimulus groups of the simulation.
Definition: StimulusGroup.cpp:567
void set_pattern_activity(unsigned int i)
Function that loops over the stimulus/pattern vector and sets the activity verctor to the gamma value...
Definition: StimulusGroup.cpp:448
StimulusGroup(NeuronID n, string filename, string stimfile, StimulusGroupModeType stimulusmode=RANDOM, AurynFloat baserate=1.0)
Default constructor.
Definition: StimulusGroup.cpp:110
virtual unsigned int get_num_stimuli()
Returns number of stimuli.
Definition: StimulusGroup.cpp:618
Abstract base class of all objects producing spikes.
Definition: SpikingGroup.h:67
static boost::uniform_01< boost::mt19937 > order_die
Definition: StimulusGroup.h:90
AurynFloat mean_on_period
Definition: StimulusGroup.h:125
AurynTime last_stim_offset_time
last stimulus offset time
Definition: StimulusGroup.h:104
AurynTime refractory_period
Enables a finite refractory time specified in AurynTime (only works for non-binary-pattern mode...
Definition: StimulusGroup.h:154
double AurynDouble
Higher precision floating point datatype.
Definition: auryn_definitions.h:158
StimulusGroupModeType stimulus_order
Definition: StimulusGroup.h:70
std::vector< type_pattern > * get_patterns()
Definition: StimulusGroup.cpp:554
int n
Definition: mkpat.py:5
static boost::mt19937 poisson_gen
Definition: StimulusGroup.h:86
bool stimulus_active
Current stimulus active.
Definition: StimulusGroup.h:138
AurynTime * ttl
Definition: StimulusGroup.h:65
void flat_distribution()
Definition: StimulusGroup.cpp:528
AurynTime get_last_offset_time()
returns the last stimulus offset time in units of AurynTime
Definition: StimulusGroup.cpp:603
bool active
Toggles group active.
Definition: SpikingGroup.h:149
bool randomintensities
Determines if the Group is using random activation intensities.
Definition: StimulusGroup.h:160
Definition: ABSConnection.h:38
void set_next_action_time(double time)
Definition: StimulusGroup.cpp:559
AurynFloat mean_off_period
Definition: StimulusGroup.h:122
virtual void clear_patterns()
Clear stimulus patterns.
Definition: StimulusGroup.cpp:372
AurynTime get_last_action_time()
returns the last action (stim on/off) time in units of AurynTime
Definition: StimulusGroup.cpp:588
void set_activity(NeuronID i, AurynFloat val=0.0)
Definition: StimulusGroup.cpp:353
StimulusGroupModeType
Specifies stimulus order used in StimulusGroup.
Definition: auryn_definitions.h:148
void normalize_distribution()
Definition: StimulusGroup.cpp:535
AurynTime get_last_onset_time()
returns the last stimulus onset time in units of AurynTime
Definition: StimulusGroup.cpp:598
void init(StimulusGroupModeType stimulusmode, string stimfile, AurynFloat baserate)
Definition: StimulusGroup.cpp:34
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
Provides a poisson stimulus at random intervals in one or more predefined subsets of the group that a...
Definition: StimulusGroup.h:50
void set_maxrate(AurynFloat baserate)
TODO.
Definition: StimulusGroup.cpp:145
AurynTime last_stim_onset_time
last stimulus onset time
Definition: StimulusGroup.h:101
AurynTime get_next_action_time()
returns the next action (stim on/off) time in units of AurynTime
Definition: StimulusGroup.cpp:593
unsigned int get_cur_stim()
returns the index of the current (or last – if not active anymore) active stimulus ...
Definition: StimulusGroup.cpp:613
AurynFloat get_activity(NeuronID i)
Gets the activity of unit i.
Definition: StimulusGroup.cpp:364
std::vector< double > probabilities
Definition: StimulusGroup.h:83
virtual void set_active_pattern(unsigned int i)
This function is called internally and sets the activity level to a given active stimulus.
Definition: StimulusGroup.cpp:495
virtual ~StimulusGroup()
Definition: StimulusGroup.cpp:121
void read_next_stimulus_from_file(AurynDouble &time, int &active, int &stimulusid)
Definition: StimulusGroup.cpp:174
std::vector< type_pattern > stimuli
Vector containing all the stimuli.
Definition: StimulusGroup.h:142
NeuronID fgx
Definition: StimulusGroup.h:77
AurynTime last_action_time
last stimulus time requiring change in rates
Definition: StimulusGroup.h:98
void set_all(AurynFloat val=0.0)
Sets sets the activity of all units.
Definition: StimulusGroup.cpp:358
bool binary_patterns
Switches to more efficient algorithm which ignores the gamma value.
Definition: StimulusGroup.h:151
bool randomintervals
Determines if the Group is using random activation intervals.
Definition: StimulusGroup.h:157
bool get_stim_active()
Returns true if currently a stimulus is active and false otherwise.
Definition: StimulusGroup.cpp:608
AurynDouble background_rate
Play random Poisson noise with this rate on all channels when no stim is active.
Definition: StimulusGroup.h:164
void set_distribution(std::vector< double > probs)
Setter for pattern probability distribution.
Definition: StimulusGroup.cpp:501
unsigned int stimulation_count
Counter variable for number of stimuli shown.
Definition: StimulusGroup.h:74
bool background_during_stimulus
Switch for background firing during stimulus.
Definition: StimulusGroup.h:167
NeuronID AurynTime
Defines Auryns discrete time unit of the System clock. Change to AurynLong if 120h of simtime are not...
Definition: auryn_definitions.h:155
virtual void redraw()
Definition: StimulusGroup.cpp:127
AurynFloat curscale
Definition: StimulusGroup.h:127
void set_mean_off_period(AurynFloat period)
Set mean quiet interval between consecutive stimuli.
Definition: StimulusGroup.cpp:150
virtual void evolve()
Standard virtual evolve function.
Definition: StimulusGroup.cpp:185
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151
AurynFloat scale
This is by how much the pattern gamma value is multiplied. The resulting value gives the x-times base...
Definition: StimulusGroup.h:148