I was wondering if it would have been possible to obtain epoch numbers based on the latency in the event array. I am merging data and events (which I have modified by adding external information), however, the event array does not contain the epoch number, but just the latencies. On the other hand, the data contain the epoch numbers but not the latency. Therefore, I cannot seem to be able to match the modified events to the epochs as I only have latencies and not epoch numbers. Is there a way to find out the epoch number based on the latency?
I hope my question was clear.
Thank you in advance for your time!
Sabia
Thank you very much for your reply. I am trying to reconstruct the epoch number so that I can merge my modified events with the data. The way to merge events and data is by using epoch numbers. However, although I have epoch number information in my raw data, I only have latencies in my event array. Below is my event array:
Basically, I do not have a linking information between the data and the event array, therefore I cannot merge my data with the modified event information.
I do not get what latency represents, and you are working with DataFrames instead of the Raw, Epochs, and other MNE objects, and neither DataFrames correspond to the output from a .to_data_frame() method from MNE…
I am trying to reconstruct the epoch number so that I can merge my modified events with the data.
It’s a bit far fetch from this sentence, but are you trying to take a continuous recording and combine 2 types of events, e.g. one from a hardware source and a second one defined manually by yourself? And then to create the Epochs corresponding to those events?
I am working with DataFrames. Latency would be the first column in the MNE event array, which I have renamed using Pandas.
The dataframe I have shown you with the data includes already epoched data.
Yes, I am trying to merge the epoched data (rather than the continuous recording) with a set of events (these are the events that are left at the end of pre-processing, e.g.: final_epochs.events, and information that I have manually added, such as item_nb, sentence_version, as can be seen in the event dataframe).
@Scosta Have you considered using Epochs metadata? It’s designed to guarantee direct correspondence between individual epochs and additional information in the form of a pandas DataFrame.