rebound 5.2.2__tar.gz → 5.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rebound-5.2.2/rebound.egg-info → rebound-5.2.3}/PKG-INFO +2 -2
- {rebound-5.2.2 → rebound-5.2.3}/README.md +1 -1
- {rebound-5.2.2 → rebound-5.2.3}/pyproject.toml +1 -1
- {rebound-5.2.2 → rebound-5.2.3}/rebound/frequency_analysis.py +3 -2
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_frequency_analysis.py +14 -3
- {rebound-5.2.2 → rebound-5.2.3/rebound.egg-info}/PKG-INFO +2 -2
- {rebound-5.2.2 → rebound-5.2.3}/setup.py +1 -1
- {rebound-5.2.2 → rebound-5.2.3}/src/frequency_analysis.c +10 -5
- {rebound-5.2.2 → rebound-5.2.3}/src/rebound.c +1 -1
- {rebound-5.2.2 → rebound-5.2.3}/src/simulationarchive.c +27 -28
- {rebound-5.2.2 → rebound-5.2.3}/LICENSE +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/MANIFEST.in +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/__init__.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/binarydata_field_descriptor.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/citations.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/horizons.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/integrator.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/ode.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/orbit.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/particle.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/particles.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/plotting.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/rotation.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/simulation.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/simulationarchive.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/__init__.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_additional_forces.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_binary_fields.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_boundary.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_bs.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_collisions.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_copy.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_data.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_eos.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_fpcontract.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_gravity.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_horizons.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_import.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_integrator.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_janus.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_leapfrog.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_megno.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_mercurius.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_modify_orbital_parameters.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_name.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_orbital_elements.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_particle.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_pickle.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_plotting.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_post_timestep_modifications.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_random.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_restart_mercurius.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_rotations.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_saba.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_serialize.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_server.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_shearingsheet.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_simulation.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_simulationarchive.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_simulationarchive_matrix.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_size_of_simulation.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_tponly_encounter.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_trace.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_trace_full_bs.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_trace_full_ias15.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_transformations.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_units.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_variational.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_whfast.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_whfast512.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_whfast_advanced.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tests/test_whfast_testparticles.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/tools.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/units.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/variation.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/vectors.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound/widget.py +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound.egg-info/SOURCES.txt +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound.egg-info/dependency_links.txt +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/rebound.egg-info/top_level.txt +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/setup.cfg +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/binarydata.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/binarydata.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/boundary.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/boundary.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/collision.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/collision.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/communication_mpi.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/communication_mpi.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/derivatives.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/derivatives.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/display.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/display.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/fmemopen.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/fmemopen.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/frequency_analysis.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/glad.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/glad.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/gravity.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/gravity.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_bs.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_bs.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_eos.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_eos.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_ias15.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_ias15.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_janus.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_janus.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_leapfrog.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_leapfrog.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_mercurius.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_mercurius.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_saba.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_saba.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_sei.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_sei.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_trace.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_trace.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_whfast.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_whfast.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_whfast512.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_whfast512.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/integrator_whfast512.s +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/khrplatform.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/output.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/output.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/particle.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/particle.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/rebound.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/rebound_internal.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/rotations.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/rotations.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/server.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/server.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/simplefont.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/simulation.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/simulation.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/simulationarchive.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/tools.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/tools.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/transformations.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/transformations.h +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/tree.c +0 -0
- {rebound-5.2.2 → rebound-5.2.3}/src/tree.h +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rebound
|
|
3
|
-
Version: 5.2.
|
|
3
|
+
Version: 5.2.3
|
|
4
4
|
Summary: An open-source multi-purpose N-body code
|
|
5
5
|
Author-email: Hanno Rein <hanno@hanno-rein.de>
|
|
6
6
|
License-Expression: GPL-3.0-only
|
|
@@ -17,7 +17,7 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Dynamic: license-file
|
|
19
19
|
|
|
20
|
-
[](https://rebound.hanno-rein.de)
|
|
21
21
|
[](https://badge.fury.io/py/rebound)
|
|
22
22
|
[](https://github.com/hannorein/rebound/blob/main/LICENSE)
|
|
23
23
|
[](https://rebound.hanno-rein.de/)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[](https://rebound.hanno-rein.de)
|
|
2
2
|
[](https://badge.fury.io/py/rebound)
|
|
3
3
|
[](https://github.com/hannorein/rebound/blob/main/LICENSE)
|
|
4
4
|
[](https://rebound.hanno-rein.de/)
|
|
@@ -4,9 +4,10 @@ FREQUENCY_ANALYSIS_TYPES = {"mft": 0, "fmft": 1, "fmft2": 2}
|
|
|
4
4
|
FREQUENCY_ANALYSIS_ERRORS = [
|
|
5
5
|
(-1, "Frequency analysis error: minfreq must be smaller than maxfreq."),
|
|
6
6
|
(-2, "Frequency analysis error: nfreq must be larger than 0."),
|
|
7
|
-
(-3, "Frequency analysis error: ndata must be power of 2."),
|
|
7
|
+
(-3, "Frequency analysis error: ndata must be a power of 2 and at least 2."),
|
|
8
8
|
(-4, "Frequency analysis error: input array is NULL."),
|
|
9
9
|
(-5, "Frequency analysis error: pointer to output array is NULL."),
|
|
10
|
+
(-6, "Frequency analysis error: cannot find frequencies in range [minfreq, maxfreq]."),
|
|
10
11
|
]
|
|
11
12
|
|
|
12
13
|
def frequency_analysis(inp, type=0, nfreq=10, minfreq=-1e-3, maxfreq=1e-3):
|
|
@@ -49,7 +50,7 @@ def frequency_analysis(inp, type=0, nfreq=10, minfreq=-1e-3, maxfreq=1e-3):
|
|
|
49
50
|
if inp.dtype != np.float64:
|
|
50
51
|
raise ValueError("Input array must be have datatype np.float64")
|
|
51
52
|
|
|
52
|
-
if isinstance(type, int):
|
|
53
|
+
if isinstance(type, int) and type in FREQUENCY_ANALYSIS_TYPES.values():
|
|
53
54
|
type = ctypes.c_uint(type)
|
|
54
55
|
elif isinstance(type, str):
|
|
55
56
|
type = type.lower()
|
|
@@ -29,7 +29,7 @@ class TestFrequencyAnalysis(unittest.TestCase):
|
|
|
29
29
|
nu_error = np.abs(nu[i]*1296000.0/datasep-nu5[i])
|
|
30
30
|
self.assertLess(nu_error, 3e-4)
|
|
31
31
|
A_error = np.abs((A[i]-A5[i])/A5[i])
|
|
32
|
-
self.assertLess(
|
|
32
|
+
self.assertLess(A_error, 2e-3)
|
|
33
33
|
phi_error = np.abs(phi[i]/np.pi*180.0-phi5[i])
|
|
34
34
|
self.assertLess(phi_error, 5e-1)
|
|
35
35
|
def test_LA1990_type_1(self):
|
|
@@ -39,7 +39,7 @@ class TestFrequencyAnalysis(unittest.TestCase):
|
|
|
39
39
|
nu_error = np.abs(nu[i]*1296000.0/datasep-nu5[i])
|
|
40
40
|
self.assertLess(nu_error, 4e-6)
|
|
41
41
|
A_error = np.abs((A[i]-A5[i])/A5[i])
|
|
42
|
-
self.assertLess(
|
|
42
|
+
self.assertLess(A_error, 1e-5)
|
|
43
43
|
phi_error = np.abs(phi[i]/np.pi*180.0-phi5[i])
|
|
44
44
|
self.assertLess(phi_error, 6e-3)
|
|
45
45
|
def test_LA1990_type_2(self):
|
|
@@ -49,9 +49,20 @@ class TestFrequencyAnalysis(unittest.TestCase):
|
|
|
49
49
|
nu_error = np.abs(nu[i]*1296000.0/datasep-nu5[i])
|
|
50
50
|
self.assertLess(nu_error, 2e-8)
|
|
51
51
|
A_error = np.abs((A[i]-A5[i])/A5[i])
|
|
52
|
-
self.assertLess(
|
|
52
|
+
self.assertLess(A_error, 3e-7)
|
|
53
53
|
phi_error = np.abs(phi[i]/np.pi*180.0-phi5[i])
|
|
54
54
|
self.assertLess(phi_error, 5e-5)
|
|
55
|
+
def test_invalid_analysis_type(self):
|
|
56
|
+
with self.assertRaises(ValueError):
|
|
57
|
+
rebound.frequency_analysis(np.zeros(16), type=3)
|
|
58
|
+
with self.assertRaises(ValueError):
|
|
59
|
+
rebound.frequency_analysis(np.zeros(16), type="other")
|
|
60
|
+
def test_no_frequencies_in_range(self):
|
|
61
|
+
domain = np.arange(16)
|
|
62
|
+
signal = np.zeros(2*len(domain)) # interleaved real/imaginary values
|
|
63
|
+
signal[0::2] = np.cos(np.pi / 4 * domain) # populate real components
|
|
64
|
+
with self.assertRaisesRegex(RuntimeError, "cannot find frequencies"):
|
|
65
|
+
rebound.frequency_analysis(signal, nfreq=1, minfreq=10.0, maxfreq=11.0)
|
|
55
66
|
|
|
56
67
|
if __name__ == "__main__":
|
|
57
68
|
unittest.main()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rebound
|
|
3
|
-
Version: 5.2.
|
|
3
|
+
Version: 5.2.3
|
|
4
4
|
Summary: An open-source multi-purpose N-body code
|
|
5
5
|
Author-email: Hanno Rein <hanno@hanno-rein.de>
|
|
6
6
|
License-Expression: GPL-3.0-only
|
|
@@ -17,7 +17,7 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Dynamic: license-file
|
|
19
19
|
|
|
20
|
-
[](https://rebound.hanno-rein.de)
|
|
21
21
|
[](https://badge.fury.io/py/rebound)
|
|
22
22
|
[](https://github.com/hannorein/rebound/blob/main/LICENSE)
|
|
23
23
|
[](https://rebound.hanno-rein.de/)
|
|
@@ -35,7 +35,7 @@ try:
|
|
|
35
35
|
ghash = subprocess.check_output(["git", "rev-parse", "HEAD"]).decode("ascii").strip()
|
|
36
36
|
ghash_arg = f"-DGITHASH={ghash}"
|
|
37
37
|
except Exception:
|
|
38
|
-
ghash_arg = "-DGITHASH=
|
|
38
|
+
ghash_arg = "-DGITHASH=96efa5e98f9540c1e94161fe2ea68bead5d2b320" #GITHASHAUTOUPDATE
|
|
39
39
|
|
|
40
40
|
##### Link args
|
|
41
41
|
extra_link_args = []
|
|
@@ -74,8 +74,8 @@ int reb_frequency_analysis(double *output, size_t nfreq, double minfreq, double
|
|
|
74
74
|
printf("Frequency analysis error: nfreq must be larger than 0.\n");
|
|
75
75
|
return -2;
|
|
76
76
|
}
|
|
77
|
-
if ((ndata & (ndata - 1)) != 0){
|
|
78
|
-
printf("Frequency analysis error: ndata must be power of 2.\n");
|
|
77
|
+
if (ndata < 2 || (ndata & (ndata - 1)) != 0){
|
|
78
|
+
printf("Frequency analysis error: ndata must be a power of 2 and at least 2.\n");
|
|
79
79
|
return -3;
|
|
80
80
|
}
|
|
81
81
|
if (!input){
|
|
@@ -90,6 +90,8 @@ int reb_frequency_analysis(double *output, size_t nfreq, double minfreq, double
|
|
|
90
90
|
|
|
91
91
|
/* ALLOCATION OF VARIABLES */
|
|
92
92
|
|
|
93
|
+
int status = 0;
|
|
94
|
+
|
|
93
95
|
double* xdata = malloc(sizeof(double)*ndata);
|
|
94
96
|
double* ydata = malloc(sizeof(double)*ndata);
|
|
95
97
|
double* x = malloc(sizeof(double)*ndata);
|
|
@@ -160,7 +162,8 @@ int reb_frequency_analysis(double *output, size_t nfreq, double minfreq, double
|
|
|
160
162
|
frequencies_removed++;
|
|
161
163
|
if (frequencies_removed>FMFT_MAX_REMOVE){
|
|
162
164
|
printf("Frequency analysis error: cannot find frequencies in range [minfreq, maxfreq].\n");
|
|
163
|
-
|
|
165
|
+
status = -6;
|
|
166
|
+
goto cleanup;
|
|
164
167
|
}
|
|
165
168
|
}
|
|
166
169
|
}else{
|
|
@@ -233,7 +236,8 @@ int reb_frequency_analysis(double *output, size_t nfreq, double minfreq, double
|
|
|
233
236
|
frequencies_removed++;
|
|
234
237
|
if (frequencies_removed>FMFT_MAX_REMOVE){
|
|
235
238
|
printf("Frequency analysis error: cannot find frequencies in range [minfreq, maxfreq].\n");
|
|
236
|
-
|
|
239
|
+
status = -6;
|
|
240
|
+
goto cleanup;
|
|
237
241
|
}
|
|
238
242
|
}
|
|
239
243
|
|
|
@@ -364,6 +368,7 @@ int reb_frequency_analysis(double *output, size_t nfreq, double minfreq, double
|
|
|
364
368
|
// SORT THE FREQUENCIES IN DECREASING ORDER OF AMPLITUDE
|
|
365
369
|
sort3(nfreq, &(output[1*nfreq]), &(output[0*nfreq]), &(output[1*nfreq]), &(output[2*nfreq]));
|
|
366
370
|
|
|
371
|
+
cleanup:
|
|
367
372
|
/* FREE THE ALLOCATED VARIABLES */
|
|
368
373
|
free(xdata);
|
|
369
374
|
free(ydata);
|
|
@@ -382,7 +387,7 @@ int reb_frequency_analysis(double *output, size_t nfreq, double minfreq, double
|
|
|
382
387
|
free(Q);
|
|
383
388
|
free(alpha);
|
|
384
389
|
free(B);
|
|
385
|
-
return
|
|
390
|
+
return status;
|
|
386
391
|
}
|
|
387
392
|
|
|
388
393
|
static void window(double *x, double *y, double *xdata, double *ydata, size_t ndata) {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
const uint32_t reb_string_size_max = REB_STRING_SIZE_MAX; // defined in rebound.h
|
|
41
41
|
const size_t reb_messages_max_N = 10;
|
|
42
42
|
const char* reb_build_str = __DATE__ " " __TIME__; // Date and time build string.
|
|
43
|
-
const char* reb_version_str = "5.2.
|
|
43
|
+
const char* reb_version_str = "5.2.3"; // **VERSIONLINE** This line gets updated automatically. Do not edit manually.
|
|
44
44
|
const char* reb_githash_str = STRINGIFY(GITHASH); // This line gets updated automatically. Do not edit manually.
|
|
45
45
|
|
|
46
46
|
// NULL terminated list of custom registered integrators.
|
|
@@ -377,37 +377,36 @@ void reb_simulationarchive_free(struct reb_simulationarchive* sa){
|
|
|
377
377
|
}
|
|
378
378
|
|
|
379
379
|
void reb_simulationarchive_heartbeat(struct reb_simulation* const r){
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
}
|
|
380
|
+
// This function assumes that r->simulationarchive_filename!=NULL
|
|
381
|
+
int modes = 0;
|
|
382
|
+
if (r->simulationarchive_auto_interval!=0) modes++;
|
|
383
|
+
if (r->simulationarchive_auto_walltime!=0.) modes++;
|
|
384
|
+
if (r->simulationarchive_auto_step!=0) modes++;
|
|
385
|
+
if (modes>1){
|
|
386
|
+
reb_simulation_error(r,"Only use one of simulationarchive_auto_interval, simulationarchive_auto_walltime, or simulationarchive_auto_step");
|
|
387
|
+
}
|
|
388
|
+
if (r->simulationarchive_auto_interval!=0.){
|
|
389
|
+
const double sign = r->dt>0.?1.:-1;
|
|
390
|
+
if (sign*r->simulationarchive_next <= sign*r->t){
|
|
391
|
+
r->simulationarchive_next += sign*r->simulationarchive_auto_interval;
|
|
392
|
+
//Snap
|
|
393
|
+
reb_simulation_save_to_file(r, NULL);
|
|
395
394
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
395
|
+
}
|
|
396
|
+
if (r->simulationarchive_auto_step!=0.){
|
|
397
|
+
if (r->simulationarchive_next_step <= r->steps_done){
|
|
398
|
+
r->simulationarchive_next_step += r->simulationarchive_auto_step;
|
|
399
|
+
//Snap
|
|
400
|
+
reb_simulation_save_to_file(r, NULL);
|
|
402
401
|
}
|
|
403
|
-
if (r->simulationarchive_auto_walltime!=0.){
|
|
404
|
-
if (r->simulationarchive_next <= r->walltime){
|
|
405
|
-
r->simulationarchive_next += r->simulationarchive_auto_walltime;
|
|
406
|
-
//Snap
|
|
407
|
-
reb_simulation_save_to_file(r, NULL);
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
402
|
}
|
|
403
|
+
if (r->simulationarchive_auto_walltime!=0.){
|
|
404
|
+
if (r->simulationarchive_next <= r->walltime){
|
|
405
|
+
r->simulationarchive_next += r->simulationarchive_auto_walltime;
|
|
406
|
+
//Snap
|
|
407
|
+
reb_simulation_save_to_file(r, NULL);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
411
410
|
}
|
|
412
411
|
|
|
413
412
|
void reb_simulation_save_to_file(struct reb_simulation* const r, const char* filename){
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|