Skip to content

OpenEphys reader for legacy format. - #580

Merged
apdavison merged 9 commits into
NeuralEnsemble:masterfrom
samuelgarcia:openephysrawio
Nov 15, 2018
Merged

apdavison merged 9 commits into
NeuralEnsemble:masterfrom
samuelgarcia:openephysrawio

Conversation

@samuelgarcia

Copy link
Copy Markdown
Contributor

No description provided.

@pep8speaks

pep8speaks commented Oct 4, 2018 •

Copy link
Copy Markdown

Hello @samuelgarcia! Thanks for updating the PR.

Line 46:100: E501 line too long (100 > 99 characters)
Line 49:100: E501 line too long (103 > 99 characters)
Line 56:100: E501 line too long (101 > 99 characters)
Line 94:48: E226 missing whitespace around arithmetic operator
Line 99:54: E226 missing whitespace around arithmetic operator
Line 107:100: E501 line too long (122 > 99 characters)
Line 118:17: E125 continuation line with same indent as next logical line
Line 120:100: E501 line too long (113 > 99 characters)
Line 125:49: E225 missing whitespace around operator
Line 127:50: E225 missing whitespace around operator
Line 135:51: E225 missing whitespace around operator
Line 135:85: E225 missing whitespace around operator
Line 138:58: E226 missing whitespace around arithmetic operator
Line 172:48: E226 missing whitespace around arithmetic operator
Line 172:62: E226 missing whitespace around arithmetic operator
Line 190:33: E126 continuation line over-indented for hanging indent
Line 224:75: E226 missing whitespace around arithmetic operator
Line 263:21: E126 continuation line over-indented for hanging indent
Line 394:5: E265 block comment should start with '# '
Line 404:31: E226 missing whitespace around arithmetic operator
Line 414:47: E226 missing whitespace around arithmetic operator
Line 479:40: E226 missing whitespace around arithmetic operator
Line 479:54: E226 missing whitespace around arithmetic operator

Line 17:5: E124 closing bracket does not match visual indentation
Line 69:100: E501 line too long (107 > 99 characters)

Line 17:1: E302 expected 2 blank lines, found 1
Line 21:9: E265 block comment should start with '# '
Line 21:36: W291 trailing whitespace
Line 22:5: E124 closing bracket does not match visual indentation
Line 26:1: E305 expected 2 blank lines after class or function definition, found 1

Comment last updated on October 10, 2018 at 10:51 Hours UTC

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.1%) to 48.543% when pulling 77f7fab on samuelgarcia:openephysrawio into ce01ce2 on NeuralEnsemble:master.

@coveralls

coveralls commented Oct 4, 2018 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.4%) to 48.249% when pulling a86af7f on samuelgarcia:openephysrawio into ce01ce2 on NeuralEnsemble:master.

@samuelgarcia

Copy link
Copy Markdown
Contributor Author

@jsiegle

Here is the PR for OpenEphy in neo

The basic usage at neo.rawio level is

from neo.rawio.openephysrawio import OpenEphysRawIO

dirname = '/path/to/OpenEphys_SampleData_1'
reader = OpenEphysRawIO(dirname=dirname)
reader.parse_header()
print(reader)

raw_sig = reader.get_analogsignal_chunk(block_index=0, seg_index=0, i_start=None, i_stop=None)
print(raw_sig.shape, raw_sig.dtype)

scaled_sig = reader.rescale_signal_raw_to_float

This give

OpenEphysRawIO: OpenEphys_SampleData_1
nb_block: 1
nb_segment:  [1]
signal_channels: [CH0, CH1]
unit_channels: []
event_channels: []

(423936, 2) int16
(423936, 2) float32

Here is the neo.io level with neo objects

from neo.io import OpenEphysIO

reader = OpenEphysIO(dirname=dirname)
seg = reader.read_segment()
anasig = seg.analogsignals[0]
print(anasig.name, anasig.shape, anasig.units)

Give

<class 'neo.core.analogsignal.AnalogSignal'>
Channel bundle (CH0,CH1)  (423936, 2) 1.0 V

@samuelgarcia

Copy link
Copy Markdown
Contributor Author

@Palaeocortex @jsiegle
The commit of today take in account:

  • the multi segment stuuf with "_2", "_3" on all file.
  • the events from file "all_channel.events"

Everything in memmap so load in memory on demand 👍

I have some problems in the dataset from @Palaeocortex because the CH32 do not have the good file length (size not modulo 1024) and the first timestamp is not the same as other channel.
Is it a general case ?

I will implement spikes (and waveform) soon.

@samuelgarcia samuelgarcia added this to the 0.7.0 milestone Oct 5, 2018
@samuelgarcia samuelgarcia changed the title [WIP] OpenEphys reader for legacy format. OpenEphys reader for legacy format. Oct 8, 2018
@samuelgarcia

Copy link
Copy Markdown
Contributor Author

OK. it is done.

@JuliaSprenger @apdavison : this is ready for review.

@Palaeocortex @jsiegle : could you test it and/or have a look in the code ?

Before merging I am still waiting new dataset with multi segment.

@samuelgarcia

samuelgarcia commented Oct 9, 2018 •

Copy link
Copy Markdown
Contributor Author

from #433 @Palecortex said:

Hi! Yes, the file length is not consistent and this occurs often, especially when the OpenEphys GUI freezes. I'm still loading the data because just one data point is missing (if I remember correctly), that means an interval of 1/sampling rate. It is not the official behavior of the OpenEphys GUI though, at least from what I understand from the documentation. I made the consistency checks in my code a bit more flexible to deal with this minor events.

@jsiegle: could you confirm that ?

In the corrupted dataset the CH32 start one record later (1024 samples).
How do you usually deal with that ? Do you clip all other channels ?

@jsiegle

jsiegle commented Oct 9, 2018

Copy link
Copy Markdown

There are two options here—either clip the channels to match the channel with the smallest number of samples, or fill the missing values with NaNs. If the missing segment is short, I would recommend the first option, since it's easier from a user perspective.

Also, I've uploaded an example data set with multiple stops & starts here: https://www.dropbox.com/s/i27lpeyou4a8e3j/Open%20Ephys%20Sample%20Data%20%28multiple%20starts%29.zip?dl=0

Recording is re-started once (resulting in samples appended to the end of the original files), and acquisition is re-started once (creating a new set of files for each channel).

@samuelgarcia

Copy link
Copy Markdown
Contributor Author

@jsiegle Thank you very much for this new file.
@Paleocortex

I have just anderstand the situation which is more complicated that I thought.
I re-read your email on OE mailing

There are two different scenarios:

  1. Recording is stopped and re-started. This will append data to the existing files for each channel, and the > segments can be identified by non-consecutive timestamps.
  2. Acquisition is stopped and re-started (which resets the hardware and the timestamps). This will result in the creation of a new file for each channel with _2, _3, etc. appended to the file name.

The 2. is already implemented. Segment list is a list of file.
The 1. could be implemented. Segment list would be list of slice in one file.
But the combinaison of the both situation make the multi segment over complicated for this IO.

I propose to NOT implemented the recording pause situation (1.) for the moment.
If futur user of this IO will report frequently the need, we will think about this.

So this new actual datset will raise an error for now.

I will try to implemented the case of the dataset from @Paleocortex (smaller files for CH32) but I will do it with the clipping method. I will display a warning in that case.
Filling with Nan is difficult here because this IO do load everything in memory but load chunks at random position and with random size and for random channelselection . Filling Nan here would slow done a lot the read_analogsignal_chunk(..).

@samuelgarcia

Copy link
Copy Markdown
Contributor Author

@jsiegle @Palaeocortex : new problem with the datasetyou provide me.

The situation is worth that only a first timestamp not aligned.

The file "100_CH32.continuous" have very strange 'timestamp : the diff timestamp between each record but here should 1024 but here we 900 or 1200

Here the first 5 recordblock:

(19200, 1024, 0, [   512, -15873,  -8961,  20992,  24832, -25598,  26115,  23553,   4608, -13312,  20480,  15104,  31232,  -4097,  20736,  24576,  20480,  15104,  -1025, -20736,  32000, -32768, -28672,    256,  13824,   -769, -17921,   -769, -14593,      0, -12033,  20224,   4096, -25601,   4352,  -5121, -12033, -12033, -28161,  -8961,  -3841,  -6401, -11265, -28161,  15104,   5120,   4352,      0, -28417,  13824,  15104,  -1793,  -5889, -22529,  20224,  18944,  21248,  20736,  12288, -28416,  28672, -32768,  32000,  18944,  27392,  10240,  13056,  31488,   6912,  20736,  23296,  31488,  23552,  -3841,  14848,  12288,  -5889,  11008, -13313,  15104,   4096, -18689,  -1281, -27649,  30720,  24832,   4096,  16896,  11776, -23808,  23296, -12033,  -9217, -12033,  31232,  24576,  -3841,  -1025, -12545, -32512,  14848,  15104,  25344,  20736,  20736,   1280,   9728,   8448,  -9217,  31488,  24576, -17664,  28672,  -1025,  20480,  20480,  17920,   4608, -11521,  11776, -13313, -12033,  -5121, -13313,  21504,   -513,   5376,  24576, -19200,   -256,  30464,  31232,  12032,  -5377,  31744, -27904,   9472, -27649, -17665,  -2305,  -2305,   6656,  -2561,  11520, -31489, -12801,   5120,   3840, -12289, -31745, -25857, -17665,  -2049, -19713, -22017,  -9473, -18689,   3840,  -4609, -11521, -12545, -20737,  -2049,  -1793,   4096,  19968,   -769,  12032,  -1537,   3840,  18944, -20993,  12032,  23552,  14080,  25600,  -9473,  11520,  -1281,  12032, -28928,  29184, -16640, -28160,      0,   9984, -17921,  20224,   4864,  -4353,  -4097,   6656,  20480,  -5377,   6656,  30976, -12289, -12545, -25857,      0,  -5377, -28673,  -5377, -28673,  18176,  14080,  13568,  31232,  -9985,  18176,  14080,  -2049,  14848,  -9473,  26368,  14592, -11265,  -1281, -20481,  15104,  17664,  19712, -25600,  23040,  12032,  -2049,  -4097,   6656, -17921,  -4609,  31743,  -6401,   6656, -28673, -14849, -28673,  21247, -31745,  30719, -12289, -17665,  24831, -12801, -32513,  -6145,  -4097, -11265,   5120,   -769,  25344,  20480,  -9473,   3840,   7168, -28928, -12544,  20224,  21504,  10752, -32000,  31232,  23040, -18688, -18176, -28928, -28160,  23040,  31232,  31744,  31232,  21248,  31488, -11776, -19200, -14592, -29184,  12288, -17920, -28672, -18176, -25600,  11776, -18176,  29952, -13568,  -9984, -14080,   6657, -12800,  10497,   7681, -26624,   3585, -14848,   4865,  18433, -13312,   8705, -15360,   6913,   3073,  -2304, -21759,  30721,   3330, -10237,  29955, -13056,  -6656,  30464, -15361,  -6400, -26368,  30464,  23552, -13057, -30720,  20224,  10752,  18944, -13057,  23552,   -513,  -5121,  31744,  19456, -26368,  20480,   6144,  32000,  30464, -28416,  17920,  23552, -29696,  18944, -13312,  30976,   3840,  30464,  18176, -10496,  29696,  30464,  19456,  19456, -21504,  12800,   5888,  -1537,  22272,   3073, -14848, -28672,  31488, -29184, -24832, -29952,  32512, -10497,  -5121, -15617,  17664,  30208, -17664,  -1280, -13312, -12544, -15872,   5633,  19201,  -5888, -18944, -25088,  -6656, -19712, -30208,   9728,  13824, -19968, -30208,   -256, -25344, -13824, -27392,  12544,  18944,  -2049,  19968, -30208,     -1, -24832,   3584,  -5377,  31232,  -2049,  -9217, -25857,  18688, -27392,  22272,   8704, -13825,  -2561,  25856,   6656,  13568,   2560,  21760, -22016,  10752,  -5377, -21761,   -257,  19712,  24064,  18688, -18945,   2560,  23808,  12800, -25344, -19200,  -2304, -25856,  29952,  28928,  12288,  10240,  -2817,  -9473, -27393,  19199,  29951,  13823,  30207,  12799,  22527,   2560,  -2817,   2560,  30207, -29953, -13825,  -2305,  10752,  -3841,  -7681,  12544,  29952,  18944, -29185, -15617,   2048,   3840, -13824,  29952,  -9473,  -3841,  10240,  18944,  29696, -11008,   7425, -22016, -25088,  18688, -30208, -25088,  14848,  -3841, -13569,  -3329,  -2561, -24321, -18689,  29951,  -7425,  -2049,  -7937, -24321,  13055, -18945, -13569, -22273, -23809, -20225,  18944,  17664,  29952, -27392, -23809,  30207,  30207, -29953,  12544,  13568,  10752,  17663,  20479,  32767,  29439, -13569, -18945,  14335,  17151,   7167, -19201,  19199,   9727,   4095,  -7681, -30208,   5376, -15617, -13569,  -5377,  12800,  -5377,  32511,  29183,  29183,  30207,  27391, -31233, -28929,  -2049,  -7681, -32513, -23809, -18689, -21505,  28415,  30463,  30207, -29697,  31743,  20223,   3071,  19455,  23807,  31999,  30463,  14079, -29698,  13822,  17918,  19710,  10238,  19710,  19710, -29441, -12289, -28161,  30463, -23553,  -1793, -23809,  23807,  14335, -29697, -29697, -21761,  19711, -29441, -13057, -22529, -30721,  17663,  24063,  24575,  19711,   7423, -13058,  -8706,   6655,   3071, -18434, -29442,  -4610,   7679,   6399, -13058, -18178,  32254, -22274,  19966,  21502,  11774,   4862,  17662,  12030,  -1027,  -1539,   9470,  15102,  -1539, -13571, -12291,   4094,  12286,  -9475, -11011,  25597,  -1027,  32254, -17666,  31488,   4352, -21507,  15358, -21507,  -1028,  20989,  32253, -17411,  31229,   4605,  31741, -27139, -19971, -27651,  32253,  11518, -13059, -22531,  21501,   6397, -32515,  16125,  15869,  21501,   2045,  13821,  -9732,  -3076, -10244, -24580,  -4100, -26116, -16900, -31236,  31996, -26628, -19972, -11780, -21764,  32764, -10244, -10244,   6909, -32004,  17148, -29700, -22276,   6397, -26372,  25852,  32764,  -9732, -11012, -15108,   1533,  -6404,  28412,  18428,   6652,   7164,  20476,  14076,  -1029,  17148,  14076,  10236,  -1285, -14085,  -8709, -15109,   7676, -14597,  -9733, -19461, -24581,  -8197,  -5381,  -5381,  -8197,  -5125,  -7941, -13317,   3324, -21253, -20997,  25083,  23291,  29435,  23291,  23035,   9211, -27653,  28411,  20475,  12795,   9211, -15110,  27386, -14854, -15110, -30726,  26618,  16378,   4859,   9979,   7163,  -5894,  30202, -21254, -21254,  -7942, -26630, -24838, -30470, -26886,  31994, -10502,  -6918, -15110, -24582,  30970, -10758,  -4614, -12806,  27130,  23034, -32006,  28666, -19718,  29178,  28922, -23558, -28166,  -9990, -24838,  -8710,  21242,  13050,  24570,  16122, -25606,  22778,  13050, -16134, -29958, -15622, -31238,  30458, -22534, -24070,   9467, -23814, -29702, -12038,  -7174,   1019, -17926, -15110,   1531, -17414,  -1286,   4347,  20731,   -262, -28422, -14342,  -8966,   8955,  10747,  -6662,  -2822,   5627,   2555,  16123,   -774,   6907, -16646, -16390, -15366, -27654, -16134, -32006,  29946, -13062, -32006,  31482,  15866,  25594, -28934,   9210,  11514,   1274,  -2823,  -3591, -14855, -14599,  11514,  11770,  18426,    762,  -3335,  13306,  13050,   9466,  -1543,   2554,  13818,  10490,  11002,  -2311, -10247,  11514,   1274,  19962,   2298,  10490,  -7943, -24583, -15367,  23801,  -9479, -17671, -28423,   4602, -24327,  -8967, -20231,  28921, -16903,  25337, -16135, -30215,  21753, -29703,  12281,  26361, -22791, -26887, -11783, -31751, -18439,  -8967,  -9735,   1018,  -9991,  -9479,   1274,   9722,   5626, -17671,  -8199,  -4103,    762,  20730,  13562, -30470,   7674,  -3335,  -8455, -24839,   2554, -12295, -16647,   3066,  -6663,   2810, -24071,  19705,  18681,  18681, -21255,  19961,  25849,   7929,   8953,  20473,  30969, -18695, -31239,  27129, -17671, -21511,  -4103,  -7943, -11527, -10759,   2554,  27130,  -2567,  -4615,   9722,  22522, -26886, -26886, -26630,   6139, -20998, -22276, -20995,  22779,   9722,  28666,  -9735,  28410,  28666, -22022,  -4102,  29690, -25606, -16134,  13051,   -774, -17158,   -518,  -8710,  17915,  29435,  23291,  -7173,  29691, -24581,  -8965, -18437,  -3845, -24325,  11260,  20732,  14076,  14844,   8956,   8956,  27388,  31740, -24580, -23556, -18180,  25340,  14844,  14076,  15356,  23036,  16124,   3580,  28156,  29948,  31484,  26364,  20988,  26108,  14076,  31740,  22012,  31740,  26364, -22788,  -6148, -12292,   -772,  -6660,    509,    509,  13821,  10493,  -4356,  10749,  18941,   -259, -22275,  24317, -23299,  27133,     -3,  -6659,   5374,  15870,  11006,   8958,  -3843,   5630,  29694,  16638,  18686,   5630, -25602, -18690,  27646, -20226, -18690, -11010, -12546, -13058,    511, -15874, -10498,   3327, -13058,  25087,  15615,  26623,  27647,   6143,  27903,  27903, -32001, -24321,  29951,    512,   8448,  11008, -11009, -22529,  15616,  11520, -32512, -29696,  22784], [  0,   1,   2,   3,   4,   5,   6,   7,   8, 255])
 (20100, 1024, 0, [ 16640,   5888,  -6145, -15873,   3328,  -5121, -24065,    256,  -6145,  11264,  -9217, -11777,    512,  -7681,   8448,  -2561,  11264,    256,   1024,   6144,  17408, -18688, -31488, -31744,  26880, -15872,    257,  29696, -32512, -25856,  -5120,  -3072,    257,  14593, -22016, -13312,  -7936,  -5376,  -3840,   -256, -26112, -17664, -29696,  23296, -32512,  26624,  16640, -29952, -21760, -26624, -26880, -13568, -22016, -13568,  -5376, -16384,    257, -11520,  -3840,   1281,  11009, -29951,  27137,  27137,  30465,  27137, -22783,  11265,   7937,  16129,  18945, -27647,  31233,  32257,    513,  14593,  32513,  27393,  24065,  27137,   9217,  23553,   4609, -12032,    769,    513,   2305,  15873,  22529,  26625,  15361,  26625, -22783, -22527, -14079, -17151, -15871,  28929, -23807, -14591, -14591,   4610,  -9215,  -1023,   7170,   5122,   2818, -28671, -14335,  -6655, -14847,   5378, -29951, -18687, -28927,  27393,  -9983, -26111, -13823, -15103,  14849,  27137,   1281,  22785,  22785,  -6912,   1537,   5121,  30977,  25601,   6145,  25601,    769,  17153,  21505,  -5376,  21505,  -6656,  24833,  -9472, -15360,    769,  -7680,   2305, -15104,  14337,  25345,  -7680,  14593,  14337,  25345,  30721, -31999, -17663,   5633,  22273,  21761,  31489,  30465, -31743,  31233,   7681,  11521,   8705,  30465,  16897, -16128,  17921,  13825,  15105,  11777,    257,   8449,  -7936,   7425,  12289,  19969,  13569,  11265,  25857, -24575,   8196, -32764,  25089, -32511,  29953,  -3072,  -2304, -16640,  23297,  23041,  24577,  -7167, -19455, -22527, -11775, -23551,   4610, -25087,  -7423,  29441,   7681,  14337,  11009, -13055,  26369,  29441,  -2303, -14591,  -9983, -28159, -24831, -22271, -25599, -28159,  29185, -31999,  20993,  19457,  18177,  29953, -25599, -31231, -25855, -28415, -25855, -12031,  -3839, -17407,  -5375,   8450,  20738,   7170,   2818,   3842,  24578,   5635,  10755, -22782, -26110,  18946,  25090,  13058,  17410,   9730,   1538,   3586,  12546,  22786,  11522,   5890,  -4863,  -2303,   6146,  14594,   6146,   3074,  18946,  19458,   2562,  19458,  24322,  23554,  18178,  30210,  28162, -31230,  19458,  11778,   9730,  30210, -22526,  23810,  23042,  10498,  27138, -18942,  29698,  18946,  10754,   4866,   -255,  -3839,  10498,  -5887,  -6399, -22527,  10242,  21762,      2,   9730,  -5119,  -5887,   -255, -28158,  23042,  20738,  20738,   9986, -31230, -28414, -19966, -14846, -18686,   4355,  -3838,  10755,   2051, -24830, -13054,  -1278,  20227,  -6398, -22270, -12798, -18174, -12542,   4867,   3587, -12798,    770,   2818, -13567, -10751,    514, -23295, -15871,  -7423,   6402,   8450, -13311, -13311, -21503, -19455,   3074, -16383,    258,   2050,  15362,  19202,  15106, -25086, -23550, -13566,  -8190, -19198,  -2302, -24830, -16638, -23550, -32766, -31486,  20738,  25090,   6146, -28414, -21758, -23806,   7427, -11774,  29698,  19970,   6146,  15362,  13570,  23554,   9986,  20994,  29442,  15362,  18178, -31742,  24322,  29442,  26370,  29442,  24066,  13826,  29954,  16386, -22014,  -9726, -25342,  -9726, -27390,  -9982,   1027, -27902,  30722,  23554, -13822, -18430,  22530,  21250,  12802,  30722,  22530, -27390, -15870, -26878,   5890,    514,  -7423, -10495,    258,  -7935, -14079,  -5887, -14079, -14591, -14847, -23807, -27135, -27391, -24319, -17151, -24575,  21761, -28671,  22529, -23295, -23295, -31487,  32513,  24321, -24831, -22527, -16639,  25857,  25857, -17919, -27391,  25857,  22785,  15617,  32001,  22529,  17153,  15617, -25599,  23809,  -1280, -18176, -27904, -25088, -23808,  15872, -32768, -17664, -17152, -16640, -29696, -30720,  26624, -25344, -19968,  20992,  17152,  23808,  29184, -25344, -21248, -17920,  -7680,   2561,  -7680,   4353, -10752,  -3840,  11521,  16129, -25343,  20993,  28929,  15105,  14081,  17409,  16641, -27135,   4098,  -8701,  31747, -28672, -18688, -17664, -11009, -18177,   4352,  27136,  13824,   4096,   6912,   6656,  31488,  30208, -28672,   1793, -15616,  -1280,  -8960,  -1280,  16385,   9729,  20481, -15360, -12544,   1281,  -9728,  -7168, -20736, -16640, -17920, -17920, -12544,  31232, -15616, -16384, -12544, -24064, -28160,  26880,  14848,  12032,  14848,  17152,  16128,  21248, -24064, -31232,  12032,  14848,  14848,   6656,   3584,   6400,  11776,  29696,  30208,  13824, -15361,  10496,  26112,  17664,  10240,   1536,  10496,  22784,  13568,   2304,   3840,  18944, -18176, -14080,  30976,  14336, -29184,  -8704,  -5120,  -5120,  -8448,  -9472,  -7936, -25856,  30976, -21504, -25088, -24064,   4353, -17152,  27904, -29440, -18688, -19712,  11264,  15616, -30720,  16384,  22528,   3328,   6144, -21248, -26624,  30720,  15616,  25344, -28672, -21248, -29696,   3328, -31488, -27392,  30720,  13568,   3584,  -1793,  14336, -25344,  22528,  29952, -25344,   4352, -11777, -24321, -15873,  -4609,   6144,  14592,   8960,   3072,  -1793,   6144,  -5889, -19201, -18177,  -2049, -18177, -25089, -17665, -18177,   3328,  14336,  16640,  14336,  14336,  19712,  19712, -30720,   2048,  -2049,  19456,  22784, -29696,   3328,  27904,   6656,  11264,  14080,  14080, -28160,  26368,  14592,  -4865, -23553, -12801, -15617, -17665,  28159,  -9985,  11264,   3328,   1024, -24065, -24065, -18177,   5888,  -6145, -22273, -19201,  -6913, -12801,  -6913,   8960, -12801,   8960,  14336,   9984,  14336, -18177,  -8705,   2048,  14080,  16384,  19456, -18432,  26368, -31488, -30976, -16128,  -9472, -18688, -16640,   1536,   3328,  14592,   5888,   3072, -13057,  22272,  25088,  22784,  14080, -10497,  13824,   9984,  22272,  -2305,   3328, -21504, -10496, -29440,  13312, -30976, -28416, -21504, -29696,  22272, -26368, -21504,  -8960, -16640, -31232,  -6400, -17152, -27648,  18176,  30464, -13568, -13568, -20224, -31232,  11008,  13056,  16128,   6912, -10497, -25345,   3840,   8960,   3584, -13313, -24577,  -5121, -16385, -12033, -16641, -29697, -19457, -12033,  -2305, -25601, -26369,  -1025,   2816,  -2561, -24833, -15361,  11264,  -3329, -13057, -18433,   1792,   9728,    512,  -6145,  30719,  -7169,  10752,  18176,   5888, -18177, -18433, -24321, -26625,  28159,  30719,  -7425, -17153,   5888, -10241,  30719, -26625,  -6401,   1792, -12033, -10241,  13824,   9984,  -4865, -18433,  10496,  -2302,  -5118,  -6657, -13057, -29441, -19457,   2816, -17409,  29951, -28673,  -2049,   5888,  -2305, -25345, -26113,    768,  -2049,    768, -16129,    768, -16897, -29441,  14847,  11263,  23807,  19711,  31999, -18689,  -4865, -13057, -22529, -21249,  23039,  16895, -18433, -18433, -29441,  20991,  22527, -29697, -24577, -17153, -29441, -24321, -13057,  -2049,   4096, -18177, -26369,  -2049,   4352,  13312,  -4865,  -5377,  -6401,   9216,   2816,  -2817,  15360,  27648,  26368,  -4865, -17153,  -7425,   1024,   2560, -26369, -16129,  -2049,  10752,  -2049,  19711,   3327,  14079,  30975,  19967,  13823,  11519,  19967,  24063,  30719, -25857, -19201, -12033,  -2817,  -5121, -18945, -29185, -31233, -31233, -29185, -20993, -29185,  29695,  14591,  19967,  25343, -29185, -23809, -29441,  14591,  -2562,   -258,   4863,  14079,  -1282,  -1538,  23295, -31489,  28415,   1791,  -3586,   7935,   7935,  18943,  -1538,   3839,  15103, -22017, -12801,  31231, -17665, -17665, -11521, -15873, -24833,  -1537,  -8449, -12289, -11265,  14592,  26112,  14336,   9216, -22785, -11777,  -1537,  -4609, -12545, -28929,  16895,  14335,  16383,  14847,   4351,   4351,   8191, -28673, -17665,  12287,  11007,  20479,  23295,  20735,  10239,  20479,  21247,  25343,  24831,   2815,  12031,  28671,  31487,  15103,   5119,  12543, -28161, -29697,  16639,  15359,  20735, -17409, -17409, -32513,  30975, -27393,   6912,  13824,   4096,  -1025, -19969, -14849, -20225,  31999, -18177,  20991, -23041, -12033,  30975,  25599,  21503,  23551,  12031,   4351,  16639,  12287,  11007,   4607,  -8962,  -1026,   7423,  21759,  25343,  15615,  15359,  12287,  31999,   7423, -11778,  31231,  26367, -30465,  20991,  12799,  12799,  14847,  32255,  26111,  15871,  24575,   -258,  -8706, -27906,  19966,  29438,  24062,  15102,  -1283,   -515,   7934,  -5891,  11774,   5118,  -7171,  -7171, -22787, -27651,  14333,  16381,  13565,  21757, -24323,  21757, -23043], [  0,   1,   2,   3,   4,   5,   6,   7,   8, 255])
 (21000, 1024, 0, [ 29693, -32515, -10755,  16637,   8445,  13565, -32259,  31997,   5885,  26365,   4605,  17149,   6141,  13821, -28675,   6141,   6141, -26628, -32004,  28924, -31748,  30972,  -9477,  17660, -30468,  31996,  23292,    252,  15100,  30204, -24836,  13308,  -4101,   1532,   4604,  -1285, -10245,   6140,   5884,  10492,   7420, -16901, -25093, -23557,  20475,  29691, -23813, -16645, -13061,  16891,   7163,   2043,   3323,  18939,  15355,  18683,  -4614,   7677,   3582,  22011,  28154,  28666,  -4103,  25594, -28934, -22534, -32518, -22790,  17915,   2299, -12806, -32262, -19974, -20742, -11526,   8955,   4347,  21499,  13307,  24315,   8187,   9467,  30203,  22523,  27643,  30203, -23557,  -4357, -13317, -19461,  22523, -27653, -18181, -18181, -12549, -29189, -29189,  22779,   9723,  16379,   4091,  12283,   2811,  15099,  28923,  12539,  19451,  14843,  12795,  13563,  21243,  -3334,  29178,  24314,  24314,  13306,  21498,  30202,  24570,  24826,  14842,  22010,  27130,  21754,   8698,  12794, -25094, -14342,  -7430, -14086, -10502,   6651,  10747,  27387,  21755,  31483,  32251,  22011,  14843,   9979, -29701, -14341, -29445, -30469,  -6661,  -5637,    252,  -4613,  -6917,  -8709,  -4357,  -5893, -16645, -21509, -21765,  -5637,   3068,  14076,  15356,  24316,  28412,  16892, -32260,  18172,  16892,  29180, -32004, -20996, -31748, -15364, -25604, -15620, -14084,  -4356,  25597,  12029,  12285, -30468, -31492, -16132,  -1284,  -3332, -23300,   1533,  24829,  18429,   6141,   9981, -30979, -14595,   7422, -14339, -19715, -14595,  -4099,  -3331,   3326,  22526,  28926, -13314, -15618, -19458,  -4354, -13314, -13314, -14338,  -9986,   7935,  22783,  10495, -22274,  -1794,   8191, -30209, -28929,  19711,   2559, -20482, -11010, -22018, -15106, -19202,  29950, -12802,  18687,   9215,  -3842,   2559,  12543,  10495,  18943,  32511, -13313,  -1281,  -5121, -14081,   9216,  27392,  27136,  29952,  29952, -29440, -15872,  -2304, -24320,  31232, -22528,  14849,  10497,   -768,  -9728,  -7168,  16641,  26625,  19713,  13313,  -1792,   5121, -13824, -27648,  21504,  24576,  18432,  29440, -19712,  24320,  26112,  21248, -24832, -24576,  18176,  18432,  13568,  29440,  24320,   3072,  29184,  10241, -22527,  25089,  16129,  12033,  -2048,  13057, -19456, -22272,  -6144,   6657,   4609, -14592, -20992,  -3328,  18177,   6145,   -256,  -1024,   3073, -16128, -30976,  16640,  15616, -22784, -30976,  31232, -19968,  29696, -20736, -23040, -24320, -29184, -10752,      1,  -3840, -12032, -14848,  17665,  27905, -15359,  31489, -20223,  20738,  12034,  -4095, -23295, -30719, -14335,  -4863,   1282, -20479, -21247, -28927, -15359,  -2815,   1026,   1026,  -7167,   1282, -15615,  30721,  32257,  -4607,   6402,  -3071,  11778,   1026,  15874,  32002,  16898,   1794, -11775,  19714,  10498, -10495,  -9215, -16127,   3074,  11266, -21500, -21243,   7683,  11010, -32510,   1282,  -8447, -13567,   6914,  16130,  14850,   2562,   6658,   7938,   9474,  13826,  14594,  -5886, -14078,  15618,  -6655,   7426, -31998, -25342, -30206,  25858,  23554,  -7422,  -4862,  -5886, -26878, -25854, -17406, -16126, -17406,  20738, -31486,  32258, -23038,  31490, -17662,  -4350,  20995,  14595, -19710,  -6654,  -1534, -12798,  -7934,  -7422,  17411,  26627,  18691,   4867,    771,   6147,  30723,    516, -24061,  24323,   5635,  14339,  12547,   8451,   8451, -10750,  21763, -25853,  24835,  12291,  16387, -31485, -24829,  -1789, -19965, -24829, -11517, -18685, -18429, -27901,  18692, -28156, -28156,  11524,  -1021,  23556,  23556,  12548,  18436, -20732, -17404, -27388,  31236,  14852,  18948, -15868,  -7932,  -7676, -17916, -26108, -23292, -21244, -29692,  24836,  30468, -27132, -20988, -13820, -31996, -31484, -26876, -27132,  26884,  24068, -27900, -24828, -15612, -28668,  26116,  30980,  -2044,   4613,  19717,   3589,  -1276, -25339, -23547,   7941,  -6908,  22789, -28411, -29691,  26117,   8453,  25605, -13051, -13051, -25339, -24315,  -7931, -24315,  29957,   8197,  18949,  27397,  13829,   8453,   5125,   1541,   2309,   1285, -12284, -13820,  -4092,   6661,   5893,   1541, -27132,  31492,  -6908,   7429,  -8444,  -8700,   9221,  17925,  12549,  -7420, -27900,  -2044,  15877,  14085,   5893,  -5628,  -6652,   8453,  15621,   5637,   6405,  16133,  17669, -15356, -15356, -14844,  11781,  15109, -11772, -10492,   -764,  16645,  12549,  15365,  14341,   4101,  19205,  10501,  -1532,  -1532,  -1788,  11269,  10501,  24581,  13061,  22789,  22277,  15621, -31739,  19205,  -2300,   8453,  13829, -30203,  19205,   8453,   2309,   3077,  18437,  12805,  30469,  21509,   9733,  -4348, -14588, -11772,   1541,   2821, -23292, -28668,  -4092,    517,  -4348, -14076, -23548, -20988,  -7420, -10748, -22524, -21244, -21244, -16124, -18172,    517,  -9212,   2821,   2053,  -5628, -11772, -16636, -16636, -18172,  -5884,    261,  16133,  26629,  -4092,      5,   1285,  23557, -22267,  26117,  16389,   6917,  12037,  17669,  23045,  24325,   -508,   9221, -26619,  26629,  14085,  -2044,  10757,   9221,  -3068,  -2556, -21756, -18428, -32764, -30204,  24580, -24828, -16636, -24828, -24828,  20996,  32260, -30716,  20996,  23556,  29188, -24316, -26364, -24060, -28412,  28676, -25852,  -5372,  -9724, -17916, -32764,  16389, -26361,  13062, -21757,   1028,  32003,  27907, -21501, -24317,  30467,  27651, -29949,  27395, -27133,  22019,  22019,  26883,  18947,  25603,  10755, -21245, -12541,  11268,  21508,  18692,  24068,  13060,  21508,  26628, -28156, -11772, -18684,  -6652, -31228,  26116, -22012,  -4092, -18172,  25860,  28932,  25348,  16900,  -6141,  -7677, -11261, -20989,  26115, -13309, -21245, -25341,  -9725, -24317, -29693, -29693, -16381, -24061, -16893, -10237, -23293, -29437,  -8701,   2564,  -8445,  -7165,  14596,  25348,  24836,   2564,  -4093,  13572,  24580,  18436,   9988,   1540,  15364, -30972, -17660, -31996,  22020,  27908,    516,   6916,  -3581,   3588,      4,  -3837,  -1789,  10244,  13828,   4868,   6148, -10493, -10493,    516,   2564,   5636,  -4093,  -9981,  -1021,  -2813,  13316,  12292,  20228,  13316,  24324,  31492,  20996,   -765,  11780,  15108,  24068,  15620,  12548,   5380,   5124,  23556, -32508, -17404,  21764,  19204,  -2045, -12285, -17917, -20477,  -2813, -23805,  24067, -30461, -25853,  30723,  22787,  22531,  19715,  24067,  27395,  22275,  24835,  27651,   4355,  11267, -27133,  24067,  30211, -29949, -18941, -23293, -30205,  21763,  30467, -19453,  -5885, -19197, -26365, -25341, -14333,  -4093,  -3069,  21252,  22276,  11780,  -7677, -15101, -12541, -20477, -30973, -27133, -23293,  -4349, -23293, -23293,  22531,   5891,   9219,  12035,   1027,  -7422,    771,  -7422,   5891,  -2302,  19971,  26627,  27651,  21251,  11267,  25091,  24835,  11267,  20739,  26371, -16637,  27395, -32765,  16387,   8195, -30205, -30205,  -8445,  27651,  18691,   3587,   2307,   3843,   7683,   7427,   4611,  10499, -25597, -13053, -25085,  26371,  15363, -30973, -26877, -25853,  26115,  31235, -26365,  31235, -23549, -11773,  -6909,  14852,   7940, -31740,  31748,  18436,  10244,  12292,  24580,  22276,  22276,  23556,   8708,   9732,  13572,  17156, -27388,  30212,   7940, -21501, -11261, -16637, -30973, -25853,  17411,  22531, -18941, -18429, -20221, -28413, -17149,  -9725, -11773, -25341,  25091, -19453, -25597, -26877,  16387, -12541,   2820, -10237, -12541,  29187, -13821,  -5629, -26621, -26365, -32509,  -9725, -12797, -20477,  28163,  24067, -17149,  -9213,   2820,   3076, -13309,  27907,  24067,  19459, -21757,  31491, -31485, -19197, -12285, -12285, -23805,   3332,   2308, -11261, -11261, -16381, -11517, -21757, -14589, -14845,   4614,  18183,  12548, -23037, -22269,   3075,  25859,  13827,    771, -15102,  -4862,  20227,  -1790,  -3070, -25854,  -7166,   5891,  13315,  25347,   2819,   7683, -21246,  -7422,   7427,   3331,  -4862, -30206, -29950,  -7934, -16126, -17406, -26878,  27650,  24834,  12546, -29950,  19202,  24578,  19202,  18434,  29954, -18942, -13822, -18174, -19966, -16638,   1539,   2307, -26366, -18430,  -7934,   1283,  -3582, -17150, -25342, -24318,  -5886,   7427,  15107, -14590, -22782,  18178, -31742,  17922,  17666,   6914,   -511,   6914], [  0,   1,   2,   3,   4,   5,   6,   7,   8, 255])
 (22200, 1024, 0, [ 18178, -20990,  29698,  24322,  27138,  23298, -26110, -28158,  30978,  25602,  22786, -31742, -31998,  -1790,  -5886,  -2046,  11011,   4611,  14339,   7171, -10238,  -2302,    259,  30467,  10755,  -2814,  -6654,  -6654,  15875,   4099,  15363,   9219,   9475,  -2814, -10750, -20478, -27390, -17918,  29186,  28418, -16382, -16638, -16894, -29182,  29186,  29442,  24322, -29182,  23810,  26626,  30722,  21250,  20994, -27390,  31746, -12542, -12030,   7683,  23555, -28925,    259,   6147,  23299,  22531,  27395,  20227,  15107,  16387,  30467,  28419,  21251,  30979,  16643, -15614, -16126,  -9726, -22526,  19714,  13314,   3330,  19714,  19714,  20738,  13826,   3330,   2818,   8450,  15362,  -2303,   4866,   5890,   6146,  -5375,  11010,   7170,  13826,  12802,   5378,  14082,  14850,   7426,  13570,  18946,  29186,  29698,  27138,  23042,  29698, -22782, -13054, -13054,  -7422, -14334, -30718, -19454,  25346, -22782, -30718,  12546,  11778, -32254,  29186,  24322, -31230,  19202,  28162,  14594,  23554,  13058,  23298,  12290,   4098,   9474,  23810,  25858,  31746,  27650,  25602, -31742, -23550,  25602,  28418, -31742, -29182, -20990, -19710, -32254,  28162, -20478, -19710, -11774, -29182, -32254,   8706,  18946,  24834,  12546,   1026,  -7935,  -4095,  11266,  16642,  11266,   2818,   1026,  -1535,  -1023,  11010,   4098,  11266,   6914,   2562,   -255,  16386,  19970,  16386,  10498,  -2303,  -5887,   9218, -20223, -20735, -11263,    258,   2306,  -7167, -20735, -32511,  -3071,  -3327,  15874,  11522,  -9471, -19967, -14335, -14079, -11519,  -6399, -14591, -22527,   3074,   4098,  -1023,   1794,  -6655, -12031, -14591,  -3839,  -6655,  -6399,      2,  -7423,  -6399,  25858,  23042,  31490,  25858, -31230, -26110,  31746,  11266,   7938,  22274, -23038, -26366,  17154,   3330,   6146,  22530,  19970,  15362,  13058, -31998, -24828, -24060,  -2815, -10495, -29183,  -4096,  22017,  24833,  15105,  23553,  14593,  21761,  13825,  10497,  21505,   8705,  20737,  16641,   1537,      1,  20481,  21761,  29441,  24577,  24577,  21761, -11007, -11007, -17919,  -8191,  20226,  20994,   1282,   -255,   7938, -27646, -25854,  29186, -29950, -16382, -25086,  24322,   8962,  14850,  23554,   7426,  -3583,   7426,  28930,  29186,  18946,  -3839, -18943,  -8959,   -767,  -4351,  -5375,   -767,  28674,  19202, -25854,  29954,  27394, -26110, -24062,  -9726, -26110,  28418, -29182, -11006, -17918,  28930,  30722, -29438, -29182, -16126, -25854, -10238,   6147,   8707,  -4862, -20478, -20734,   5123,  14083,  -5118, -26366,  -5118,   6915,  21251,    771, -29950, -18942, -18942,  -7166,  27138,  30466,  31234, -22014, -14078,  -7166,  -7166,   4355,  10499,   5379,   4867,   7427,   -766,   5123,   7171,   4611,  -1534,   4611,  -2302,  -6398,  -5886,  -1790,   5891,   1539,   9987, -32766, -28670, -26622,   6659,  -8958,  15362, -20478,  -2046,   3587,  -6398, -12542, -12798, -20734,  -2302,  -6654, -29182, -23038, -29182, -15870, -28158, -13310, -11006,   3331,   3587,  -4862,  -6654,   7939,  -5118,    259,      3,  16387,  19203,  11267,  13315,  -4350,  18947,  32515,  -7677, -25853,   7683,   1283,   3843,  12035,   1027, -29438, -29182, -22526,  18179,   4099,   3331,  -9214, -22782, -23038, -31742, -30718,  30210, -11518,   1539, -10750, -31230, -14846,   1027,      3, -13822, -31486, -15102,   9475, -19454, -32510, -31742,  13059,   9219,  -1790, -21758, -23806,   8963,  14339, -32253,   4611,  -2302,  -7678,  -9214, -10494,  30210, -31998, -24318, -15870, -10750, -24318,   2819, -11006,  32002,  20482,   1282,  13570,   6146,   7938,  -6399, -17407, -16127,  22530,  21506,   5122,    258,   -511,   -511,   3586,  -8703,   -255, -27902,  -7166, -24830, -26878,  20994,  27138, -13054, -17918, -23038,  31746, -18174,  30978, -28158,  15362,   9986,  19202,  11778,   4098,  15106,  12034,  12290,  23298,  18690,  -9215,  -1535,  12034,   -255,   6914,  -1535, -12287,  -1791,  31490,  18434,  13826,   7682,  15106, -32254, -32254,   3586,  19714, -13054, -14590, -24062,  25602, -29694, -25598,  -5118,  -5118, -13310,  -1022,   2819, -13310,  30210,  22274, -13310, -15870, -23038,  12802, -29950, -13822,   5379,   4355, -30462, -22270, -17406, -10750, -29182, -30718,  26626, -20734, -20734,  29956,  -4091,  -2045,  25858,  -9470,  29186,  19202,  16642,  31490,   1539, -18942,  -2558,  -3582,   1283,  12035,   2051,  21763,  25603,  28931, -20733,  11267,   3843,   5635, -31997,  18435, -27646, -22270, -10494,   8707,  11267, -29438, -28926, -18430, -22782, -21502,  29954, -29694, -24318, -16382, -16638,  -3326,   2819,  23043,  17411, -32253,  26883,  27139,  17411,  22787, -32509, -23037,  -5885, -16893,  26627,  32003, -30717, -20733,   -509,  -7677, -16637,   -766,  23555,  15107,   2819,  -6654, -17662,  -7422,  21251,  30723,  -9726, -19966,  -1534,   2563,   9219,  -2302,   1027,  32003,  22787,   8451, -13566,  15107,  31747,  -5373,  -3581,  30723, -13821,  14084,  11268, -10749, -20221,  22020,  25092,   7428, -15101, -19197,  11780,  23556,  28420,  16132,   5636,  -2045,  -3325, -16637, -27133,  32003, -16637,  -8445,  -2557, -12029, -15357,  -3837, -17661, -12285, -28925,  -6909,  12292,  11780,  -2301, -26109, -22781,   5636,  11780,   -253,  -2557,      4,  -4861,   4100, -21245, -21501, -16381,  19204, -23548,  21764,   9732,  12292, -16636, -23292, -20732, -20988, -22012, -27644,  27140,  18180,  29444,  29956,  13060,   9988,  23044,  29188,  25092,   9988,   4356, -20221, -18941,   3076, -12285, -12285, -23293, -15101,  -6397,  19972,  21764, -20988,  -7420,  25092,  30468,  25092,   8964,  20996, -32508, -24316,  24836,  13572,   8196,  20484, -29948,  18948,  25348,  27396, -30204,  15876,  13828,   3588,   -509,  15364,  -8701, -17149,   7428,  17412,  19460,  26372,  15364,  -1021,  17924,  26372,   5380,   4100,  -1533,   9732,  14596, -31484, -16380, -15100, -18428,  26884, -29180, -24060, -18428, -26876, -26108, -15612, -15868, -10748, -11004,   -252,   3333,  14853, -27643,  12037,  21253, -19964, -16892, -16892, -24060,  -9724,  20996,  28932, -15356, -29948, -28156,  20740,  30212,  28932,  31748, -25852,  30980, -28924,  23300, -18172,  28164, -29436, -16380,  13573,   4357, -28668, -16124,  -5116, -13564, -12796,  -7932,  21765,  25605,  14853,   2565,   7941,  13573,  14341, -23035, -14331, -14843,  26373,  28165,  12549,   8453,   1285,  -6652, -15100,    517,  13573, -21756,  28932,  20484,  25092,  26116, -31740, -29436,  27908, -31484, -32764, -32764,  -5116,   -252,  23301,  22021,  27397,  12037,   7685,   -252, -16124,  10245,  29701,  15877,   7429,  -6140,  -6396,  11269,  23813,  22277,  23301, -30715, -23801,  29960, -28923, -14076,  18693, -20988, -12284,  -1020,   9221,  22277,  -2300,  17157,  -2556,  -2556,  22021, -11004,  21253,  -8444, -12540, -11004,  -8444,  27653,   6405,  29445,  23301,   3077,  20997, -19964,  12293,  13829, -31739,   5638, -12283,   -763, -23547,   7942,   8454, -10747,   3590,   3078, -10491, -20987, -13563, -10491, -21499, -28411,  11781, -27131, -11003, -22011,  32005,  11525,  22021,  13061,  26629,  21509,  13317,  25093, -22523,  24837,  30213, -28411, -28411,  -6139,   3846,  -6907, -16635, -23803, -15611, -15611,  13318,  16902,   5638,  16646,   3078,  25094,  18182, -24570, -18682, -19194, -28154,   2310,  19974,  30726,  17670,   7430, -17915,  15366,   7942,  -1275,   5638,  -6395,  -3835, -23291, -15355,  25861, -31227, -23291, -26619, -17147, -18683, -10747,  -4603,    262,  -4603, -11003,  -3323, -24571,  26373,  31749, -31995, -13051, -16891,  25349,  32005, -22011, -18171,  -4347, -20987, -13819,  20229,  15109,  11781,  14085,  31237,  -1788,  14597,  32261,  30725,  27653,  19973,  26373,  24837,  22533,  26885,  19205, -21755,  18949,  20229,  16901, -18171,  -5883,  -5883,  -2811,  31493,  -3067,   4870, -24059, -32763, -31227,   7686,  -1787,  -5115, -15099, -28923,  22278,  22022, -31226,   4870,    262,    774,  -4859,  -7931, -24571, -24571, -22011, -16123,   -251, -18171, -17915, -16891, -19195, -32507,  23813, -22523, -17403, -16635,  19717,  26117,  28677, -25851, -24315, -27387, -17147,   6150,   5126,  -8443, -24059,  30469,  -6907,  14854], [  0,   1,   2,   3,   4,   5,   6,   7,   8, 255])
 (23100, 1024, 0, [ -1531,  -9211, -18939,  -5371,  12294,   7430,  -3067,  -6139,   4870, -11515, -25339,  18437, -26107, -18939, -19707,  24837,  16645, -20219, -20987,  17669,   4101,  -3068,   6661,  23045,  22789,   6405,  -3836,  11525,   2821,   5381,   3077,  11269,  14597,  14341, -31995, -29947,  13573,   8197,  15877,  17413,  18437,  25605, -11771, -11259, -22523, -28155, -22779, -14587, -22779,  20741,   9733,   8453,  20485,  14853,  12037,  -6908,  13317,  25349,   9989,   9989, -20476, -13308, -19196, -15868, -32252, -25852, -26364, -29692, -24572, -23804, -13820,  -1532,   1797,  -1788,  -7420,  15877,  13061,  18437,   3589,   7429,  15365,  15365,  18181,  -1532,  17925,  18181, -32251,  31237,  17669,   1029,   5125,  10757,  18437,  16389, -10748,  -8700,  16901,  25605,  24837,  17925,  17157,  21765,  16645,  24581,  15877,  21765,  27141,  28165,  21254, -28152,  29191,   9989, -20475,  -4348, -18172,  14341,   4101,   8965, -20476,  -9724,   4101,  -1788, -16892,  30468, -12796,   4101,  19461, -12028, -29692,  30980, -28924,  26372,  27140, -22012, -23292, -31740, -17148, -16892,  29956, -19452, -30204, -30716,  20484,  10244,  13316,  28420,  17156,   1796,   1796,  26116, -29948, -30972,  18948,  24068, -31740, -31484,  24324,   2308,   9220, -30460, -31740,  25092,  28164,  28164, -21244, -26108,    517, -14588, -18940, -19452, -21500, -29948,  24324, -29436, -32764,  32516, -19964, -28924, -19964, -25084, -22268, -31996,  11780,  21764,  10244,  20996,   -765,  -9213,  -1021,  25348,  32260,  26116,  26116, -28668, -21244, -11004,  25604,  23300, -23548, -12540, -10236,  24580,  15364,  30724, -15868, -29180,   8708,  20740,  24068,   8964, -14077,  24579, -23293, -15869, -25597,  17411,  23555, -24573, -16637, -24829,  24067,  14083,  30211,  -3581, -17149, -25597,  24067, -18941, -15101,  -4093,  -3837,  -9213,   9220,  23300,  12292,  -1277,  -7421,  -1533,   5636,  12292,   6660,   6404,  22532,  26884, -26620,  28932,  28676, -26620, -27900,  17156,  -4861,  -6397,   7684,  -2557, -10749,  31747,  10756,  21764, -11005, -12029, -27645,  -9725,  -6141,   -509, -30973,  23299, -12285,  -7421,  -6397, -11773,  -7933,   5892,   6660,  -5629, -13309, -12029, -13309, -12285, -31997,  26627,  25859,  26883, -31997,  -7166,  -2814,   3587,  24067,  23299,  19971,  -4350, -12798, -13054,   3331,   3075, -27902, -30974, -14334, -13310, -24318, -29694, -28158, -29694, -29950,  27394,   2818,   8962,  11266,   8194,  -5375,   2818,  24322,  32514,  22018,   7938,   8962,  28418,  22274,   7682,  10242,   8706, -28414,  24066,  25346,  11778,  18434,  24578,  29954,  17666,  -3839,  -4863,  -8959, -11263,  -9215, -22527,  31745,  23809, -23039,  32001,  22273,  20225,  23297,  13825,   2049,  17665,  17921,  21249,    769,  -4608, -14848,   9729,  24065,  20993,   6913,   2049,  23297,  22273,  -8960, -30976, -19456,   1281,  -5376, -23040, -31488,   9472, -15872,  -6912,  31232, -28928, -31232,  23040,   6656,  -1281,  -9473, -17665, -12033, -29185, -21505, -10753, -13569,  -9473, -27137, -20993, -30721, -13569, -14849, -17921, -31233,  11007,   9727,  29183, -25601, -31489,  29439,  28159, -29953, -29185,  15103,   6911,  15359, -22785, -14593,  24319,   6655,   9983, -26881,  17151,  18175, -11265,   1538,  18177,  18174,  31742,   3070, -10755,  -8195, -25859, -15363, -14083,  -8963, -22275,  23805,  26621,  18941, -22275,  17917,  24829,  14589,   8445,   7677,  10749,  18685,   4861,  30461,  24317,  14077,   8189,  11261,  14077,  15101,  18941,  14333,  -5124,   5117,  -7940,  -7940,   2301,  -7428,  -6660,  -9220, -21252, -15876, -29188,  25340,  14332,   9724,  12028,  25596, -23556,  25852, -24580, -28420, -26116,  -6916,  -8196, -12292, -21764, -29700, -29700,  27132, -31236, -29444,  20220,   2556,   1532,  -4869,  -7685, -30725, -28165, -30981, -31749, -30469,  32763,  28411,   5115,  31227,  27131,  25339,  28155,  21243,  15355,  13307,  -1030, -13062,  -6150,  -4614, -12806,  -4358,  -4614,   3835,   6651,  -4358, -10246, -23814, -17414,  30202,  27642,  29178,  23802,  15610,  31994, -25094, -16390, -22534, -28678, -26118, -16902, -18438, -28678, -12294,  -5126,   7675,   5627,   8443,   1787,  16891, -30725, -10245, -23813,  28667,  22779,  15355, -24325,  30971,   8443,   1275,  -1542,  14075,  22779,  12283,   7163,  12027,  15355,  15611,  30715,  10491,  23291,  10491,  10235,   9467,  23803, -19717, -21509, -22021, -26629, -15621,     -5, -13317, -25605, -24837, -15365,  -5125, -15109, -25349, -28933,   1020,  13052,    508,    764,  12284,  -4357,   -517,  -4101, -15109, -12293, -25349, -30469, -18693,  11516,   4604,   1020,  -9733,  -6661, -10501,   2044,   2812,  10236,  21500,  22524,  22780, -22532, -22276,  -5892,   2557, -15108,    509,   5629,   6909,  -3588,   2813,  30205, -27139, -28675,  31741,  13821,  30461, -21507, -18691,  -5123,   1790, -13315, -13571,  22525,  22525,  20989,  25341,  26621,  22525, -18179, -26371, -29187, -31747, -28163, -26115, -17923, -12547, -25859, -27651,  31229, -30467, -16643,  -2563,   2046,  15102,  15102,   2046,  31230,  17150,  -1283,  15358,  20734,  30462,  21758,  26366,   7166, -30466, -22530,   1791,  24831,  24063,  15359,  -1026,  15615,   5887,   3327,  20991,  11519,  27903,  31743, -31489,  31999,  26367, -28161,  24063, -16641, -24065, -19969, -17153,  21759, -27393, -28161,  -7425,   4096,  -1025,  -3585,  -1537,  20992,   9472,   7680,  12544,  16640,  32000, -29952,  28928,  15360, -28416, -18176,  -3840,  -1792, -17408, -21760, -28416, -12032, -21760, -16128,  -1792, -27136,  -1280,      1,  21249,  21761,   6913,  -1280,   4097,  26113,  12033,  21761,  15105,  14081,  17665,   8195,  -4348, -20734,   4097, -28159,  11521,  28417,  -6912,  -4864,  19969,  14849, -30463,  19969, -12799, -31231, -28927,  14594,  11266,  14338,  -2047, -13055, -16895, -28415,   7426,  -3071,  11778, -21502, -21502, -12030, -28926, -26878,  27906, -31230, -21758, -13566,  -7678, -23038, -13310, -13054,   1027,  22275,  14851,  27139,  23299, -23549, -20477, -30461, -30461,  29443, -29949, -22781, -27901, -29693, -28157,  19203, -26877, -13309,   2564,   1796, -11773, -20477,  13571,  28675,  23555,  17667,  22531, -12030,  16131,  12035,  -5374, -20734, -15870,  14339,   -766,  17155,    771,   9987,  16899,  10755,  27907,  19715,    260,  -5117, -11773,  -1789, -19453,      4, -31997, -24573, -22525, -13565,   -253, -31741,  -8445, -25085, -26621,   -253, -13565,  -6141, -16893, -30461,  26627,  18435,  20227,  16643,  15363,  29187,  25859,  26371,  26115,  15875,  15363,  14851,  10755,  15619,   8707,  32515,  25603,  11779,   9475,  25347, -23037, -27901,   1284, -10237, -17405,   8708, -13821,  -4349, -13565,  10500, -32508,   9988, -31228,   1540,  21764, -27388,  29956, -21244,  32516, -18684, -24828,   9220,  10244,  11780,  25860,  20996,  18948,  29188,  18692, -25596,  27652,  28676,  18436,  28676,  23556,   6660,  17668,   6660,  12036,   6660,  22788,  22788,   6404,  17412,  18436,  28164,  28420,  11524,  28932, -21500, -10748, -18684, -21756, -28668,  -5884,  -2812,   5637,  29957,   7173,  -5884, -22268, -16636, -25340,  -5628,  -6140,  -6652,  20485,   4869,   1541,  17157,  12549,  -6140, -15100,   9221,  -8444,  17413,  11781,   3589,   9733,   3333, -32763,  25093,  29701,  18181,  23557, -24571,  25861,  31237,  18949, -24827, -16891,  32005, -19707,  18437, -14587,   -507, -11771,  -2299, -22779, -14587, -30971,  23045,  31237,  23045,  24069,  26117, -30203, -29179, -32763, -25339, -30715, -27131, -32251,  -9211,  -8699,  -5627, -16379, -27643, -17147, -19451,  -7931, -10491, -12795,  -6395,   -763,   6150, -27387, -24315, -28411,  32261, -28667,  21509,  30725,  13573,  27141, -25851,  31493, -21499,  26885,  29701,  13061,    517,  -7932,  -3068,  22533,  -8700,  -5628,  11013,   2565,  11525,  -3068,   -764,  -1532,   2053,   5125, -15612, -15612, -11516, -19964,   2565,   9989,  19205, -30971,  20741, -21243,  31237,  28677,  28421, -20987,   1030,  -4603,  -4603,  -4091, -17147, -11771,  -7675,    262, -25594,   1289,  23560,  27141, -11771, -22779, -32507,  32261, -30459,  -5627, -11771,  -9211, -17147, -24827, -21499, -14843,  20998], [  0,   1,   2,   3,   4,   5,   6,   7,   8, 255])

The first columns is timestamps.
You can see that
20100 - 19200 = 900
21000 - 20100 = 900
22200 - 21000 = 1200
...
The delta should be 1024 always.

How can we explain that ????

All files are now hosted here at gnode

I affraid that I won't be able to cover such difficult situations in the IO.

@Palaeocortex

Copy link
Copy Markdown

I didn't dig so deep into the files and the OE scripts just loaded the files, I cannot contribute to solving this problem unfortunately...

@samuelgarcia

Copy link
Copy Markdown
Contributor Author

I anderstand totally.

Note that this file with CH32 is probabliy corruted and not time aligned with others.
Also note the script in analysis-tools don't cover this case, I think.

I hope it is a isolated case and you don't have too much data like this one...
Maybe running this new io class on your old data could wise.

Thank you for helping.

@apdavison
apdavison merged commit 7376a7c into NeuralEnsemble:master Nov 15, 2018
@samuelgarcia

Copy link
Copy Markdown
Contributor Author

Thanks.

@samuelgarcia
samuelgarcia deleted the openephysrawio branch April 10, 2019 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants