The tool saves an image every 10 minutes in a folder that must be specified in line 223.
For now it is not yet generalized for any number of strings. It works for 5 strings. In the future I will make sure that it does not have to be changed every time new DUs are added.
The script is not adequately commented. In the coming days I will comment on it in detail.
If you have any questions do not hesitate to contact me.
Thanks,
Carlo
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
You see that the script has a module doc string which defines the usage including all the options:
"""Runs the AHRS calibration online.Usage: ahrs_calibration.py [options] ahrs_calibration.py (-h | --help)Options: -l LIGIER_IP The IP of the ligier [default: 127.0.0.1]. -p LIGIER_PORT The port of the ligier [default: 5553]. -d DET_ID Detector ID [default: 29]. -o PLOT_DIR The directory to save the plot [default: plots]. -h --help Show this screen."""
It should at least accept an option for the plot directory -o PLOT_DIR and a detector ID -d DET_ID as this is provided by the monitoring system.
Can you please push the script to the branch I just created instead of attaching it, so we can continue with the code review?
I ran the command git clone git@git.km3net.de: km3py / km3mon without problems.
Then I guess you wanted to write cd km3mon.
The next two commands (git checkout 36-integrated-online-acoustic-monitoring-script-for-orca-site and cp /home/carlo/Online_Acoustic_Monitoring.py scripts / acoustics.py) did not give problems.
Instead, I get an error when I run:
git add scripts.acoustics.py -> fatal: pathspec 'scripts.acoustics.py' did not match any files
git commit" Add acoustics monitoring " -> error: pathspec 'Add acoustic monitoring' did not match any file (s) known to git.
I checked and the file acoustics.py appears correctly pasted on my computer's local folder
OK well done! You have done the git add ... and git commit -m ..., but you still need to synchronise your repository to this server (I don't see any new commits on the server yet). Currently everything is still present on your local machine
I fixed all errors but now it complains that no data is available:
2020-01-16 12:27:37 ERROR ++ km3pipe.db: No data found at URL 'streamds/toashort.txt?detid=44&minrun=7171&maxrun=7171&domid=808432849&emitterid=14'.2020-01-16 12:27:37 ERROR ++ km3pipe.db: No data found at URL 'streamds/toashort.txt?detid=44&minrun=7171&maxrun=7171&domid=808476701&emitterid=16'.2020-01-16 12:27:37 ERROR ++ km3pipe.db: No data found at URL 'streamds/toashort.txt?detid=44&minrun=7171&maxrun=7171&domid=808432836&emitterid=16'.2020-01-16 12:27:37 ERROR ++ km3pipe.db: No data found at URL 'streamds/toashort.txt?detid=44&minrun=7171&maxrun=7171&domid=808949646&emitterid=16'.2020-01-16 12:27:38 ERROR ++ km3pipe.db: No data found at URL 'streamds/toashort.txt?detid=44&minrun=7171&maxrun=7171&domid=808483678&emitterid=16'.2020-01-16 12:27:38 ERROR ++ km3pipe.db: No data found at URL 'streamds/toashort.txt?detid=44&minrun=7171&maxrun=7171&domid=808476737&emitterid=16'.
Is this what you meant lately, or is something else not working correctly?
In this case it does not find data because it is looking for data relating to DU 1.
Currently it is possible that it gives similar errors also for the other DUs and it has due to what I was telling you about. Simply the little square corresponding to the piezo in question will be black in the plot.
44 is safe because I changed your code to accept both From the monitoring system you'll get the det_id passed, which is the number (the det_oid is the string representation of the detector, D_ORCA005)
OK, I'll try it later, I have to drive home now... Thanks for checking.
It is not actually blocked. It is waiting for 10 minutes with respect to when it begun to run the first time. After 10 minutes it does again the whole calculation and generates a new plot.
Yes, the plot is how it should be. In fact, all the piezos of DU1 did not receive any impulse. This is the reason why they are black. Probably, if you run the program with 5 DUs you will have the same result for all the lines, or at most very few red / yellow / green squares. Unfortunately, the current situation is really this. For some reason not all data is saved in the database. These days I check in the raw acoustic data whether the pulses are actually emitted by the beacons or not.
In any case, the program gives the correct output.
@tgal I have seen in the elog https://elog.km3net.de/Operations+FR/3821 that the convention for the numbering of the DUs has been changed. So I should make some changes to the program. I thought I would no longer ask the user for the number of DUs but directly show a plot with all the DUs that are at sea at that time. I have already made changes to the version I have of the program on my PC and it works.
Where can I modify the latest version you edited?
If I try to launch the latest version of the program (taken from "WIP: Resolve "Integrate Online Acoustic Monitoring script for ORCA site") I get this error:
AttributeError: 'CLBMap' object has no attribute 'omkeys'
Btw. the latest version of you script is in master. However I am now thinking about removing it and merge it when it's working until it meets the requirements.
Yes, the program should now work properly for any number of strings.
Has the problem with data that was saved late in the database been resolved?
I'm still doing some tests and then I'll send you the most updated version of the program. Where should I upload it?
the program is ready. It works with any number of lines. At this moment it provides an image of the situation every 20 minutes. This is because it takes a little less than 20 minutes on my computer to complete the analysis. I don't know how long it will take when it runs on the server. In any case we can leave this value in my opinion. Or we can make sure that this value is settable by the user.
Where should I upload the program?
Here? !5 (closed)