@@ 451-482 (lines=32) @@ | ||
448 | return dts_retr_interp0, time0, lst0, lon0, sdd |
|
449 | ||
450 | ||
451 | def get_orbits_from_date(date, mlt=False, path=None, L2_version="v6.2"): |
|
452 | """Find SCIAMACHY orbits with retrieved data at a date |
|
453 | ||
454 | Parameters |
|
455 | ---------- |
|
456 | date: str |
|
457 | The date in the format "%Y-%m-%d". |
|
458 | mlt: bool, optional |
|
459 | Look for MLT mode data instead of nominal mode data. |
|
460 | Increases the heuristics to find all MLT orbits. |
|
461 | path: str, optional |
|
462 | The path to the level 2 data. If `None` tries to infer |
|
463 | the data directory from the L2 version using |
|
464 | `./*<L2_version>`. Default: None |
|
465 | ||
466 | Returns |
|
467 | ------- |
|
468 | orbits: list |
|
469 | List of found orbits with retrieved data files |
|
470 | """ |
|
471 | logging.debug("pre-processing: %s", date) |
|
472 | if path is None: |
|
473 | density_base = os.curdir |
|
474 | path = "{0}/*{1}".format(density_base, L2_version) |
|
475 | logging.debug("path: %s", path) |
|
476 | ||
477 | dfiles = glob.glob("{0}/000NO_orbit_*_{1}_Dichten.txt".format( |
|
478 | path, date.replace("-", ""))) |
|
479 | orbits = sorted([int(os.path.basename(df).split('_')[2]) for df in dfiles]) |
|
480 | if mlt: |
|
481 | orbits.append(orbits[-1] + 1) |
|
482 | return orbits |
|
483 | ||
484 | ||
485 | def combine_orbit_data(orbits, |
@@ 396-427 (lines=32) @@ | ||
393 | return dts_retr_interp0, time0, lst0, lon0, sdd |
|
394 | ||
395 | ||
396 | def get_orbits_from_date(date, mlt=False, path=None, L2_version="v6.2"): |
|
397 | """Find SCIAMACHY orbits with retrieved data at a date |
|
398 | ||
399 | Parameters |
|
400 | ---------- |
|
401 | date: str |
|
402 | The date in the format "%Y-%m-%d". |
|
403 | mlt: bool, optional |
|
404 | Look for MLT mode data instead of nominal mode data. |
|
405 | Increases the heuristics to find all MLT orbits. |
|
406 | path: str, optional |
|
407 | The path to the level 2 data. If `None` tries to infer |
|
408 | the data directory from the L2 version using |
|
409 | './*<L2_version>'. Default: None |
|
410 | ||
411 | Returns |
|
412 | ------- |
|
413 | orbits: list |
|
414 | List of found orbits with retrieved data files |
|
415 | """ |
|
416 | logging.debug("pre-processing: %s", date) |
|
417 | if path is None: |
|
418 | density_base = os.curdir |
|
419 | path = "{0}/*{1}".format(density_base, L2_version) |
|
420 | logging.debug("path: %s", path) |
|
421 | ||
422 | dfiles = glob.glob("{0}/000NO_orbit_*_{1}_Dichten.txt".format( |
|
423 | path, date.replace("-", ""))) |
|
424 | orbits = sorted([int(os.path.basename(df).split('_')[2]) for df in dfiles]) |
|
425 | if mlt: |
|
426 | orbits.append(orbits[-1] + 1) |
|
427 | return orbits |
|
428 | ||
429 | ||
430 | def combine_orbit_data(orbits, |