pycnet package
Subpackages
- pycnet.cnet package
- pycnet.file package
- pycnet.process package
- pycnet.prog package
- pycnet.review package
- Module contents
buildClipDataFrame()getApparentDetections()getClipInfo()getClipTimestamp()getDefaultReviewSettings()getReadableOffset()getSourceFile()getSourceFolders()makeKscopeReviewTable()makeReviewTable()parseStrReviewCriteria()readPredFile()readReviewSettings()summarizeDetections()summarizeRecordingEffort()tallyDetections()
- Module contents
Submodules
pycnet.TestPycnet module
Test the functionality of pycnet using synthetic data.
This script generates one audio file containing mostly random noise and a few examples of the synthetic tone played during northern spotted owl surveys (which is a target class in PNW-Cnet v5), then generates a set of spectrograms from the file, processes the spectrograms using PNW-Cnet v5, and checks that there are apparent detections of the Survey_Tone class at the correct timestamps.
Once the pycnet-audio package has been installed, just run
test_pycnet
and the script should run.
- pycnet.TestPycnet.generateToneFile(output_dir)
Create a synthetic audio file containing three NSO survey tones.
Generate a 10 minute clip containing “pink noise” with NSO survey tones at 00:40, 03:25, and 07:50, normalized to -30 dB.
When the resulting audio file is processed using PNW-Cnet v5, there should be high-confidence detections of the Survey_Tone class in the part_004, part_018, and part_040 clips.
- Parameters:
output_dir (str) – Path to the directory in which the temporary folder, audio file, and spectrograms will be generated.
- Returns:
Path to the audio file that was synthesized.
- Return type:
str
- pycnet.TestPycnet.main()
Module contents
‘pycnet’ library for audio processing
The purpose of this library is to provide a Python-based API and command-line tools for the PNW-Cnet audio classification model for processing bioacoustics data on practical scales.
- copyright:
2024 by Zachary J. Ruff
- license:
GNU General Public License v3; see LICENSE for details.