File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -752,6 +752,21 @@ bool SpecFile::load_from_iaea( std::istream& istr )
752752 const string valuestr = remove_label ( line );
753753 if ( !parse_float ( valuestr.c_str (), valuestr.size (), cal_coeffs[2 ] ) )
754754 throw runtime_error ( " NCF: Failed to parse quadratic." );
755+ }else if ( starts_with (line," $SPEC_CAL:" ) )
756+ {
757+ if ( !SpecUtils::safe_get_line ( istr, line ) )
758+ throw runtime_error (" Error reading SPEC_CAL section of IAEA file" );
759+ trim (line);
760+
761+ if ( starts_with (line," $" ) )
762+ {
763+ skip_getline = true ;
764+ break ;
765+ }// if( we have overrun the data section )
766+
767+ vector<float > parts;
768+ if ( SpecUtils::split_to_floats (line.c_str (), line.size (), parts) && (parts.size () >= 2 ) )
769+ cal_coeffs = parts;
755770 }else if ( is_ncf && starts_with (line," $RLTIME:" ) )
756771 {
757772 const string valuestr = remove_label ( line );
You can’t perform that action at this time.
0 commit comments