SNEWS2 / snewpdag

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

Shape time diff #7

Closed josh83930 closed 3 years ago

josh83930 commented 3 years ago

Plugin method for the uniform binning method and Bayesian blocks method.

tsengj10 commented 3 years ago

Can you add some unit tests? One can use some of the input files in the data subdirectory, or make new ones with (for instance) a black hole model.

tsengj10 commented 3 years ago

I've had a little go with your new code. It doesn't seem to affect the other tests, so the problem you were having earlier might well be the python version.

For test_shape.py, you'll need to specify name='Node1' or something like that when you instantiate Shape.

josh83930 commented 3 years ago

Ok, specified name = 'Node1' in the test.

For the python version, how should I invoke them in pplxint11? They don't seem to be in the module lists.

josh83930 commented 3 years ago

Fixed the bugs in the code and checked that the unit test runs properly.

Though I'm still a bit confused about how the 'history' tag works. You might want to take a look at what I'm doing in 'Shape.update' regarding the 'history' tag. Just to make sure I'm not breaking anything. Otherwise the rest of the code should be fine.

tsengj10 commented 3 years ago

Usage of the history tag looks okay.

No tests in the unit tests - one can start with placeholders, but it would be good to check at least one thing in the output json.

And...I guess I hadn't paid close enough attention. Two separate methods should really go into two different plugins!