oirlab / liger_iris_pipeline

Data Reduction System (DRS) for the Thirty Meter Telescope IRIS imager/spectrograph
https://oirlab.github.io/iris-pipeline
0 stars 3 forks source link

Improve testing of ROP #28

Closed zonca closed 3 years ago

zonca commented 3 years ago

Currently ROP is just executed with a uniform input ramp without checking its outputs.

It would be nice instead to first generate on the fly a more complicated input ramp, and then check that the different sampling algorithms work as expected (we can use small 10x10 arrays and save the outputs).

arunsurya77 commented 3 years ago

Yes , I have written aa generate ramp and testing on the fly with better tests. Since now the Travis integration works I can push some of these new tests.

On Tue, 14 Jul 2020 at 13:38, Andrea Zonca notifications@github.com wrote:

Currently ROP is just executed with a uniform input ramp without checking its outputs.

It would be nice instead to first generate on the fly a more complicated input ramp, and then check that the different sampling algorithms work as expected (we can use small 10x10 arrays and save the outputs).

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/oirlab/iris_pipeline/issues/28, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKB37LTDGTIY5BV27X5X5X3R3S63FANCNFSM4OZ4CBWA .

zonca commented 3 years ago

@arunsurya77 can you make a pull request with what tests have now? even if incomplete or not working, I can at least use it as a starting point.

arunsurya77 commented 3 years ago

Hi , I have added the on the fly test function in the test_rop.py file in the tests. I added it as a new test and added an assert check on the mean value of the frame. https://github.com/arunsurya77/iris_pipeline/blob/master/iris_pipeline/tests/test_rop.py

I think maybe we should just use this test for now without the file dependent test. I haven't removed the old test.

Cheers Arun

On Tue, 25 Aug 2020 at 19:57, Andrea Zonca notifications@github.com wrote:

@arunsurya77 https://github.com/arunsurya77 can you make a pull request with what tests have now? even if incomplete or not working, I can at least use it as a starting point.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/oirlab/iris_pipeline/issues/28#issuecomment-680455210, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKB37LQWIEAXX3TI54FDKSDSCR2YFANCNFSM4OZ4CBWA .

zonca commented 3 years ago

thanks @arunsurya77, is there a way to compute analytically the mean of the frame? if so, it would be nice if you can explain here so I can copy into test

arunsurya77 commented 3 years ago

Sorry @zonca . just saw this now. Somehow didn't see in the mail. I'm thinking how this test could be like analytic since the analytic formulae are what is used in the code. So checking with the same will not make sense. let me check in other sampling implementations how they setup their tests.

zonca commented 3 years ago

ok nevermind, I think it is fine