Bugfix: whitelist_species_list.txt will now overrule the Species Occurrence Frequency Threshold (#365)
* Bugfix: whitelist_species_list.txt will now overrule the Species Occurrence Frequency Threshold
This commit is contained in:
committed by
GitHub
parent
c55144f742
commit
09d5d9950d
+3
-5
@@ -135,9 +135,6 @@ def predictSpeciesList(lat, lon, week):
|
|||||||
# if there's a custom user-made include list, we only want to use the species in that
|
# if there's a custom user-made include list, we only want to use the species in that
|
||||||
if (len(INCLUDE_LIST) == 0):
|
if (len(INCLUDE_LIST) == 0):
|
||||||
PREDICTED_SPECIES_LIST.append(s[1])
|
PREDICTED_SPECIES_LIST.append(s[1])
|
||||||
WHITELIST_LIST = loadCustomSpeciesList(os.path.expanduser("~/BirdNET-Pi/whitelist_species_list.txt"))
|
|
||||||
for species in WHITELIST_LIST:
|
|
||||||
PREDICTED_SPECIES_LIST.append(species)
|
|
||||||
|
|
||||||
|
|
||||||
def loadCustomSpeciesList(path):
|
def loadCustomSpeciesList(path):
|
||||||
@@ -310,9 +307,10 @@ def load_global_model():
|
|||||||
|
|
||||||
|
|
||||||
def run_analysis(file):
|
def run_analysis(file):
|
||||||
global INCLUDE_LIST, EXCLUDE_LIST
|
global INCLUDE_LIST, EXCLUDE_LIST, WHITELIST_LIST
|
||||||
INCLUDE_LIST = loadCustomSpeciesList(os.path.expanduser("~/BirdNET-Pi/include_species_list.txt"))
|
INCLUDE_LIST = loadCustomSpeciesList(os.path.expanduser("~/BirdNET-Pi/include_species_list.txt"))
|
||||||
EXCLUDE_LIST = loadCustomSpeciesList(os.path.expanduser("~/BirdNET-Pi/exclude_species_list.txt"))
|
EXCLUDE_LIST = loadCustomSpeciesList(os.path.expanduser("~/BirdNET-Pi/exclude_species_list.txt"))
|
||||||
|
WHITELIST_LIST = loadCustomSpeciesList(os.path.expanduser("~/BirdNET-Pi/whitelist_species_list.txt"))
|
||||||
|
|
||||||
conf = get_settings()
|
conf = get_settings()
|
||||||
|
|
||||||
@@ -335,7 +333,7 @@ def run_analysis(file):
|
|||||||
log.warning("Excluded as INCLUDE_LIST is active but this species is not in it: %s", entry[0])
|
log.warning("Excluded as INCLUDE_LIST is active but this species is not in it: %s", entry[0])
|
||||||
elif entry[0] in EXCLUDE_LIST and len(EXCLUDE_LIST) != 0:
|
elif entry[0] in EXCLUDE_LIST and len(EXCLUDE_LIST) != 0:
|
||||||
log.warning("Excluded as species in EXCLUDE_LIST: %s", entry[0])
|
log.warning("Excluded as species in EXCLUDE_LIST: %s", entry[0])
|
||||||
elif entry[0] not in PREDICTED_SPECIES_LIST and len(PREDICTED_SPECIES_LIST) != 0:
|
elif entry[0] not in PREDICTED_SPECIES_LIST and len(PREDICTED_SPECIES_LIST) != 0 and entry[0] not in WHITELIST_LIST:
|
||||||
log.warning("Excluded as below Species Occurrence Frequency Threshold: %s", entry[0])
|
log.warning("Excluded as below Species Occurrence Frequency Threshold: %s", entry[0])
|
||||||
else:
|
else:
|
||||||
d = Detection(
|
d = Detection(
|
||||||
|
|||||||
Reference in New Issue
Block a user