Commit 9c24bc6a1d5a380300cfc65009f75d057f0d6a17

Authored by Erdogan Furkan
1 parent b79dbb0f
Exists in master

Adding helios e6 data

scripts/Add_helios1_e6.json 0 โ†’ 100644
... ... @@ -0,0 +1,11 @@
  1 +{
  2 + "brief": "par",
  3 + "ViId": "helios1_e6_all",
  4 + "mission": "Helios1",
  5 + "instrument": "E6",
  6 + "mission_dir": "Helios1/",
  7 + "location": "E6/",
  8 + "min_sampling": "3600",
  9 + "max_sampling": "",
  10 + "no_compression": "TRUE"
  11 +}
... ...
scripts/Add_helios2_e6.json 0 โ†’ 100644
... ... @@ -0,0 +1,11 @@
  1 +{
  2 + "brief": "par",
  3 + "ViId": "helios2_e6_all",
  4 + "mission": "Helios2",
  5 + "instrument": "E6",
  6 + "mission_dir": "Helios2/",
  7 + "location": "E6/",
  8 + "min_sampling": "3600",
  9 + "max_sampling": "",
  10 + "no_compression": "TRUE"
  11 +}
... ...
scripts/helios_e6.py 0 โ†’ 100644
... ... @@ -0,0 +1,39 @@
  1 +from amda_data_generator.navigate import LocalFileItem
  2 +from amda_data_generator.get import LocalFileContainer
  3 +from amda_data_generator.convert.cdf import CDF2NetCDF
  4 +import os
  5 +
  6 +
  7 +datasets = {"helios1" : LocalFileContainer(LocalFileItem(source="/home/amda_admin/AMDA/amda_data_generator/helios1_e6_1hour_particle_flux_19741212_v01.cdf")),
  8 + "helios2" : LocalFileContainer(LocalFileItem(source="/home/amda_admin/AMDA/amda_data_generator/helios2_e6_1hour_particle_flux_19760117_v01.cdf"))
  9 +}
  10 +
  11 +
  12 +converter = CDF2NetCDF()
  13 +
  14 +common_mapping= {
  15 + "Time": "Epoch",
  16 + "p_flux": "p_flux",
  17 + "p_flux_sd": "p_flux_sd",
  18 + # "p_flux_yaxis": "p_flux_yaxis",
  19 + "e_flux": "e_flux",
  20 + "e_flux_sd": "e_flux_sd",
  21 + # "e_flux_yaxis": "e_flux_yaxis",
  22 + "He_flux": "He_flux",
  23 + "He_flux_sd": "He_flux_sd",
  24 + # "He_flux_yaxis": "He_flux_yaxis"
  25 +}
  26 +
  27 +for dataset in datasets.keys():
  28 + target_nc_dir = "scripts/helios/"+dataset
  29 + # create if doesn't exists
  30 + if not os.path.exists(target_nc_dir):
  31 + os.system("mkdir -p {}".format(target_nc_dir))
  32 +
  33 + output_filename="par_e6.nc"
  34 + if not os.path.exists(os.path.join(target_nc_dir, output_filename)) :
  35 + print(os.path.join(target_nc_dir, output_filename))
  36 + converter.convert(datasets[dataset].get_data(binary=True),
  37 + output_filename=os.path.join(target_nc_dir, output_filename),
  38 + mapping=common_mapping)
  39 +
... ...