Skip to content

Commit 0074e1a

Browse files
committed
Small tweaks for CMF, SPC, SPE files.
1 parent 84f71c6 commit 0074e1a

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/SpecFile_cnf.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ void SpecFile::load_cnf_using_reader( CAMInputOutput::CAMIO &reader )
147147
const CAMInputOutput::DetInfo &det_info = reader.GetDetectorInfo();
148148

149149
if( det_info.MCAType.size() )
150-
remarks_.push_back( "MCA Type: " + det_info.MCAType);
150+
remarks_.push_back( "MCA Type: " + det_info.MCAType );
151151

152152
if( det_info.Type.size() )
153-
remarks_.push_back( "Detector Type: " + det_info.MCAType);
153+
remarks_.push_back( "Detector Type: " + det_info.Type );
154154

155155
if( !det_info.SerialNo.empty() )
156156
instrument_id_ = det_info.SerialNo;

src/SpecFile_spc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ bool SpecFile::load_from_iaea_spc( std::istream &input )
431431
if( have_d )
432432
d = static_cast<float>( atof( line.c_str() + dpos + 2 ) );
433433

434-
if( have_a && have_b && have_c && have_d
434+
if( have_c && have_d
435435
&& (a!=0.0 || b!=0.0 || c!=0.0 ) )
436436
{
437437
calibcoeff_poly = {d,c,b,a};

src/SpecFile_spe.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,8 @@ bool SpecFile::load_from_iaea( std::istream& istr )
678678
break;
679679
}//if( we have overrun the data section )
680680
}
681-
}else if( starts_with(line,"$MCA_CAL:") )
681+
}else if( starts_with(line,"$MCA_CAL:")
682+
|| starts_with(line,"$NONLIN_ENER_FIT:") )
682683
{
683684
try
684685
{

0 commit comments

Comments
 (0)