Quick silly question…once uploading new calibrations on the eVOLVER, we can then select the calibration we want to use directly from the touch screen interface or the eVOLVER software. But I was wondering how to remove old calibrations that are not useful anymore, to prevent somebody from using the wrong calibration by error…
I hope this has not already been covered on the forum…looked for it but did not find.
It’s definitely possible, but we haven’t implemented a nice tool to do it yet. All of the calibrations are in the calibrations.json file on the raspberry pi. I wouldn’t recommend removing a calibration manually via a text editor unless you backed up the file first. The structure of that file is fairly straightforward, it should look more or less like this:
So if you were to write a small script to remove a cal, you would just iterate through the objects in the list of calibrations until you found the one you wanted to remove, then take it out. You could also only remove a fit if that was desired, keeping the raw data, by also iterating through the fits list within a calibration object.
I will suggest to my student to work on a script. As right now we are still in the testing / calibration / validation of our machines, it’s the good time to do this ! He also designed a very nice cover to protect the system in case of an overflow. As soon as it’s finished we will post pictures and the files for laser cutting the parts.
I found the script and cleaned it a bit to be easy to use. I uploaded it here:
To delete a calibration, we just have to download the calibrations file, run the script and upload the file again.
As we discussed, we can integrate this in the calibrate.py script, but we would need to change some of the logic and data structure (also linked to this issue). I’m happy to discuss the optimal way to do it and adapt it
Thanks so much! Yes, the optimal solution would be to use calibrate.py as you said. The logic you wrote here would just need to move into evolver_server.py instead of being in a standalone script, and execute upon the proper server event.
How does the linked issue relate to deleting calibrations?
Right now, calibrate.py only gets the available calibration names when the option -g is given, and it only prints them.
To delete calibrations, it should check if the calibration name given by the user exists. Depending on the way we implement this, we could also solve the issue that I linked. That’s what I meant, I was not super clear.
I see. The server should just do that check if a deletion event is triggered by calibrate.py. It could return a message with details if the deletion was successful or not, plus any additional details like the calibration not existing or if an error occurs, etc. I think at the end of the day the server should be the entity managing this, calibrate.py shouldn’t be doing any logic about the calibration file structure or contents beyond generating fits and sending them back to the server.