Exemplo n.º 1
0
    """ This function implements a log transformation on the data. """
    # Copy the original sample
    new_sample = original_sample.copy()
    new_data = new_sample.data

    # Our transformation goes here
    new_data['Y2-A'] = log(new_data['Y2-A'])
    new_data = new_data.dropna()  # Removes all NaN entries
    new_sample.data = new_data
    return new_sample


# Load data
sample = FCMeasurement(ID='Test Sample', datafile=datafile)

# Transform using our own custom method
custom_transform_sample = sample.apply(transform_using_this_method)

###
# To do this with a collection (a plate):
# compensated_plate = plate.apply(transform_using_this_method,
#                   output_format='collection')

# Plot
custom_transform_sample.plot(['Y2-A'], color='green', alpha=0.9)
grid(True)

title('Custom log transformation')

# show() # <-- Uncomment when running as a script.
Exemplo n.º 2
0
    """ This function implements a log transformation on the data. """
    # Copy the original sample
    new_sample = original_sample.copy()
    new_data = new_sample.data

    # Our transformation goes here
    new_data['Y2-A'] = log(new_data['Y2-A'])
    new_data = new_data.dropna()  # Removes all NaN entries
    new_sample.data = new_data
    return new_sample


# Load data
sample = FCMeasurement(ID='Test Sample', datafile=datafile)

# Transform using our own custom method
custom_transform_sample = sample.apply(transform_using_this_method)

###
# To do this with a collection (a plate):
# compensated_plate = plate.apply(transform_using_this_method, 
#                   output_format='collection')

# Plot
custom_transform_sample.plot(['Y2-A'], color='green', alpha=0.9);
grid(True)

title('Custom log transformation')

# show() # <-- Uncomment when running as a script.
    new_sample = original_sample.copy()
    new_data = new_sample.data
    original_data = original_sample.data

    # Our transformation goes here
    new_data['Y2-A'] = original_data['Y2-A'] - 0.15 * original_data['FSC-A']
    new_data['FSC-A'] = original_data['FSC-A'] - 0.32 * original_data['Y2-A']
    new_data = new_data.dropna() # Removes all NaN entries
    new_sample.data = new_data
    return new_sample

# Load data
sample = FCMeasurement(ID='Test Sample', datafile=datafile)
sample = sample.transform('hlog')

compensated_sample = sample.apply(custom_compensate)

###
# To do this with a collection (a plate):
# compensated_plate = plate.apply(compensate, output_format='collection')
#

# Plot
sample.plot(['Y2-A', 'FSC-A'], kind='scatter', color='gray', alpha=0.6, label='Original');
compensated_sample.plot(['Y2-A', 'FSC-A'], kind='scatter', color='green', alpha=0.6, label='Compensated');

legend(loc='best')
grid(True)

#show() # <-- Uncomment when running as a script.
Exemplo n.º 4
0
    new_data = new_sample.data
    original_data = original_sample.data

    # Our transformation goes here
    new_data['Y2-A'] = original_data['Y2-A'] - 0.15 * original_data['FSC-A']
    new_data['FSC-A'] = original_data['FSC-A'] - 0.32 * original_data['Y2-A']
    new_data = new_data.dropna()  # Removes all NaN entries
    new_sample.data = new_data
    return new_sample


# Load data
sample = FCMeasurement(ID='Test Sample', datafile=datafile)
sample = sample.transform('hlog')

compensated_sample = sample.apply(custom_compensate)

###
# To do this with a collection (a plate):
# compensated_plate = plate.apply(compensate, output_format='collection')
#

# Plot
sample.plot(['Y2-A', 'FSC-A'],
            kind='scatter',
            color='gray',
            alpha=0.6,
            label='Original')
compensated_sample.plot(['Y2-A', 'FSC-A'],
                        kind='scatter',
                        color='green',