event_data_to_dataframe(oscar_session_data, channel_ids, mis_value_strategy=None)

Get the event data as dataframe of an OSCARSession from channelIDs.

Parameters:
  • oscar_session_data (OSCARSession) –

    OSCARSession filled from file

  • channel_ids (List[Any]) –

    List of channel id (see channelID in oscar_constants.py)

  • mis_value_strategy (Optional[Dict[str, Union[str, float]]], default: None ) –

    Strategy to deal with missing value on one channel.

    • None : nothing is done, missing values are kept as nan
    • Dictionary containing a channel id as key and a strategy as value:
      • 'ignore' : remove rows where the channel is nan
      • float : replace NaN value in the channel by the float value
Returns:
  • DataFrame

    A dataframe with the following columns : ["time", "time_utc", ChannelID text, ChannelID text +"2", ... (see oscar_constants.py) ]. if no channel_ids are found, return an empty dataframe containing one column named 'no_channel'

get_channel_from_code(oscar_session_data, channel_id)

Get channel data inside OSCARSession data structure from a channel_id

Parameters:
  • oscar_session_data (OSCARSession) –

    OSCARSession filled from file

  • channel_id (int) –

    one channel id (.value, see channelID in oscar_constants.py)

Returns:
  • Union[OSCARSessionChannel, None]

    Channel data (OSCARSessionChannel) or None if the channelID is not found in the session