MatthewGrim / Lunar_SPS

0 stars 0 forks source link

Bug fix: Make overlaps not give 0.0 event durations and implement fasted method #26

Closed MatthewGrim closed 6 years ago

MatthewGrim commented 6 years ago

Currently the method used to combine events is called 3 times per simulation, and is O(N^2). A faster O(N) algorithm has already been implemented but does not interface with the other post-processing functions. The current slow method is also giving zero active time event durations which is clearly wrong.

This seems to be a good time to fix these two issues - it should speed up post processing but data sets considerably by making algorithms O(N)

MatthewGrim commented 6 years ago

I've implemented a fast version of the code, and a slow version which should catch any 0.0 active time simulations. I'm going to meld the results to see how they compare. If they are the same across the board, I will switch to the fast algorithm which is going to cut down a day's post-processing to half an hour or less.

MatthewGrim commented 6 years ago

The fast post processing didn't eliminate zeros, but results are similar. Maybe the zeros are produced by rounding?

MatthewGrim commented 6 years ago

Comparing my fast implementation to older versions, the results seem to be identical ... I need to double check against archived versions, but if this is the case, I will switch to the fast version for future analysis.

MatthewGrim commented 6 years ago

The files seem to match, so I am switching to the fast implementation.

MatthewGrim commented 6 years ago

I have a hunch that this error is coming from the target eclipse inversion function, but I'm not sure. This is the first time I find an event that has 0.0 length... this might be wrong, but let's investigate it first.

MatthewGrim commented 6 years ago

This bug has been fixed, so I am closing this issue.