sardine.vessel package
Submodules
sardine.vessel.history_event module
- class sardine.vessel.history_event.HistoryEvent(operation, start_time)[source]
Bases:
object- clip(start_time, end_time)[source]
Checks if the given interval its completely outside the event If not (it’s inside), it returns None Calculates the actual start as the maximum start between real and given Calculates the relative start as the actual start minus the real start (could be cero) Calculates the actual end as the minimum end between real and given Calculates the relative end as the actual end minus the real start Clips the event calling the ‘clip’ function from the instanced ‘operation’, passing it the relative start and relative end Wraps that clipped operation in a new instance of the class HistoryEvent, starting at the actual start Returns that instanced clipped event
- property duration
end time - start time
- Type:
Returns the duration of the operation as
- classmethod duration_of_overlapping_events(events)[source]
Creates a list of the start and end time of each event and calls it intervals Merges the intervals using the function _merge_intervals Returns a list of the durations of each merged interval
- property end
Returns the end time of the operation
- property name
Returns the name of the operation
- property operation
Returns the operation
- position_at(time)[source]
Checks if the given time is inside the history If it does, it calculates the position at the relative time (given time minus the start time) Returns that position
- property receiver_lines_deployed
Returns the number of receiver lines deployed in the operation
- property receiver_lines_recovered
Returns the number of receiver lines recovered in the operation
- property source_lines_shot
Returns the number of source lines shot in the operation
- property start
Returns the start time of the operation
sardine.vessel.vessel module
sardine.vessel.vessel_history module
- class sardine.vessel.vessel_history.VesselHistory[source]
Bases:
object- position_at(time)[source]
Returns the position of the vessel in the specified time: It loops through the events in the history and checks if the time falls inside the event time range, if it does, it returns the position of that event. If there are no events in the history, it returns (0,0) If the time is after the end of the history, it returns the position of the final event
- split(intervals_count, final_time)[source]
Defines a list of intervals with step = ceil(final_time / intervals_count) For each interval, it loops through the events and clips them in the interval, if the portion exists (event overlaps with the interval), it’s added to a list ‘history per intervals’ Returns ‘history per intervals’