"""
        Update the gui such that the widgets match with the fpga. 
        That is useful for the implementation with other GUI that also 
        modifies the fpga. 
        """
        _debug('GUICounts: update_GUI_with_fpga')
        # There is nothing to update with the fpga.
        # The count time interval is note recored in the fpga, because it is
        # hidden in the data array


if __name__ == '__main__':

    import api_fpga as _fc

    _debug_enabled = True
    _fc._debug_enabled = False

    print('Hey on es-tu bin en coton-watte')

    # Create the fpga api
    bitfile_path = (
        "X:\DiamondCloud\Magnetometry\Acquisition\FPGA\Magnetometry Control\FPGA Bitfiles"
        "\Pulsepattern(bet_FPGATarget_FPGAFULLV2_WZPA4vla3fk.lvbitx")
    resource_num = "RIO0"
    fpga = _fc.FPGA_api(bitfile_path, resource_num)  # Create the api
    fpga.open_session()

    self = GUICounts(fpga)
    self.show()
    import api_fpga as _fc

    _debug_enabled = True
    gui_pulser._debug_enabled = True
    gui_confocal_main._debug_enabled = False
    gui_pipulse_optimization._debug_enabled = False
    gui_magnet._debug_enabled = False
    import gui_confocal_optimizer
    gui_confocal_optimizer._debug_enabled = True
    _fc.debug_enabled = False

    print('Hey on es-tu bin en coton-watte')

    # Get the fpga paths and ressource number
    import spinmob as sm
    infos = sm.data.load('cpu_specifics.dat')
    bitfile_path = infos.headers['FPGA_bitfile_path']
    resource_num = infos.headers['FPGA_resource_number']
    # Get the fpga API
    fpga = _fc.FPGA_api(bitfile_path, resource_num)
    fpga.open_session()

    self = GUIMainExperiment(fpga)
    self.show()

#    fpga_fake = _fc.FPGA_fake_api(bitfile_path, resource_num) # Create the api
#    fpga_fake.open_session()
#
#    self = GUIMainExperiment(fpga_fake)
#    self.show()