1. 24 Jan, 2022 4 commits
  2. 17 Jan, 2022 1 commit
  3. 16 Jan, 2022 1 commit
    • Paco Lopez Dekker's avatar
      Added azimuth phase spoiling · 5199ee07
      Paco Lopez Dekker authored
      Added azimuth phase spoiling code to NESZ and AASR calculation (not yet to RASR), and fixed pointing error in aasr code (did not affect results) for phase-spoiled elevation patterns.
      5199ee07
  4. 11 Jan, 2022 1 commit
  5. 07 Dec, 2021 4 commits
  6. 19 Nov, 2021 2 commits
  7. 13 Nov, 2021 1 commit
  8. 05 Nov, 2021 7 commits
  9. 25 Oct, 2021 1 commit
  10. 21 Oct, 2021 2 commits
  11. 20 Apr, 2021 5 commits
  12. 08 Apr, 2021 4 commits
    • Andreas Theodosiou's avatar
      1999929c
    • Andreas Theodosiou's avatar
      Fix typo in TestKepler · 8f127cd1
      Andreas Theodosiou authored
      8f127cd1
    • Andreas Theodosiou's avatar
      Replace 1 loop with numpy, get a x67 speedup in j2_kepler · 98372850
      Andreas Theodosiou authored
      * Replace the for loop in KeplerianOrbit.__calc_orb with a vectorised
      function. Instead of looping through each time instant of timevec and
      calling j2_kepler with a scalar delta_t at each iteration, j2_kepler
      was changed to handle its arguments being ndarrays. Thus we directly
      call the j2_keppler with timevec.
      * The reason this was avoided when j2_kepler was first written was
      because I couldn't figure out a nice way to write the check for the
      initial value of the eccentric anomaly in the
      mean_anomaly_to_eccentric for both a scalar and an array. Logical
      indexing was all that was needed, after all.
      * New tests that pass arrays to j2_kepler and orbital_elements_to_rv.
      * With this change, initialising a KeplerianOrbit or a SingleOrbit,
      therefore a FormationTimeline is much faster. Profiling before this commit:
      cProfile.run('FormationTimeline(parfile, secondary=True)',
      'ftl_stats')
      
      p = pstats.Stats('ftl_stats')
      p.strip_dirs().sort_stats(SortKey.TIME).print_stats(10)
      Wed Apr  7 13:45:15 2021    ftl_stats
      
               5803551 function calls (5801158 primitive calls) in 41.083 seconds
      
         Ordered by: internal time
         List reduced from 602 to 10 due to restriction <10>
      
         ncalls  tottime  percall  cumtime  percall filename:lineno(function)
            372   10.392    0.028   10.427    0.028 formation.py:15(ClohessyWiltshire)
              6    7.906    1.318    7.906    1.318 core.py:13226(gst06a)
           1314    5.010    0.004    5.010    0.004 {method 'take' of 'numpy.ndarray' objects}
              3    2.685    0.895    7.263    2.421 swath_geo.py:53(line_of_sight)
            841    1.770    0.002    1.770    0.002 {method 'reduce' of 'numpy.ufunc' objects}
         465367    1.474    0.000    1.474    0.000 {built-in method numpy.array}
          74559    1.069    0.000    6.174    0.000 two_body.py:243(j2_kepler)
              3    1.038    0.346    1.149    0.383 geometry.py:736(pt_get_intersection_ellipsoid)
          74565    1.019    0.000    1.522    0.000 {built-in method from_euler}
          74559    0.907    0.000    3.064    0.000 two_body.py:183(orbital_elements_to_rv)
      
      * With the changes included in this commit:
      p_v = pstats.Stats('ftl_stats_vectorise_2')
      p_v.strip_dirs().sort_stats(SortKey.CUMULATIVE).print_stats(120)
      Thu Apr  8 12:59:02 2021    ftl_stats_vectorise_2
      
               6250639 function calls (6228272 primitive calls) in 32.723 seconds
      
         Ordered by: cumulative time
         List reduced from 2382 to 120 due to restriction <120>
      
         ncalls  tottime  percall  cumtime  percall filename:lineno(function)
          183/1    0.000    0.000   32.724   32.724 {built-in method builtins.exec}
              1    0.035    0.035   32.724   32.724 <string>:1(<module>)
            2/1    0.000    0.000   32.689   32.689 formation.py:158(__init__)
              3    0.006    0.002   17.351    5.784 swath_geo.py:184(__init__)
              2    0.000    0.000   15.326    7.663 formation.py:228(reload)
              .
              .
              .
              3    0.002    0.001    0.091    0.030 two_body.py:271(j2_kepler)
              ...
              3    0.008    0.003    0.080    0.027 two_body.py:200(orbital_elements_to_rv)
      
      As can be seen in the results the cumulative time spent in j2_kepler
      drops from 6.174s to 0.091s.
      
      The parfile was kept the same and included a monostatic formation with
      a timestep of 0.5s.
      
      * Timing the two calls before and after this commit using timeit:
      Before vectorisation: 39.1 s ± 565 ms per loop (mean ± std. dev. of 7
      runs, 1 loop each)
      After vectorisation: 30.8 s ± 119 ms per loop (mean ± std. dev. of 7
      runs, 1 loop each)
      98372850
    • Andreas Theodosiou's avatar
      Refactor test_kepler to have commonly used parameters as fixtures · 9b384951
      Andreas Theodosiou authored
      * Avoid setting up the same parameters more than once. This will come
      handy when we want to reuse the parameters as an array input.
      9b384951
  13. 30 Mar, 2021 3 commits
  14. 26 Mar, 2021 1 commit
  15. 17 Mar, 2021 3 commits