Project-OSmOSE / OSEkit

OSEkit is an open source suite of tools written in python and dedicated to the management and analysis of data in underwater passive acoustics.
https://osmose.ifremer.fr
Other
3 stars 2 forks source link

small modifications + overload print #17

Closed cazaudo closed 1 year ago

cazaudo commented 1 year ago

plus one question/recommendation : why not directly using the setter on variable definitions from 114 to 218 in Spectrogram.py ?

ie eg replacing self.__nfft to self.nfft in :

    self.__nfft: int = (
        analysis_sheet["nfft"][0] if "nfft" in analysis_sheet else None
    )

[.....]

this will be necessary if we set tests on input values (eg nfft must be >0 or a multiple of 2^) that will have to be in their setters no ?

Rumengol commented 1 year ago

Indeed, it might be best to use directly the setters even in the init. I will test it locally to see if it triggers an unexpected behavior and push it otherwise.