BHTOM-Team / bhtom2

7 stars 2 forks source link

CPCS plots have to be generated with a delay #208

Open wyrzykow opened 1 month ago

wyrzykow commented 1 month ago

Currently, every new fits processed by CCDPHOT goes to CPCS, gets standardised and this triggers a re-generation of JSON version of the three plots. This causes the entire system to block because ccdphot is much faster than cpcs plot generation.

We suggest to generate the cpcs plots only every 10 minutes. This will be enough to catch-up with the incoming data. The down side is that the new datapoints will not be visible on the plot before 10 minutes.

This concept of generating JSON plots in cpcs will have to go away in BHTOM3 and we should get back to dynamic generation of figures.

majkelx commented 1 month ago

Recently, we investigated the issue with @YuriiPurdenko. The goal was to change the workflow a bit to not block UI while the diagram JSON is being generated. (In principle this is not rocket science to have them being generated in background in own peace and to display what is ready with some visual tag indicating that the newer version is coming).

But

It turned out that it wasn't true that the diagram generation is the blocker here. In the examples when it took much time to generate plots the majority of the time had been spent in CPSC and the example data was from very dense field with exceptionally high number of stars. It looked like an effect of non-linear computational complexity of CPCS with respect to the number of objects.

To be sure, please provide example FITS file, where the blocking was observed, and we will try to reanalyze the case.

@YuriiPurdenko please confirm if I'm correct.

YuriiPurdenko commented 1 month ago

Yes, that’s correct. The main issue isn’t with the plot JSON generation but rather with the CPSC computation

astromiki commented 4 weeks ago

This is adjacent issue: https://github.com/BHTOM-Team/bhtom2/issues/218