Skip to content
Ivars Karpics edited this page Dec 8, 2016 · 4 revisions

=========== API

HardwareObject, Equipment

  • update_value(self): Re-emits all available signals. Method called from bricks to ensure gui update
  • isReady(self)
  • isConnected(self)
  • getState(self)
  • self.emit("stateChanged", self.state)

AbstractCollect

  • self.emit("collectReady", (False, ))
  • self.emit("collectConnected", (True,))
  • self.emit("collectStarted", (self.owner, 1))
  • self.emit("collectEnded", self.owner, failed_msg)
  • self.emit("collectOscillationStarted", (owner, None, None, None, self.current_dc_parameters, None))
  • self.emit("collectOscillationFailed", (owner, False, failed_msg, self.current_dc_parameters.get('collection_id'), 1))
  • self.emit("collectNumberOfFrames", number_images=0, exposure_time=0)
  • self.emit("collectImageTaken", frame)
  • self.emit("progressInit", ("Data collection", 100))
  • self.emit("progressStop", ())

AbstractDataAnalysis

AbstractDetector

  • get_distance(self): returns float
  • set_distance(self, float, wait=False)
  • get_distance_limits(self): returns (float, float)
  • get_exp_time_limits(self): returns (float, float)
  • set_roi_mode(self, int)
  • get_roi_mode(self): returns int
  • get_roi_modes(self): return list of str
  • get_beam_centre(self): return (float, float)
  • self.emit("distanceChanged", self.distance_value)
  • self.emit("roiModeChanged", self.roi_mode_value)

AbstractEnergySan

AbstractMCA

  • read_raw_data(self, chmin=0, chmax=4095, save_data=False): Read the raw data from chmin to chmax. Args: - chmin (int): channel number. - chmax (int): channel number. - save_data (bool): save the data. Return: list: Raw data.

  • read_roi_data(self, save_data=False): Read the data for the currently used predefined ROI. Args: - save_data (bool): save the data. Return: list: Raw data for the predefined ROI channels.

  • read_data(self, chmin, chmax, calib=False, save_data=False): Read the data. Args: - chmin (float): channel number or energy [keV] - chmax (float): channel number or energy [keV] - calib (bool): use calibration. - save_data (bool): save the data. Return: numpy.array. x - channels or energy (if calib=True), y - data.

  • set_calibration(self, fname=None, calib_cf=[0,1,0]): Set the energy calibration. Give a filename or a list of calibration factors. Args: - fname (str): optional filename with the calibration factors - calib_cf (list): optional list of calibration factors Return: list. Calibration factors. Raises: IOError, ValueError

  • get_calibration(self): Get the calibration factors list. Return: list. Calibration factors.

  • set_roi(self, emin, emax, **kwargs): Configure a ROI Args: - emin (float): energy [keV] or channel number - emax (float): energy [keV] or channel number Keyword Args: - element (str): element name as in periodic table - atomic_nb (int): element atomic number - channel (int): output connector channel number. Return: None Raises: KeyError

  • def get_roi(self, **kwargs): Get ROI settings Keyword Args: channel (int): output connector channel number. Return: dict. ROI dictionary.

  • def clear_roi(self, **kwargs): Clear ROI settings Keyword Args: channel (int): optional output connector channel number. Return: None

  • def get_times(self): Return a dictionary with the pre-set and elapsed real time [s], and if possible elapsed live time [s] and the dead time [%]. Return: dict. Times dictionary. Raises: RuntimeError

  • def get_presets(self, **kwargs): Get the preset parameters Keyword Args: - ctime (float): Real time - erange (int): energy range - name (str): filename where the data are stored - ... Return: dict. Raises: RuntimeError

  • def set_presets(self, **kwargs): Set presets parameters Keyword Args: - ctime (float): real time [s] - erange (int): the energy range - fname (str): file name (full path) to save the raw data Return: None

  • def start_acq (self, cnt_time=None): Start new acquisition. If cnt_time is not specified, counts for pre-set real time. Args: cnt_time (float, optional): count time [s]; 0 means to count indefinitely. Return: None

  • def stop_acq (self): Stop the running acquisition. Return: None

  • def clear_spectrum (self): Clear the acquired spectrum. Return: None

AbstractMotor

AbstractMultiCollect

AbstractXRFSpectrum

Aperture

  • get_diameter_mm(self): return float
  • get_diameter_index(self): return int
  • set_diameter_index(self, int)
  • set_diameter_size_mm(self, float)
  • get_diameter_size_list(self)
  • set_int(self)
  • set_out(self)
  • set_position(self, str)
  • get_position(self): returns str (in ,out, beam)
  • get_position_list(self)
  • self.emit('diameterChanged', self.diameter_index, self,diameter_size_mm)
  • self.emit('positionChanged', self.position)

BeamInfo

  • get_beam_position(self): returns (float, float)
  • set_beam_position(self, hor_position, ver_position)
  • get_beam_info(self): returns dict {"size_x": float, "size_y": float, "shape": str}
  • set_slits_gap(self, hor_gap=None, ver_gap=None)

Energy

  • get_current_energy(self): returns float
  • get_current_wavelength(self): returns float
  • get_energy_limits(self): returns (float, float), or (None, None)
  • get_wavelength_limits(self): returns (float, float) or (None, None)
  • move_energy(self, value, wait=False)
  • move_wavelength(self, value, wait=False)
  • abort(self)
  • can_move_energy(self): returns bool.
  • get_undulator_gaps(self): returns list with floats
  • self.emit("energyChanged", self.energy_value, self.wavelength_value)

GenericDiffractometer

GenericSampleChanger

ISPyBClient

MachineInfo

MicrodiffLight

MicrodiffMotor

MicrodiffZoom

Resolution

  • set_resolution(self, float)
  • get_resolution(self, float)
  • get_resolution_limits(self): returns (float, float)
  • abort(self)
  • self.emit("resolutionChanged", self.resolution_value)

Slits

  • get_step_size(self): returns float
  • get_hor_gap_limits(self): returns (float, float)
  • get_ver_gap_limits(self): returns (float, float)
  • get_gaps_mm(self): returns (float, float), hor and ver
  • set_gaps_mm(self, hor_gap=None, ver_gap=None)
  • get_gaps_limits_mm(self): returns (float, float)
  • stop(self)
  • self.emit('gapSizeChanged', float, float)

Transmission

  • get_transmission(self): returns float (0-100)
  • set_transmission(self, float):
  • self.emit("transmissionChanged", self.transmission_value)