예제 #1
0
파일: BkgModelHdf5.cpp 프로젝트: Lingrui/TS
void BkgParamH5::InitBeads_BestRegion( H5File &h5_local_ref, int nBeads_live, const Region *region)
{
    char buff[80];
    //cout << "BkgParamH5::InitBeads_BestRegion... bestRegion=" << bestRegion.first << "," << bestRegion.second << endl << flush;
	// only once (the first flow, not all flows) 
    beads_bestRegion_timeframe.InitBasicCube (h5_local_ref,1,max_frames,1,"/bestRegion/timeframe", "Time Frame", "frameNumber");
    beads_bestRegion_location.InitBasicCube (h5_local_ref,nBeads_live,2,1,"/bestRegion/location", "y(row),x(col) for each bead", "row,col" );
    beads_bestRegion_gainSens.InitBasicCube(h5_local_ref,nBeads_live,1,1,"/bestRegion/gainSens","gain*sens","");
    beads_bestRegion_kmult.InitBasicCube(h5_local_ref,nBeads_live,1,1,"/bestRegion/kmult","kMult","");
    beads_bestRegion_dmult.InitBasicCube(h5_local_ref,nBeads_live,1,1,"/bestRegion/dmult","dMult","");
    beads_bestRegion_SP.InitBasicCube(h5_local_ref,nBeads_live,1,1,"/bestRegion/SP","SP: copies*copy_multiplier","");
    beads_bestRegion_R.InitBasicCube(h5_local_ref,nBeads_live,1,1,"/bestRegion/R","R: ratio of bead buffering to empty buffering","");
	// all flows 
    beads_bestRegion_predicted.InitBasicCube(h5_local_ref,nBeads_live,max_frames,datacube_numflows,"/bestRegion/predicted","predicted trace","");
    beads_bestRegion_corrected.InitBasicCube(h5_local_ref,nBeads_live,max_frames,datacube_numflows,"/bestRegion/corrected","background-adjusted trace","");
    beads_bestRegion_amplitude.InitBasicCube(h5_local_ref,nBeads_live,1,datacube_numflows,"/bestRegion/amplitude","amplititude","");
    beads_bestRegion_residual.InitBasicCube(h5_local_ref,nBeads_live,1,datacube_numflows,"/bestRegion/residual","residual error","");
    beads_bestRegion_fittype.InitBasicCube(h5_local_ref,nBeads_live,1,datacube_numflows,"/bestRegion/fittype","fittype","");
    beads_bestRegion_taub.InitBasicCube(h5_local_ref,nBeads_live,1,datacube_numflows,"/bestRegion/taub","taub","");
    sprintf(buff,"%d",nBeads_live);
    h5_local_ref.CreateAttribute(beads_bestRegion_location.h5_set->getDataSetId(),"nBeads_live",buff);
    sprintf(buff,"%d",region->h);
    h5_local_ref.CreateAttribute(beads_bestRegion_location.h5_set->getDataSetId(),"region_h",buff);
    sprintf(buff,"%d",region->w);
    h5_local_ref.CreateAttribute(beads_bestRegion_location.h5_set->getDataSetId(),"region_w",buff);
    sprintf(buff,"%d",region->row);
    h5_local_ref.CreateAttribute(beads_bestRegion_location.h5_set->getDataSetId(),"region_y(row)",buff);
    sprintf(buff,"%d",region->col);
    h5_local_ref.CreateAttribute(beads_bestRegion_location.h5_set->getDataSetId(),"region_x(col)",buff);
}
예제 #2
0
void RotatingCube::RotateMyCube ( H5File &h5_local_ref, int total_blocks, const char *cube_name, const char *cube_description )
{
  char s[128];
  string str;

  for ( int i=0; i<total_blocks; i++ )
  {
    sprintf ( s,"%s/block_%04d",cube_name, i );
    H5DataSet *ptr = h5_local_ref.CreateDataSet ( s, source, 3 );
    sprintf ( s,"%s",cube_description );
    h5_local_ref.CreateAttribute ( ptr->getDataSetId(),"description",s );
    h5_local_ref.makeParamNames ( "ndx_",source.GetNumZ(),str );
    h5_local_ref.CreateAttribute ( ptr->getDataSetId(),"paramNames",str.c_str() );
    h5_vec.push_back ( ptr );
  }
}
예제 #3
0
// set up a basic data cube + matched h5 set
//@TODO: use templates to avoid "INT" duplication
void MatchedCubeInt::InitBasicCube ( H5File &h5_local_ref, int col, int row, int maxflows, const char *set_name, const char *set_description, const char *param_root )
{
  //printf ( "%s\n",set_name );
  string str;
  source.Init ( col, row, maxflows );
  source.SetRange ( 0,col, 0, row, 0, maxflows );
  source.AllocateBuffer();
  h5_set = h5_local_ref.CreateDataSet ( set_name, source, 3 );
  h5_local_ref.CreateAttribute ( h5_set->getDataSetId(),"description",set_description );
  // either we're just using the axis for nothing special
  if ( strlen ( param_root ) <1 )
  {
    h5_local_ref.makeParamNames ( "ndx_",maxflows, str );
  }
  else
  {
    // or we have a specific set of variables for this axis
    str = param_root;
  }
  h5_local_ref.CreateAttribute ( h5_set->getDataSetId(),"paramNames",str.c_str() );
}