Ejemplo n.º 1
0
 def __init__(self,
              name_pattern,
              directory,
              integration_time=5,
              transmission=0.5,
              insertion_timeout=2,
              position=None,
              photon_energy=None,
              flux=None,
              snapshot=False,
              zoom=None,
              analysis=None,
              display=False):
     
     xray_experiment.__init__(self, 
                             name_pattern, 
                             directory,
                             position=position,
                             photon_energy=photon_energy,
                             transmission=transmission,
                             flux=flux,
                             snapshot=snapshot,
                             zoom=zoom,
                             analysis=analysis)
     
     self.description = 'XRF spectrum, Proxima 2A, SOLEIL, %s' % time.ctime(self.timestamp)
     self.detector = fluorescence_detector()
     self.fast_shutter = fast_shutter()
     
     self.integration_time = integration_time
     self.transmission = transmission
     self.insertion_timeout = insertion_timeout
     self.display = display
Ejemplo n.º 2
0
    def __init__(
            self,
            name_pattern,
            directory,
            element,
            edge,
            scan_range=150,  #eV
            scan_speed=1,  #eV/s
            integration_time=0.25,
            total_time=60.,
            transmission=0.5,
            insertion_timeout=2,
            roi_width=250.,  #eV
            default_speed=0.5,
            position=None,
            photon_energy=None,
            flux=None,
            display=False,
            optimize=True,
            snapshot=False,
            zoom=None,
            diagnostic=True,
            analysis=True,
            conclusion=None,
            simulation=None):

        xray_experiment.__init__(self,
                                 name_pattern,
                                 directory,
                                 position=position,
                                 photon_energy=photon_energy,
                                 transmission=transmission,
                                 flux=flux,
                                 snapshot=snapshot,
                                 zoom=zoom,
                                 diagnostic=diagnostic,
                                 analysis=analysis,
                                 conclusion=conclusion,
                                 simulation=simulation)

        self.description = 'ESCAN, Proxima 2A, SOLEIL, element %s, edge %s, %s' % (
            element, edge, time.ctime(self.timestamp))
        self.element = element
        self.edge = edge
        self.scan_range = scan_range
        self.scan_speed = scan_speed
        self.integration_time = integration_time
        self.total_time = total_time
        self.insertion_timeout = insertion_timeout
        self.optimize = optimize
        self.display = display
        self.roi_width = roi_width
        self.default_speed = default_speed

        self.detector = detector()
        self.actuator = monochromator_rx_motor()

        self.monitor_names = ['mca'] + self.monitor_names
        self.monitors = [self.detector] + self.monitors
Ejemplo n.º 3
0
    def __init__(self,
                 name_pattern,
                 directory,
                 position=None,
                 photon_energy=None,
                 resolution=None,
                 detector_distance=None,
                 detector_vertical=None,
                 detector_horizontal=None,
                 transmission=None,
                 flux=None,
                 ntrigger=1,
                 snapshot=False,
                 zoom=None,
                 diagnostic=None,
                 analysis=None,
                 conclusion=None,
                 simulation=None):

        xray_experiment.__init__(self,
                                 name_pattern,
                                 directory,
                                 position=position,
                                 photon_energy=photon_energy,
                                 resolution=resolution,
                                 detector_distance=detector_distance,
                                 detector_vertical=detector_vertical,
                                 detector_horizontal=detector_horizontal,
                                 transmission=transmission,
                                 flux=flux,
                                 ntrigger=ntrigger,
                                 snapshot=snapshot,
                                 zoom=zoom,
                                 diagnostic=diagnostic,
                                 analysis=analysis,
                                 conclusion=conclusion,
                                 simulation=simulation)

        self.actuator = self.goniometer

        # Set resolution: detector_distance takes precedence
        # if neither specified, takes currect detector_distance

        if self.detector_distance == None and self.resolution == None:
            self.detector_distance = self.detector.position.ts.get_position()

        if self.detector_distance != None:
            self.resolution = self.resolution_motor.get_resolution_from_distance(
                self.detector_distance, wavelength=self.wavelength)
        elif self.resolution != None:
            self.detector_distance = self.resolution_motor.get_distance_from_resolution(
                self.resolution, wavelength=self.wavelength)
            print 'self.detector_distance calculated from resolution', self.detector_distance
        else:
            print 'There seem to be a problem with logic for detector distance determination. Please check'

        self.parameter_fields = self.parameter_fields.union(
            diffraction_experiment.specific_parameter_fields)
    def __init__(self,
                 name_pattern,
                 directory,
                 gap=8,
                 start_energy=5.e3,
                 end_energy=20.e3,
                 scan_speed=0.025,
                 default_speed=0.5,
                 darkcurrent_time=10.,
                 optimize=True,
                 transmission=None,
                 diagnostic=True,
                 analysis=None,
                 conclusion=None,
                 simulation=None,
                 display=False,
                 extract=False):

        xray_experiment.__init__(self,
                                 name_pattern,
                                 directory,
                                 transmission=transmission,
                                 diagnostic=diagnostic,
                                 analysis=analysis,
                                 conclusion=conclusion,
                                 simulation=simulation)

        self.description = 'Energy scan between %6.1f and %6.1f eV at gap=%5.2f mm, Proxima 2A, SOLEIL, %s' % (
            start_energy, end_energy, gap, time.ctime(self.timestamp))

        self.gap = gap
        self.start_energy = start_energy
        self.end_energy = end_energy
        self.scan_speed = scan_speed
        self.default_speed = default_speed
        self.darkcurrent_time = darkcurrent_time

        self.optimize = optimize
        self.transmission = transmission
        self.diagnostic = diagnostic
        self.display = display
        self.extract = extract

        self.calibrated_diode = Si_PIN_diode()

        self.monitors_dictionary['calibrated_diode'] = self.calibrated_diode

        self.monitor_names += ['calibrated_diode']
        self.monitors += [self.calibrated_diode]

        self.actuator = self.monochromator_rx_motor
Ejemplo n.º 5
0
 def __init__(self,
              name_pattern,
              directory,
              scan_range=360, 
              scan_exposure_time=72, 
              scan_start_angle=0, 
              angle_per_frame=0.2, 
              image_nr_start=1,
              position=None,
              photon_energy=None,
              resolution=None,
              detector_distance=137,
              detector_vertical=19.,
              detector_horizontal=21.3,
              transmission=None,
              flux=None,
              ntrigger=1,
              snapshot=False,
              zoom=None,
              analysis=None):
                  
     xray_experiment.__init__(self, 
                             name_pattern, 
                             directory,
                             position=position,
                             photon_energy=photon_energy,
                             resolution=resolution,
                             detector_distance=detector_distance,
                             detector_vertical=detector_vertical,
                             detector_horizontal=detector_horizontal,
                             transmission=transmission,
                             flux=flux,
                             ntrigger=ntrigger,
                             snapshot=snapshot,
                             zoom=zoom,
                             analysis=analysis)
      
     # Scan parameters
     self.scan_range = float(scan_range)
     self.scan_exposure_time = float(scan_exposure_time)
     self.scan_start_angle = float(scan_start_angle)
     self.angle_per_frame = float(angle_per_frame)
     self.image_nr_start = int(image_nr_start)
     self.position = self.goniometer.check_position(position)
     print 'self.position'
     print self.position
     self.detector = detector()
     
     self.images = None
     self.background = None
Ejemplo n.º 6
0
    def __init__(self,
                 name_pattern,
                 directory,
                 slits=1,
                 start_position=2.0,
                 end_position=-2.0,
                 scan_speed=None,
                 default_speed=None,
                 darkcurrent_time=5.,
                 photon_energy=None,
                 diagnostic=True,
                 analysis=None,
                 conclusion=None,
                 simulation=None,
                 display=False,
                 extract=False):

        xray_experiment.__init__(self,
                                 name_pattern,
                                 directory,
                                 photon_energy=photon_energy,
                                 diagnostic=diagnostic,
                                 analysis=analysis,
                                 conclusion=conclusion,
                                 simulation=simulation)

        self.description = 'Slits %d scan between %6.1f and %6.1f mm, Proxima 2A, SOLEIL, %s' % (
            slits, start_position, end_position, time.ctime(self.timestamp))

        self.start_position = start_position
        self.end_position = end_position
        self.scan_speed = scan_speed
        self.default_speed = default_speed
        self.darkcurrent_time = darkcurrent_time

        self.diagnostic = diagnostic
        self.display = display
        self.extract = extract

        self.calibrated_diode = Si_PIN_diode()

        self.monitors_dictionary['calibrated_diode'] = self.calibrated_diode

        self.monitor_names += ['calibrated_diode']
        self.monitors += [self.calibrated_diode]

        self.slits = slits
        self.slit_type = self.slit_types[slits]
        self.alignment_slits = getattr(self, 'slits%d' % slits)
Ejemplo n.º 7
0
 def __init__(self,
              name_pattern,
              directory,
              start_position=-0.8,
              end_position=0.,
              default_position=-0.4400,
              darkcurrent_time=5.,
              photon_energy=None,
              diagnostic=True,
              analysis=None,
              conclusion=None,
              simulation=None,
              display=False,
              extract=False):
              
     xray_experiment.__init__(self, 
                              name_pattern, 
                              directory,
                              photon_energy=photon_energy,
                              diagnostic=diagnostic,
                              analysis=analysis,
                              conclusion=conclusion,
                              simulation=simulation)
     
     self.description = 'Monochromator rocking curve. Scan between %6.1f and %6.1f mm, Proxima 2A, SOLEIL, %s' % (start_position, end_position, time.ctime(self.timestamp))
     
     self.start_position = start_position
     self.end_position = end_position
     self.default_position = default_position
     self.darkcurrent_time = darkcurrent_time
     
     self.diagnostic = diagnostic
     self.display = display
     self.extract = extract
     
     self.calibrated_diode = Si_PIN_diode()
     
     self.monitors_dictionary['calibrated_diode'] = self.calibrated_diode
     
     self.monitor_names += ['calibrated_diode']
     self.monitors += [self.calibrated_diode]
     
     self.actuator = monochromator_pitch_motor()
Ejemplo n.º 8
0
 def __init__(self,
              name_pattern,
              directory,
              start,
              end,
              default_position,
              darkcurrent_time=5.,
              photon_energy=None,
              diagnostic=True,
              analysis=None,
              conclusion=None,
              simulation=None,
              display=False,
              extract=False):
              
     xray_experiment.__init__(self, 
                              name_pattern, 
                              directory,
                              photon_energy=photon_energy,
                              diagnostic=diagnostic,
                              analysis=analysis,
                              conclusion=conclusion,
                              simulation=simulation)