@staticmethod<EOL><INDENT>def _addSampleData(origData=None, numSamples=<NUM_LIT>, spikeValue=<NUM_LIT:1.0>,<EOL>spikePeriod=<NUM_LIT:20>):<DEDENT>
if origData is None:<EOL><INDENT>origData = []<EOL><DEDENT>if len(origData) > <NUM_LIT:0>:<EOL><INDENT>lastDate = origData[-<NUM_LIT:1>][<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>lastDate = datetime.datetime(<NUM_LIT>, <NUM_LIT:2>, <NUM_LIT:3>)<EOL><DEDENT>dateList = _getDateList(numSamples, lastDate)<EOL>data = copy.copy(origData)<EOL>for idx, date in enumerate(dateList):<EOL><INDENT>if (spikePeriod > <NUM_LIT:0>) and ( (idx + <NUM_LIT:1>) % spikePeriod == <NUM_LIT:0>):<EOL><INDENT>data.append([date, idx, spikeValue])<EOL><DEDENT>else:<EOL><INDENT>data.append([date, idx, <NUM_LIT:0.0>])<EOL><DEDENT><DEDENT>return data<EOL>
Add sample anomaly data to the existing data list and return it.
Note: this does not modify the original data list
Note 2: here we just add in increasing integers as the metric value