Merge fromDG (#172)

* 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.

* SMall changes to OfflineTaskGroup

Copy data before processing to avoid concurrency problems

* Scroller imporvements

Better functions in scroll manager to enable jumping to somewhere interesting from other commands in PAMGuard, e.g. from data table views.
This commit is contained in:
Douglas Gillespie 2024-10-11 16:44:45 +01:00 committed by GitHub
parent 59f9dcb969
commit a38e2262d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 72 additions and 12 deletions

View File

@ -249,6 +249,18 @@ public abstract class DataBlockTableView<T extends PamDataUnit> {
}
}
/**
* Get the data unit for the selected data row
* @return
*/
public T getSelectedDataUnit() {
int row = testTable.getSelectedRow();
if (row < 0) {
return null;
}
return getDataUnit(row);
}
/**
* Get the number of rows in the table - default behaviour is the
* number of rows in the datablock, but this may be overridden if
@ -344,7 +356,7 @@ public abstract class DataBlockTableView<T extends PamDataUnit> {
}
public void popupMenuAction(MouseEvent e, T dataUnit, String colName) {
// System.out.println("Pop");
}
private void showPopupMenu(MouseEvent e) {

View File

@ -338,7 +338,7 @@ public class DetectionGroupTable extends UserDisplayComponentAdapter implements
*
* @return which data row is selected, or null.
*/
private DetectionGroupDataUnit getSelectedDataRow() {
public DetectionGroupDataUnit getSelectedDataRow() {
int row = table.getSelectedRow();
if (row < 0 || dataCopy == null || row >= dataCopy.size()) {
return null;

View File

@ -104,6 +104,13 @@ public abstract class AbstractScrollManager {
*/
abstract public void centreDataAt(PamDataBlock dataBlock, long menuMouseTime);
/**
* Move scroll to given time. Don't move the outer scroller unless necessary.
* @param dataBlock
* @param menuMouseTime
*/
abstract public void scrollToTime(PamDataBlock dataBlock, long menuMouseTime);
/**
* Start all data in all data blocks at the given time
* @param dataBlock

View File

@ -93,11 +93,12 @@ public class PamScrollSlider extends AbstractPamScrollerAWT {
}
@Override
void doMouseWheelAction(MouseWheelEvent mouseWheelEvent) {
public void doMouseWheelAction(MouseWheelEvent mouseWheelEvent) {
int n = mouseWheelEvent.getWheelRotation();
slider.setValue(slider.getValue() - n);
scrollMoved();
}
public void scrollMoved() {
AbstractScrollManager.getScrollManager().moveInnerScroller(this, getValueMillis());
notifyValueChange();
@ -146,6 +147,7 @@ public class PamScrollSlider extends AbstractPamScrollerAWT {
public long getVisibleAmount() {
return 0;
}
/* (non-Javadoc)
* @see pamScrollSystem.AbstractPamScroller#setRangeMillis(long, long, boolean)
*/

View File

@ -59,4 +59,10 @@ public class RealTimeScrollManager extends AbstractScrollManager {
return newMin;
}
@Override
public void scrollToTime(PamDataBlock dataBlock, long menuMouseTime) {
// TODO Auto-generated method stub
}
}

View File

@ -17,6 +17,7 @@ import PamController.PamControllerInterface;
import PamController.PamGUIManager;
import PamController.PamSettingManager;
import PamController.PamSettings;
import PamUtils.PamCalendar;
import PamguardMVC.PamDataBlock;
import PamguardMVC.dataOffline.OfflineDataLoadInfo;
import PamguardMVC.superdet.SuperDetDataBlock;
@ -624,20 +625,52 @@ public class ViewerScrollerManager extends AbstractScrollManager implements PamS
public void centreDataAt(PamDataBlock dataBlock, long menuMouseTime) {
// centre all scroll bars as close to the above as is possible.
AbstractPamScroller aScroller;
long scrollRange, newMax, newMin;
for (int i = 0; i < pamScrollers.size(); i++) {
aScroller = pamScrollers.get(i);
scrollRange = aScroller.getMaximumMillis() - aScroller.getMinimumMillis();
newMin = checkMinimumTime(menuMouseTime - scrollRange / 2);
newMax = checkMaximumTime(newMin + scrollRange);
newMin = newMax-scrollRange;
newMin = checkGapPos(dataBlock, newMin, newMax);
newMax = newMin + scrollRange;
aScroller.setRangeMillis(newMin, newMax, false);
// aScroller.setValueMillis(menuMouseTime - scrollRange/2);
centreScrollerAt(aScroller, dataBlock, menuMouseTime);
}
loadData(false);
}
/**
* Moves outer scroller to centre at given time.
* @param aScroller
* @param dataBlock
* @param menuMouseTime
*/
private void centreScrollerAt(AbstractPamScroller aScroller, PamDataBlock dataBlock, long menuMouseTime) {
long scrollRange, newMax, newMin;
scrollRange = aScroller.getMaximumMillis() - aScroller.getMinimumMillis();
newMin = checkMinimumTime(menuMouseTime - scrollRange / 2);
newMax = checkMaximumTime(newMin + scrollRange);
newMin = menuMouseTime - scrollRange/2;
newMin = checkGapPos(dataBlock, newMin, newMax);
newMax = newMin + scrollRange;
System.out.printf("Centering scoller at %s, range %s to %s\n", PamCalendar.formatDBDateTime(menuMouseTime),
PamCalendar.formatDBDateTime(newMin), PamCalendar.formatDBDateTime(newMax));
aScroller.setRangeMillis(newMin, newMax, false);
aScroller.setValueMillis(menuMouseTime);
}
@Override
public void scrollToTime(PamDataBlock dataBlock, long menuMouseTime) {
// centre all scroll bars as close to the above as is possible.
AbstractPamScroller aScroller;
boolean moved = false;
for (int i = 0; i < pamScrollers.size(); i++) {
aScroller = pamScrollers.get(i);
long scrollerMin = aScroller.getMinimumMillis();
long scrollerMax = aScroller.getMaximumMillis();
if (menuMouseTime < scrollerMin || menuMouseTime > scrollerMax) {
centreScrollerAt(aScroller, dataBlock, menuMouseTime);
moved = true;
}
aScroller.setValueMillis(menuMouseTime);
}
if (moved) {
loadData(false);
}
}
@Override
public void startDataAt(PamDataBlock dataBlock, long menuMouseTime, boolean immediateLoad) {