mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-25 08:32:32 +00:00
Merge pull request #24 from PAMGuard/main
Fixes to click train detector (#73)
This commit is contained in:
commit
de809b6572
@ -231,9 +231,9 @@ public class TOADBearingAlgorithm extends BaseFFTBearingAlgorithm {
|
||||
*/
|
||||
// locBearings[0][0] = Math.PI/2-locBearings[0][0];
|
||||
|
||||
if (arrayShape == ArrayManager.ARRAY_TYPE_PLANE) {
|
||||
locBearings[0][0] = Math.PI/2-locBearings[0][0];
|
||||
}
|
||||
// if (arrayShape == ArrayManager.ARRAY_TYPE_PLANE) {
|
||||
// locBearings[0][0] = Math.PI/2-locBearings[0][0];
|
||||
// }
|
||||
|
||||
PamVector[] arrayAxis = bearingLocaliser.getArrayAxis();
|
||||
double[] arrayAngles = PamVector.getMinimalHeadingPitchRoll(arrayAxis);
|
||||
|
@ -49,6 +49,13 @@ public class CTClassifierParams implements Cloneable, Serializable, ManagedParam
|
||||
*/
|
||||
public CTClassifierType type;
|
||||
|
||||
/**
|
||||
* Create a new unique string identifier - USE WITH CAUTION as the unique ID is used to identify data selectors.
|
||||
*/
|
||||
public void newUniqueID() {
|
||||
this.uniqueID = UUID.randomUUID().toString();
|
||||
};
|
||||
|
||||
public CTClassifierParams clone() {
|
||||
try {
|
||||
CTClassifierParams clonedParams =(CTClassifierParams) super.clone();
|
||||
|
@ -119,6 +119,8 @@ public class Chi2ThresholdClassifier implements CTClassifier {
|
||||
public void createDataSelector(PamDataBlock<?> source) {
|
||||
//System.out.println("Create data selector " +" " + clssfrParams.classifierName + " " + clssfrParams.speciesFlag + " " + clssfrParams.uniqueID );
|
||||
|
||||
if (clssfrParams.uniqueID==null) clssfrParams.newUniqueID();
|
||||
|
||||
if (dataSelector==null || dataSelector.getPamDataBlock()!=source) {
|
||||
//create the data selector
|
||||
//System.out.println("Data selector: " + dataSelector);
|
||||
|
@ -148,13 +148,13 @@ public class StandardClassifier implements CTClassifier {
|
||||
// + " sub species: "+ classifiers.get(i).getParams().speciesFlag + " standard species: " +speciesID + " use? : " + standardClssfrParams.enable[i]);
|
||||
|
||||
if (standardClssfrParams.enable[i]) {
|
||||
if (ctClassification[i].getSpeciesID() != SUB_CLASSIFIER_SPECIESID){
|
||||
if (ctClassification[i].getSpeciesID() < 0){
|
||||
speciesID = CTClassifier.NOSPECIES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//System.out.println("SPECIES ID: " + speciesID);
|
||||
//System.out.println("SPECIES ID: " + speciesID + " clickTrain: " + clickTrain.getUID());
|
||||
|
||||
//create the classification.
|
||||
StandardClassification classification = new StandardClassification(ctClassification, speciesID);
|
||||
|
Loading…
Reference in New Issue
Block a user