Skip to content

Commit

Permalink
stokes changes should update statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
schiebel committed Feb 1, 2024
1 parent 2a8e583 commit 391da57
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion casagui/toolbox/_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -1967,7 +1967,10 @@ def connect( self ):
### updates (e.g. convergence plot) to update based upon 'label' after fresh
### convergence data is available...
code='''if ( cb_obj.item != cb_obj.origin.label ) {
source.channel( source.cur_chan[1], %s, msg => { cb_obj.origin.label = cb_obj.item } )
source.channel( source.cur_chan[1], %s,
msg => { cb_obj.origin.label = cb_obj.item
if ( 'stats' in msg ) { source.update_statistics( msg.stats ) }
} )
}''' % ( ' : '.join( map( lambda x: f'''cb_obj.item == '{x[1]}' ? {x[0]}''',
zip(range(len(stokes_labels)),stokes_labels) ) ) + ' : 0' ) ) )

Expand Down

0 comments on commit 391da57

Please sign in to comment.