Commit 5a6d4498ea4ba60a27049a05bafc36725e1c928d

Authored by Goutte
1 parent 05e269d1

Add a title to each of the parameters.

Showing 1 changed file with 14 additions and 8 deletions   Show diff stats
@@ -288,32 +288,38 @@ PARAMETERS = { @@ -288,32 +288,38 @@ PARAMETERS = {
288 'pdyn': { 288 'pdyn': {
289 'slug': 'pdyn', 289 'slug': 'pdyn',
290 'name': 'Dyn. Pressure', 290 'name': 'Dyn. Pressure',
291 - 'unit': 'nPa', 291 + 'title': 'The dynamic pressure.',
  292 + 'units': 'nPa',
292 }, 293 },
293 'vlen': { 294 'vlen': {
294 'slug': 'vlen', 295 'slug': 'vlen',
295 'name': 'Velocity', 296 'name': 'Velocity',
296 - 'unit': 'km/s', 297 + 'title': 'The velocity of the particles.',
  298 + 'units': 'km/s',
297 }, 299 },
298 'magn': { 300 'magn': {
299 'slug': 'magn', 301 'slug': 'magn',
300 'name': 'Magnetism', 302 'name': 'Magnetism',
301 - 'unit': 'nT', 303 + 'title': 'B Tangential.',
  304 + 'units': 'nT',
302 }, 305 },
303 'temp': { 306 'temp': {
304 'slug': 'temp', 307 'slug': 'temp',
305 'name': 'Temperature', 308 'name': 'Temperature',
306 - 'unit': 'K', 309 + 'title': 'The absolute temperature.',
  310 + 'units': 'K',
307 }, 311 },
308 'dens': { 312 'dens': {
309 'slug': 'dens', 313 'slug': 'dens',
310 'name': 'Density', 314 'name': 'Density',
311 - 'unit': 'cm^-3', 315 + 'title': 'The density N.',
  316 + 'units': 'cm^-3',
312 }, 317 },
313 'angl': { 318 'angl': {
314 'slug': 'angl', 319 'slug': 'angl',
315 'name': 'Angle T-S-E', 320 'name': 'Angle T-S-E',
316 - 'unit': 'deg', 321 + 'title': 'Angle Target-Sun-Earth.',
  322 + 'units': 'deg',
317 }, 323 },
318 } 324 }
319 325
@@ -613,7 +619,7 @@ def download_targets_netcdf(targets, params, started_at, stopped_at): @@ -613,7 +619,7 @@ def download_targets_netcdf(targets, params, started_at, stopped_at):
613 targets: string list of targets' slugs, separated by `-`. 619 targets: string list of targets' slugs, separated by `-`.
614 params: string list of targets' parameters, separated by `-`. 620 params: string list of targets' parameters, separated by `-`.
615 """ 621 """
616 - separator = '-' 622 + separator = '-' # /!\ this char should never be in slugs
617 targets = targets.split(separator) 623 targets = targets.split(separator)
618 targets.sort() 624 targets.sort()
619 targets_configs = [] 625 targets_configs = []
@@ -682,7 +688,7 @@ def download_targets_netcdf(targets, params, started_at, stopped_at): @@ -682,7 +688,7 @@ def download_targets_netcdf(targets, params, started_at, stopped_at):
682 for param in params: 688 for param in params:
683 indices.append(available_params.index(param)) 689 indices.append(available_params.index(param))
684 nc_var = nc_group.createVariable(param, 'f8', (dimension,)) 690 nc_var = nc_group.createVariable(param, 'f8', (dimension,))
685 - nc_var.units = PARAMETERS[param]['unit'] 691 + nc_var.units = PARAMETERS[param]['units']
686 nc_vars.append(nc_var) 692 nc_vars.append(nc_var)
687 for i, nc_var in enumerate(nc_vars): 693 for i, nc_var in enumerate(nc_vars):
688 index = indices[i] 694 index = indices[i]