Stereo LET metadata/LET upgrade function#89
Stereo LET metadata/LET upgrade function#89ZigongXu wants to merge 3 commits intoserpentine-h2020:mainfrom
Conversation
|
Hi @ZigongXu 👋, thanks a lot for your contribution! I'm separating my comments to the metadata part and the functions metadata
for var in sec_name:
metadata.update({var: cdf.varattsget(var)['CATDESC']})
metadata.update({var+'_UNITS': cdf.varattsget(var)['UNITS']})
metadata.update({var+'_FILLVAL': cdf.varattsget(var)['FILLVAL']})
metadata.update({'H_Lo_sec_flux_Energy_Bins': [4,6]})
metadata.update({'H_Hi_sec_flux_Energy_Bins': [6,12]})
metadata.update({'H_VLo_sec_flux_Energy_Bins': [1.8,3.6]})
metadata.update({'H_Lo_sec_cnts_Energy_Bins': [4,6]})
metadata.update({'H_Hi_sec_cnts_Energy_Bins': [6,12]})
metadata.update({'H_VLo_sec_cnts_Energy_Bins': [1.8,3.6]})
metadata.update({'H_sec_flux_Energy_Bins':[[1.8,3.6],[4,6],[6,12]]})with for var in sec_name:
metadata.update({var: cdf.varattsget(var)['CATDESC']})
metadata.update({var+'_UNITS': cdf.varattsget(var)['UNITS']})
metadata.update({var+'_FILLVAL': cdf.varattsget(var)['FILLVAL']})
metadata.update({var+'_Energy_Bins': [float(cdf.varattsget(var)['CATDESC'].split(' ')[-4].replace(',', '.')),
float(cdf.varattsget(var)['CATDESC'].split(' ')[-2].replace(',', '.')) ]})
H_sec_flux_Energy_Bins = []
for flux_var in ['H_VLo_sec_flux', 'H_Lo_sec_flux', 'H_Hi_sec_flux']:
H_sec_flux_Energy_Bins = H_sec_flux_Energy_Bins + [metadata[flux_var+'_Energy_Bins']]
metadata.update({'H_sec_flux_Energy_Bins': H_sec_flux_Energy_Bins})(The
#sec data, only load proton data, others are not very commonly used
sec_name = ['H_Lo_sec_flux', 'H_Hi_sec_flux', 'H_VLo_sec_flux', 'H_Lo_sec_cnts', 'H_Hi_sec_cnts', 'H_VLo_sec_cnts']I think it would be worthwhile to just put in the info in for all the data.
|
|
Thanks for your time reviewing the code. That is my first time working on github with others. So apologize for extra trouble I caused. Here are my reply to your comment.,
|
|
No problem, and no need to apologize! As I said, I'm really glad to get some participation. :-)
|
Note that the file you linked is the one for He4; the one for H (e.g. H_hi_sectored_ahead_2025_001_level1_11.txt) says "16 sectored proton intensities, 6 - 10 MeV (1/(cm^2 s sr MeV/nuc))" |
Yes! You are correct!!! |
The metadata of LET elements are added, including all unsec elements and sec data of protons, since in most cases only protons are used. The unsec data product is the standard data product. summed data products have been implemented.
Also, since LET has multiple elements, I added a stereo.let() function to return the data of different elements. usage see the help header of the function. These functions have been tested on my side, and should work well