コード例 #1
0
ファイル: RegionalizedData.cpp プロジェクト: Jorges1000/TS
void RegionalizedData::UpdateTracesFromImage (SynchDat &chunk, int flow)
{
  ION_ASSERT(my_trace.time_cp->npts() <= (int)chunk.NumFrames(region->row, region->col), "Wrong number of frames.")
  my_trace.SetRawTrace(); // buffers treated as raw traces
  // populate bead traces from image file, just filling in data already saved
  my_trace.GenerateAllBeadTrace (region,my_beads,chunk, my_flow.flowBufferWritePos, regionAndTimingMatchSdat);

  // calculate average trace across all empty wells in a region for a flow
  // to FileLoadWorker at Image load time, should be able to go here
  emptytrace = emptyTraceTracker->GetEmptyTrace (*region);

  // sanity check images are what we think
  assert ( emptytrace->imgFrames == (int)chunk.NumFrames(region->row, region->col));
}
コード例 #2
0
ファイル: BkgTrace.cpp プロジェクト: Jorges1000/TS
void BkgTrace::GenerateAllBeadTrace (Region *region, BeadTracker &my_beads, SynchDat &chunk, int iFlowBuffer, bool matchSdat)
{
  //  ION_ASSERT(chunk.NumFrames(my_beads.params_nn[0].x,my_beads.params_nn[0].y) >= (size_t)time_cp->npts(), "Wrong data points.");
  ION_ASSERT(chunk.NumFrames(region->row, region->col) >= (size_t)time_cp->npts(), "Wrong data points.");
    for (int nbd = 0;nbd < my_beads.numLBeads;nbd++) // is this the right iterator here?
      {
        int rx = my_beads.params_nn[nbd].x;  // should x,y be stored with traces instead?
        int ry = my_beads.params_nn[nbd].y;

        FG_BUFFER_TYPE *fg = &fg_buffers[bead_flow_t*nbd+time_cp->npts()*iFlowBuffer];
        if (matchSdat) {
	  for (int i = 0; i < time_cp->npts(); i++) {
	    fg[i] = chunk.At(ry + region->row, rx + region->col, i);
	  }
	}
	else {
	  std::vector<float> tmp(time_cp->npts(), 0);
	  chunk.InterpolatedAt(ry + region->row, rx + region->col, time_cp->mTimePoints, tmp);
	  for (int i = 0; i < time_cp->npts(); i++) {
	    fg[i] = tmp[i];
	  }
	}
        float offset = BkgTrace::ComputeDcOffset(fg, *time_cp, 0.0f, time_cp->t0-2);
        for (int i = 0; i < time_cp->npts(); i++) {
          fg[i] = round(fg[i] - offset);
        }
    }
    KeepEmptyScale(region, my_beads,chunk, iFlowBuffer);
}
コード例 #3
0
ファイル: RegionalizedData.cpp プロジェクト: Lingrui/TS
void RegionalizedData::UpdateTracesFromImage (SynchDat &chunk, FlowBufferInfo &my_flow, int flow, int flow_block_size)
{
  ION_ASSERT(my_trace.time_cp->npts() <= (int)chunk.NumFrames(region->row, region->col), "Wrong number of frames.")
  my_trace.SetRawTrace(); // buffers treated as raw traces
  // populate bead traces from image file, just filling in data already saved
  my_trace.GenerateAllBeadTrace (region,my_beads,chunk, my_flow.flowBufferWritePos, regionAndTimingMatchSdat, flow_block_size);
  float t_mid_nuc =  GetTypicalMidNucTime (&my_regions.rp.nuc_shape);
  float t_offset_beads = my_regions.rp.nuc_shape.sigma;
  my_trace.RezeroBeads(time_c.time_start, t_mid_nuc-t_offset_beads, my_flow.flowBufferWritePos, flow_block_size);
  // calculate average trace across all empty wells in a region for a flow
  // to FileLoadWorker at Image load time, should be able to go here
  emptytrace = emptyTraceTracker->GetEmptyTrace (*region);
}