V2.02.07a dB levels bug fix

Fixed bug in some level calculations where a channel map instead of a
single channel was being passed to the function performing the calcs.
Was OK if hydrophones had same gain, but got it wrong if they were
different.
This commit is contained in:
Douglas Gillespie 2023-01-18 11:06:03 +00:00
parent e169ccb1a7
commit a89279ef81
13 changed files with 176 additions and 141 deletions

View File

@ -451,13 +451,13 @@ Version 2.00.10 June 2017</a></span></h1>
<h1><a name="_Latest_Version_2.02.03_1"></a><a name="_Latest_Version_2.02.05"></a><a <h1><a name="_Latest_Version_2.02.03_1"></a><a name="_Latest_Version_2.02.05"></a><a
name="_Latest_Version_2.02.06"></a><a name="_Latest_Version_2.02.07"></a><span name="_Latest_Version_2.02.06"></a><a name="_Latest_Version_2.02.07"></a><span
lang=EN-US>Latest Version 2.02.07 November 2022</span></h1> lang=EN-US>Latest Version 2.02.07 January 2023</span></h1>
<h2><span lang=EN-US>Bug Fixes</span></h2> <h2><span lang=EN-US>Bug Fixes</span></h2>
<p class=MsoNormal><span lang=EN-US>Use of localization sensor and orientation <p class=MsoNormal><span lang=EN-US>Use of localization sensor and orientation data
data for static hydrophones had a bug whereby it would continually forget for static hydrophones had a bug whereby it would continually forget angle
angle offsets applied to static hydrophones in viewer mode. This is now fixed. </span></p> offsets applied to static hydrophones in viewer mode. This is now fixed. </span></p>
<p class=MsoNormal><span lang=EN-US>Click tool bar: Correctly shows event <p class=MsoNormal><span lang=EN-US>Click tool bar: Correctly shows event
selection options even if no species classification options are in place. </span></p> selection options even if no species classification options are in place. </span></p>
@ -467,8 +467,8 @@ selection options even if no species classification options are in place. </span
mode. Now fixed. </span></p> mode. Now fixed. </span></p>
<p class=MsoNormal><span lang=EN-US>ROCCA: Fixed (another) memory leak which <p class=MsoNormal><span lang=EN-US>ROCCA: Fixed (another) memory leak which
caused PAMGuard to crash when processing large data sets with the ROCCA classifier. caused PAMGuard to crash when processing large data sets with the ROCCA
</span></p> classifier. </span></p>
<p class=MsoNormal><span lang=EN-US>Ishmael Modules: Fixed bug which <p class=MsoNormal><span lang=EN-US>Ishmael Modules: Fixed bug which
occasionally caused crashes when processing many files offline. </span></p> occasionally caused crashes when processing many files offline. </span></p>
@ -681,9 +681,9 @@ href="http://www.pamguard.org/downloads.php?cat_id=3">here</a>.</p>
lang=EN-US> </span></p> lang=EN-US> </span></p>
<p class=MsoNormal>This module has been renamed “Detection Grouper”, so <p class=MsoNormal>This module has been renamed “Detection Grouper”, so
as to avoid confusion with the Group 3D localizer. This is because the Detection as to avoid confusion with the Group 3D localizer. This is because the
Grouper is more for organizing data into groups to be localized than it is for Detection Grouper is more for organizing data into groups to be localized than
doing localization.</p> it is for doing localization.</p>
<p class=MsoNormal><b><span lang=EN-US>Minor Bug Fixes</span></b><span <p class=MsoNormal><b><span lang=EN-US>Minor Bug Fixes</span></b><span
lang=EN-US> </span></p> lang=EN-US> </span></p>
@ -932,11 +932,11 @@ understand the notes listed for <a href="#_Latest_Beta_Version_2.00.10">Beta
Version 2.00.10</a> before proceeding with installation and use of this Version 2.00.10</a> before proceeding with installation and use of this
version.</b></p> version.</b></p>
<p class=MsoNormal>This version of PAMGuard has been bundled with Java 13 (release <p class=MsoNormal>This version of PAMGuard has been bundled with Java 13
13.0.1). PSFX files generated in previous beta releases (2.xx.xx) should be (release 13.0.1). PSFX files generated in previous beta releases (2.xx.xx)
compatible with this version, and vice-versa. PSF files generated in core should be compatible with this version, and vice-versa. PSF files generated in
releases (1.15.xx) can be loaded in this version, but will be converted to PSFX core releases (1.15.xx) can be loaded in this version, but will be converted to
files when PAMGuard exits.</p> PSFX files when PAMGuard exits.</p>
<p class=MsoNormal><b><span lang=EN-US>Bug Fixes</span></b></p> <p class=MsoNormal><b><span lang=EN-US>Bug Fixes</span></b></p>
@ -1064,9 +1064,9 @@ lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nb
Add 3D map for target motion module. </p> Add 3D map for target motion module. </p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>6. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>6. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
Add option to alarm module to attach screenshots of all frames to email alerts. lang=EN-US> </span>Add option to alarm module to attach screenshots of all
</p> frames to email alerts. </p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>7. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>7. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
@ -1100,9 +1100,9 @@ lang=EN-US> </span>Added ctrl-p hotkey to print-screen button. </p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>14. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>14. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
lang=EN-US> </span>Update simulated daq so that it generates new random noise correctly lang=EN-US> </span>Update simulated daq so that it generates new random noise
on each call rather then recycling old data. Makes the output more spectrally correctly on each call rather then recycling old data. Makes the output more
flat. </p> spectrally flat. </p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>14. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>14. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
@ -1169,8 +1169,8 @@ Bug 441. Plot coordinate calculations incorrect in PamAxis.</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>10. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>10. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
lang=EN-US> </span>Bug 442. BT Display does not change click symbol color when lang=EN-US> </span>Bug 442. BT Display does not change click symbol color when Colour
Colour By Superdetection is selected.</p> By Superdetection is selected.</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>11. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>11. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
@ -1194,8 +1194,7 @@ Spectrogram display.</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>15. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>15. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
Bug 447. Viewer mode throws exception when trying to load beamformer Bug 447. Viewer mode throws exception when trying to load beamformer localisations</p>
localisations</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>16. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>16. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
@ -1208,8 +1207,8 @@ Bug 449. Rocca Encounter Stats output file calculating incorrect values.</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>18. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>18. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
lang=EN-US> </span>Bug 450. Ishmael Detectors subscribing to FFTDataBlock lang=EN-US> </span>Bug 450. Ishmael Detectors subscribing to FFTDataBlock twice,
twice, meaning they process each data unit 2x doubling the output.</p> meaning they process each data unit 2x doubling the output.</p>
<p class=MsoNormal><b><span lang=EN-US>Upgrades</span></b></p> <p class=MsoNormal><b><span lang=EN-US>Upgrades</span></b></p>
@ -1220,8 +1219,8 @@ classify clicks. </p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>2. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>2. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
lang=EN-US> </span>Added option in Sound Acquisition settings dialog to override lang=EN-US> </span>Added option in Sound Acquisition settings dialog to
filename time stamp and use PC local time instead. </p> override filename time stamp and use PC local time instead. </p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>3. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>3. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
@ -1298,8 +1297,8 @@ with installation and use of this version.</span></p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>1. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>1. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
lang=EN-US> </span>Bug 427. Soundtrap import not closing binary files properly if lang=EN-US> </span>Bug 427. Soundtrap import not closing binary files properly
BCL files do not contain off-effort 'E' line</p> if BCL files do not contain off-effort 'E' line</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>2. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>2. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
@ -1347,8 +1346,8 @@ lang=EN-US> </span>Updates to the Ishmael detectors.</p>
<h1><a name="_Latest_Beta_Version_2.00.16"></a><span lang=EN-US>Beta Version <h1><a name="_Latest_Beta_Version_2.00.16"></a><span lang=EN-US>Beta Version
2.00.16 May 2019</span></h1> 2.00.16 May 2019</span></h1>
<p class=MsoNormal><span lang=EN-US>PAMGuard Version 2 contains major updates. You <p class=MsoNormal><span lang=EN-US>PAMGuard Version 2 contains major updates.
should read and understand the notes listed for <a You should read and understand the notes listed for <a
href="#_Latest_Beta_Version_2.00.10">Beta Version 2.00.10</a> before proceeding href="#_Latest_Beta_Version_2.00.10">Beta Version 2.00.10</a> before proceeding
with installation and use of this version.</span></p> with installation and use of this version.</span></p>
@ -1597,9 +1596,9 @@ lang=EN-US> </span>Added decimal degrees option to latitude/longitude dialog.</p
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>2. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>2. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
lang=EN-US> </span>Added option in the Click Delay parameters to restrict the lang=EN-US> </span>Added option in the Click Delay parameters to restrict the number
number of initial samples used in the calculation. This can be useful for of initial samples used in the calculation. This can be useful for cleaning up
cleaning up delays in the presence of echoes and small time delays.</p> delays in the presence of echoes and small time delays.</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>3. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>3. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
@ -1642,8 +1641,8 @@ dialog is opened and then closed with no classifiers specified.</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>5. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>5. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Bug 386. Click Detector Sweep Classifier sometimes keeping changed settings </span>Bug 386. Click Detector Sweep Classifier sometimes keeping changed
even when user tries to cancel or discard changes</p> settings even when user tries to cancel or discard changes</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>6. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>6. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@ -1724,8 +1723,8 @@ not compatible wth earlier versions and all configuration data may be lost if
an attempt is made to open newly created psf files with older versions. We have an attempt is made to open newly created psf files with older versions. We have
therefore changed the file extension of psf files to .psfx in new Beta therefore changed the file extension of psf files to .psfx in new Beta
releases. Beta releases will still load the older psf files, but when the releases. Beta releases will still load the older psf files, but when the
configuration is saved, the original psf file will remain untouched and data will configuration is saved, the original psf file will remain untouched and data
be written to a psfx file with the same directory and name.</p> will be written to a psfx file with the same directory and name.</p>
<!-- ************************************************************************************************************************** --> <!-- ************************************************************************************************************************** -->
@ -1741,8 +1740,8 @@ with installation and use of this version.</span></p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>1. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>1. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Bug 367. When adding a click to an event that already contained that click, </span>Bug 367. When adding a click to an event that already contained that
the click was being duplicated in the subtable.</p> click, the click was being duplicated in the subtable.</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>2. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>2. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@ -1888,8 +1887,8 @@ Beta versions</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>11. </span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>11. </span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Bug 366. Rocca manual whistle contour extraction throws error when trying </span>Bug 366. Rocca manual whistle contour extraction throws error when
to classify a boxed whistle</p> trying to classify a boxed whistle</p>
<p class=MsoNormal><b><span lang=EN-US>Upgrades</span></b></p> <p class=MsoNormal><b><span lang=EN-US>Upgrades</span></b></p>
@ -1972,8 +1971,8 @@ User is now able to specify Soundtrap date/time format</p>
<h1><a name="_Latest_Beta_Version_2.00.11"></a><span lang=EN-US>Beta Version <h1><a name="_Latest_Beta_Version_2.00.11"></a><span lang=EN-US>Beta Version
2.00.11 October 2017</span></h1> 2.00.11 October 2017</span></h1>
<p class=MsoNormal><span lang=EN-US>PAMGuard Version 2 contains major updates. <p class=MsoNormal><span lang=EN-US>PAMGuard Version 2 contains major updates. You
You should read and understand the notes listed for <a should read and understand the notes listed for <a
href="#_Latest_Beta_Version_2.00.10">Beta Version 2.00.10</a> before proceeding href="#_Latest_Beta_Version_2.00.10">Beta Version 2.00.10</a> before proceeding
with installation and use of this version.</span></p> with installation and use of this version.</span></p>
@ -2127,8 +2126,8 @@ to colour them by the colour assigned to the group. </span></p>
<h3><span lang=EN-US>Using Old PAMGuard Configurations</span></h3> <h3><span lang=EN-US>Using Old PAMGuard Configurations</span></h3>
<p class=MsoNormal><span lang=EN-US>Old PAMGuard configurations will work with <p class=MsoNormal><span lang=EN-US>Old PAMGuard configurations will work with the
the new version. However please note the following:</span></p> new version. However please note the following:</span></p>
<p class=MsoListParagraph style='margin-left:54.0pt;text-indent:-36.0pt'><span <p class=MsoListParagraph style='margin-left:54.0pt;text-indent:-36.0pt'><span
lang=EN-US>1.</span><span lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lang=EN-US>1.</span><span lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@ -2137,10 +2136,10 @@ so they will no longer work with older PAMGuard versions.</span></p>
<p class=MsoListParagraph style='margin-left:54.0pt;text-indent:-36.0pt'><span <p class=MsoListParagraph style='margin-left:54.0pt;text-indent:-36.0pt'><span
lang=EN-US>2.</span><span lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lang=EN-US>2.</span><span lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US>Display colour options will be lost and most data </span><span lang=EN-US>Display colour options will be lost and most data displayed
displayed on the map may default to black. This is due to the above changes to on the map may default to black. This is due to the above changes to how
how colours are managed. Changing back to the colours of your choice is colours are managed. Changing back to the colours of your choice is relatively
relatively simple through the PAMGuard GUI. </span></p> simple through the PAMGuard GUI. </span></p>
<p class=MsoListParagraph style='margin-left:54.0pt;text-indent:-36.0pt'><span <p class=MsoListParagraph style='margin-left:54.0pt;text-indent:-36.0pt'><span
lang=EN-US>&nbsp;</span></p> lang=EN-US>&nbsp;</span></p>
@ -2182,8 +2181,8 @@ lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nb
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>3.</span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>3.</span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Rocca Module: added StartHr, ProportionWhists and ProportionClicks parameters </span>Rocca Module: added StartHr, ProportionWhists and ProportionClicks
to Event classifier</p> parameters to Event classifier</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>4.</span><span <p class=MsoListParagraph style='text-indent:-18.0pt'><span lang=EN-US>4.</span><span
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@ -3147,9 +3146,9 @@ correctly calculated in real world coordinates. </p>
<p class=MsoNormal><i>Wild ArcGIS Interface</i> (Maps and Mapping group)</p> <p class=MsoNormal><i>Wild ArcGIS Interface</i> (Maps and Mapping group)</p>
<p class=MsoNormal>This module, developed by Michael Oswald / SWFSC, allows PAMGuard <p class=MsoNormal>This module, developed by Michael Oswald / SWFSC, allows
to output data in a format suitable for display in the WILD ArcGIS marine PAMGuard to output data in a format suitable for display in the WILD ArcGIS
mammal survey package. See online help for details. </p> marine mammal survey package. See online help for details. </p>
<p class=MsoNormal><i>Alarms</i> (Utilities Group)</p> <p class=MsoNormal><i>Alarms</i> (Utilities Group)</p>
@ -3186,9 +3185,9 @@ help for details. </p>
<p class=MsoNormal><i>Echo Detector and Sperm Whale IPI Computation</i> (Beta <p class=MsoNormal><i>Echo Detector and Sperm Whale IPI Computation</i> (Beta
only, Sound Measurements Group)</p> only, Sound Measurements Group)</p>
<p class=MsoNormal>These two modules, developed by Brian Miller of the Australian <p class=MsoNormal>These two modules, developed by Brian Miller of the
Antarctic Division can be used to estimate the inter pulse interval of sperm Australian Antarctic Division can be used to estimate the inter pulse interval
whale clicks. (No help available)</p> of sperm whale clicks. (No help available)</p>
<p class=MsoNormal>&nbsp;</p> <p class=MsoNormal>&nbsp;</p>
@ -3246,9 +3245,9 @@ horizon. </p>
<p class=MsoNormal><i>Improved Filter Options</i></p> <p class=MsoNormal><i>Improved Filter Options</i></p>
<p class=MsoNormal>Filter options (used as stand-alone filter modules and also <p class=MsoNormal>Filter options (used as stand-alone filter modules and also
within many other modules, such as the click detector and the Filtered Noise Measurement within many other modules, such as the click detector and the Filtered Noise
module) have been improved so that the user can specify arbitrarily shaped Measurement module) have been improved so that the user can specify arbitrarily
Finite Impulse Response filters (see online help for details). </p> shaped Finite Impulse Response filters (see online help for details). </p>
<p class=MsoNormal><i>Radar Display</i></p> <p class=MsoNormal><i>Radar Display</i></p>
@ -3271,9 +3270,9 @@ whistle.</p>
<li class=MsoNormal style='margin-bottom:0cm'>Click detector inter click <li class=MsoNormal style='margin-bottom:0cm'>Click detector inter click
interval display was not working in viewer mode. This has been rectified. </li> interval display was not working in viewer mode. This has been rectified. </li>
<li class=MsoNormal style='margin-bottom:0cm'>Configuration loading. This has <li class=MsoNormal style='margin-bottom:0cm'>Configuration loading. This has
been rationalised since it was often confusing to users. It is now no longer been rationalised since it was often confusing to users. It is now no
possible to change configurations once PAMGuard has been launched and longer possible to change configurations once PAMGuard has been launched
pressing 'Cancel' on the select dialog causes PAMGuard to exit. </li> and pressing 'Cancel' on the select dialog causes PAMGuard to exit. </li>
<li class=MsoNormal style='margin-bottom:0cm'>Airgun display. If this was <li class=MsoNormal style='margin-bottom:0cm'>Airgun display. If this was
included in the PAMGuard model before the GPS module it would hang included in the PAMGuard model before the GPS module it would hang
PAMGuard. This has been rectified. </li> PAMGuard. This has been rectified. </li>
@ -3287,10 +3286,10 @@ whistle.</p>
device.</li> device.</li>
<li class=MsoNormal style='margin-bottom:0cm'>Fixed colour bugs in Logger <li class=MsoNormal style='margin-bottom:0cm'>Fixed colour bugs in Logger
forms which did not display correctly in 'night' mode. </li> forms which did not display correctly in 'night' mode. </li>
<li class=MsoNormal style='margin-bottom:0cm'>Bug fix in simulator. No longer stops <li class=MsoNormal style='margin-bottom:0cm'>Bug fix in simulator. No longer
or fails to start generating sounds. </li> stops or fails to start generating sounds. </li>
<li class=MsoNormal style='margin-bottom:0cm'>Bug in calculated spectrum <li class=MsoNormal style='margin-bottom:0cm'>Bug in calculated spectrum levels
levels if data were decimated (<a if data were decimated (<a
href="http://sourceforge.net/p/pamguard/bugs/187/">http://sourceforge.net/p/pamguard/bugs/187/</a>) href="http://sourceforge.net/p/pamguard/bugs/187/">http://sourceforge.net/p/pamguard/bugs/187/</a>)
. Did not affect band level calculations. </li> . Did not affect band level calculations. </li>
<li class=MsoNormal style='margin-bottom:0cm'>Bug in noise band monitor. <li class=MsoNormal style='margin-bottom:0cm'>Bug in noise band monitor.
@ -3374,9 +3373,9 @@ databases.</p>
<p class=MsoNormal style='margin-left:36.0pt'>National Instruments cards: Added <p class=MsoNormal style='margin-left:36.0pt'>National Instruments cards: Added
code in support of the new x-series devices. </p> code in support of the new x-series devices. </p>
<p class=MsoNormal style='margin-left:36.0pt'>ASIO sound cards: Added support <p class=MsoNormal style='margin-left:36.0pt'>ASIO sound cards: Added support for
for a new open source ASIO driver system (jasiohost). The old system has been a new open source ASIO driver system (jasiohost). The old system has been left
left in place for now while we assess users response to the newer system. </p> in place for now while we assess users response to the newer system. </p>
<p class=MsoNormal style='margin-left:36.0pt'><i>AIS</i></p> <p class=MsoNormal style='margin-left:36.0pt'><i>AIS</i></p>
@ -3451,14 +3450,14 @@ have implemented database storage for output of these modules. </p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span style='font-family: <p class=MsoListParagraph style='text-indent:-18.0pt'><span style='font-family:
Symbol'>'</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Symbol'>'</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Radar Display: A bug which stopped the radar display from correctly displaying </span>Radar Display: A bug which stopped the radar display from correctly
bearings to whistles from arrays containing more than two hydrophone elements displaying bearings to whistles from arrays containing more than two hydrophone
has been fixed. </p> elements has been fixed. </p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span style='font-family: <p class=MsoListParagraph style='text-indent:-18.0pt'><span style='font-family:
Symbol'>'</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Symbol'>'</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Database Speed: A substantial rewriting of some of the indexing methods </span>Database Speed: A substantial rewriting of some of the indexing methods in
in the database module has led to a significant increase in the speed at which the database module has led to a significant increase in the speed at which
data are written to the database (orders of magnitude for large databases). data are written to the database (orders of magnitude for large databases).
This is having a significant impact on the overall reliability of the software. This is having a significant impact on the overall reliability of the software.
Other changes have increased the speed (again by orders of magnitude) at which Other changes have increased the speed (again by orders of magnitude) at which
@ -3565,8 +3564,8 @@ Symbol'>'</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif
<p class=MsoListParagraph style='text-indent:-18.0pt'><span style='font-family: <p class=MsoListParagraph style='text-indent:-18.0pt'><span style='font-family:
Symbol'>'</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Symbol'>'</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Bearings can be calculated using the envelope of the waveform rather than </span>Bearings can be calculated using the envelope of the waveform rather
the full waveform. The waveform or envelope can also be filtered prior to than the full waveform. The waveform or envelope can also be filtered prior to
bearing calculation.</p> bearing calculation.</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span style='font-family: <p class=MsoListParagraph style='text-indent:-18.0pt'><span style='font-family:
@ -3699,11 +3698,11 @@ Symbol'>'</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif
<p class=MsoNormal>2. Improved offline viewer functionality. </p> <p class=MsoNormal>2. Improved offline viewer functionality. </p>
<p class=MsoNormal>The offline viewer is much improved with better data <p class=MsoNormal>The offline viewer is much improved with better data scrolling
scrolling and the ability to view data either stored in the database or the and the ability to view data either stored in the database or the binary
binary storage system. Work has stated on functions which read and use data storage system. Work has stated on functions which read and use data stored in
stored in audio files. This is currently limited to re-calculating and audio files. This is currently limited to re-calculating and displaying
displaying displaying spectrogram data during viewer mode operation.&nbsp; </p> displaying spectrogram data during viewer mode operation.&nbsp; </p>
<p class=MsoNormal>3. Heading sensor readout</p> <p class=MsoNormal>3. Heading sensor readout</p>
@ -3722,8 +3721,8 @@ frequency division (i.e. previous versions would convert well from 96kHz to
<p class=MsoNormal><b>Bug fixes</b></p> <p class=MsoNormal><b>Bug fixes</b></p>
<p class=MsoNormal>1. Placement of axes on some displays (array manager and depth <p class=MsoNormal>1. Placement of axes on some displays (array manager and
side panel). Problem in 1.9.01 Beta now fixed. </p> depth side panel). Problem in 1.9.01 Beta now fixed. </p>
<p class=MsoNormal>2. Fixed problems of NMEA read out not restarting after a <p class=MsoNormal>2. Fixed problems of NMEA read out not restarting after a
serial drop out. NMEA now restarts correctly. </p> serial drop out. NMEA now restarts correctly. </p>
@ -3800,12 +3799,12 @@ re-label those channels 0,1,2,3. </p>
numbering scheme. For instance, if you had a configuration which worked in real numbering scheme. For instance, if you had a configuration which worked in real
time using channels 7 and 8 of a sound card, you could not use that same time using channels 7 and 8 of a sound card, you could not use that same
configuration to analyse wav files, which would always read their data as configuration to analyse wav files, which would always read their data as
channels 0 and 1. Similarly if you switched sound cards, you may have to channels 0 and 1. Similarly if you switched sound cards, you may have to reconfigure
reconfigure every detector and several of the displays to handle the changes in every detector and several of the displays to handle the changes in channel
channel numbering. </p> numbering. </p>
<p class=MsoNormal>I have spent a considerable amount of time trying to work <p class=MsoNormal>I have spent a considerable amount of time trying to work out
out a better system for handling channel numbering in PAMGUARD and have decided a better system for handling channel numbering in PAMGUARD and have decided
that the only practical thing to do is to force all software channel numbering that the only practical thing to do is to force all software channel numbering
back to a zero indexed system. i.e. even if you read out hardware channels back to a zero indexed system. i.e. even if you read out hardware channels
3,4,5 and 6, within PAMGUARD, everywhere apart from the Sound acquisition 3,4,5 and 6, within PAMGUARD, everywhere apart from the Sound acquisition
@ -3998,10 +3997,10 @@ synchronisation.</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span style='font-family: <p class=MsoListParagraph style='text-indent:-18.0pt'><span style='font-family:
Symbol'>'</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Symbol'>'</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Wigner time-frequency plot for the click detector. Clicks are NOT automatically </span>Wigner time-frequency plot for the click detector. Clicks are NOT
displayed in the Winger window as they are for the waveform and spectrum automatically displayed in the Winger window as they are for the waveform and
windows since the Wigner transformation is very time consuming. Clicks will be spectrum windows since the Wigner transformation is very time consuming. Clicks
displayed if you select them with the mouse.</p> will be displayed if you select them with the mouse.</p>
<p class=MsoListParagraph style='text-indent:-18.0pt'><span style='font-family: <p class=MsoListParagraph style='text-indent:-18.0pt'><span style='font-family:
Symbol'>'</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Symbol'>'</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@ -4393,9 +4392,9 @@ a serial port </p>
<p class=MsoNormal>New Likelihood detector. </p> <p class=MsoNormal>New Likelihood detector. </p>
<p class=MsoNormal>The likelihood detector module is an implementation of a <p class=MsoNormal>The likelihood detector module is an implementation of a likelihood
likelihood ratio test with flexible algorithms and configuration to estimate ratio test with flexible algorithms and configuration to estimate likelihood.
likelihood. It is </p> It is </p>
<p class=MsoNormal>suitable for detecting both short duration Odontocete clicks <p class=MsoNormal>suitable for detecting both short duration Odontocete clicks
(Sperm, Beaked, etc.) as well as moderate duration Mysticete calls (Humpback, (Sperm, Beaked, etc.) as well as moderate duration Mysticete calls (Humpback,
@ -4677,7 +4676,8 @@ Symbol'>'</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif
<h2>0.5b&nbsp;&nbsp;&nbsp; 31 August 2007 </h2> <h2>0.5b&nbsp;&nbsp;&nbsp; 31 August 2007 </h2>
<p class=MsoNormal>Requires Java 6 Update 2 (http://java.com/en/download/manual.jsp)</p> <p class=MsoNormal>Requires Java 6 Update 2
(http://java.com/en/download/manual.jsp)</p>
<p class=MsoNormal>Major new features include:</p> <p class=MsoNormal>Major new features include:</p>

View File

@ -4,7 +4,7 @@
<groupId>org.pamguard</groupId> <groupId>org.pamguard</groupId>
<artifactId>Pamguard</artifactId> <artifactId>Pamguard</artifactId>
<name>Pamguard Java12+</name> <name>Pamguard Java12+</name>
<version>2.02.06</version> <version>2.02.07a</version>
<description>Pamguard for Java 12+, using Maven to control dependcies</description> <description>Pamguard for Java 12+, using Maven to control dependcies</description>
<url>www.pamguard.org</url> <url>www.pamguard.org</url>
<organization> <organization>

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.pamguard</groupId> <groupId>org.pamguard</groupId>
<artifactId>Pamguard</artifactId> <artifactId>Pamguard</artifactId>
<version>2.02.07</version> <version>2.02.07a</version>
<name>Pamguard Java12+</name> <name>Pamguard Java12+</name>
<description>Pamguard for Java 12+, using Maven to control dependcies</description> <description>Pamguard for Java 12+, using Maven to control dependcies</description>
<url>www.pamguard.org</url> <url>www.pamguard.org</url>

View File

@ -950,15 +950,22 @@ public class AcquisitionProcess extends PamProcess {
/** /**
* Check it's a single channel and not a channel map. * Check it's a single channel and not a channel map.
* This fundamentally messed up the amplitude calculations when the
* channels were > 2 since it was only taking the number of the lowest set
* bit. So if a genuine channel was sent, rather than a channel map with a
* single set channel, it messed up. Have made this function redundant
* and we need to be 100% sure that all amplitude calculations are sent a
* channel number not a bitmap with a single set channel.
* @param channel * @param channel
* @return single channel if it seemed to be a bitmap. * @return single channel if it seemed to be a bitmap.
*/ */
private int checkSingleChannel(int channel) { private int checkSingleChannel(int channel) {
int bitCount = PamUtils.getNumChannels(channel);
if (bitCount > 1 || channel > 32) {
channel = PamUtils.getLowestChannel(channel);
}
return channel; return channel;
// int bitCount = PamUtils.getNumChannels(channel);
// if (bitCount > 1 || channel > 32) {
// channel = PamUtils.getLowestChannel(channel);
// }
// return channel;
} }
/** /**
@ -1022,7 +1029,7 @@ public class AcquisitionProcess extends PamProcess {
/** /**
* Prepares for fast amplitude calculations * Prepares for fast amplitude calculations
* @param channel * @param channel number i.e. 0 - 31, NOT a bitmap.
*/ */
public double prepareFastAmplitudeCalculation(int channel) { public double prepareFastAmplitudeCalculation(int channel) {
channel = checkSingleChannel(channel); channel = checkSingleChannel(channel);
@ -1035,7 +1042,7 @@ public class AcquisitionProcess extends PamProcess {
* for an array of double data * for an array of double data
* *
* @param rawAmplitude raw amplitude (should be -1 < rawAmplitude < 1) * @param rawAmplitude raw amplitude (should be -1 < rawAmplitude < 1)
* @param channel channel number (MUST be a channel, not a sequence number) * @param channel channel number (MUST be a channel 0 - 31, not a sequence number)
* @return amplitude in dB re 1 uPa. * @return amplitude in dB re 1 uPa.
*/ */
public double[] rawAmplitude2dB(double[] rawAmplitude, int channel){ public double[] rawAmplitude2dB(double[] rawAmplitude, int channel){
@ -1122,7 +1129,7 @@ public class AcquisitionProcess extends PamProcess {
/** /**
* Converts dB in micropascal to ADC counts on a 0 - 1 scale. * Converts dB in micropascal to ADC counts on a 0 - 1 scale.
* @param channel channel number. * @param channel channel number, i.e. channel index 0 - 31 NOT a bitmap.
* @param dBMuPascal db in micropascal * @param dBMuPascal db in micropascal
* @return ADC counts on a 0-1 scale. * @return ADC counts on a 0-1 scale.
*/ */

View File

@ -14,7 +14,7 @@ import org.codehaus.plexus.util.FileUtils;
* <p> * <p>
* PamAudioFieManager holds a list of PamAudioFile classes. Each PamAudioFile * PamAudioFieManager holds a list of PamAudioFile classes. Each PamAudioFile
* can open a certain type of sound file e.g. flac or raw wav files. * can open a certain type of sound file e.g. flac or raw wav files.
* PamAudioFieManager provides fucntions around the list to open files, provide * PamAudioFieManager provides functions around the list to open files, provide
* file filters etc. * file filters etc.
* *
* @author Jamie Macaulay * @author Jamie Macaulay
@ -81,8 +81,16 @@ public class PamAudioFileManager {
} }
public boolean isSoundFile(File soundFile, String soundExtension) { public boolean isSoundFile(File soundFile, String soundExtension) {
if (soundFile == null) {
return false;
}
String extension = FileUtils.getExtension(soundFile.getName()); String extension = FileUtils.getExtension(soundFile.getName());
if (extension == null) {
return false;
}
extension = extension.toLowerCase();
soundExtension = soundExtension.toLowerCase();
//System.out.println("Sound Extension: " + soundExtension + " File extension: " + extension); //System.out.println("Sound Extension: " + soundExtension + " File extension: " + extension);
return (soundExtension.equals(extension) || soundExtension.equals("." + extension)); return (soundExtension.equals(extension) || soundExtension.equals("." + extension));
} }

View File

@ -31,7 +31,7 @@ public class PamguardVersionInfo {
* Version number, major version.minorversion.sub-release. * Version number, major version.minorversion.sub-release.
* Note: can't go higher than sub-release 'f' * Note: can't go higher than sub-release 'f'
*/ */
static public final String version = "2.02.07"; static public final String version = "2.02.07a";
/** /**
* Release date * Release date

View File

@ -247,15 +247,15 @@ public class SelectFolder {
folderName.setColumns(textLength); folderName.setColumns(textLength);
} }
// public boolean isShowSubFolderOption() { public boolean isShowSubFolderOption() {
// return showSubFolderOption; return showSubFolderOption;
// } }
//
//
// public void setShowSubFolderOption(boolean showSubFolderOption) { public void setShowSubFolderOption(boolean showSubFolderOption) {
// this.showSubFolderOption = showSubFolderOption; this.showSubFolderOption = showSubFolderOption;
// setVisibleControls(); setVisibleControls();
// } }
private void setVisibleControls() { private void setVisibleControls() {
includeSubFoldersCheckBox.setVisible(showSubFolderOption); includeSubFoldersCheckBox.setVisible(showSubFolderOption);

View File

@ -91,6 +91,7 @@ public class ColourScheme implements Serializable, Cloneable {
} }
// avoid overflows. // avoid overflows.
int nCol = whaleColors.length - 1; int nCol = whaleColors.length - 1;
// iCol = Math.abs(iCol);
iCol = ((iCol-1)%nCol) + 1; iCol = ((iCol-1)%nCol) + 1;
if (iCol < 0) { if (iCol < 0) {
return whaleColors[0]; return whaleColors[0];

View File

@ -1696,7 +1696,15 @@ abstract public class PamDataUnit<T extends PamDataUnit, U extends PamDataUnit>
* @return any integer. * @return any integer.
*/ */
public int getColourIndex() { public int getColourIndex() {
return (int) getUID(); /*
* This can go wrong when UID > 2^31 since the colour choser takes
* a mod WRT number of whale colours and it doesn't like negative numbers.
* So need to keep the value going in positive.
*/
long uid = getUID();
uid -= uid/2^31;
return (int) uid;
// return (int) getUID();
} }
/** /**

View File

@ -351,10 +351,15 @@ public class SuperDetection<T extends PamDataUnit> extends PamDataUnit<T, SuperD
if (subDetections == null) { if (subDetections == null) {
return null; return null;
} }
for (int i=0; i<subDetections.size(); i++) { synchronized (subDetectionSyncronisation) {
T aSub = subDetections.get(i).getSubDetection(); for (int i=0; i<subDetections.size(); i++) {
if (aSub.getUID() == UID) { T aSub = subDetections.get(i).getSubDetection();
return aSub; if (aSub == null) {
continue;
}
if (aSub.getUID() == UID) {
return aSub;
}
} }
} }
return null; return null;

View File

@ -128,22 +128,27 @@ public class LevelMeterSidePanel extends PamObserverAdapter implements PamSidePa
levelDisplays[i].setLimits(levelMeterControl.levelMeterParams.minLevel, 0); levelDisplays[i].setLimits(levelMeterControl.levelMeterParams.minLevel, 0);
} }
checkConstants();
}
private void checkConstants() {
// now find the source acquisition module and any gain that's in between them. // now find the source acquisition module and any gain that's in between them.
PamRawDataBlock rawBlock = (PamRawDataBlock) parentBlock; PamRawDataBlock rawBlock = (PamRawDataBlock) parentBlock;
if (rawBlock!=null) { if (rawBlock==null) {
AcquisitionProcess daqProcess = (AcquisitionProcess) rawBlock.getSourceProcess(); return;
AcquisitionControl daqControl = daqProcess.getAcquisitionControl();
voltsPeak2Peak = daqControl.acquisitionParameters.voltsPeak2Peak;
int nChan = PamUtils.getNumChannels(channelMap);
maxFullScale = Double.NEGATIVE_INFINITY;
for (int i = 0; i < nChan; i++) {
int chan = PamUtils.getNthChannel(i, channelMap);
gains[chan] = rawBlock.getDataGain(chan);
dbFullScale[chan] = daqProcess.rawAmplitude2dB(1, chan, false);
maxFullScale = Math.max(maxFullScale, dbFullScale[chan]);
}
setupLabels();
} }
int channelMap = parentBlock.getChannelMap();
AcquisitionProcess daqProcess = (AcquisitionProcess) rawBlock.getSourceProcess();
AcquisitionControl daqControl = daqProcess.getAcquisitionControl();
voltsPeak2Peak = daqControl.acquisitionParameters.voltsPeak2Peak;
int nChan = PamUtils.getNumChannels(channelMap);
maxFullScale = Double.NEGATIVE_INFINITY;
for (int i = 0; i < nChan; i++) {
int chan = PamUtils.getNthChannel(i, channelMap);
gains[chan] = rawBlock.getDataGain(chan);
dbFullScale[chan] = daqProcess.rawAmplitude2dB(1, chan, false);
maxFullScale = Math.max(maxFullScale, dbFullScale[chan]);
}
setupLabels();
} }
private void setupLabels() { private void setupLabels() {
@ -228,7 +233,7 @@ public class LevelMeterSidePanel extends PamObserverAdapter implements PamSidePa
case LevelMeterParams.DISPLAY_VOLTS: case LevelMeterParams.DISPLAY_VOLTS:
return 20.*Math.log10(level*(voltsPeak2Peak/2)); return 20.*Math.log10(level*(voltsPeak2Peak/2));
case LevelMeterParams.DISPLAY_MICROPASCAL: case LevelMeterParams.DISPLAY_MICROPASCAL:
return 20.*Math.log10(level) + maxFullScale; return 20.*Math.log10(level) + dbFullScale[channel];
} }
return 0; return 0;
} }

View File

@ -161,7 +161,8 @@ public class NoiseBandProcess extends PamProcess {
lastOutputTime = timeMillis; lastOutputTime = timeMillis;
} }
else if (timeMillis - lastOutputTime >= noiseBandControl.noiseBandSettings.outputIntervalSeconds*1000) { else if (timeMillis - lastOutputTime >= noiseBandControl.noiseBandSettings.outputIntervalSeconds*1000) {
daqProcess.prepareFastAmplitudeCalculation(iChan); double ampTerm = daqProcess.prepareFastAmplitudeCalculation(iChan);
// System.out.printf("Amplitude term cahnnel %d is %3.1f\n", iChan, ampTerm);
double[][] measurementStats = new double[bandOutputs.length][2]; double[][] measurementStats = new double[bandOutputs.length][2];
for (int i = 0; i < bandOutputs.length; i++) { for (int i = 0; i < bandOutputs.length; i++) {
measurementStats[bandOutputs.length-i-1][0] = daqProcess.rawAmplitude2dB(bandOutputs[i].getRMS(), iChan, true); measurementStats[bandOutputs.length-i-1][0] = daqProcess.rawAmplitude2dB(bandOutputs[i].getRMS(), iChan, true);

View File

@ -451,7 +451,7 @@ public class RoccaSpecPopUp extends javax.swing.JPanel {
for(int currentFreqBin = 0; currentFreqBin < fftVals.length(); currentFreqBin++) { for(int currentFreqBin = 0; currentFreqBin < fftVals.length(); currentFreqBin++) {
rawAmp = fftVals.magsq(currentFreqBin); rawAmp = fftVals.magsq(currentFreqBin);
dB = daq.fftAmplitude2dB(rawAmp, dB = daq.fftAmplitude2dB(rawAmp,
channelMap, PamUtils.getLowestChannel(channelMap),
fftData.getSampleRate(), fftData.getSampleRate(),
fftLength, fftLength,
true, true,