lib/redred.py
def timezero_shift(timeData, timeZero = 0, reverse = 'False'):
    """Shift the 0 offset of a time trace, returns [new time trace] and [time shift]

    Some time its better to define time shift from one trace and aply it to athers,
    since max or min value could be different, like in my case

    -> You can define the time shift with a single line (timeshift = max(TimeData))
    and feed it to this function as "timeZero", so no need to have two outputs
    from this function.
    """
    #timeshift = max(timeData)
    #newtimedata = timeData + timeshift - timeZero
    timeData = timeData - timeZero
    if reverse:
        timeData = -timeData

    #return(newtimedata, timeshift)
    return(timeData)
Shift the 0 offset of a time trace, returns [new time trace] and [time shift]

    Some time its better to define time shift from one trace and aply it to athers,
    since max or min value could be different, like in my case

    -> You can define the time shift with a single line (timeshift = max(TimeData))
    and feed it to this function as "timeZero", so no need to have two outputs
    from this function.
    
Shift the 0 offset of a time trace, returns [new time trace] and [time shift]
Some time its better to define time shift from one trace and aply it to athers,
since max or min value could be different, like in my case

> You can define the time shift with a single line (timeshift = max(TimeData))
and feed it to this function as "timeZero", so no need to have two outputs
from this function.
Shift the 0 offset of a time trace returns [ new time trace ] and [ time shift ] Some time its better to define time shift from one trace and aply it to athers since max or min value could be different like in my case > You can define the time shift with a single line ( timeshift = max ( TimeData )) and feed it to this function as " timeZero " so no need to have two outputs from this function .
def timezero_shift(timeData, timeZero = 0, reverse = 'False'):
    timeData = timeData - timeZero
    if reverse:
        timeData = -timeData
    return(timeData)
def timezero_shift ( timeData , timeZero = 0 , reverse = 'False' ) : timeData = timeData - timeZero if reverse : timeData = - timeData return ( timeData )
Shift the 0 offset of a time trace, returns [new time trace] and [time shift]
Some time its better to define time shift from one trace and aply it to athers,
since max or min value could be different, like in my case
Shift the 0 offset of a time trace returns [ new time trace ] and [ time shift ] Some time its better to define time shift from one trace and aply it to athers since max or min value could be different like in my case
"""Shift the 0 offset of a time trace, returns [new time trace] and [time shift]

    Some time its better to define time shift from one trace and aply it to athers,
    since max or min value could be different, like in my case

    -> You can define the time shift with a single line (timeshift = max(TimeData))
    and feed it to this function as "timeZero", so no need to have two outputs
    from this function.
    """ #timeshift = max(timeData) #newtimedata = timeData + timeshift - timeZero #return(newtimedata, timeshift)
timeData
timeZero
reverse