Discrete wavelet decomposition (wavedec) using less than 365 days per year
Ältere Kommentare anzeigen
Hi!
I am trying to run a wavelet coherence analysis of daily streamflow from two gage stations. I have for each year daily streamflow from October and November (61 days) over a period of 75 years, that means that I have daily flow only for 61 days a year. This results on 4575 daily flows (75 years x 61 days) in each station.
When I run the wavelet coherence analysis using the 4575 samples I got the following image

However, I do not know how to convert the Normalized Frequency (cycles/sample) to period of years?
I want to understand how coherent were the daily streamflow data for October and November (the fall season) of each year for different periodicities of 1 year, 2years, 4years, and 8years.
How can i understand this normalized frequency?
Thank you for the help!
10 Kommentare
Jonas
am 25 Jun. 2022
i guess you sticked the daily recording of all 75 years together. to get from normalized frequency to actual frequency, you have to multiply by you sampling frequency. but look into the Matlab function description, there you can normally enter the sampling frequency! which function did you use?
Sara Alonso Vicario
am 27 Jun. 2022
if you compare data from year a with data from year b you use
[wcoh,wcs,f] = wcoherence(x,y,fs)
with fs beeing the sampling frequency in Hz. Your sampling frequency was 1/day, which equals 1/(24*60*60s)
use that value for fs
another possibility to compare the data for each year, is to stick them together to one vector and calculating e.g. the spectrogram or the cwt of the sticked vector. maybe you want to window each year's data using e.g. a hann() window of length 61 to remove harsh transitions (leading to high frequencies) between the years
hann(61).*[year1;
year2;
year3;
...
];
year1 e.g. a row vector here
how did you use the wcoherence function on all 4575 samples?
Sara Alonso Vicario
am 27 Jun. 2022
Jonas
am 28 Jun. 2022
at the moment, you gave a sampling frequency of 61 per year. the problem is, that your 61 samples per year are not uniformly distributed over the year, but they are all taken within two months, so the samples are denser conpared of you stretch 61 samples over one year (which would equal a sampling period of 365/61=6 days). if you want the algorithm to know that these samples are denser, i would suggest that you pre and post pad your 61 samples with 0 such you get 365 samples per year. then you can give the the algorithm the sampling rate 1/day and it can account for the true sampling of 61 samples in two months
Jonas
am 28 Jun. 2022
to make the y labels better readable i would suggest you generate new yticklabels() using your formular on yticks() and updating the ylabel() accordingly
Sara Alonso Vicario
am 28 Jun. 2022
Bearbeitet: Sara Alonso Vicario
am 28 Jun. 2022
Jonas
am 29 Jun. 2022
hmm, ok, i guess the problem is, that the zero padded parts have a big influence on the calculation of the correlation. since the values are the same in the padded regions, the correlation values are much better there compared to the part in which you ate actually interested.
i would consider teo measures you can try (not both at the same time).
1. you could use ne non padded version and mutiply the y values by 6 manually (if this is a valid procedure I can't tell)
2. remove the image regions in which you padded with NaN values, leading to white regions and empty spacing in the appearance. but you may still see the edge effects.
another thing is your sampling frequency, you cut the 365 part here. sampling frequency in the second case is 1/d which equals 1/(24*60*60). you can see also that there must be an error since the x axis range is not correct
Sara Alonso Vicario
am 29 Jun. 2022
Bearbeitet: Sara Alonso Vicario
am 29 Jun. 2022
Jonas
am 30 Jun. 2022
I have re-run the wavelet coherence function over this new data but with the new frequency:
365 (samples / year) * (1 year / 365 days) * (1 day / 24 hours) * (1 hour / 3600 seconds) = 1.1574E-5
using the following expresion:
wcoherence(upstream,downstream,0.0000157431)
just an error from typing you forgot a 1
num2str(1/(24*60*60),'%.12f')
ans =
'0.000011574074'
About the first approach to try, do you mean to multiply the nHz of the y axis in the frist Figure by 6, this will mean then 512 nHz * 6 = 3072 nHz?
Yes, the first figure and the yticklabels changed by factor of 6 to compensate for the fact, that the data were taken ober two months only and not over a whole year. in addition, you can also change the yticklabels by your formular from nano Herz to years, to make it better readable
I have tried to run the wcoherence function using 6 samples/year (365/61) with a frequency equal to:
6 (samples / year) * (1 year / 365 days) * (1 day / 24 hours) * (1 hour / 3600 seconds) = 1.9024E-7
i think this does not make sence.
Antworten (0)
Kategorien
Mehr zu Wavelet Toolbox finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


