Call FRbinViewer from generate mp4s#289
Call FRbinViewer from generate mp4s#289timbot18 wants to merge 6 commits intoCroatianMeteorNetwork:masterfrom
Conversation
added code to pass a config file location to FRbinViewer as it was failing with a 'not configured' error without it when run from a directory other than the file locations.
hard coded the python path for frbinviewer to allow it to run successfully in cron jobs.
|
@dvida I'm keen to see this working but as written it will fail on most systems as it contains a hardcoded path to the FRbinViewer.py which is only correct on a Bookworm build Pi4/5. Additionally frbinviewer is invoked using a system call to launch a child shell, which could consume additional memory and might cause issues on low-memory systems. Another issue - not due to this PR - is that FRbinViewer calls exit() if there are no FR files. This is a problem because GenerateMP4s is designed to be called from other Python code which might then be aborted if FRbinviewer exit()ed . The UKMON toolset uses GenerateMP4s from python and so i am concerned that it could cause our tools to fail. I suggest that I take a look at FRbinViewer to make it safe to call, and restructure it so it can be easily called by GenerateMP4s. This would allow @timbot18 to import it rather than using a system() call. Then this PR can be updated. I will take a look at FRbinViewer today and report back asap |
|
taking another look, i think you might just be able to call the view() function in FRbinViewer. |
markmac99
left a comment
There was a problem hiding this comment.
Line 225 will fail on Pi3 and older Pi4 systems, and on linux systems as it assumes a hardcoded path to the python codebase. However, i think a better approach would be to import the view() function from FRbinViewer and call it directly, passing the necessary arguments. See my comments on the PR. This will also avoid a bug in FRbinViewer which can cause it to exit improperly.
|
Line 1751 in 10b7033 The code linked above may be helpful as an ex ample. |
6a56add to
8ec0c1e
Compare
Added code to call the FRbinViewer utility from the Generate MP4 utility so both can be run based off of the magnitude and shower filters from GenerateMP4s