-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing parameters when partitioning spectra #94
Comments
@DrakonianMight the peak-based parameters such as |
Thanks @rafa-guedes, yeah I can see that for the partitions in question. Yeah, I can see that. The behaviour I am looking for is to be able to take the peak at the boundary, if a peak is not present in the partitioned spectrum. I wondered whether there was a way of parsing the ipeak in based on just using some sort of argmax. |
In the beginning we used argmax which is faster and a lot simpler to calculate since it can be done directly with dask and does not require those ufuncs we needed to write to allow indexing using
I haven't tested this snippet but something along these lines should work. |
Yeah I absolutely agree with the thinking. In my experience the use case comes up a fair amount about splitting the spectrum using more than just the topographical/watershedding method. Like you say, I am not sure how "valid" the spectrum is, particularly when the number of frequency bins in the model may be quite limited. Perhaps consider it as an optional call? Thanks for the snippet for Tp, thats a neat one liner (I was writing something far more complex). I guess the problem still remains about calculating peak direction, any tips? |
True that will only solve it for Just so you understand it, the spectral stats requiring the peak frequency index If you really want this as a functionality in wavespectra you could try to implement it as an optional argument inside each ipeak-based method, something like |
Hi,
I am trying to understand the behaviour for the generation of parameters when I am partitioning the spectrum.
So my case is that I am wanting to partition the spectrum down into quite a narrow frequency range (which I know can cause issues, with reintegration), but I didn't expect there to be no peak parameters produced.
Here's my code:
And here is a plot of the tp.
![image](https://private-user-images.githubusercontent.com/46990198/276423804-45b13d1b-0995-42f8-9d17-e18addef8d10.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkzNDAyMTYsIm5iZiI6MTcxOTMzOTkxNiwicGF0aCI6Ii80Njk5MDE5OC8yNzY0MjM4MDQtNDViMTNkMWItMDk5NS00MmY4LTlkMTctZTE4YWRkZWY4ZDEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI1VDE4MjUxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJhMTY4NGVmM2EwOWIzMTdkMjFjN2I2ZTljYTJmMDBkYTMwMjdkNDI0YTBlMmUxNDYyYmM2ZWIwYzFjMDFiYjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.E7_J1ob8cloRECxZ9yDq8UZV2293X-UMx9gH1FiE52s)
I have had a quick look at the source code, but there appears to be a couple of different functions that calculate the peak parameters and I am not sure which one is currently in use. My aim here is to have a tp value produced, even if it at the boundary of the frequency range that I have supplied (the same with other peak parameters like peak direction).
Cheers
The text was updated successfully, but these errors were encountered: