Closed jtmbeta closed 8 years ago
Thank you for the report, and for including files! I will take a look at this in the next several days.
Hi there, I figured out the problem. I recently updated my Python xy and run 'pip install cili', which installed an older version to that which I was using. I grabbed the master version from git and everything is working fine again.
Good to know. Since there have been a couple of critical bug fixes, I will push a new version to pypi this weekend. On Thu, Sep 3, 2015 at 4:51 AM jtmbeta notifications@github.com wrote:
Hi there, I figured out the problem. I recently updated my Python xy and run 'pip install cili', which installed an older version to that which I was using. I grabbed the master version from git and everything is working fine again.
— Reply to this email directly or view it on GitHub https://github.com/beOn/cili/issues/8#issuecomment-137395014.
Hi there, The following code used to work fine but recently I run it again and I got the ValueError which can be seen below. It happens when I call extract_event_ranges, and I can't figure out why! The data file and script for reproducing the error can be found in the following link:
https://www.dropbox.com/sh/aencj60ipzgdvwl/AAD7BqfTAGALQ1Pg6TyIsNN6a?dl=0
I have also included the_actual_script_I_am_using.py which runs this operation on ~34 similar files and saves the various data structures into HDFStores. The script used to work steadily through the files without any problems, but now it only works for some files and not others. Maybe there is something really simple that I am missing (I am a rather naive python user...). If anyone could help I would be very grateful. Cili has become central to my workflow! Cheers, Joel
samps, events = load_eyelink_dataset('p10_2.asc') events.save('cili_events_p10_2')
samps = interp_eyelink_blinks(samps, events, interp_fields=["pup_l"])
samps = interp_zeros(samps, interp_fields=["pup_l"])
samps = butterworth_series(samps, fields=["pup_l"], filt_order=3, cutoff_freq=0.05)
ranges = extract_event_ranges(samps, events.MSG[events.MSG.content=='STIM_ON'], start_offset = 0, end_offset=9999, round_indices=False)
Traceback (most recent call last):
File "", line 5, in
round_indices=False)
File "C:\Python27\lib\site-packages\cili\extract.py", line 76, in extract_event_ranges df.index = midx
File "C:\Python27\lib\site-packages\pandas\core\generic.py", line 2161, in setattr return object.setattr(self, name, value)
File "pandas\src\properties.pyx", line 65, in pandas.lib.AxisProperty.set (pandas\lib.c:42577)
File "C:\Python27\lib\site-packages\pandas\core\generic.py", line 413, in _set_axis self._data.set_axis(axis, labels)
File "C:\Python27\lib\site-packages\pandas\core\internals.py", line 2219, in set_axis 'new values have %d elements' % (old_len, new_len))
ValueError: Length mismatch: Expected axis has 759518 elements, new values have 760000 elements