Sha256: 8452bf3a0c74e1af26e704ea04cd72d725c245cb9d596ad4f0212c5010950591
Contents?: true
Size: 562 Bytes
Versions: 3
Compression:
Stored size: 562 Bytes
Contents
require "matrix" require "flex_station_data/services/compute_mean" module FlexStationData class Sample attr_reader :label, :wells, :plate delegate :wells, to: :plate, prefix: true def initialize(label, wells, plate) @label = label @wells = wells @plate = plate end def values wells.map(&plate_wells.method(:values)) end def readings @readings ||= wells.zip(values).map { |well, v| Readings.new(well, v) } end def mean @mean ||= values.transpose.map(&ComputeMean) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
flex-station-data-1.0.1 | lib/flex_station_data/sample.rb |
flex-station-data-1.0.0 | lib/flex_station_data/sample.rb |
flex-station-data-0.3.2 | lib/flex_station_data/sample.rb |