HOME Prise de donnees MML Controle commande Simulations Notes Hardware Ligne X Laser Interaction Diagnostiques Synchronisation
Hardware
  Notes sur les differents appareils (Klystron, Etuves, Sondes Etuve, Temperature, Modulateur,...), Page 2 of 2  Not logged in ThomX    logo
ID Date Author Status Type Category Important Subjectdown Icon
  23   Tue Nov 16 14:39:32 2021 Entered by Hayg Guler from 134.158.195.141 on Tue Nov 16 14:39:17 2021 LinacRF D1 Calibrations et réglages Canon (Pierre, Nourredine) 
klystron à 1090        
att (dB) Pic (MW) au wattmètre Pic cristal (MW) % erreur Gradient (MV/m)
2 3.9 4.12 6 69
1.75 4.1 4.39 7 71
1.5 4.35 4.66 7 73
1.25 4.6 4.92 7 75
1 5 5.2 4 79
0.75 5.3 5.58 5 81
0.5 5.6 5.92 6 83
0.25 6.1 6.27 3 87
0 6.6 6.64 1 91
  19   Tue Oct 12 12:07:22 2021 Entered by Viktor Soskov from 134.158.195.153 on Tue Oct 12 12:06:17 2021FixedInfo | LinacLaser Attenuator_11_10_201 

mesures faites avec 180 uJ et Iris entièrement ouverte. Puissance mesurée au niveau du shutter (après atténuateur)

Attachment 1: Attenuator_11_10_21.pdf
  32   Mon May 12 16:27:53 2025 Entered by Viktor Soskov from 134.158.195.153 on Mon May 12 16:27:34 2025FixedLinacLaser Attenuator-Energy 

Bonjour, voici la courbe l'energie UV sur la cathode vs la position d'attenuateur pour l'iris=1.3mm (l'energie MAX=25mkJ). Les courbes sont identiques pour tous les diametres d'iris sauf les energies MAX sont differents:

d=1.3mm  Emax=25mkJ  ; d=2mm Emax=50mkJ  ;  d=3mm Emax=73mkJ ;   d=4mm Emax=88mkJ ; d=5mm Emax=97mkJ  (les energies MAX actuelles)

Viktor

Attachment 1: Att_Energy.png
Att_Energy.png
  33   Tue Jun 3 17:00:58 2025 Entered by Viktor Soskov from 134.158.195.153 on Tue Jun 3 17:00:35 2025FixedInfoLaser Attenuator Energy 
Attachment 1: UV_energy_vs_Attenuator.pdf
  1   Thu Jun 6 10:58:43 2019 Miwiwi QuestionDocs , entered from 134.158.195.143 
coucou loulou
Attachment 1: index.jpeg
index.jpeg
  2   Thu Jun 6 11:53:24 2019 nfalcoz QuestionDocs , entered from 134.158.195.143 
Coucou Test
Attachment 1: index.jpeg
index.jpeg
  3   Thu Jun 6 11:54:08 2019 nfalcoz QuestionDocs , entered from 134.158.195.143 
Coucou Test
Attachment 1: index.jpeg
index.jpeg
  4   Thu Jun 6 12:00:33 2019 nfalcoz QuestionDocs , entered from 134.158.195.143 
Coucou Test2
Attachment 1: index.jpeg
index.jpeg
  6   Wed Jun 12 11:04:46 2019 nfalcoz InfoDocs , entered from 134.158.195.143 
Essai 1 sans piece jointe
Attachment 1: index.jpeg
index.jpeg
  7   Wed Jun 12 11:09:26 2019 nfalcoz ProblemSondes Etuve , entered from 134.158.195.143 
Essai 2 sans pièe jointe
  8   Wed Jun 12 11:24:05 2019 nfalcoz ProblemSondes Etuve , entered from 134.158.195.143 
/self.saisieTexte.toPlainText()
  9   Wed Jun 12 11:45:26 2019 nfalcoz UrgentTemperature , entered from 134.158.195.143 
Essai 3 sans pièce jointe (-_/!?éèêü)
  11   Wed Jun 12 14:23:38 2019 nfalcoz ProblemTemperature , entered from 134.158.195.143 
éééééèèè
  12   Fri Jun 14 13:55:33 2019 nfalcoz FixSondes Etuve , entered from 134.158.195.143 
Test 3 screens
Attachment 1: screen.png
screen.png
Attachment 2: Laser.png
Laser.png
Attachment 3: LaserAvance.png
LaserAvance.png
  13   Thu Jun 27 14:26:55 2019 nfalcoz FixKlystron , entered from 134.158.195.143 
Test IHMLogBook
Attachment 1: screen.png
screen.png
Attachment 2: Laser.png
Laser.png
  14   Thu Jul 11 11:14:46 2019 nfalcoz OtherDocs , entered from 134.158.195.143 
Test
Attachment 1: screenshot.py
#!/usr/bin/env python
# Python screenshot tool (fullscreen/area selection)
# Tested on:
# Lubuntu 13.04 x86_64
# Gentoo 4.1.7-hardened-r1 x86_64

import sys
from PyQt4 import QtCore, QtGui
from commands import getoutput
from StringIO import StringIO
from Xlib import X, display, Xutil


# Documentation for python-xlib here:
# http://python-xlib.sourceforge.net/doc/html/index.html

class XSelect:
    def __init__(self, display):
        # X display
        self.d = display

        # Screen
        self.screen = self.d.screen()

        # Draw on the root window (desktop surface)
        self.window = self.screen.root

        # If only I could get this working...
        #cursor = xobject.cursor.Cursor(self.d, Xcursorfont.crosshair)
        #cursor = self.d.create_resource_object('cursor', Xcursorfont.X_cursor)
        cursor = X.NONE

        self.window.grab_pointer(1, X.PointerMotionMask|X.ButtonReleaseMask|X.ButtonPressMask,
                X.GrabModeAsync, X.GrabModeAsync, X.NONE, cursor, X.CurrentTime)

        self.window.grab_keyboard(1, X.GrabModeAsync, X.GrabModeAsync, X.CurrentTime)

        colormap = self.screen.default_colormap
        color = colormap.alloc_color(0, 0, 0)
        # Xor it because we'll draw with X.GXxor function
        xor_color = color.pixel ^ 0xffffff

        self.gc = self.window.create_gc(
            line_width = 1,
            line_style = X.LineSolid,
            fill_style = X.FillOpaqueStippled,
            fill_rule  = X.WindingRule,
            cap_style  = X.CapButt,
            join_style = X.JoinMiter,
            foreground = xor_color,
            background = self.screen.black_pixel,
            function = X.GXxor,
            graphics_exposures = False,
            subwindow_mode = X.IncludeInferiors,
        )

        done    = False
        started = False
        start   = dict(x=0, y=0)
        end     = dict(x=0, y=0)
        last    = None
        drawlimit = 10
        i = 0

        while done == False:
            e = self.d.next_event()

            # Window has been destroyed, quit
            if e.type == X.DestroyNotify:
                sys.exit(0)

            # Mouse button press
            elif e.type == X.ButtonPress:
                # Left mouse button?
                if e.detail == 1:
                    start = dict(x=e.root_x, y=e.root_y)
                    started = True

                # Right mouse button?
                elif e.detail == 3:
                    sys.exit(0)

            # Mouse button release
            elif e.type == X.ButtonRelease:
                end = dict(x=e.root_x, y=e.root_y)
                if last:
                    self.draw_rectangle(start, last)
                done = True
                pass

            # Mouse movement
            elif e.type == X.MotionNotify and started:
                i = i + 1
                if i % drawlimit != 0:
                    continue

                if last:
                    self.draw_rectangle(start, last)
                    last = None

                last = dict(x=e.root_x, y=e.root_y)
                self.draw_rectangle(start, last)
                pass

            # Keyboard key
            elif e.type == X.KeyPress:
                sys.exit(0)

        self.d.flush()

        coords = self.get_coords(start, end)
        if coords['width'] <= 1 or coords['height'] <= 1:
            sys.exit(0)
        else:
            print "%d %d %d %d" % (coords['start']['x'], coords['start']['y'], coords['width'], coords['height'])

    def get_coords(self, start, end):
        safe_start = dict(x=0, y=0)
        safe_end   = dict(x=0, y=0)

        if start['x'] > end['x']:
            safe_start['x'] = end['x']
            safe_end['x']   = start['x']
        else:
            safe_start['x'] = start['x']
            safe_end['x']   = end['x']

        if start['y'] > end['y']:
            safe_start['y'] = end['y']
            safe_end['y']   = start['y']
        else:
            safe_start['y'] = start['y']
            safe_end['y']   = end['y']

        return {
            'start': {
                'x': safe_start['x'],
                'y': safe_start['y'],
            },
            'end': {
                'x': safe_end['x'],
                'y': safe_end['y'],
            },
            'width' : safe_end['x'] - safe_start['x'],
            'height': safe_end['y'] - safe_start['y'],
        }

    def draw_rectangle(self, start, end):
        coords = self.get_coords(start, end)
        self.window.rectangle(self.gc,
            coords['start']['x'],
            coords['start']['y'],
            coords['end']['x'] - coords['start']['x'],
            coords['end']['y'] - coords['start']['y']
        )


class Screenshot(QtGui.QWidget):
    def __init__(self):
        super(Screenshot, self).__init__()

        self.screenshotLabel = QtGui.QLabel()
        self.screenshotLabel.setSizePolicy(QtGui.QSizePolicy.Expanding,
                QtGui.QSizePolicy.Expanding)
        self.screenshotLabel.setAlignment(QtCore.Qt.AlignCenter)
        self.screenshotLabel.setMinimumSize(240, 160)

        self.createOptionsGroupBox()
        self.createButtonsLayout()

        mainLayout = QtGui.QVBoxLayout()
        mainLayout.addWidget(self.screenshotLabel)
        mainLayout.addWidget(self.optionsGroupBox)
        mainLayout.addLayout(self.buttonsLayout)
        self.setLayout(mainLayout)

        self.area = None
        self.shootScreen()
        self.delaySpinBox.setValue(1)

        self.setWindowTitle("Screenshot")
        self.resize(300, 200)

    def resizeEvent(self, event):
        scaledSize = self.originalPixmap.size()
        scaledSize.scale(self.screenshotLabel.size(), QtCore.Qt.KeepAspectRatio)
        if not self.screenshotLabel.pixmap() or scaledSize != self.screenshotLabel.pixmap().size():
            self.updateScreenshotLabel()

    def selectArea(self):
        self.hide()

        #print sys.argv[0]
        resArea = getoutput('python ./screenshot.py -A') #TODO horrible 1/2 !
        if resArea and resArea != '0 0 0 0':
            print resArea.split()
            self.area = xo, yo, x, y = resArea.split()
            self.areaLabel.setText("Area: x%s y%s to x%s y%s" % (xo, yo, x, y))
            self.shootScreen()
            # print 'OK', self.area #DEBUG
        elif self.area is not None:
            self.area = None
            self.areaLabel.setText("Area: fullscreen")
            self.shootScreen()

        self.show()

    def newScreenshot(self):
        if self.hideThisWindowCheckBox.isChecked():
            self.hide()
        self.newScreenshotButton.setDisabled(True)

        QtCore.QTimer.singleShot(self.delaySpinBox.value() * 1000, self.shootScreen)

    def saveScreenshot(self):
        format = 'png'
        initialPath = QtCore.QDir.currentPath() + "/untitled." + format

        fileName = QtGui.QFileDialog.getSaveFileName(self, "Save As",
                initialPath,
                "%s Files (*.%s);;All Files (*)" % (format.upper(), format))
        if fileName:
            self.originalPixmap.save(fileName, format)

    def shootScreen(self):
        if self.delaySpinBox.value() != 0:
            QtGui.qApp.beep()

        # Garbage collect any existing image first.
        self.originalPixmap = None
        self.originalPixmap = QtGui.QPixmap.grabWindow(QtGui.QApplication.desktop().winId())
        if self.area is not None:
            qi = self.originalPixmap.toImage()
            size = qi.size()
            qi = qi.copy(int(self.area[0]), int(self.area[1]), int(self.area[2]), int(self.area[3]))
            self.originalPixmap = None
            self.originalPixmap = QtGui.QPixmap.fromImage(qi)

        self.updateScreenshotLabel()

        self.newScreenshotButton.setDisabled(False)
        if self.hideThisWindowCheckBox.isChecked():
            self.show()

    def updateCheckBox(self):
        if self.delaySpinBox.value() == 0:
            self.hideThisWindowCheckBox.setDisabled(True)
        else:
            self.hideThisWindowCheckBox.setDisabled(False)

    def createOptionsGroupBox(self):
        self.optionsGroupBox = QtGui.QGroupBox("Options")

        self.delaySpinBox = QtGui.QSpinBox()
        self.delaySpinBox.setSuffix(" s")
        self.delaySpinBox.setMaximum(60)
        self.delaySpinBox.valueChanged.connect(self.updateCheckBox)

        self.delaySpinBoxLabel = QtGui.QLabel("Screenshot Delay:")

        self.hideThisWindowCheckBox = QtGui.QCheckBox("Hide This Window")
        self.hideThisWindowCheckBox.setChecked(True)
        
        self.areaLabel = QtGui.QLabel("Area: fullscreen")

        optionsGroupBoxLayout = QtGui.QGridLayout()
        optionsGroupBoxLayout.addWidget(self.delaySpinBoxLabel, 0, 0)
        optionsGroupBoxLayout.addWidget(self.delaySpinBox, 0, 1)
        optionsGroupBoxLayout.addWidget(self.hideThisWindowCheckBox, 1, 0)
        optionsGroupBoxLayout.addWidget(self.areaLabel, 1, 1)
        self.optionsGroupBox.setLayout(optionsGroupBoxLayout)

    def createButtonsLayout(self):
        self.selectAreaButton = self.createButton("Select Area",
                self.selectArea)

        self.newScreenshotButton = self.createButton("New Screenshot",
                self.newScreenshot)

        self.saveScreenshotButton = self.createButton("Save Screenshot",
                self.saveScreenshot)

        self.quitScreenshotButton = self.createButton("Quit", self.close)

        self.buttonsLayout = QtGui.QHBoxLayout()
        self.buttonsLayout.addStretch()
        self.buttonsLayout.addWidget(self.selectAreaButton)
        self.buttonsLayout.addWidget(self.newScreenshotButton)
        self.buttonsLayout.addWidget(self.saveScreenshotButton)
        self.buttonsLayout.addWidget(self.quitScreenshotButton)

    def createButton(self, text, member):
        button = QtGui.QPushButton(text)
        button.clicked.connect(member)
        return button

    def updateScreenshotLabel(self):
        self.screenshotLabel.setPixmap(self.originalPixmap.scaled(
                self.screenshotLabel.size(), QtCore.Qt.KeepAspectRatio,
                QtCore.Qt.SmoothTransformation))
... 19 more lines ...
Attachment 2: RFCanon.png
RFCanon.png
Attachment 3: RFSection.png
RFSection.png
  Draft   Tue Jun 11 12:25:21 2019 Entered by Falcoz Nicolas from 134.158.195.143 on Tue Jun 11 11:55:34 2019      
ELOG V3.1.4-395e101