Opened 10 years ago

Closed 10 years ago

#211 closed defect (fixed)

Bugs in binary writing/reading of parameters

Reported by: MatthewWhiting Owned by: MatthewWhiting
Priority: normal Milestone: Release-1.6
Component: Output Version: 1.5
Severity: major Keywords:
Cc:

Description

There's a problem here, in param.cc:

    if(this->flagFDR){
      outfile.write(reinterpret_cast<const char*>(&this->alphaFDR), sizeof this->alphaFDR);
      outfile.write(reinterpret_cast<const char*>(&this->FDRnumCorChan), sizeof this->FDRnumCorChan);
      if(this->beamAsUsed.origin()==PARAM){
	outfile.write(reinterpret_cast<const char*>(&this->fwhmBeam), sizeof this->fwhmBeam);
	outfile.write(reinterpret_cast<const char*>(&this->areaBeam), sizeof this->areaBeam);
      }
    }

The state of the beam doesn't get written to the binary file, so the reading function will not know about it. Need to fix

Change History (4)

comment:1 Changed 10 years ago by MatthewWhiting

Status: newassigned
Summary: Potential bug in binary writing/reading of parametersBugs in binary writing/reading of parameters

Also

outfile.write(reinterpret_cast<const char*>(&this->smoothEdgeMethod), sizeof this->smoothEdgeMethod);

should be written with the string interface.

comment:2 Changed 10 years ago by MatthewWhiting

Also, would be good to write out the full Detection class, rather than just the Object3D information (which really means just the pixel locations). This way we could just load in the binary catalogue and not have to worry about looking at the ascii one, unless we wanted to re-parameterise.

comment:3 Changed 10 years ago by MatthewWhiting

[1345] fixes the original problem on this ticket, as well as adding in the flagUserGrowthThreshold to the binary file.

comment:4 Changed 10 years ago by MatthewWhiting

Resolution: fixed
Status: assignedclosed

Ticket #218 has been created to handle the Detection class output to binary files, so this one can be closed.

Note: See TracTickets for help on using tickets.