Skip to content

Commit

Permalink
Attempt to fix bug in UseModel.cs
Browse files Browse the repository at this point in the history
Issue #252 Fail to fix bug in UseModel.cs.
  • Loading branch information
towsey committed Dec 21, 2019
1 parent 9ad5c90 commit 1e0079e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/AnalysisBase/AnalysisCoordinator.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// --------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AnalysisCoordinator.cs" company="QutEcoacoustics">
// All code in this file and all associated files are the copyright and property of the QUT Ecoacoustics Research Group (formerly MQUTeR, and formerly QUT Bioacoustics Research Group).
// </copyright>
Expand Down Expand Up @@ -467,21 +467,21 @@ private static void ValidateResult<T>(
{
Contract.Ensures(
summaryIndexBase.ResultStartSeconds >= result.SegmentStartOffset.TotalSeconds,
"Every summary index generated by this analysis should of been found within the bounds of the segment analyzed");
"Every summary index generated by this analysis should have been found within the bounds of the segment analyzed");
}

foreach (var spectralIndexBase in result.SpectralIndices)
{
Contract.Ensures(
spectralIndexBase.ResultStartSeconds >= result.SegmentStartOffset.TotalSeconds,
"Every spectral index generated by this analysis should of been found within the bounds of the segment analyzed");
"Every spectral index generated by this analysis should have been found within the bounds of the segment analyzed");
}
}

private static (DirectoryInfo Output, DirectoryInfo Temp) PrepareSegmentDirectories<T>(IAnalyser2 analyzer, AnalysisSettings settings, ISegment<T> uniqueDirectoryPerSegment)
{
Contract.Requires(analyzer.NotNull(), "analysis must not be null.");
Contract.Requires(settings != null, "settings must not be null.");
Contract.Requires(analyzer.NotNull(), "Analysis must not be null.");
Contract.Requires(settings != null, "Settings must not be null.");
Contract.Requires(
settings.AnalysisOutputDirectory != null,
$"{nameof(settings.AnalysisOutputDirectory)} is not set.");
Expand Down
4 changes: 4 additions & 0 deletions src/AnalysisPrograms/ContentDescription/UseModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,16 @@ public override AnalysisResult2 Analyze<T>(AnalysisSettings analysisSettings, Se
// TODO: consider not returning this value if it is not needed in summarize
segmentResults,
},

MiscellaneousResults =
{
{ nameof(DescriptionResult), descriptionResultForOneMinute },
},
};

analysisResults.SpectralIndices[0].ResultStartSeconds = segmentSettings.SegmentStartOffset.TotalSeconds;
//spectralIndexBase.ResultStartSeconds >= result.SegmentStartOffset.TotalSeconds,

return analysisResults;
}

Expand Down

0 comments on commit 1e0079e

Please sign in to comment.