Open HolgerPollyNet opened 1 month ago
I have added HolgerPollyNet to Gluing Repository to access the code. I attach the read me file for the code. GLUING CODE INPUT.docx How do you want to proceed?
Dear @mtsichla ,
according to you glue on the averaged signals, correct? Then the correct position for including it in the chain would be here: https://github.com/PollyNET/Pollynet_Processing_Chain/blob/e85bef047e7cd642a52ab25d1288fd07bd924076/lib/qc/pollyOLCor.m#L154
Could you define which VARIABLES you need for your code to run (preferably the range-corrected signal would be great),
then @ulysses78 can help implementing the python code executed out of matlab!
Hello @HolgerPollyNet & @ulysses78
I calculate the gluing region and the normalization factor after averaging the range corrected signal but then I implement these values in each 30s range corrected profile seperately and not in the averaging signal (so the gluing can be shown in a quicklook also).
The input to my code is the range-corrected signal yes and the following variables and constants:
From a raw file: 1) the length of the variable "measurement_time" 2) the length of the dimension "channel" 3) the length of the dimenson "height" 4) the variable "depol_cal_angle" 5) the variable "if_center" 6) the variable "polstate" 7) the variable "telescope"
(The 5, 6 and 7 will define which channels to glue since not all PollyXTs has the same near field channels.)
Constants:
8) the average interval 9) overlap (in bins, not meters) for each gluing channel (for example 80 which corresponds to 600m) 10) first bin (this can be omitted) 11) correlation coefficient threshold for each gluing channel (for example 0.75) 12) signal to noise ratio threshold for each gluing channel (for example 5) 13) the depolarization calibration angle when the polarizer is in the normal position (for example for aky is 0)
If in your code the sigFR is the range corrected signal and we can have the variable information from another part of the code and insert them there I think it will work.
Hi @mtsichla ,
can you provide a little bit more detail of the variables and constants. E.g. type (array, which dimensions, etc.) and what values are possible. E.g. for telescope it is not 100% clear what is meant. The I can prepare the implementation. And what is the output? The merged signal only?
Hello @HolgerPollyNet ,
The variables I read from the netcdf are: "depol_cal_angle" (float), "if_center" (float), "polstate"(integer) and "telescope"(integer). All these are 1d arrays.
The telescope variable has 0 and 1 values which correspond to far and near field and I am using it in combination with the if_center and polstate (values: 0, 1, 2) to find the pairs for gluing. If in pollynet you don't read the netcdfs and you take these information in another way let me know so we can modify the code.
The other values I take from netcdf is
time: integer value (the number of time profiles)
channels : integer value (the number of channels )
The constants I use are: the average interval: integer value (<=number of time profiles) overlap: integer value (in bins) for each gluing channel (for example 80 corresponds to 600m) correlation coefficient threshold: float value (0-1) for each gluing channel (for example 0.75) signal to noise ratio threshold: float value. I used a simplified expression of the signal to noise ratio (mean of array/standard deviation of array) so the range is not standard. I used the value 5 in my runs which suggests that the signal is 5 times stronger than the noise. the depolarization calibration angle value: float value. It is the angle when the polarizer is in the normal position (for example for aky is 0).
The output is a 3d array with the merged signals and dimensions (time, height, channels).
We can arrange also a meeting to explain these better if you want.
According to the NOA approach as another option.
This could lead to profiles of bsc, ex, and depol combining both telescopes...