From 2ff7ebed9cc357a0c9b6fa0b9cd2471634aec7d7 Mon Sep 17 00:00:00 2001 From: David Minton Date: Thu, 26 Aug 2021 20:45:46 -0400 Subject: [PATCH] Fixed bad central body id in initial conditions generator. Also made XVEL the default out put type and EL the default input type --- python/swiftest/swiftest/init_cond.py | 3 +-- python/swiftest/swiftest/simulation_class.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/python/swiftest/swiftest/init_cond.py b/python/swiftest/swiftest/init_cond.py index 83ced66b8..1e23eabe8 100644 --- a/python/swiftest/swiftest/init_cond.py +++ b/python/swiftest/swiftest/init_cond.py @@ -118,7 +118,7 @@ def solar_system_horizons(plname, idval, param, ephemerides_start_date, ds): rotcb = solarpole.cartesian * solarrot Ipsun = np.array([0.0, 0.0, planetIpz['Sun']]) - cbid = np.array([0]) + cbid = np.array([1]) cvec = np.vstack([GMcb, Rcb, J2RP2, J4RP4, Ipsun[0], Ipsun[1], Ipsun[2], rotcb.x, rotcb.y, rotcb.z ]) # Horizons date time internal variables @@ -167,7 +167,6 @@ def solar_system_horizons(plname, idval, param, ephemerides_start_date, ds): val = -1 if key == "Sun" : # Create central body print("Creating the Sun as a central body") - cb = [] cbframe = np.expand_dims(cvec.T, axis=0) cbxr = xr.DataArray(cbframe, dims=dims, coords={'time': t, 'id': cbid, 'vec': clab}) cbds = cbxr.to_dataset(dim='vec') diff --git a/python/swiftest/swiftest/simulation_class.py b/python/swiftest/swiftest/simulation_class.py index 1663b3366..f3047fa71 100644 --- a/python/swiftest/swiftest/simulation_class.py +++ b/python/swiftest/swiftest/simulation_class.py @@ -21,12 +21,12 @@ def __init__(self, codename="Swiftest", param_file=""): 'TP_IN': "tp.in", 'CB_IN': "cb.in", 'IN_TYPE': "ASCII", - 'IN_FORM': "XV", + 'IN_FORM': "EL", 'ISTEP_OUT': "1", 'ISTEP_DUMP': "1", 'BIN_OUT': "bin.dat", 'OUT_TYPE': 'REAL8', - 'OUT_FORM': "EL", + 'OUT_FORM': "XVEL", 'OUT_STAT': "REPLACE", 'CHK_RMAX': "-1.0", 'CHK_EJECT': "-1.0",