SNEWS2 / snewpdag

SNEWS2 alert calculations
BSD 3-Clause "New" or "Revised" License
1 stars 13 forks source link

MC trial utilities #63

Closed tsengj10 closed 2 years ago

tsengj10 commented 2 years ago

Several additions to facilitate MC trials and move in direction of making MC look like alert data:

  1. plugin utilities Copy and Write, for directly manipulating payload without having to write specific new plugins.
  2. take apart GenPoint to generate true arrival times (TrueTimes) and resolution/bias smearing (SmearTimes).
  3. HistogramSkymap to count most likely directions given a chi2 map from DiffPointing.
  4. test-gen-smear.csv uses TrueTimes/SmearTimes to generate arrival times for 4 detectors, adding information we expect if the alerts are transmitted together as a coincidence.
  5. test-diff-smear.csv generates 10k trials and counts most likely directions in HistogramSkymap.
  6. test-diff-low-res.csv is similar to older test-diff.csv, but with nside=8 so it can be compared with test-diff-smear.csv output.

Change (4) should be able to feed a delta-time calculator; this would then deprecate gen.GenPoint.

tsengj10 commented 2 years ago

A few more adjustments so we can run MC trials and compare the results in one DAG. See test-pointing.csv: the (low-resolution) probability map is computed only from the first trial with the MC truth SN position. The rest of the DAG then runs smeared MC trials and accumulates them with HistogramSkymap. Finally, at the report stage, CompareHistogram takes the probability map and compares it with the HistogramSkymap output. All of these are displayed as mollview skymaps.

A few more adjustments were also made, like adding comments and changing min/max in Mollview to a simpler range tuple.

tsengj10 commented 2 years ago

And one more: test-pointing-weighted.csv, comparing probability map with weighted MC trials map. The weighted MC trials map comes from adding probability maps (normalized to unit area) from each pointing trial, rather than using only the most likely direction as in test-pointing.csv.