Skip to content

Commit

Permalink
fix Interfile writing of TOF data with 1 TOF bin
Browse files Browse the repository at this point in the history
We need to preserve the TOF character, such that coincidence window
etc is taken into account.
  • Loading branch information
KrisThielemans committed Jun 1, 2024
1 parent 9520af8 commit 7eea917
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/IO/interfile.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1225,12 +1225,16 @@ write_basic_interfile_PDFS_header(const string& header_file_name, const string&
*/
{
case ProjDataFromStream::Segment_View_AxialPos_TangPos: {
if (is_TOF) // TOF data with 1 timing position
order_of_timing_poss = 5;
order_of_segment = 4;
order_of_view = 3;
order_of_z = 2;
break;
}
case ProjDataFromStream::Segment_AxialPos_View_TangPos: {
if (is_TOF) // TOF data with 1 timing position
order_of_timing_poss = 5;
order_of_segment = 4;
order_of_view = 2;
order_of_z = 3;
Expand All @@ -1252,8 +1256,7 @@ write_basic_interfile_PDFS_header(const string& header_file_name, const string&
if (order_of_timing_poss > 0)
{
output_header << "matrix axis label [" << order_of_timing_poss << "] := timing positions\n";
output_header << "!matrix size [" << order_of_timing_poss << "] := " << pdfs.get_timing_poss_sequence_in_stream().size()
<< "\n";
output_header << "!matrix size [" << order_of_timing_poss << "] := " << pdfs.get_num_tof_poss() << "\n";
}

output_header << "matrix axis label [" << order_of_segment << "] := segment\n";
Expand Down

0 comments on commit 7eea917

Please sign in to comment.