Commit 3a5138b27a6c9d756bce9d6a5e303673f3a3eae4
1 parent
db050046
Exists in
rhitier-dev
Set all earth amda parameters
Showing
2 changed files
with
19 additions
and
8 deletions
Show diff stats
config.yml
@@ -283,15 +283,18 @@ targets: | @@ -283,15 +283,18 @@ targets: | ||
283 | # Earth has a LOT of data files, compared to the others. | 283 | # Earth has a LOT of data files, compared to the others. |
284 | models: | 284 | models: |
285 | om: | 285 | om: |
286 | - - slug: 'omni_hour_all' | 286 | + - slug: 'omni-hour-all' |
287 | parameters: | 287 | parameters: |
288 | - pdyn: 'RamP' | ||
289 | - - slug: 'ace_swepam_real_1h' | ||
290 | - # [u'Time', u'Dens', u'Vel', u'Temp', u'flag', u'StartTime', u'StopTime'] | 288 | + pdyn: 'omni_sw_ram' |
289 | +# xy_b: 'omni_imf' | ||
290 | + - slug: 'ace-swepam-real-1h' | ||
291 | parameters: | 291 | parameters: |
292 | - dens: 'Dens' | ||
293 | - vtot: 'Vel' | ||
294 | - temp: 'Temp' | 292 | + vtot: 'sw_v_real' |
293 | + temp: 'sw_n_real' | ||
294 | + dens: 'sw_t_real' | ||
295 | + xy_b: 'imf_real_gse' | ||
296 | + #brad: '' | ||
297 | + #atse: '' | ||
295 | #btan: 'Bgsm' # /!. VECTOR2 (actually, does not exist) | 298 | #btan: 'Bgsm' # /!. VECTOR2 (actually, does not exist) |
296 | sa: | 299 | sa: |
297 | - slug: 'omni_hour_all' | 300 | - slug: 'omni_hour_all' |
web/run.py
@@ -925,6 +925,9 @@ def generate_csv_contents_spz(target_slug, input_slug, started_at, stopped_at): | @@ -925,6 +925,9 @@ def generate_csv_contents_spz(target_slug, input_slug, started_at, stopped_at): | ||
925 | elif _name == 'xy_hee': | 925 | elif _name == 'xy_hee': |
926 | _df = _df.drop(_df.columns[2], axis=1) | 926 | _df = _df.drop(_df.columns[2], axis=1) |
927 | _df = _df.rename(columns={_df.columns[0]: 'xhee', _df.columns[1]: 'yhee'}) | 927 | _df = _df.rename(columns={_df.columns[0]: 'xhee', _df.columns[1]: 'yhee'}) |
928 | + elif _name == 'xy_b': | ||
929 | + _df = _df.drop(_df.columns[2], axis=1) | ||
930 | + _df = _df.rename(columns={_df.columns[0]: 'brad', _df.columns[1]: 'btan'}) | ||
928 | else: | 931 | else: |
929 | _df = _df.rename(columns={_df.columns[0]: _name}) | 932 | _df = _df.rename(columns={_df.columns[0]: _name}) |
930 | 933 | ||
@@ -945,6 +948,11 @@ def generate_csv_contents_spz(target_slug, input_slug, started_at, stopped_at): | @@ -945,6 +948,11 @@ def generate_csv_contents_spz(target_slug, input_slug, started_at, stopped_at): | ||
945 | and 'vrad' in final_df.columns: | 948 | and 'vrad' in final_df.columns: |
946 | final_df['vtot'] = final_df.apply(lambda x: sqrt(x.vtan * x.vtan + x.vrad * x.vrad), axis=1) | 949 | final_df['vtot'] = final_df.apply(lambda x: sqrt(x.vtan * x.vtan + x.vrad * x.vrad), axis=1) |
947 | 950 | ||
951 | + # Hardcoded earth coordinates | ||
952 | + if target_slug == 'earth': | ||
953 | + final_df['xhee'] = 1 | ||
954 | + final_df['yhee'] = 0 | ||
955 | + | ||
948 | cols_ordered = ['vrad', 'vtan', 'vtot', 'btan', 'brad', 'temp', 'pdyn', 'dens', 'atse', 'xhee', 'yhee'] | 956 | cols_ordered = ['vrad', 'vtan', 'vtot', 'btan', 'brad', 'temp', 'pdyn', 'dens', 'atse', 'xhee', 'yhee'] |
949 | cols_ordered = [_c for _c in cols_ordered if _c in final_df.columns] | 957 | cols_ordered = [_c for _c in cols_ordered if _c in final_df.columns] |
950 | final_df = final_df[cols_ordered] | 958 | final_df = final_df[cols_ordered] |
@@ -973,7 +981,7 @@ def generate_csv_file_if_needed(target_slug, input_slug, | @@ -973,7 +981,7 @@ def generate_csv_file_if_needed(target_slug, input_slug, | ||
973 | break | 981 | break |
974 | 982 | ||
975 | # temporary switch while migrating each target to spz | 983 | # temporary switch while migrating each target to spz |
976 | - if target_slug in ['mercury', 'venus', 'mars']: | 984 | + if target_slug in ['mercury', 'venus', 'mars', 'earth']: |
977 | csv_generator = generate_csv_contents_spz | 985 | csv_generator = generate_csv_contents_spz |
978 | else: | 986 | else: |
979 | csv_generator = generate_csv_contents | 987 | csv_generator = generate_csv_contents |