diff --git a/web/run.py b/web/run.py index dbb512b..9fe4325 100755 --- a/web/run.py +++ b/web/run.py @@ -939,8 +939,10 @@ def generate_csv_contents_spz(target_slug, input_slug, started_at, stopped_at): from math import sqrt final_df = pd.concat(list_df, axis=1) - # Is ther a vtot param ? else build it - if 'vtot' not in final_df.columns: + # build vtot param if doesnt exist + if 'vtot' not in final_df.columns \ + and 'vtan' in final_df.columns \ + and 'vrad' in final_df.columns: final_df['vtot'] = final_df.apply(lambda x: sqrt(x.vtan * x.vtan + x.vrad * x.vrad), axis=1) cols_ordered = ['vrad', 'vtan', 'vtot', 'btan', 'brad', 'temp', 'pdyn', 'dens', 'atse', 'xhee', 'yhee'] -- libgit2 0.21.2