1. 22 Sep, 2020 1 commit
  2. 28 Aug, 2020 2 commits
  3. 27 Aug, 2020 6 commits
  4. 26 Aug, 2020 2 commits
    • Leo Pound Singer's avatar
      Repack fields to fix undefined behavior in rasterize · c31a8904
      Leo Pound Singer authored
      Fixes these UBSan errors from the unit test suite when
      rasterizing a Boolean HEALPix mask image:
      
          ligo/skymap/tool/tests/test_bayestar.py src/bayestar_moc.c:109:27: runtime error: load of misaligned address 0x7febfedc6009 for type 'const int64_t', which requires 8 byte alignment
          0x7febfedc6009: note: pointer points here
           00 00 00  01 61 61 2d 00 00 00 00  00 01 66 61 2d 00 00 00  00 00 01 73 61 2d 00 00  00 00 00 01 38
      c31a8904
    • Leo Pound Singer's avatar
      Fix changelog · 8842299e
      Leo Pound Singer authored
      8842299e
  5. 21 Aug, 2020 2 commits
    • Leo Pound Singer's avatar
      Increase range of validity of moments_to_parameters · e1d423c7
      Leo Pound Singer authored
      Increase the range of validity of the solver used in
      `ligo.skymap.distance.moments_to_parameters` for low-probability
      pixels that are very prior dominated. Sky maps that have many such
      pixels could have credible volumes repoted as infinity. The
      incidence of such cases should now be decreased.
      e1d423c7
    • Leo Pound Singer's avatar
      Fix typo · 0abd15b7
      Leo Pound Singer authored
      0abd15b7
  6. 19 Aug, 2020 2 commits
  7. 18 Aug, 2020 5 commits
    • Leo Pound Singer's avatar
      Add changelog entry [ci skip] · 56ccfbf1
      Leo Pound Singer authored
      56ccfbf1
    • Leo Pound Singer's avatar
      Bump upcoming version to 0.5.0 · f1416318
      Leo Pound Singer authored
      f1416318
    • Leo Pound Singer's avatar
      b0476ebb
    • Leo Pound Singer's avatar
      Improve numerical stability of conditional_ppf · d64bc06c
      Leo Pound Singer authored
      Improve the numerical stability of the method
      `ligo.skymap.distance.conditional_ppf` by reparametrizing the equation
      that is being solved. This method, which calculates the inverse of the
      distance CDF, works by solving the equation `f(x) - p = 0` for `x`,
      where `f(x)` is the distance CDF, and `p` is the desired probability.
      
      The reparametrized equation is `log(1 - f(x)) - log(1 - p) = 0` if `p >
      1/2` and `log(f(x)) - log(p) = 0` otherwise. This reparametrization is
      effective because it improves the dynamic range in the tails of the
      distribution. This same reparametrization had already proven effective
      in the related method `ligo.skymap.distance.marginal_ppf`.
      
      This change also fixes some rare corner cases where `marginal_ppf`
      returned silly values becauses it uses `conditional_ppf` internally to
      create its own initial guess. One example was the median distance for
      the binary neutron star candidate S191205ah. Before this patch, the
      result was negative and invalid:
      
          >>> from ligo.skymap.distance import marginal_ppf
          >>> from ligo.skymap.moc import uniq2pixarea
          >>> from ligo.skymap.io import read_sky_map
          >>> url = 'https://gracedb.ligo.org/apiweb/superevents/S191205ah/files/bayestar.multiorder.fits'
          >>> s = read_sky_map(url, moc=True)
          >>> marginal_ppf(0.5, s['PROBDENSITY'] * uniq2pixarea(s['UNIQ']),
          ...              s['DISTMU'], s['DISTSIGMA'], s['DISTNORM'])
          /Users/lpsinger/src/ligo.skymap/ligo/skymap/util/numpy.py:46:
          RuntimeWarning: invalid value encountered in marginal_ppf
            return func(*args, **kwargs)
          -223357.8508233767
      
      After this patch, the result is positive and sensible:
      
          >>> marginal_ppf(0.5, s['PROBDENSITY'] * uniq2pixarea(s['UNIQ']),
          ...              s['DISTMU'], s['DISTSIGMA'], s['DISTNORM'])
          362.7485740018039
      d64bc06c
    • Leo Pound Singer's avatar
      Add per-branch acceptance tests · 7ec54ad0
      Leo Pound Singer authored
      7ec54ad0
  8. 17 Aug, 2020 5 commits
  9. 15 Aug, 2020 4 commits
  10. 14 Aug, 2020 1 commit
  11. 13 Aug, 2020 3 commits
  12. 07 Aug, 2020 1 commit
  13. 04 Aug, 2020 6 commits