-
Notifications
You must be signed in to change notification settings - Fork 10
Processing corrections2 #312
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
Conversation
…rp changes in the slope of the temperature.
…ts, ensuring that it is not dependent on the number of shots in each time bin.
…ptical properties to the 30s grid to improve accuracy of the molecular representation when performing high-resolution retrievals (WV and quasiretrievals).
Any chance to review the pull request? |
I am working on it ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I have some but only questions so far, I will change to your branch on rsd2 to test if the branch is working for all systems and on the server. If this is succesful, we can aprove the pull request and merge. ok?
print_msg('Start calculating attenuated backscatter.\n', 'flagTimestamp', true); | ||
|
||
data.att_beta_355 = NaN(length(data.height), length(data.mTime)); | ||
data.att_beta_355 = NaN(length(data.distance0), length(data.mTime)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why you change to distance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, I see it is for the range correction
|
||
% load meteorological data | ||
[temperature, pressure, ~, ~, ~, thisMeteorAttri] = loadMeteor(mean(data.mTime), data.alt, ... | ||
[temperature, pressure, ~, ~, ~, thisMeteorAttri] = loadMeteor(TimeM, data.alt, ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit confused, wasn't temperature and pressure already defined? will this then be overwritten or is this line obsolte?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as far as I know, these temperature and pressure arrays are only used for the high resolution products. Instead of having one profiles, one get one each 3 hours
% Rayleigh scattering | ||
[mBsc532, ~] = rayleigh_scattering(532, pressure, temperature + 273.17, 380, 70); | ||
mBsc532 = repmat(transpose(mBsc532), 1, length(data.mTime)); | ||
mBsc532 = transpose(interp2(TimeMg, HeightMg, mBsc532, mTimeg, Heightg, 'linear')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have two times Mbsc532 calcaulated? I.e. also in line 4454.
mBsc532 = repmat(transpose(mBsc532), 1, length(data.mTime)); | ||
mExt532 = repmat(transpose(mExt532), 1, length(data.mTime)); | ||
mExt607 = repmat(transpose(mExt607), 1, length(data.mTime)); | ||
mBsc532 = transpose(interp2(TimeMg, HeightMg, mBsc532, mTimeg, Heightg, 'linear')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here is the third time mBsc532 is calculated, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just leave it as it was. I know it is calculating the same stuff again and again. Just because on each section there are conditions to be fullfilled (e.g., if (sum(flag532) == 1) . In a later commit, I can try to calculate the molecular properties for all needed wavelengths before all these calculations for the individual channels start.
mExt607 = repmat(transpose(mExt607), 1, length(data.mTime)); | ||
mBsc1064 = transpose(interp2(TimeMg, HeightMg, mBsc1064, mTimeg, Heightg, 'linear')); | ||
mExt1064 = transpose(interp2(TimeMg, HeightMg, mExt1064, mTimeg, Heightg, 'linear')); | ||
mExt607 = transpose(interp2(TimeMg, HeightMg, mExt607, mTimeg, Heightg, 'linear')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mExt607 has also already been calculated, right? I.e. in line 5463
% Rayleigh scattering | ||
[mBsc532, ~] = rayleigh_scattering(532, pressure, temperature + 273.17, 380, 70); | ||
mBsc532 = repmat(transpose(mBsc532), 1, length(data.mTime)); | ||
mBsc532 = transpose(interp2(TimeMg, HeightMg, mBsc532, mTimeg, Heightg, 'linear')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- time for mBsc532?
% Rayleigh scattering | ||
[mBsc532, ~] = rayleigh_scattering(532, pressure, temperature + 273.17, 380, 70); | ||
mBsc532 = repmat(transpose(mBsc532), 1, length(data.mTime)); | ||
mBsc532 = transpose(interp2(TimeMg, HeightMg, mBsc532, mTimeg, Heightg, 'linear')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5th time mBsc532?
addParameter(p, 'flagReadLess', false, @islogical); | ||
addParameter(p, 'method', 'nearest', @ischar); | ||
addParameter(p, 'isUseLatestGDAS', true, @islogical); | ||
addParameter(p, 'SmoothMeteo', 7, @isnumeric); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope some information on this new paramter is given somewhere and it is inserted in the global config template....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not yet, but for now it works with the default value of 7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please try to add this in the global config? Should not be to difficult but then it would be consistent, also for future devs.
% HISTORY: | ||
% - 2021-05-16: first edition by Zhenping | ||
% | ||
% - 2025-02-19: edition by Cristofer Jimenez |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vorbildlich! Super!
reshape(mShots, size(mShots, 1), 1, size(mShots, 2)), ... | ||
[1, size(sigI, 2), 1]); % reshape mShots to the same dimensions of sigI | ||
|
||
MShots_back = repmat(... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still didn't get it why the median need to be used , can you insert some comment reflecting what was here before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MShots_back is a new array, I introduced to recalculate the signals in counts keeping the temporal window normalization, which the signals in MHz have.
The following corrections were made (now in the dev branch):
Using the median shot number to recalculate the signal in photon counts, ensuring that it is not dependent on the number of shots in each time bin.
A small smoothing is added to the meteorological data to avoid sharp changes in the slope of the temperature.
Read all gdas files during the period and interpolate the molecular optical properties to the 30s grid to improve the accuracy of the molecular representation when performing high-resolution retrievals (WV and quasi retrievals).
The last two commits are only to undo some unnoticed and undesired changes.