ratt-ru / QuartiCal

CubiCal, but with greater power.
MIT License
7 stars 4 forks source link

[Feature Request] Log the number of iterations taken for each solution interval solve. #303

Open Joshuaalbert opened 8 months ago

Joshuaalbert commented 8 months ago

Describe the problem that the feature should address At DSA2000 we're using Quartical to understand how to reach real-time, and we need to know the number of iterations a solve takes. Would it be possible to add to the logs:

Maybe add another summary stat for number of iterations during log_summary_stats?

| INFO | logging:log_summary_stats | 
quartical            | Final post-solve chi-squared summary, colourised by deviation from the mean:
quartical            |  <= 3*sigma   <= 5*sigma   <= 10*sigma   > 10*sigma       
quartical            |   CHUNK  FLD0    
quartical            |          SPW0    
quartical            |          SCN1    
quartical            |     
quartical            |   T0F0   chisq=195.32  num_iters=...
JSKenyon commented 8 months ago

Hi @Joshuaalbert! I can think about adding it when I have a moment. As a temporary workaround, that information is stored in the gains which get written to disk in the conv_iter field. The docs give some very basic information on accessing the gains: https://quartical.readthedocs.io/en/latest/gain_files.html#reading-gains.

Joshuaalbert commented 8 months ago

Thanks @JSKenyon, also I have noticed something that I'd like your comment on. The time to solve with time_interval=2, freq_interval=32 is the same time as time_interval=1, freq_interval=1 after first averaging down to 1chan and 1 time int. Is this something you'd expect?

JSKenyon commented 8 months ago

Thanks @JSKenyon, also I have noticed something that I'd like your comment on. The time to solve with time_interval=2, freq_interval=32 is the same time as time_interval=1, freq_interval=1 after first averaging down to 1chan and 1 time int. Is this something you'd expect?

I would probably need to know a little more about the setup in order to comment. Is the above true if you set dask.scheduler="single-theaded" and set solver.threads=1? That will give you the serial processing times.