mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-10-29 23:30:44 +00:00
MErge from DG (#168)
* Localization output * update localiser output * Start effort management system * Start of Effort plotting Strat of effort plotting on map. Framework for using Effort data in other areas (such as Tethys output). * Logger forms update Effort and Symbol selectors working with Logger forms. Also functions to add, edit and delete form rows in Viewer mode. * Update LoggerFormGraphics.java add in correct symbol managemet to forms graphics. * Effort lines on map Sort of working OK in real time mode. * Working effort system Currently only for map, but seems to work OK * Update Tethys to latest nilus schema * Raven importer Start of a system for a raven importer. Not quite working yet. * Raven import Basic functionality working. Not nice to use though. * Tethys Localization work Abstracting out writing of localization objects and document header information so that individual localisers can give fine scale control of this stuff. * updated Nilus A few updates around track and target motion measures. * FX Plot for raven data Also sorted out symbols a bit and improved symbol selector in Generic plots. * Update spectrogram mark bearing display Remove the 90-angle bit * Raven extra columns Logging of data from additional Raven table columns * Start effort management system * Start of Effort plotting Strat of effort plotting on map. Framework for using Effort data in other areas (such as Tethys output). * Logger forms update Effort and Symbol selectors working with Logger forms. Also functions to add, edit and delete form rows in Viewer mode. * Effort lines on map Sort of working OK in real time mode. * Update Tethys to latest nilus schema * Tethys Localization work Abstracting out writing of localization objects and document header information so that individual localisers can give fine scale control of this stuff. * Ishmael Tethys output Added necessaries for Tethys output from Ishmael detectors. Also found a pretty major bug in the spectrogram correlation detector, where for each block of data it was only testing the first sample of each block, not all samples, for being over threshold. * Speed and algorithm improvements to Ish matched filter Seems to be errors in correlation, didn't support multiple channels and also used very old and slow FFT, so working to fix all three issues. * Updated matched filter Updated and working Matched filter, though still some thinking to do about how the scaling of this works, since currently scaled by the template, so whole thing is dependent on the input. Need to think of a better way to do this. * Update match filt normalisation Normalisation now correctly using both the template and the signal for normalisation so that it will be data amplitude independent. * invFFT improvements Use faster inverse FFT of real data in correlation / delay functions. * Improve ifft's in other modules to improve TDOA speeds * Sorting mess of spec plugin graphics Have got the Ishmael ones scrolling, but when scrolling, there is an offset in the data due to the lag of the correlation functions. Quite hard to fix with available timing data * Improve ish spectrogram plugin Sorted scaling and scrollling problems. * Improve startup checks Rethread startup checks so that a progress bar shows when PAMGuard is checking input and output files at start up. Also include single file processing in checks. * Apply all spectrogram overlays Apply to all function on spectrogram overlays so changes to overlays affect all panels.
This commit is contained in:
parent
f2f9870b6f
commit
1acddb4cc6
@ -6,9 +6,8 @@
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/ojdk-21.0.1">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
|
@ -232,6 +232,7 @@ public class LSQBearingLocaliser implements BearingLocaliser {
|
||||
public Serializable getParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalisationAlgorithmInfo getAlgorithmInfo() {
|
||||
return this;
|
||||
|
@ -124,22 +124,6 @@ public abstract class OverlayDataManager<TOverlayInfoType extends OverlayDataInf
|
||||
}
|
||||
DataSelector dataSel = dataBlock.getDataSelector(getDataSelectorName(), allowScores);
|
||||
checkMenuItem = new OverlayCheckboxMenuItem(dataBlock, getDataSelectorName(), dataInfo.select, includeSymbolManagement);
|
||||
// if (dataSel != null) {
|
||||
// if (dataInfo != null && dataInfo.select) {
|
||||
// checkMenuItem = new OverlayCheckboxMenuItem(dataBlock.getDataName(), settingsIcon);
|
||||
// }
|
||||
// else {
|
||||
// checkMenuItem = new OverlayCheckboxMenuItem(dataBlock.getDataName(), settingsIconNot);
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// checkMenuItem = new OverlayCheckboxMenuItem(dataBlock.getDataName());
|
||||
// }
|
||||
// try {
|
||||
// checkMenuItem.setToolTipText(dataBlock.getParentProcess().getPamControlledUnit().getUnitName());
|
||||
// }
|
||||
// catch (NullPointerException e) {
|
||||
// }
|
||||
checkMenuItem.setSelected(dataInfo.select);
|
||||
PamSymbolChooser symbolChooser = null;
|
||||
PamSymbolManager symbolManager = dataBlock.getPamSymbolManager();
|
||||
|
@ -2965,7 +2965,9 @@ InternalFrameListener, DisplayPanelContainer, SpectrogramParametersUser, PamSett
|
||||
if (dataUnit.getTimeMilliseconds() > timeToUse) {
|
||||
continue;
|
||||
}
|
||||
if ((1<<spectrogramParameters.channelList[panelId] & dataUnit.getSequenceBitmap()) == 0) {
|
||||
int wantedMap = 1<<spectrogramParameters.channelList[panelId];
|
||||
int dataChanMap = dataUnit.getSequenceBitmap();
|
||||
if ((wantedMap & dataChanMap) == 0) {
|
||||
continue;
|
||||
}
|
||||
if (dataSelector != null && dataSelector.scoreData(dataUnit) <= 0) {
|
||||
|
@ -1,5 +1,14 @@
|
||||
package Spectrogram;
|
||||
|
||||
import java.awt.Window;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.JCheckBoxMenuItem;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JMenu;
|
||||
import javax.swing.JPopupMenu;
|
||||
|
||||
import PamView.GeneralProjector;
|
||||
import PamView.GeneralProjector.ParameterType;
|
||||
import PamView.GeneralProjector.ParameterUnits;
|
||||
@ -25,7 +34,15 @@ public class SpectrogramOverlayDataManager extends OverlayDataManager {
|
||||
|
||||
@Override
|
||||
public void selectionChanged(PamDataBlock dataBlock, boolean selected) {
|
||||
spectrogramDisplay.getOverlayDataInfo(dataBlock, spectrogramPanel.panelId).select = selected;
|
||||
if (spectrogramDisplay.getSpectrogramParameters().applySelectAll) {
|
||||
int nPanels = spectrogramDisplay.getSpectrogramParameters().nPanels;
|
||||
for (int i = 0; i < nPanels; i++) {
|
||||
spectrogramDisplay.getOverlayDataInfo(dataBlock, i).select = selected;
|
||||
}
|
||||
}
|
||||
else {
|
||||
spectrogramDisplay.getOverlayDataInfo(dataBlock, spectrogramPanel.panelId).select = selected;
|
||||
}
|
||||
spectrogramPanel.subscribeDataBlocks();
|
||||
spectrogramPanel.repaint();
|
||||
}
|
||||
@ -47,4 +64,31 @@ public class SpectrogramOverlayDataManager extends OverlayDataManager {
|
||||
protected GeneralProjector getProjector() {
|
||||
return spectrogramPanel.getProjector();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addSelectionMenuItems(JComponent menu, Window awtWindow, boolean sortAlphabetical, boolean allowScores,
|
||||
boolean includeSymbolManagement) {
|
||||
int n = super.addSelectionMenuItems(menu, awtWindow, sortAlphabetical, allowScores, includeSymbolManagement);
|
||||
if (n > 0) {
|
||||
// add an apply to all channels option.
|
||||
JCheckBoxMenuItem cbi = new JCheckBoxMenuItem("Apply to all channels");
|
||||
cbi.setToolTipText("Selections will apply to all channels in this spectrogram display");
|
||||
cbi.setSelected(spectrogramDisplay.getSpectrogramParameters().applySelectAll);
|
||||
if (menu instanceof JMenu) {
|
||||
((JMenu) menu).addSeparator();
|
||||
}
|
||||
if (menu instanceof JPopupMenu) {
|
||||
((JPopupMenu) menu).addSeparator();
|
||||
}
|
||||
menu.add(cbi);
|
||||
cbi.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
spectrogramDisplay.getSpectrogramParameters().applySelectAll = cbi.isSelected();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
}
|
||||
|
@ -162,6 +162,11 @@ public class SpectrogramParameters extends UserFrameParameters implements Serial
|
||||
|
||||
public boolean[] useSpectrogramMarkObserver;
|
||||
|
||||
/**
|
||||
* apply meny selections to all channels
|
||||
*/
|
||||
public boolean applySelectAll;
|
||||
|
||||
public SpectrogramParameters() {
|
||||
boundingRectangle.x = (int) (Math.random() * 300);
|
||||
boundingRectangle.y = (int) (Math.random() * 200);
|
||||
|
@ -431,12 +431,19 @@ public class PamTableItem implements Cloneable {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return (Integer) value;
|
||||
if (value instanceof Integer) {
|
||||
return (Integer) value;
|
||||
}
|
||||
else if (value instanceof Long) {
|
||||
long longVal = (long) value;
|
||||
return (int) longVal;
|
||||
}
|
||||
}
|
||||
catch (ClassCastException e) {
|
||||
e.printStackTrace();
|
||||
return -1;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user