#NEWLINE# def add_channel( self , viewer , channel ) : #NEWLINE# #INDENT# chname = channel . name #NEWLINE# info = Bunch . Bunch ( chinfo = channel ) #NEWLINE# self . channel [ chname ] = info #NEWLINE# fitsimage = channel . fitsimage #NEWLINE# fitssettings = fitsimage . get_settings ( ) #NEWLINE# fitsimage . add_callback ( 'image-set' , self . new_image_cb , info ) #NEWLINE# fitssettings . getSetting ( 'scale' ) . add_callback ( 'set' , self . zoomset_cb , fitsimage , info ) #NEWLINE# fitssettings . getSetting ( 'rot_deg' ) . add_callback ( 'set' , fitssettings . rotset_cb , fitsimage , info ) #NEWLINE# for name in ( 'flip_x' , 'flip_y' , 'swap_xy' ) : #NEWLINE# #INDENT# fitssettings . getSetting ( name ) . add_callback ( 'set' , self . xfmset_cb , fitsimage , info ) #NEWLINE# #UNINDENT# fitssettings . getSetting ( 'pan' ) . add_callback ( 'set' , self . panset_cb , fitsimage , info ) #NEWLINE# self . fv . gui_do ( self . _reset_channels_gui )