Open Matyasz opened 3 years ago
This does not need to run on videos that are not 512 pixels. we can assume that the input videos from Institute Scientifica scanners. It would be good to return a sensible error message if the video is not 512 so that we can quickly feedback that information to the experiment operators.
this is improved enough with a schema and more tests now. it could be refactored even more, but, this is good enough to deploy to production.
Moving to backlog to do the remaining tasks
To bring the dewarping code up to our current standards before putting it into production, at a minimum the following must occur:
[ ] Xdewarp could be separated into smaller methods. Left and right side dewarping are nearly identical, split these out into a single function that will take a parameter for starting column and direction or something similar. This would also be a good time to vectorize this method.
[ ] Generalize the various methods used so that instead of having multiple if/else statements about FOVwidth being 512, we have one statement that will work no matter the value of FOVwidth.
[x] Replace the parse_input function with an argschema.
[ ] Maybe make the high/low masking its own function.
[ ] Shorten the create_xtable function, some of this could be other, more testable functions that get called here.
[x] Add tests for any new functions created, and any old functions that have become more testable.
[ ] Replace the while/else loops. Could easily be a for loop with an if statement.