Commit 160bc0823bdfd4e1fc038f9067f6c20ba937f001
1 parent
a5e8081b
Exists in
rhitier-dev
Set 3 main probes amda parameters
Showing
2 changed files
with
98 additions
and
22 deletions
Show diff stats
config.yml
@@ -658,15 +658,40 @@ targets: | @@ -658,15 +658,40 @@ targets: | ||
658 | title: 'BepiColombo' | 658 | title: 'BepiColombo' |
659 | orbit: | 659 | orbit: |
660 | models: | 660 | models: |
661 | - - slug: 'bepi_cruise_all' | ||
662 | - # - slug: 'mercury_orb_all' | 661 | + - slug: 'bepi-cruise-all' |
662 | + parameters: | ||
663 | + xy_hee: 'bepi_xyz_hee' | ||
663 | models: | 664 | models: |
664 | om: | 665 | om: |
665 | - - slug: 'tao_bepi_sw' | 666 | + - slug: 'tao-bepi-sw' |
667 | + parameters: | ||
668 | + dens: 'bepi_sw_n' | ||
669 | + xy_v: 'bepi_sw_v' | ||
670 | + temp: 'bepi_sw_t' | ||
671 | + pdyn: 'bepi_sw_pdyn' | ||
672 | + btan: 'bepi_sw_b' | ||
673 | + brad: 'bepi_sw_bx' | ||
674 | + atse: 'bepi_sw_da' | ||
666 | art: | 675 | art: |
667 | - - slug: 'tao_bepi_swrt' | 676 | + - slug: 'tao-bepi-swrt' |
677 | + parameters: | ||
678 | + dens: 'bepi_swrt_n' | ||
679 | + xy_v: 'bepi_swrt_v' | ||
680 | + temp: 'bepi_swrt_t' | ||
681 | + pdyn: 'bepi_swrt_pdyn' | ||
682 | + btan: 'bepi_swrt_b' | ||
683 | + brad: 'bepi_swrt_bx' | ||
684 | + atse: 'bepi_swrt_da' | ||
668 | sa: | 685 | sa: |
669 | - - slug: 'tao_bepi_sta' | 686 | + - slug: 'tao-bepi-sta' |
687 | + parameters: | ||
688 | + dens: 'bepi_sta_n' | ||
689 | + xy_v: 'bepi_sta_v' | ||
690 | + temp: 'bepi_sta_t' | ||
691 | + pdyn: 'bepi_sta_pdyn' | ||
692 | + btan: 'bepi_sta_b' | ||
693 | + brad: 'bepi_sta_bx' | ||
694 | + atse: 'bepi_sta_da' | ||
670 | locked: false | 695 | locked: false |
671 | default: false | 696 | default: false |
672 | - type: 'probe' | 697 | - type: 'probe' |
@@ -675,15 +700,30 @@ targets: | @@ -675,15 +700,30 @@ targets: | ||
675 | title: 'SolarOrbiter' | 700 | title: 'SolarOrbiter' |
676 | orbit: | 701 | orbit: |
677 | models: | 702 | models: |
678 | - - slug: 'so_orb_all' | ||
679 | - # - slug: 'earth_orb_all' | 703 | + - slug: 'so-orb-all' |
704 | + parameters: | ||
705 | + xy_hee: 'so_xyz_hee' | ||
680 | models: | 706 | models: |
681 | om: | 707 | om: |
682 | - - slug: 'tao_so_sw' | ||
683 | - art: | ||
684 | - - slug: 'tao_so_swrt' | ||
685 | - # sa: | ||
686 | - # - slug: 'tao_so_sw' | 708 | + - slug: 'tao-so-sw' |
709 | + parameters: | ||
710 | + dens: 'so_sw_n' | ||
711 | + xy_v: 'so_sw_v' | ||
712 | + temp: 'so_sw_t' | ||
713 | + pdyn: 'so_sw_pdyn' | ||
714 | + btan: 'so_sw_b' | ||
715 | + brad: 'so_sw_bx' | ||
716 | + atse: 'so_sw_da' | ||
717 | + dsc: | ||
718 | + - slug: 'tao-so-dsc' | ||
719 | + parameters: | ||
720 | + dens: 'so_dsc_n' | ||
721 | + xy_v: 'so_dsc_v' | ||
722 | + temp: 'so_dsc_t' | ||
723 | + pdyn: 'so_dsc_pdyn' | ||
724 | + btan: 'so_dsc_b' | ||
725 | + brad: 'so_dsc_bx' | ||
726 | + atse: 'so_dsc_da' | ||
687 | locked: false | 727 | locked: false |
688 | default: false | 728 | default: false |
689 | - type: 'probe' | 729 | - type: 'probe' |
@@ -692,15 +732,50 @@ targets: | @@ -692,15 +732,50 @@ targets: | ||
692 | title: 'Parker Solar Probe' | 732 | title: 'Parker Solar Probe' |
693 | orbit: | 733 | orbit: |
694 | models: | 734 | models: |
695 | - - slug: 'psp_orb_all' | ||
696 | - # - slug: 'earth_orb_all' | 735 | + - slug: 'psp-orb-all' |
736 | + parameters: | ||
737 | + xy_hee: 'psp_xyz_hee' | ||
697 | models: | 738 | models: |
698 | om: | 739 | om: |
699 | - - slug: 'tao_psp_sw' | 740 | + - slug: 'tao-psp-sw' |
741 | + parameters: | ||
742 | + dens: 'psp_sw_n' | ||
743 | + xy_v: 'psp_sw_v' | ||
744 | + temp: 'psp_sw_t' | ||
745 | + pdyn: 'psp_sw_pdyn' | ||
746 | + btan: 'psp_sw_b' | ||
747 | + brad: 'psp_sw_bx' | ||
748 | + atse: 'psp_sw_da' | ||
749 | + dsc: | ||
750 | + - slug: 'tao-psp-dsc' | ||
751 | + parameters: | ||
752 | + dens: 'psp_dsc_n' | ||
753 | + xy_v: 'psp_dsc_v' | ||
754 | + temp: 'psp_dsc_t' | ||
755 | + pdyn: 'psp_dsc_pdyn' | ||
756 | + btan: 'psp_dsc_b' | ||
757 | + brad: 'psp_dsc_bx' | ||
758 | + atse: 'psp_dsc_da' | ||
700 | art: | 759 | art: |
701 | - - slug: 'tao_psp_swrt' | 760 | + - slug: 'tao-psp-swrt' |
761 | + parameters: | ||
762 | + dens: 'psp_swrt_n' | ||
763 | + xy_v: 'psp_swrt_v' | ||
764 | + temp: 'psp_swrt_t' | ||
765 | + pdyn: 'psp_swrt_pdyn' | ||
766 | + btan: 'psp_swrt_b' | ||
767 | + brad: 'psp_swrt_bx' | ||
768 | + atse: 'psp_swrt_da' | ||
702 | sa: | 769 | sa: |
703 | - - slug: 'tao_psp_sta' | 770 | + - slug: 'tao-psp-sta' |
771 | + parameters: | ||
772 | + dens: 'psp_sta_n' | ||
773 | + xy_v: 'psp_sta_v' | ||
774 | + temp: 'psp_sta_t' | ||
775 | + pdyn: 'psp_sta_pdyn' | ||
776 | + btan: 'psp_sta_b' | ||
777 | + brad: 'psp_sta_bx' | ||
778 | + atse: 'psp_sta_da' | ||
704 | locked: false | 779 | locked: false |
705 | default: false | 780 | default: false |
706 | - type: 'probe' | 781 | - type: 'probe' |
web/run.py
@@ -904,7 +904,8 @@ def generate_csv_contents(target_slug, input_slug, started_at, stopped_at): | @@ -904,7 +904,8 @@ def generate_csv_contents(target_slug, input_slug, started_at, stopped_at): | ||
904 | 904 | ||
905 | def generate_csv_contents_spz(target_slug, input_slug, started_at, stopped_at): | 905 | def generate_csv_contents_spz(target_slug, input_slug, started_at, stopped_at): |
906 | now = datetime.datetime.now() | 906 | now = datetime.datetime.now() |
907 | - hp_logger.debug(f"Generating csv content with Speasy for {target_slug}/{input_slug} between {stopped_at} {stopped_at}") | 907 | + hp_logger.debug( |
908 | + f"Generating csv content with Speasy for {target_slug}/{input_slug} between {stopped_at} {stopped_at}") | ||
908 | target_config = get_target_config(target_slug) | 909 | target_config = get_target_config(target_slug) |
909 | plasma_params = {} | 910 | plasma_params = {} |
910 | for plasma_struct in target_config['models'][input_slug]: | 911 | for plasma_struct in target_config['models'][input_slug]: |
@@ -961,7 +962,7 @@ def generate_csv_contents_spz(target_slug, input_slug, started_at, stopped_at): | @@ -961,7 +962,7 @@ def generate_csv_contents_spz(target_slug, input_slug, started_at, stopped_at): | ||
961 | final_df.index.name = 'time' | 962 | final_df.index.name = 'time' |
962 | 963 | ||
963 | then = datetime.datetime.now() | 964 | then = datetime.datetime.now() |
964 | - hp_logger.debug(f"Took {then-now} to generate") | 965 | + hp_logger.debug(f"Took {then - now} to generate") |
965 | 966 | ||
966 | return final_df.to_csv(date_format='%Y-%m-%dT%H:%M:%S+00:00', float_format="%.5f", | 967 | return final_df.to_csv(date_format='%Y-%m-%dT%H:%M:%S+00:00', float_format="%.5f", |
967 | header=True, | 968 | header=True, |
@@ -987,10 +988,10 @@ def generate_csv_file_if_needed(target_slug, input_slug, | @@ -987,10 +988,10 @@ def generate_csv_file_if_needed(target_slug, input_slug, | ||
987 | break | 988 | break |
988 | 989 | ||
989 | # temporary switch while migrating each target to spz | 990 | # temporary switch while migrating each target to spz |
990 | - if target_slug in ['mercury', 'venus', 'mars', 'earth', 'jupiter', 'saturn', 'uranus', 'neptune']: | ||
991 | - csv_generator = generate_csv_contents_spz | ||
992 | - else: | 991 | + if target_slug in ['rosetta', 'juno', 'p67']: |
993 | csv_generator = generate_csv_contents | 992 | csv_generator = generate_csv_contents |
993 | + else: | ||
994 | + csv_generator = generate_csv_contents_spz | ||
994 | 995 | ||
995 | if generate: | 996 | if generate: |
996 | hp_logger.info("Generating CSV '%s'..." % local_csv_file) | 997 | hp_logger.info("Generating CSV '%s'..." % local_csv_file) |