nano-bio / IsotopeFitSharp

0 stars 0 forks source link

Clusters[cluster_id].PeakData.Add(peak) mixes up data after second entry #4

Closed johannespostler closed 6 years ago

johannespostler commented 6 years ago

When repeatedly adding peak data to a cluster, the second Add succeeds, but wrong data is reproduced afterwards.

Python:


for peak in data_source:
    self.wrk.Clusters[cluster_id].PeakData.Add(peak)

peak has the format: [ 15.99491462 0.99757 ]

When reading self.wrk.Clusters[cluster_id].PeakData.Mass after the first read, it reproduces [ 15.99491462] and .Abundace reproduces [ 0.99757].

After adding another peak: [ 1.79991596e+01 2.05000000e-03]

The readout for the masses shows: [ 15.99491462 17.99915961]

But, the readout for Abundance shows: [ 0.99757 17.99915961]

Hence, instead of the second abundance, the mass was added again. This also happends on subsequent Add() calls.